[x3d-public] Background static image and dds

Michalis Kamburelis michalis.kambi at gmail.com
Tue Aug 6 02:37:46 PDT 2019


Andreas Plesch <andreasplesch at gmail.com> wrote:
>
> I agree, a dedicated BackgroundImage node may be more appropriate rather than layering on top of Background. Sounds like a pretty obvious and straightforward spec. enhancement to me since all the functionality is already there, only in separate places. Thinking ahead, there would be need to be a rule of what to do when both Background and BackgroundImage are provided.

I think this is already governed by X3D specification about
X3DBackgroundNode and bindable nodes. The 1st X3DBackgroundNode in
file becomes the "current background on top of the stack", and user
can call set_bind to change it.

That's how existing Background,
TextureBackground work, and also (as far as I know) as InstantReality
extensions like SolidBackground, ImageBackground, GradientBackground
work ( http://doc.instantreality.org/documentation/nodetype/SolidBackground/#
, http://doc.instantreality.org/documentation/nodetype/ImageBackground/#
, http://doc.instantreality.org/documentation/nodetype/GradientBackground/#
).

>
> The simple feature A) of just having static, fixed image as a backdrop is also very useful. Here is an example:
>
> https://codepen.io/anon/pen/ZgXPVq?editors=1000
>

Indeed, this is useful.

Looking at InstantReality extensions, it already has ImageBackground (
http://doc.instantreality.org/documentation/nodetype/ImageBackground/
) with a simple field "texture" of texture of SFNode. This is what I
imagined earlier as "BackgroundImage" :)

So:

- ImageBackground seems like a cleaner way to provide a single 2D
image, that would be static in the background.

     Why did X3DOM decided to "overuse" Background node (specially
treating the case when only backUrl is filled) instead of supporting
ImageBackground from InstantReality? Was it just an omission, or does
ImageBackground have other meaning than I think?

- ImageBackground also seems like a natural node that could take a
cubemap in "texture" field. So if you place a cubemap in
ImageBackground, you can get the same functionality as current
Background node. ImageBackground.texture could be ImageCubeMapTexture
node (with DDS or KTX), ComposedCubeMapTexture (6 images) etc.

Best regards,
Michalis



More information about the x3d-public mailing list