viz.COPY_SHARED_MATERIAL_HINT not working
1 Attachment(s)
Hi Jeff,
I've come across this very irritating issue of the viz.COPY_SHARED_MATERIAL_HINT command not working. I have a very simple model and have moved things around just in case, but the command fails to do what it's supposed to (create copies of the same material). Whenever I try to change alpha value of one node, the second one using the second material changes to. Weirdly enough, I've use this in other cases with no problem. I couldn't attach the model (bigger than 1MB) but here's the simple code: Code:
object = factory.add('models/blue_tanks.osgb') Thanks! |
I ran both of the following scripts with the attached model and it worked. Only the alpha of one sub-part was changed. Does it only happen when you parent the object to your factory model?
Here is the object loaded on it's own: Code:
import viz Code:
import viz |
Jeff,
sorry it wasn't clear, but as I said in my original post I could NOT attach the problematic model created (save as) from the Vizard Inspector. The zipped model is more than 1MB, which exceeds the forum's limitation. I've tried adding the model by itself as well and the problem persists. Something happened during the saving process and the shared_material command does not work. Let me know if I can send it some other way. Also, I'm not sure if the increase in size is normal (the 703KB file became 5.7MB as soon as I saved it with the Inspector). Thanks! |
Yes, you can upload it here. Please include both the original 3DS model and OSGB model saved out from Inspector. How did you create the attached OSGB model that does work?
|
Just uploaded (ref #1634110).
The original model was created using 3DS Max v12 and your osgb exporter plug-in. |
Did you also upload the original exported model? If not, can you upload that as well. The model 'oil_pump.osgb' has no textures saved with it while 'blue_tanks.osgb' does and their scenegraphs appear different.
|
The oil_pump.osgb is the original exported model. I just chose to save the textures as images to keep the file sizes low. I am sure this shouldn't affect the command. Also, I slightly altered the scenegraph of the blue_tanks model in my attempt to make the command work. I basically removed the 'OilDrop' node. You can Save as... yourself from the original to maintain the original structure.
If you believe the textures might affect anything during saving a copy, I uploaded them as a zip file (ref #1634470). |
The command works when saving out the model directly. What are the modifications you are wanting to make in Inspector before saving it out?
|
Yes, I noticed it only works with direct export. I'd like to delete some nodes and change some material. I don't have 3DS installed any more and try to avoid the hassle for these minor modifications. Is it possible? What does Inspector affect and the model does not behave properly with Vizard command(s)?
|
Thanks for finding this. It looks like there is an issue with the command when the scenegraph above the node is modified. This will be fixed in the next release.
|
You're welcome Jeff. I'm glad I could give back to WorldViz a little bit:)
I guess I'll have to bite the bullet and re-install 3DS until you fix this. |
If you have not, update to Vizard 5.6 which was recently released. The fix is included there.
|
All times are GMT -7. The time now is 05:32 PM. |
Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Copyright 2002-2023 WorldViz LLC