WorldViz User Forum  

Go Back   WorldViz User Forum > Vizard

Reply
 
Thread Tools Rate Thread Display Modes
  #1  
Old 07-31-2007, 03:24 PM
mjabon mjabon is offline
Member
 
Join Date: Jul 2007
Posts: 63
Another color question

I have a question about coloring. I want to just make a purple box so I wrote this:

Code:
import viz

viz.go()

#set up view
viz.clearcolor(viz.SKYBLUE)	
view = viz.get(viz.MAIN_VIEWPOINT)
view.translate(0,0,-25)

#add box
box = viz.add('box.wrl')
box.scale(3,3,3)
box.translate(0,0,0)

#color box
box.color(viz.PURPLE)

The thing is, looking straight at the box it appears white. Only when I move around in the world and look at different angles does it appear purple. Why is this? I want the box to always look purple from all sides.
Reply With Quote
  #2  
Old 07-31-2007, 03:30 PM
farshizzo farshizzo is offline
WorldViz Team Member
 
Join Date: Mar 2003
Posts: 2,849
Hi,

It works fine for me here. Are you using the same box.wrl file that comes with Vizard or do you have your own box file?
Reply With Quote
  #3  
Old 07-31-2007, 03:41 PM
mjabon mjabon is offline
Member
 
Join Date: Jul 2007
Posts: 63
no, it's the built in one....
Reply With Quote
  #4  
Old 07-31-2007, 03:49 PM
farshizzo farshizzo is offline
WorldViz Team Member
 
Join Date: Mar 2003
Posts: 2,849
Hi,

I believe this might be a specular issue. Does adding the following command fix it:
Code:
box.specular(0,0,0)
The box.wrl file that comes with Vizard does not have any specular color, so your file might have been modified.
Reply With Quote
  #5  
Old 07-31-2007, 04:04 PM
mjabon mjabon is offline
Member
 
Join Date: Jul 2007
Posts: 63
oh sorry, actually I had another spurious one in the folder. Now it works
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:02 PM.


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