# Question about coloring and lightning

4 messages
Open this post in threaded view
|

## Question about coloring and lightning

 Hello Folk, I am new to OpenSCAD but I already love it! :D I have just a little problem with the coloring of objects. I made a cube and cut three cylinders out of it, for bearings. Now I tried to color out the bearing holes. I attached two screen shots. As you see, one side is not colored and has this fancy lightning so you can see the hole. The side I tried to color red, dosen't have that fancy lightning which makes it hard to see the hole correctly. I also tried to play with the alpha value - no changes at all. Can anybody help here? My code:  \$fn=200; height = 10; difference() { cube([50,50,50]); translate([25,25,-1]) cylinder(h=52, r=7); translate([25,25,-1]) cylinder(h=height, r=19); color([255,0,0,255]) translate([25,25,51-height]) cylinder(h=height, r=19); } Kind Regards, Joel Bodenmann 2012-08-22-104822_1440x900_scrot.png (116K) Download Attachment 2012-08-22-104834_1440x900_scrot.png (118K) Download Attachment
Open this post in threaded view
|

## Re: Question about coloring and lightning

 I think it is because you have used 255. Color values are 0 -1.0.On 22 August 2012 10:14, Joel Bodenmann wrote: Hello Folk, I am new to OpenSCAD but I already love it! :D I have just a little problem with the coloring of objects. I made a cube and cut three cylinders out of it, for bearings. Now I tried to color out the bearing holes. I attached two screen shots. As you see, one side is not colored and has this fancy lightning so you can see the hole. The side I tried to color red, dosen't have that fancy lightning which makes it hard to see the hole correctly. I also tried to play with the alpha value - no changes at all. Can anybody help here? My code:  \$fn=200; height = 10; difference() { cube([50,50,50]); translate([25,25,-1]) cylinder(h=52, r=7); translate([25,25,-1]) cylinder(h=height, r=19); color([255,0,0,255]) translate([25,25,51-height]) cylinder(h=height, r=19); } Kind Regards, Joel Bodenmann _______________________________________________ OpenSCAD mailing list [hidden email] http://rocklinux.net/mailman/listinfo/openscad http://openscad.org - https://flattr.com/thing/121566