[x3d-public] TwoSidedTexture node

Michalis Kamburelis michalis.kambi at gmail.com
Sat Nov 4 13:23:13 PDT 2017


2017-11-04 13:39 GMT+01:00 Andreas Plesch <andreasplesch at gmail.com>:
> Another initial, minor question is how is TwoSidedMaterial expected to
> interact with solid='true' surfaces ? Presumably by not using the
> backMaterial but since solid='true' is the default another option is
> that TwoSidedMaterial always implies solid='false'. After all, this is
> surely what the author intended as she could have used a regular
> Material otherwise. I could not find that resolved in the spec.

My current understanding is that TwoSidedMaterial does *not* imply
solid=FALSE. Since the specification doesn't say anything about it,
then there's no automatic connection between "TwoSidedMaterial"
existence and "solid" value.

In my head, this is good, as we have two independent functionalities
controlled by two independent things:

1. "solid" says whether the object is visible or not from the back
side (i.e. whether to use "backface culling")

2. TwoSidedMaterial (or lack or if it) says if the object interacts
with lighting differently when viewed from the back side.

This feels clean to me. It's the responsibility of the 3D authoring
tool to suggest that "hey, if you have TwoSidedMaterial, than maybe
you want to use solid=FALSE". It is *not* the responsibility of the
X3D standard (or X3D implementations) to hardcode such connection
between TwoSidedMaterial and "solid".

Otherwise, mixing these two things would complicate the specification
and logic, you would need to say that "backface culling is used if
solid = FALSE *or* some TwoSidedMaterial is present". How to turn on
the backface culling then? You will need to set solid = TRUE *and*
remove any TwoSidedMaterial nodes. It seems simple on paper, but I'm
afraid that such rule would be a source of bugs/inconsistencies
between implementations.

This is just my "feeling" (not some definite mathematical proof) that
"TwoSidedMaterial existence" and "backface culling (solid value)"
should not interact with each other. In the end, I would be fine with
any behavior, as long as clearly articulated in the X3D spec :)

Regards,
Michalis



More information about the x3d-public mailing list