WorldViz User Forum  

Go Back   WorldViz User Forum > Vizard

 
 
Thread Tools Rate Thread Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 05-28-2009, 06:06 AM
Joran Joran is offline
Member
 
Join Date: Jun 2006
Posts: 38
Send a message via Yahoo to Joran
Loading OSG models and orientation

Hello,

I have a question about orientation and loading OpenSceneGraph models.

It seems that the OSGExp that can be downloaded from the worldviz site exports the model rotated and calls the root of the scene __VIZARD_NODE__. When loading the model, it will show correctly in vizard, but as soon as you rename this Root node, it will load the model rotated.

I think this mechanism is used by Vizard to detect how the model is rotated. If it does not contain the __VIZARD_NODE__ root, it will applies a modifier so it is orientated correctly for use in Vizard.

I already have a lot of models exported with another exporter. When you just load up the model it works fine, but when you change the parent of child objects, the orientation goes wrong. Here is some example code:

Code:
scene = viz.add('data/testscene.ive')
target = scene.getChild('Test1')
target.parent(target.getParents()[0])
This piece of code rotates the Test1 child of testscene.ive. What I do is to attach the object back to the parent it already belonged to. This should not change anything in the orientation.

It this behavior a bug? Is there a workaround (without exporting all the models again)?

Greetings, Joran.
Reply With Quote
 

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

Similar Threads
Thread Thread Starter Forum Replies Last Post
Collision detection with specific models just alex Vizard 1 02-06-2009 11:02 AM


All times are GMT -7. The time now is 01:58 PM.


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