WorldViz User Forum  

Go Back   WorldViz User Forum > Vizard

Reply
 
Thread Tools Rate Thread Display Modes
  #1  
Old 11-20-2012, 03:33 AM
pankaj bansal pankaj bansal is offline
Member
 
Join Date: Nov 2012
Posts: 14
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
Reply With Quote
  #2  
Old 11-20-2012, 12:59 PM
Jeff Jeff is offline
WorldViz Team Member
 
Join Date: Aug 2008
Posts: 2,471
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.
Reply With Quote
  #3  
Old 11-20-2012, 11:01 PM
pankaj bansal pankaj bansal is offline
Member
 
Join Date: Nov 2012
Posts: 14
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
Reply With Quote
  #4  
Old 11-20-2012, 11:37 PM
pankaj bansal pankaj bansal is offline
Member
 
Join Date: Nov 2012
Posts: 14
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
Reply With Quote
  #5  
Old 11-21-2012, 10:24 AM
Jeff Jeff is offline
WorldViz Team Member
 
Join Date: Aug 2008
Posts: 2,471
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.
Reply With Quote
  #6  
Old 12-11-2012, 02:54 PM
Jeff Jeff is offline
WorldViz Team Member
 
Join Date: Aug 2008
Posts: 2,471
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')

Last edited by Jeff; 12-11-2012 at 02:59 PM.
Reply With Quote
  #7  
Old 12-29-2012, 08:47 AM
asdf asdf is offline
Member
 
Join Date: Sep 2012
Posts: 6
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()
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

Similar Threads
Thread Thread Starter Forum Replies Last Post
Vizard 4 Beta Testing farshizzo Announcements 0 02-01-2011 10:46 AM
Vizard 4 Beta Testing farshizzo Vizard 0 02-01-2011 10:46 AM
Vizard tech tip: Using the Python Imaging Library (PIL) Jeff Vizard 0 03-23-2009 11:13 AM
problem with exporting avatars and using them in Vizard VDong Vizard 2 02-23-2009 01:25 AM
Exporting from Maya to Vizard jfreeman Vizard 2 06-30-2005 02:14 PM


All times are GMT -7. The time now is 12:56 PM.


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