#1
|
|||
|
|||
Problem on adding OSG file
Hi,
I am a new user of Vizard and getting problem on importing OSG model into Vizard. The model was perpared using 3D MAX and exported to OSG format. It looks fine when using OSGViewer but with problem in both Vizard 2.5 or 3 Beta. I just try rotate the point of view to the model from left to right, it getting diffrent color from different view. Some point it shows red, just turning a little more, it will turn magenta or cyan. There is only small portion of it showing correct color, silver in color. I tried many options, like turning on/off lighting and etc, still no help. Could anyone help to have any suggestion. Attache 3 pictures on 3 different views. Thanks in advance. Felix. |
#2
|
|||
|
|||
Hi,
Does your model have any materials applied to it? After loading the model try changing the color to white just to see if the problem persists: Code:
model.color(viz.WHITE) |
#3
|
|||
|
|||
Thanks for prompt reply, farshizzo.
I tried your suggestion but still no good. I had you the model and py file to your email account. It is quick a large model, sorry. Felix. |
#4
|
|||
|
|||
Hi,
I looked at your file and experience the same problem here. The problem is that the color for most of the geometry in the model is undefined. This means that the geometry will inherit the color of the last rendered geometry. And depending on the viewpoint the last rendered geometry will change (due to culling), which causes the color to change. The reason it works with osgViewer is because osgViewer automatically optimizes all models that are loaded. The optimization seems to fix this problem. You can manually perform the optimization in Vizard using the following command: Code:
kob = viz.add('kob.osg') kob.optimize() Code:
kob = viz.add('kob.osg') kob.optimize() kob.save('kob.ive') |
#5
|
|||
|
|||
Wow, excellent. You gave me a great support on a right direction to solve the problem. Thanks for your fast and valuable help.
|
Thread Tools | |
Display Modes | Rate This Thread |
|
|