[X3D-Public] Need good multitexture example

Michalis Kamburelis michalis.kambi at gmail.com
Tue Feb 5 09:44:37 PST 2013


Dave A wrote:
> Does anyone have a spec-compliant working example of, say, a simple Bump
> Map? In XML format?

You cannot really make a simple bump mapping with a light source with a 
spec-compliant X3D, as far as I know. Not without using one of the 
extensions I mentioned in previous mail (view3dscene normalMap or 
InstantReality CommonSurfaceShader). The only thing you can do is use 
multi-texturing DOTPRODUCT3 mode, but this still requires some tricks to 
synchronize with normal light source.

Well, actually, you can do it with spec-compliant X3D if you just 
program bump mapping inside a shader (GLSL or Cg or HLSL) yourself. But 
that's probably not what you want...

I share your sentiments: I would like to see bump mapping added to X3D 
spec. I actually plan to implement CommonSurfaceShader in view3dscene at 
some point, and then at least CommonSurfaceShader will be supported in 2 
browsers.

(Oh, and I would like to see multi-texturing spec actually fixed, I was 
reporting it's bugs many times without any effect: 
http://castle-engine.sourceforge.net/x3d_implementation_texturing.php#section_multi_texturing 
).

> But the example file I found on the X3D.org site looks like this:
>
> <MultiTextureCoordinate containerField='texCoord'>
...
> <TextureCoordinate point='0 0 1 0 1 1 0 1'/>
> </MultiTextureCoordinate>
>
> Note, no containerFields on individual TextureCoordinate elements.

Both MultiTextureCoordinate and TextureCoordinate have by default 
containerField='texCoord', this is specified inside "X3D encodings: XML 
encoding Edition 2" specification at "6 Encoding of nodes" 
(http://www.web3d.org/files/specifications/19776-1/V3.2/Part01/EncodingOfNodes.html 
).

Specifying explicit containerField='texCoord' should be allowed but have 
no effect.

I would suggest to report the remaining bugs to the appropriate 
browsers, with simple examples to reproduce the bugs. That's the only 
way to make them better, they probably do not read this mailing list. 
(All I can say is that everything you mention works flawlessly in 
view3dscene :)

Michalis



More information about the X3D-Public mailing list