[x3d-public] [x3dom-developers] ElevationGrid for the modern age

Leonard Daly web3d at realism.com
Thu Jan 22 10:37:33 PST 2015


Dave,

The spec does not directly provide support for multiple textures in a 
single ElevationGrid. It can be done with MultiTexture (don't know if 
X3DOM supports that). The current structure of a displayable node 
includes Geometry and Appearance. The ElevationGrid is the Geometry. 
Texture is one component of the Appearance. You could swap out the 
ElevationGrid geometry for something else and the Appearance would be 
applied in the same manner.

Are you recommending something like a Terrain node which would include 
geometry and appearance tied together? Now looking at your example, it 
appears that you are suggesting the Appearance support multiple 
textures, each assigned an index that determines its (image texture's) use.

In the current structure, you would create two images with transparent 
backgrounds (e.g. PNG) - one for the paths, another scattered shrubs. A 
third image would be the grass. The MultiTexture node would be used to 
merge the images together to get the desired effect.

I worked on the MultiTexture node many years ago and still have my notes 
(someplace). I don't think much has changed. We do have reports that the 
node is not functioning correctly, but I do not remember enough of the 
details right now.


Leonard Daly



> I'm working on an X3D/X3DOM exporter for Unity. Currently working on 
> Terrains (ElevationGrids)
>
> Is it still true that an EG can have only one texture? Is this still 
> true in X3DOM?
>
> If not, can we all go get the FREE Unity app, and check out how 
> Terrain is done. For the curious, it is like an EG,
> but it can have multiple layers (each having both diffuse and 
> optionally normal maps), each with its own resolution,
> and each with a set of 'weights'. The weights range from 0 to 1 
> indicating that texture's contribution to the texel.
> Why? So you can have relatively small repeating textures for things 
> like grass, gravel, mud, snow, etc., and blend them
> together across the larger map such that it doesn't look so 
> repetitive. Unity lets you paint heights as well as these
> weights. So you can, for example, add grass and sand to a terrain, 
> then paint the sand onto the grass to make paths
> in the grass.
>
> I would imagine the Appearance to looks something like this maybe:
>
> <Appearance>
>     <ImageTexture index='0' url='"grass.png"'/>
>     <ImageTexture index='1' url='"sand.png"'/>
> </Appearance>
> <ElevationGrid .... how it is pretty much with height et al >
>   <Weight index='0' weight = ' 0 .5  .25 .....'    One weight for each 
> height ... />
>   <Weight index='1' weight = ' 1 .5  .75 .....'    One weight for each 
> height ... />
> </ElevationGrid>
>
> Of course this doesn't account for normal maps or other types of maps 
> that could be included, open to suggestion there. Here's one:
>
> <ImageTexture index='0' channel='diffuse' ...
> <ImageTexture index='0' channel='normal' ...
>
> and so on.
>
> Here's something to whet your appetite:
>
>
> -- 
> Follow me! @thatvrguy
>

-- 
*Leonard Daly*
X3D Co-Chair
Cloud Consultant
President, Daly Realism - /Creating the Future/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://web3d.org/pipermail/x3d-public_web3d.org/attachments/20150122/68d94ec6/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: image/png
Size: 611815 bytes
Desc: not available
URL: <http://web3d.org/pipermail/x3d-public_web3d.org/attachments/20150122/68d94ec6/attachment-0001.png>


More information about the x3d-public mailing list