WorldViz User Forum

WorldViz User Forum (https://forum.worldviz.com/index.php)
-   Vizard (https://forum.worldviz.com/forumdisplay.php?f=17)
-   -   Another color question (https://forum.worldviz.com/showthread.php?t=1166)

mjabon 07-31-2007 02:24 PM

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.

farshizzo 07-31-2007 02:30 PM

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?

mjabon 07-31-2007 02:41 PM

no, it's the built in one....

farshizzo 07-31-2007 02:49 PM

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.

mjabon 07-31-2007 03:04 PM

oh sorry, actually I had another spurious one in the folder. Now it works


All times are GMT -7. The time now is 01:14 AM.

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