Hi,
I have used material, but it doesn't work and all of shapes are dark.
Below is my code :
Appearance appearance=new Appearance(); appearance.setColoringAttributes (new ColoringAttributes (new Color3f(2.0f, 1.0f, 3.5f),1)); appearance.setPolygonAttributes(polyAtt); Material mat=new
Saeed,
Perhaps you don't have a light source in your scene?
- John Wright
Starfire Research
Saeed Ansari wrote:
Hi,
I have used material, but it doesn't work and all of shapes are dark.
Below is my code :
Appearance appearance=new Appearance();
appearance.setColoringAttributes (new Coloring
in your code :
appearance.setColoringAttributes (new ColoringAttributes (new Color3f(2.0f,
1.0f, 3.5f),1));
in the documentation, about Color3f :
A three-element color value represented by single precision floating point
x,y,z values. The x,y,z values represent the red, green, and blue color
valu
Hi John,
I have used lighting as you see :
BoundingSphere bound=new BoundingSphere(new Point3d(0.0, 0.0, 0.0), 50 );
Color3f lightColor = new Color3f (1.0f, 1.0f, 1.0f); Vector3f light1Direction = new Vector3f (0.0f, 0.0f, 0.0f); DirectionalLight light1 = new DirectionalLight (ligh
Saeed,
Is your object within the bounds of the lights?
Your directional light has no direction! (0,0,0)!
The ambient light color of your objects is fairly dark (pure blue).
As Christophe pointed out your color values should be between 0 and 1.
- John Wright
Starfire Research
Saeed Ansari wrote:
Hi
Hi,
I have attached the source code that I have problem with.
Can you tell me what is the problem ?
Regards,
Saeed
Yahoo! Mail Mobile
Take Yahoo! Mail with you! Check email on your mobile phone.
===
To unsubsc
Hi,
I have attached the source code that I have problem with.
Can you tell me what is the problem ?
Regards,
Saeed
Do you Yahoo!?
Yahoo! Mail - Find what you need with new enhanced search. Learn more.
===
T
Saeed,
It's been a long time since I looked at light directions but my guess is
that your problem is that you have a flat object (all points have z = 0)
and your light is shining straight at the *edge* of your object not on
your object!
As a test just to make sure everything else is working try mak