[Papervision3D] FOR TIM KNIP: Suggestion for Material handling in Collada and Max3DS
elbarto37 at yahoo.com
Wed Jul 8 06:14:32 PDT 2009
This is a suggestion for Tim, because I know he created and maintains the
Max3DS, Collada and DAE parser classes in PV3d.
I was working with the Max3DS.as class the other day and noticed that if I
didn't send it a materialsList in the constructor, it would create wireframe
materials for the model, But then throw away the references to those
wireframe materials. So, I couldn't do a replaceMaterialByName after the
model had loaded because the model's materialsList was empty.
I dug into the parser and found the problem - I tweaked the code so that the
Max3DS parser would add the new wireframe materials to the model's
materialsList. This allowed me to replace them later. The side benefit of
this is that I can load a model and not know anything about it's materials,
but retrieve a complete materialsList after it has finished loading and
replace the materials as needed.
Now, I am noticing that the Collada.as class has the same issue. If it can't
find the materials in the collada file, it creates wireframe materials and
then throws away the reference to those materials!
Anyway, I added an issue ticket on the papervision Google Code site about
the Max3DS parser, but I guess I would like to see this change made to all
of the model parsers. Unless, there is a reason why this change would be a
problem. Tim, can you shed any light on this?
View this message in context: http://www.nabble.com/FOR-TIM-KNIP%3A-Suggestion-for-Material-handling-in-Collada-and-Max3DS-tp24391302p24391302.html
Sent from the Papervision3D mailing list archive at Nabble.com.
More information about the Papervision3D