Hi Farshid,
I gave it a try, the description lines are there. I just see a minor issue: you
did not add the MaterialData.{h,cpp} to Cmake.
About the results, looks like what is there is fine! I'll do more testing in
the next days, trying to use the definitions in my shaders as well, and let you
know.
One more thing. it looks like you now have code to handle the normal maps also.
But I think there is still no way to know if you were using a bump or a normal
map for the Bump channel. While in Max there is a clear distinction (different
texture types there), the exporter does not distinguish them. Look at this
example:
"# osgmaxexp material data
Name TestMat
Map Diffuse 0 1 images\\casaterr_02.tga
Map Specular Level 1 1 images\\testRefMap.tga
Map Bump 2 0.5 images\\casaterr_01norm.tga
"
"# osgmaxexp material data
Name TestMat2
Map Bump 0 0.3 images\\casaterr_01norm.tga
"
The testMat2 is using the tx directly as a bitmap, while TestMap first has a
NormalMap texture, then the bitmap. In the output they look totally equivalent
though. Looking at the code, it seems that you treat them as separate cases:
so, what about adding an extra field at the end of TestMap to indicate it's a
normal map? The field could actually be even smarter and indicate the active
texture space (tangent, screen, ...).
Great work anyway, really thanks for this.
Luca
------------------
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=39530#39530
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org