#1
|
|||
|
|||
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:
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. |
#2
|
|||
|
|||
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 |
#3
|
|||
|
|||
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? |
#4
|
|||
|
|||
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?
|
#5
|
|||
|
|||
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. |
#6
|
|||
|
|||
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 |
#7
|
|||
|
|||
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. |
#8
|
|||
|
|||
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.
|
#9
|
|||
|
|||
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] Code:
import test node1.translate(test.point1) node2.translate(test.point2) Code:
test = viz.addPoints('test.xml') node1.translate(test.point1) node2.translate(test.point2) |
Thread Tools | |
Display Modes | Rate This Thread |
|
|