WorldViz User Forum  

Go Back   WorldViz User Forum > Vizard

Reply
 
Thread Tools Rate Thread Display Modes
  #1  
Old 10-04-2006, 08:46 PM
felixchc felixchc is offline
Member
 
Join Date: Oct 2006
Posts: 6
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.
Attached Thumbnails
Click image for larger version

Name:	Left.JPG
Views:	472
Size:	45.6 KB
ID:	134   Click image for larger version

Name:	Middle.JPG
Views:	487
Size:	55.8 KB
ID:	135   Click image for larger version

Name:	Right.JPG
Views:	495
Size:	48.1 KB
ID:	136  
Reply With Quote
  #2  
Old 10-05-2006, 06:27 PM
farshizzo farshizzo is offline
WorldViz Team Member
 
Join Date: Mar 2003
Posts: 2,849
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)
I've never experienced this problem. Could you provide me with a sample model that recreates the problem? If you don't want to post your model on the forum then you can send it directly to me at lashkari@worldviz.com
Reply With Quote
  #3  
Old 10-05-2006, 08:59 PM
felixchc felixchc is offline
Member
 
Join Date: Oct 2006
Posts: 6
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.
Reply With Quote
  #4  
Old 10-06-2006, 09:07 AM
farshizzo farshizzo is offline
WorldViz Team Member
 
Join Date: Mar 2003
Posts: 2,849
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()
Also, when dealing with models this large that take a long time to load, I suggest converting it to the IVE format. It will load MUCH faster. You can create a script to convert your file:
Code:
kob = viz.add('kob.osg')
kob.optimize()
kob.save('kob.ive')
Now you can use the kob.ive file and save yourself a lot of time.
Reply With Quote
  #5  
Old 10-06-2006, 11:26 AM
felixchc felixchc is offline
Member
 
Join Date: Oct 2006
Posts: 6
Wow, excellent. You gave me a great support on a right direction to solve the problem. Thanks for your fast and valuable help.
Reply With Quote
Reply

Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -7. The time now is 07:46 PM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2019, vBulletin Solutions, Inc.
Copyright 2002-2018 WorldViz LLC