Hi Farshid,
Same here, our application already determines texture units at runtime,
so I personally have no need for hard-coded units. Do you have any
suggestions for how the material description strings should be formatted?
Both your and Luca's suggestions are good, but I think I like Luca's
better, as it doesn't assume any ID number (yours has Type_0, Type_1,
... which seems to suggest a certain texture unit, but at the same time
you don't want hard-coded texture unit numbers, so you seem to
contradict yourself).
A few extra bytes to Luca's suggestion would add more clarity, for example:
Diffuse=<filename>, 100
Self_Illumination=<filename>, 80
Bump=<filename>, 100
I would suggest as you can see that we add the filename there, even if
the exported file might already have the relevant images loaded in the
graph. I can imagine a case where we might want the exported file to be
viewable on the fixed pipeline only (without normal maps etc.) and in
that case, we might strip all textures except the diffuse one, so having
the filename there, while not hurting anyone, preserves some hint that a
normal map was associated with that material.
BTW, a bump map is not a normal map (object-space vs tangent-space etc.)
so I think there should be a distinction there too.
BTW, where would you put those description strings? osg::Material? Or
osg::StateSet?
Thanks,
J-S
--
______________________________________________________
Jean-Sebastien Guay [email protected]
http://www.cm-labs.com/
http://whitestar02.dyndns-web.com/
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org