Hi Luca, On Mon, May 16, 2011 at 3:39 PM, Luca Vezzadini <[email protected]>wrote: > > About the "texture unit <-> map type" mapping, is that something that you > really need on a per-material basis or is it more of a global definition for > you whole file? I would say it's more a global thing. If so, we could have > in the export dialog a choice between the predefined (hardcoded) mapping - > like the one I was suggesting in the previous post - or a custom one (to be > defined in some way still to be decided...). Then you may write it as a > description string for every material (but if you do all materials will have > the same string I guess). > Of course the description string is still a great idea for everything that > is specific to a given material instance (like the blend values you were > mentioning). As this is fully Max-specific, the syntax to use could rely on > Max definitions; for example, use the texture type IDs from the Max SDK to > indicate the blend amount ("ID_DI=0.7") and leave it up to the end-user code > to do whatever it needs with that. >
I don't really see the need for per-material texture unit mappings, having the mapping be global seem reasonable enough. My main concern was whether this mapping would be hard-coded or if it should be customizable. Making it customizable requires a lot more interface related coding, which is not very fun ;) Either way, I'd like to first add the description string support for the material map data. If we can come up with reasonable format, I could probably add this within the next few days. What do you feel about the following example? # osgmaxexp texture maps MapUnits=0,1,5 MapTypes=Diffuse,Self-Illumination,Bump MapBlendAmounts=100,80,100 Another option would be having each map definition on its own line: # osgmaxexp texture maps Type_0=Diffuse Type_1=Self-Illumination Type_5=Bump BlendAmount_0=100 BlendAmount_1=80 BlendAmount_5=100 I was thinking of an xml-based description format, but that might be overkill and require more coding work to parse. Cheers, Farshid
_______________________________________________ osg-users mailing list [email protected] http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

