Firstly, I was unsure where to actually make this thread as it really doesn't seem to fit in any of the forum categories so if a mod thinks it should go in another forum, I am sorry!
While writing my 3dsmax model export script I had a problem in the beginning with materials and them not showing up properly in the editor. It took me a while, and some searching through the material object files to realize that all the textures that didn't show up properly were using static.mat as their material, and that static.mat requires two sets of texture coordinates to actually render something useful. That was fine, I just made all my created mao files use prop.mat instead as it only uses one set, however now I wish to add in the ability to use a material object using static.mat as its material.
I looked a bit harder and found that all maos which use static.mat define a lightmap texture. Infact, all the ones I have looked at reference the SAME lightmap texture, LM.dds. I thought, ok lets go look at lm.dds, but its not in the texture files like every other referenced texture I have tried to find. Another interesting thing I have found is that only maos prefixed with plc_ use the static material it seems, and that static.mat seems the be the only material which requires two texture coord sets. This leads me to believe that the lightmap texture is used for some purpose in the light mapping process in an area.
However, I don't really need to know what its for, only how the texture coordinates are generated for it as those are stored in the msh and without them any static.mat based mao will fail to show up. Are (were) they generated on export or were they mapped by hand, and what process was used in either case? If it is the former case I would expect only the guy who wrote the export tool to really be able to answer me, but if it's the latter an answer might be a bit more forthcoming. The reason I am asking is because I have only ever heard of lightmapping be used on a static object and only when its environment and lighting setup are known beforehand.
Static.mat and LM.dds
Débuté par
ChewyGumball
, nov. 27 2009 02:56
#1
Posté 27 novembre 2009 - 02:56
#2
Posté 27 novembre 2009 - 09:56
Perhaps, the LM.dds is a sort of dummy resource and the light are begin generated by a black image throught shader with one offset scale.
Modifié par IKe0s, 27 novembre 2009 - 09:56 .
#3
Posté 28 novembre 2009 - 01:31
Those were my thoughts about LM.dds, however the uvs are not just offset, they seem to be a completely different map with no correlation to the first. Of course there might be a patter but we are talking about long lists (1000+) of coords and me just looking at them in notepad++, not doing algorithmic analysis.
#4
Posté 30 novembre 2009 - 09:39
Still have had no luck figuring it out. Post thanksgiving bumpage.





Retour en haut






