WorldViz User Forum

WorldViz User Forum (https://forum.worldviz.com/index.php)
-   Vizard (https://forum.worldviz.com/forumdisplay.php?f=17)
-   -   Ideas for Vizard support in OSGExp (https://forum.worldviz.com/showthread.php?t=635)

Joran 06-29-2006 05:20 AM

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.

Gladsomebeast 06-29-2006 11:58 AM

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 .getchild() and get their orientations and positions. Would that provide the functionality you are looking for?

Joran 06-30-2006 01:12 AM

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?

tobin 07-05-2006 12:56 PM

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?

Joran 07-06-2006 12:44 AM

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.

Gladsomebeast 07-06-2006 09:41 AM

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.

Joran 07-06-2006 11:45 AM

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.

tobin 07-18-2006 09:30 PM

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.

farshizzo 08-01-2006 09:39 AM

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.


All times are GMT -7. The time now is 04:48 PM.

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