WorldViz User Forum  

Go Back   WorldViz User Forum > Vizard

Reply
 
Thread Tools Rate Thread Display Modes
  #1  
Old 06-29-2006, 05:20 AM
Joran Joran is offline
Member
 
Join Date: Jun 2006
Posts: 38
Send a message via Yahoo to Joran
Lightbulb Ideas for Vizard support in OSGExp

Hello,

I was thinking about adding some options to OSGExp (The osg exporter for 3ds max) especially for vizard. I am just starting to learn Vizard, so I am not sure if these options would be needed. My current ideas are:
  • Export point helpers to a python script.
  • Export camera positions and orientations to a python script.

I am thinking to create for a file called test.osg also a test.py that contains the data mentioned above. By including this file in your script, you will have access to the point helpers and camera's that where defined in the Max file.

What do you think? Is this useful?

Another idea is to export this information to an general file format, like xml. Maybe that is an better idea, that way it is more general.

Any suggestions are welcome.

Greetings, Joran.
Reply With Quote
  #2  
Old 06-29-2006, 11:58 AM
Gladsomebeast Gladsomebeast is offline
Member
 
Join Date: Mar 2005
Location: Isla Vizta, CA
Posts: 397
How about adding invisible objects to your Max scene in place of the cameras and helper points? You can then access them in Vizard by calling <VizNode>.getchild() and get their orientations and positions. Would that provide the functionality you are looking for?
__________________
Paul Elliott
WorldViz LLC
Reply With Quote
  #3  
Old 06-30-2006, 01:12 AM
Joran Joran is offline
Member
 
Join Date: Jun 2006
Posts: 38
Send a message via Yahoo to Joran
If I know the name of the camera, I can get it using getChild() in Vizard. But if I want a list of all defined camera's, I don't know how to get them. Any suggestions?

This is the same for the point helpers. I can find one named point helper, but how to get all point helpers?
Reply With Quote
  #4  
Old 07-05-2006, 12:56 PM
tobin tobin is offline
WorldViz Team Member
 
Join Date: Feb 2003
Posts: 251
This is definitely an effort the some of the developers at WorldViz would be interested in supporting. Can you explain some of the rationale behind what your suggesting? I'm not sure I get why you're wanting to access point helpers?
Reply With Quote
  #5  
Old 07-06-2006, 12:44 AM
Joran Joran is offline
Member
 
Join Date: Jun 2006
Posts: 38
Send a message via Yahoo to Joran
I have a project in witch we generate a lot of random trees on the places point helpers are created. The point helpers are in different groups like: BIG_TREES and SMALL_TREES. Then for big trees are defined with height 15 +/- 5 meters, and a collection of possible trees images. Then you can use a script to really create those images. I used it to create billboard trees. In my project I also created a view for the trees seen from above.

But I am sure there are a lot of other uses, like marking waypoints for avatars. Or marking chimneys where at certain moments a smoke particle system should be created.
Reply With Quote
  #6  
Old 07-06-2006, 09:41 AM
Gladsomebeast Gladsomebeast is offline
Member
 
Join Date: Mar 2005
Location: Isla Vizta, CA
Posts: 397
Would putting invisible objects in the Max scene in place of the point helpers work for you? What characteristics do "point helpers" have that scene objects do not?

The invisible objects could have a naming convention allowing you to identify if they are BIG_TREES or SMALL_TREES and iterate through them with getChild() calls. You could name the objects big_tree1, big_tree2, big_tree3 and small_tree1, small_tree2, etc.
__________________
Paul Elliott
WorldViz LLC
Reply With Quote
  #7  
Old 07-06-2006, 11:45 AM
Joran Joran is offline
Member
 
Join Date: Jun 2006
Posts: 38
Send a message via Yahoo to Joran
I guess that will work. It only feels a bit like a workaround. I am not talking about a problem I have. I am just thinking about how to make things work better. I already use this system in software I have directly written on top of OpenSceneGraph, and it works well.

I think it would be nice to have that info in a directly accessible way.
Reply With Quote
  #8  
Old 07-18-2006, 09:30 PM
tobin tobin is offline
WorldViz Team Member
 
Join Date: Feb 2003
Posts: 251
Thanks for the explanation. I would definitely be a useful feature and so I'll we'll explore on our end what is necessary and what might needs modifying in osgExp.
Reply With Quote
  #9  
Old 08-01-2006, 09:39 AM
farshizzo farshizzo is offline
WorldViz Team Member
 
Join Date: Mar 2003
Posts: 2,849
Exporting the positions to a python file would definitely be the easiest way to access them. Would the exporter allow you to name the points? If so then it seems like all you have to do is generate a python script that declares global variables containing the points. Example:
Code:
#test.py
point1 = [0,1,0]
point2 = [2,0,0]
Then your script would access them as follows:
Code:
import test
node1.translate(test.point1)
node2.translate(test.point2)
I agree with you that this solution is not very portable. If you decide to go the xml route, I can supply you with some sample python code that can parse xml files. This way you can create a vizard plugin that allows you to add the xml files like so:
Code:
test = viz.addPoints('test.xml')
node1.translate(test.point1)
node2.translate(test.point2)
Either of these seem like usefull features, so let me know if you need help implementing them.
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 03:18 AM.


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