WorldViz User Forum  

Go Back   WorldViz User Forum > Vizard

Reply
 
Thread Tools Rate Thread Display Modes
  #1  
Old 09-10-2013, 08:57 AM
torbeng torbeng is offline
Member
 
Join Date: Apr 2012
Posts: 11
The only solution to work around this problem I found so far is to save every group to an individual file. However, this introduces some problems. If I use the significantly faster OSGb format, the textures are all duplicated and the GPU memory consumption rises. As I cannot tell Vizard not to embed textures when saving as OSGb, I have to use the OSG format - the city model I used, split into individual blocks, is about 6GB - models only, which takes a while to load. If there is any way to get Vizard to understand that textures in two files are identical to save GPU memory, that would solve some of the issues.
Reply With Quote
  #2  
Old 09-11-2013, 02:23 PM
farshizzo farshizzo is offline
WorldViz Team Member
 
Join Date: Mar 2003
Posts: 2,849
There is an undocumented plugin that allows changing the name of underlying scene graph nodes. Here is sample code showing how to name groups nodes using it:
Code:
# Load extension
osg = viz.add('SceneGraphTools.dle')

# Set name of group node
group = viz.addGroup()
osg.getRootNode(group).setName('MyGroup')
Regarding saving out OSGB files with images, you can use the following options to have it save the images to file or reference existing image files:
Code:
"""
OSGB options:

WriteImageHint=<hint>
	IncludeData - embed image data
	IncludeFile - embed image file
	UseExternal - reference existing external file
	WriteOut -writes image to external file
"""
viz.res.setFileLoaderOption('WriteImageHint=IncludeData')
model.save('model.osgb')
Reply With Quote
  #3  
Old 09-12-2013, 03:36 AM
torbeng torbeng is offline
Member
 
Join Date: Apr 2012
Posts: 11
Thanks, that solved it for me!
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 08:28 AM.


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