Welcome!

Join our community of MMO enthusiasts and game developers! By registering, you'll gain access to discussions on the latest developments in MMO server files and collaborate with like-minded individuals. Join us today and unlock the potential of MMO server development!

Join Today!

[C++] How to remove or skip Map shadow (for custom map)

Newbie Spellweaver
Joined
Feb 2, 2015
Messages
77
Reaction score
53
for who don't know what that map shadow meaning. just skip this topic.


few days ago. i just found some ace video. that server have custom map. but still have map shadow from original map that they clone. so i will give a guide to fix that poop.

how this happen?
when you clone dat. map that have shadow layer without remove.
your new map will render that shadow and make your map look glitch.



there have 2 solution here. just pick one
1. create some app that can read dat structure then clean VERTEXINFO->nor from structure.
2. skip map shadow render on client soruce.

ProjectAtum\main\Background.cpp inside HRESULT CBackground::InitDeviceObjects()
Code:
        memcpy(&m_pTileVertexArray[i], p, sizeof(VERTEXINFO));
        [COLOR=#ff0000][B]m_pTileVertexArray[i].nor = D3DXVECTOR3(0.0f,1.0f,0.0f); // Add this line
[/B][/COLOR]        p += sizeof(VERTEXINFO);
 
Joined
Apr 12, 2013
Messages
897
Reaction score
480
After getting a little hint from Future it's not really a good idea to just simple zero out the vector, since it's a normal vector and that assumes that the terrain is completely flat.
Check for more info on normal vectors. The proper way to do it is to calculate them accordingly to your terrain mesh.
You can do this during runtime or in your toolset (mapeditor) when saving the map.

IvQlCFf - [C++] How to remove or skip Map shadow (for custom map) - RaGEZONE Forums


Unity as an example provides a method to get the normal vector so it's quite easy to use.
 

Attachments

You must be registered for see attachments list
Newbie Spellweaver
Joined
Feb 2, 2015
Messages
77
Reaction score
53
After getting a little hint from @Future it's not really a good idea to just simple zero out the vector, since it's a normal vector and that assumes that the terrain is completely flat.
Check for more info on normal vectors. The proper way to do it is to calculate them accordingly to your terrain mesh.
You can do this during runtime or in your toolset (mapeditor) when saving the map.

IvQlCFf - [C++] How to remove or skip Map shadow (for custom map) - RaGEZONE Forums


Unity as an example provides a method to get the normal vector so it's quite easy to use.


thank for the hint,
on the first that i found shadow vertex issue. i have no idea what nor work. but i try to check all nor vector. it seem to be store some vector every single map position x y. after i try to debug all nor. clean value seem to be 0,1,0
so that’s why i didn’t looking to deeper. it should be make a little effect. but i dont know what it was.
 

Attachments

You must be registered for see attachments list
Joined
Apr 12, 2013
Messages
897
Reaction score
480
In theory it's quite easy to understand, it's just an arrow pointing in a 90° angle from the surface.
But i failed vectors in school so i can't really provide more to this topic :D

Here a little graphical example:

72yR6GE - [C++] How to remove or skip Map shadow (for custom map) - RaGEZONE Forums
 

Attachments

You must be registered for see attachments list
Last edited:
Back
Top