[x3d-public] height and slope TextureCoordinateGenerator modes

Roy Walmsley roy.walmsley at ntlworld.com
Tue Jul 21 11:26:52 PDT 2015


Andreas,

 

Thank you very much for your extremely interesting and thoughtful suggestions below. 

 

I have raised a Mantis issue on your behalf, directly copying in all of your submission. It is Issue 831 (http://www.web3d.org/member-only/mantis/view.php?id=831) for tracking. Your comments will be passed to one of the working groups for consideration and possible inclusion in the next X3D specification release. We will keep you informed of further developments.

 

Regards,

 

Roy Walmsley

 

From: x3d-public [mailto:x3d-public-bounces at web3d.org] On Behalf Of Andreas Plesch
Sent: 20 July 2015 15:36
To: X3D Graphics public mailing list
Subject: [x3d-public] height and slope TextureCoordinateGenerator modes

 

This is a request of feedback on potential new height and slope modes for TextureCoordinateGenerator and their suitability for inclusion in new versions of the X3D specification.


The TextureCoordinateGenerator node offers a number of modes intended for advanced graphics effects such as (pseudo-)reflections:


http://www.web3d.org/documents/specifications/19775-1/V3.3/Part01/components/texturing.html#t-Texturecoordgeneration

 

Many modes involve the eye position which is dynamic and therefore requires dynamic generation of texture coordinates. The other intention of the node seems to be more of a helper node to enable easy generation of static texture coordinates. SPHERE-LOCAL, VERTEX and NOISE modes fall into this category as I understand them.

Is this a fair description of the purpose of the TextureCoordinateGenerator node ? What does the VERTEX mode do ? Literally use the x and y (or z?)  components of a vertex as texture coordinates (which then could be scaled with a TextureTransform) ?

In data visualization it is often useful to color the y component (height) of a mesh. This is particularly evident for ElevationGrids where contouring is a proven visualization method. Therefore it would be very useful to have a new HEIGHT mode which generates texture coordinates based on the y coordinate. The most useful default would be to automatically scale to the range in height of the mesh. The parameter field could be used to define a custom range in height which corresponds to the 0 to 1 range of the S texture coordinate. T would be set to 0, eg. a 1d texture map would be expected.

Here is an example of the use a height mode:

http://andreasplesch.github.io/x3dom/GeoElevationGrid_texture/terrain_height.xhtml

which was tentatively implemented in a forked x3dom (Mesh.js).

Similary, it is often useful to visualize the spatial gradient of a surface or the slope. A new SLOPE mode for TextureCoordinateGenerator would generate texture coordinates based on the local slope angle ( implementations could derive the slope on the local normal ). By default slopes from 0 to 90 degrees would be scaled to the 0 to 1 range of the S texture coordinate. The  parameter field could be used to define a custom range. T would be set to 0 and a 1d texture map would be expected.

Here are two examples:

http://andreasplesch.github.io/x3dom/GeoElevationGrid_texture/puddle_slope.xhtml

and 

http://andreasplesch.github.io/x3dom/GeoElevationGrid_texture/face_slope.xhtml

using a tentative implementation in a forked x3dom (Mesh.js).

One could also imagine (and quite easily implement) another mode "HEIGHT-SLOPE" which uses both attributes as S and T respectively  and a 2d texture map as suggested by Simon Thum on the geospatial list.

These modes would be somewhat similar to the existing VERTEX and SPHERE-LOCAL modes but aimed at 1d texture maps.

 

Finally, geospatially registered meshes would need equivalent modes using height above the geoid and slope relative to the local tangential plane to the geoid.

Thanks for reading,

-Andreas


-- 

Andreas Plesch
39 Barbara Rd.
Waltham, MA 02453

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://web3d.org/pipermail/x3d-public_web3d.org/attachments/20150721/ed97cf00/attachment.html>


More information about the x3d-public mailing list