[X3D-Public] is MultiTexture for 3D textures as well as 2D textures?

Dirk Schulz ds at dssd-42.com
Wed Aug 3 03:03:10 PDT 2011


Hi Don,
 the MultiTexture node is a container for any kind of Texture(2D, 3D, Cube).

The mapping is done by X3DTextureCoordinateNode in the Shape's geometry.
The author is responsible to provide the matching X3DTextureCoordinateNode in
MultiTextureCoordinate.

If you want to mix 2D and 3D you should use something like:

- Shape
  - Appearance
     - MultiTexture
       - ImageTexture3D
       - ImageTexture
  - IndexedFaceSet
    - Coordinate
    - MultiTextureCoordinate
        - TextureCoordinate3D
        - TextureCoordinate

If you omit X3DTextureCoordinateNode like

- Shape
  - Appearance
     - MultiTexture
       - ImageTexture3D
       - ImageTexture
  - IndexedFaceSet
    - Coordinate

the mapping of the 3D texture will always read the texture coordinates (r,s,0) 
where r and s are the generated defaults. So the only visible part of the 3D texture is at depth zero. 

There is no need for TextureProperties in MultiTexture because they are bound to the texture content!


Original Message 02.08.2011 05:28:34
from  Don Brutzman
> Wondering, is MultiTexture node applicable to 3D textures as well as
> 2D textures?
> 
> http://www.web3d.org/x3d/specifications/ISO-IEC-19775-1.2-X3D-AbstractSpecification/Part01/components/texturing.html#MultiTexture
> 
> 18.4.3 MultiTexture
> 
> MultiTexture : X3DTextureNode {
>   SFFloat  [in,out] alpha    1     [0,1]
>   SFColor  [in,out] color    1 1 1 [0,1] 
>   MFString [in,out] function []
>   SFNode   [in,out] metadata NULL  [X3DMetadataObject]
>   MFString [in,out] mode     []
>   MFString [in,out] source   []
>   MFNode   [in,out] texture  []    [X3DTextureNode]
> }
> 
> The prose isn't completely clear.  It says
> 
> =========
> 	The MultiTexture node specifies the application of several individual textures to a 3D object to achieve a more complex visual effect. MultiTexture can be used as a value for the texture field in an Appearance node.
> 
> 	The texture field contains a list of texture nodes (e.g., ImageTexture, PixelTexture, and MovieTexture). The texture field may not contain another MultiTexture node.
> =========
> 
> Presumably the operations listed in the table could work for 3D textures
> since they appear to be implementable using matrix operators.
> 
> There are 3 pertinent node interfaces:
> 	X3DTexture2DNode
> 	X3DTexture3DNode
> 	X3DTextureNode

BASE: X3DTextureNode
  - X3DTexture2DNode
  - X3DTexture3DNode
  - X3DEnvironmentTextureNode

Maybe we should think to add following to the spec in the future:

X3DTextureArray2DNode

> 
> Both X3DTexture2DNode and X3DTexture3DNode are part of X3DTextureNode.
> 
> MultiTexture only implements X3DTextureNode interface, not 2D or 3D.
> It is the only X3D node in that category.
> 
> Some potential specificaton changes here:
> 
> a.  If applicable to both 2D and 3D, then no change is needed to the
> 	MultiTexture node per se.  But we might need to change some
> 	of the 2D texture transform operations in the Volume Rendering
> 	component might to also allow use of MultiTexture with 2D nodes.
> 
> b.  If applicable to both 2D and 3D, we probably ought to say that
> 	combined operations with a mix of both 2D and 3D nodes are
> 	not allowed at the same time.
> 
> c.  If MultiTexture is only intended for 2D textures, then we should
> 	restrict it to the X3DTexture2DNode interface and also provide
> 	fields for
>   SFBool []       repeatS           TRUE
>   SFBool []       repeatT           TRUE
>   SFNode []       textureProperties NULL [TextureProperties]
> 
> d.  If applicable to both 2D and 3D, then we might also add the preceding
> 	fields anyway, since it is reasonable to want to apply them to
> 	the result of 2D multitexture operations.  In that case we
> 	should likely also say that the fields are only appropriate
> 	when using 2D textures.
> 
> Any other potential spec changes?
> 
> I hope that we have some multitexture experts who can shed light on this.
> We have an opportunity to make X3D v3.3 modifications/clarifications
> that is just a few weeks way.  TIA for all review.
> 
> all the best, Don

Hope it's clear,
 Dirk
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://web3d.org/pipermail/x3d-public_web3d.org/attachments/20110803/83a18e36/attachment-0001.html>


More information about the X3D-Public mailing list