WorldViz User Forum  

Go Back   WorldViz User Forum > Vizard

Reply
 
Thread Tools Rate Thread Display Modes
  #1  
Old 12-21-2016, 06:07 AM
VizMars VizMars is offline
Member
 
Join Date: Jan 2016
Posts: 40
difference between cave and Inspector

Hello,

I am using the vizcave module to present objects stereoscopically. When I add my 3d-model (chessboard.OSGB) to the world it looks much brighter than the model I created. In the Inspector, however, it is displayed as expected.
Turning of the ambient light doesn't seem to fix the problem.
Why is that?

Please find attached the code, the screenshots and the model.

Code:
import viz
import vizcave

CAVE_WIDTH = 0.59773
CAVE_HEIGHT = 0.33622
DISTANCE = 0.70 


viz.setMultiSample(8)
viz.go(viz.FULLSCREEN)	
viz.clearcolor(0, 0, 0) 

PowerWall = vizcave.Wall( upperLeft=[-CAVE_WIDTH/2.0, CAVE_HEIGHT/2.0, 0], 
				     upperRight=[CAVE_WIDTH/2.0, CAVE_HEIGHT/2.0, 0], 
				     lowerLeft=[-CAVE_WIDTH/2.0, -CAVE_HEIGHT/2.0, 0], 
				     lowerRight=[CAVE_WIDTH/2.0, -CAVE_HEIGHT/2.0, 0] )
							
cave = vizcave.Cave()
cave.addWall(PowerWall)
# creates a dummy-tracker (a group object is an empty node)
head_tracker = viz.addGroup( pos=[0, 0, -DISTANCE] ) 
cave.setTracker(head_tracker)
vizcave.CaveView(head_tracker)

board = viz.add('chessboard.OSGB')
Attached Files
File Type: zip code+model+screenshots.zip (107.3 KB, 1303 views)
Reply With Quote
  #2  
Old 12-21-2016, 05:02 PM
Jeff Jeff is offline
WorldViz Team Member
 
Join Date: Aug 2008
Posts: 2,471
Try the following. Does this work the way you want in Vizard?

Code:
import viz
viz.go()	

viz.clearcolor(viz.SLATE)

import vizfx
board = vizfx.addChild('chessboard.OSGB')

# Disable ambient light 
vizfx.setAmbientColor(viz.BLACK)

import vizcam
vizcam.PivotNavigate(distance=1)
Reply With Quote
  #3  
Old 01-04-2017, 04:44 AM
VizMars VizMars is offline
Member
 
Join Date: Jan 2016
Posts: 40
Thanks, this works! What exactly is the difference between vizfx.addChild() and viz.add() ?
Reply With Quote
Reply

Tags
inspector, vizcave

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 04:03 AM.


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