[x3d-public] TwoSidedMaterial

Michalis Kamburelis michalis.kambi at gmail.com
Sun Feb 2 16:09:47 PST 2020


Don,

My sentence """TwoSidedMaterial with separateBackColor=false has
completely no purpose""" means that there's no reason for anyone using
TwoSidedMaterial with separateBackColor=FALSE (which is the default
value of this field). You can use "Material" instead.

IOW, using

"""
material Material { diffuseColor 1 0 0 }
"""

is 100%, always, precisely equivalent to using

"""
material TwoSidedMaterial { diffuseColor 1 0 0 }
"""

In a 100% conforming browser, this should give you the same results.

The "TwoSidedMaterial" specification sentences you cite merely say
that fields "backXxx" of TwoSidedMaterial are ignored when
separateBackColor = FALSE.

In case of "Material", also front and back sides have the same
parameters -- since "Material" doesn't have separate fields for front
and back colors.

The "solid" field documentation tells to do two-sided lighting in any
case: https://www.web3d.org/documents/specifications/19775-1/V3.3/Part01/components/rendering.html#CommonGeometryFields
.

Regards,
Michalis


niedz., 2 lut 2020 o 21:54 Don Brutzman <brutzman at nps.edu> napisał(a):
>
> Hmmm.  Perhaps this statement is taken out of context:
>
> On 1/21/2020 8:17 AM, Michalis Kamburelis wrote:
> >
> > And so, TwoSidedMaterial with separateBackColor=false has completely no purpose.
>
> but in general, spec seems to provide practical guidance:
>
> 12.4.6 TwoSidedMaterial
>
> "If the separateBackColor field is set to TRUE, the rendering shall render the front and back faces of the geometry with different values. If the value is FALSE, the front colours are used for both the front and back side of the polygon, as per the existing X3D lighting rules."
>
> all the best, Don
> --
> Don Brutzman  Naval Postgraduate School, Code USW/Br       brutzman at nps.edu
> Watkins 270,  MOVES Institute, Monterey CA 93943-5000 USA   +1.831.656.2149
> X3D graphics, virtual worlds, navy robotics http://faculty.nps.edu/brutzman



More information about the x3d-public mailing list