Page 1 of 1

mirrors

Posted: Sat 12. Mar 2011, 07:51
by gpo
Has anybody created a mirror surface or object?

Is this what we need:

chapp.setAttribute(CommonAttributes.POLYGON_SHADER+"."+CommonAttributes.SPECULAR_EXPONENT, 22.1);
chapp.setAttribute(CommonAttributes.POLYGON_SHADER+"."+CommonAttributes.SPECULAR_COEFFICIENT, 1.0);
chapp.setAttribute(CommonAttributes.POLYGON_SHADER+"."+CommonAttributes.DIFFUSE_COEFFICIENT, 0.0);

or something like that?

Is there something else drastic needed to create a mirror?

gpo

Re: mirrors

Posted: Tue 15. Mar 2011, 21:05
by gunn
Most jReality backends don't do ray-tracing, for example, the JOGL backend doesn't. You can however create an impression of reflections using reflection maps. See this jReality tutorial for details. For a flat mirror, use a quadrilateral, and attach the reflection map to the appearance attached to the scene graph component containing the quadrilateral.