<html>
<head>
<meta content="text/html; charset=windows-1252"
http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
Thanks Leonard,<br>
<br>
So, if I have say, 7 types of ground (sand, rock, asphalt, dirt,
grass, snow, pebbles), and each has a normal map, then would I
generate 7 PNG files (from the weights) to use as an alpha channel
per texture, and somehow composite them using MultiTexture stuff?
Can each ground texture can still be like 256x256 pixels, even if
the entire terrain is very very large, as the alpha blending
channels are stretched across the terrain, where the diffuse/normal
ones are tiled?<br>
<br>
Dave<br>
<br>
<br>
<div class="moz-cite-prefix">On 1/22/2015 10:37 AM, Leonard Daly
wrote:<br>
</div>
<blockquote cite="mid:54C1436D.7020907@realism.com" type="cite">
<meta content="text/html; charset=windows-1252"
http-equiv="Content-Type">
<div class="moz-cite-prefix">Dave,<br>
<br>
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.<br>
<br>
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. <br>
<br>
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.<br>
<br>
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.<br>
<br>
<br>
Leonard Daly<br>
<br>
<br>
<br>
</div>
<blockquote cite="mid:54C09357.5000305@realmofconcepts.com"
type="cite">
<meta http-equiv="content-type" content="text/html;
charset=windows-1252">
I'm working on an X3D/X3DOM exporter for Unity. Currently
working on Terrains (ElevationGrids)<br>
<br>
Is it still true that an EG can have only one texture? Is this
still true in X3DOM?<br>
<br>
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,<br>
but it can have multiple layers (each having both diffuse and
optionally normal maps), each with its own resolution,<br>
and each with a set of 'weights'. The weights range from 0 to 1
indicating that texture's contribution to the texel.<br>
Why? So you can have relatively small repeating textures for
things like grass, gravel, mud, snow, etc., and blend them<br>
together across the larger map such that it doesn't look so
repetitive. Unity lets you paint heights as well as these<br>
weights. So you can, for example, add grass and sand to a
terrain, then paint the sand onto the grass to make paths<br>
in the grass.<br>
<br>
I would imagine the Appearance to looks something like this
maybe:<br>
<br>
<Appearance><br>
<ImageTexture index='0' url='"grass.png"'/><br>
<ImageTexture index='1' url='"sand.png"'/><br>
</Appearance><br>
<ElevationGrid .... how it is pretty much with height et al
><br>
<Weight index='0' weight = ' 0 .5 .25 .....' One weight
for each height ... /><br>
<Weight index='1' weight = ' 1 .5 .75 .....' One weight
for each height ... /><br>
</ElevationGrid><br>
<br>
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:<br>
<br>
<ImageTexture index='0' channel='diffuse' ...<br>
<ImageTexture index='0' channel='normal' ...<br>
<br>
and so on.<br>
<br>
Here's something to whet your appetite:<br>
<br>
<img src="cid:part1.04060908.08000304@realmofconcepts.com"
alt=""><br>
<pre class="moz-signature" cols="72">--
Follow me! @thatvrguy</pre>
<br>
</blockquote>
<br>
<div class="moz-signature">-- <br>
<font class="tahoma,arial,helvetica san serif" color="#333366">
<font size="+1"><b>Leonard Daly</b></font><br>
X3D Co-Chair<br>
Cloud Consultant<br>
President, Daly Realism - <i>Creating the Future</i> </font></div>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre wrap="">_______________________________________________
x3d-public mailing list
<a class="moz-txt-link-abbreviated" href="mailto:x3d-public@web3d.org">x3d-public@web3d.org</a>
<a class="moz-txt-link-freetext" href="http://web3d.org/mailman/listinfo/x3d-public_web3d.org">http://web3d.org/mailman/listinfo/x3d-public_web3d.org</a>
</pre>
</blockquote>
<br>
<pre class="moz-signature" cols="72">--
Follow me! @thatvrguy</pre>
</body>
</html>