WorldViz User Forum

WorldViz User Forum (https://forum.worldviz.com/index.php)
-   Vizard (https://forum.worldviz.com/forumdisplay.php?f=17)
-   -   Exporting the vizard full scene (https://forum.worldviz.com/showthread.php?t=4418)

pankaj bansal 11-20-2012 03:33 AM

Exporting the vizard full scene
 
Hii
I am new to vizard. I want to ask If it is possible to export the whole vizard scene as a osg file tyoe like .ive or .osg.
I want to show the vizard scene on web and for that i will use OSG JS but for that i need the whole world in osg format. So plz tell me if that is possible

Regards
Pankaj Bansal

Jeff 11-20-2012 12:59 PM

Vizard will load OSG models but does not export them. We support a workflow through 3ds Max and you can download the OSG exporter for Max from our downloads page.

pankaj bansal 11-20-2012 11:01 PM

jeff

thanks for replying... I want to know is it possible to export the final visualization of vizard meaning the final world. Is it possible to save it in any format. Is there any method to show the vizard world in web.

regards
Pankaj

pankaj bansal 11-20-2012 11:37 PM

jeff

Sorry for last reply.. now i know i can publish it as '.exe' .
But i still have to export it to web. Do you know if there is a method to do that. How can i show the vizard world on web.

Regards
Pankaj

Jeff 11-21-2012 10:24 AM

There is currently no way to export the scene to view on the web. You can use the vizhtml module to communicate between Vizard and a web browser. For an example script take a look at htmlWebSocket.py in the examples->html folder.

Jeff 12-11-2012 02:54 PM

A correction to my earlier post about exporting objects to osg. It is possible to use the node3D.save command for saving objects in the osg format. To save the whole scene with multiple objects as one model file, parent all objects to a single node before saving. However, this will not work with avatar files. Here's an example:
Code:

import viz
viz.go()

scene = viz.addGroup()

dojo = viz.addChild('dojo.osgb',parent=scene)
soccerball = viz.addChild('soccerball.osgb',parent=scene,pos=[-0.5,2,1.5])
basketball = viz.addChild('basketball.osgb',parent=scene,pos=[0,2,1.5])
volleyball = viz.addChild('volleyball.osgb',parent=scene,pos=[0.5,2,1.5])

scene.save('dojo2.osgb')


asdf 12-29-2012 08:47 AM

Hi,
what is the best way to get the same state after importing a scene?

I made an example similar to "Tutorial: Hierarchical Models".
In the first run the level is exported, after that the EXPORT should be changed to False. The print output differs although I import the same level I just exported.

Additionally I'm not sure how to get a child Node.
I want to access one of the Nodes that are mentioned in the "print scene.getNodeNames()" in the line that is commented out, but don't know how.

Code:

import viz

viz.clearcolor(viz.SKYBLUE)
viz.MainView.setPosition([0,1.8,-10])

EXPORT = True

if(EXPORT):
        scene = viz.addGroup()

        viz.addChild('ground_grass.osgb', parent = scene)
        carousel = viz.addChild('carousel.wrl', parent = scene)
        pole1 = viz.addChild('pole.wrl',parent=carousel)
        pole1.setPosition([2.5,0,0])
        horse1 = viz.addChild('horse.wrl',parent=pole1)

        print scene.getNodeNames()
        print scene.getChildren()
        #print scene.getChild('???')

        scene.save('example.osgb')
else:
        scene = viz.add('example.osgb')

        print scene.getNodeNames()
        print scene.getChildren()

viz.go()



All times are GMT -7. The time now is 03:13 PM.

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