|
From: Scott D. D. <Sco...@Ac...> - 2009-08-15 17:36:49
|
marco bittelli wrote:
> I am starting to use Python and Visualpython. I am running the first simple
> program with a 3D animation of a red ball bouncing on a blue floor. I
> installed
>
> Visual 5.11 released for Windows and Python 2.6. The colors are not showing
> well on the screen. For instance both the ball and the floor are dark blue.
The human eye is not great with pure blue. You could make it a paler
blue by using a less monochrome color. For example, you could simply go
from a pure blue RGB (0.0, 0.0, 1.0) to increasing the "lightness" by
adding a balanced amount of red and green (for example (.4, .4, 1.0)),
or even pump up green since we are so good at seeing green: (.4, .6, 1).
so, rather than "blue" in the demo, use one of these triples.
It may also be your lighting. You could turn up the ambient some,
(scene.ambient = .4, rather than the .2 default) for example, or add
lights. I think the default lighting has a "hole" from one direction,
are you looking at the dark side of the demo?
to fiddle with all of this, do something simple:
import visual as vp
s = vp.sphere() # make a sphere (default color is white)
s.color = (.5, .6, .7) # try painting the sphere a new color
vp.scene.ambient # see ambient lighting (note it is colored light)
vp.scene.ambient = .4 # Set ambient to an intensity of white
t = vp.sphere(pos=(3,2,1), color=(1,.6,.4)) # create another sphere
--Scott David Daniels
Sco...@Ac...
|