<html>
<head>
<meta content="text/html; charset=windows-1252"
http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
So I'm going ahead to code this into my Unity-based X3D
importer/export, and two ways.<br>
The first would be this 'text' based node as outlined below (it may
need to be tweaked, I'll send out my final implementation when
ready)<br>
The second would be a 'binary' based system, where the weights would
be baked into a lossless PNG file. Probably up to 4 sets of weights
per file.<br>
Think of it as four alpha channels corresponding to 4 textures at a
time. An alternative is one grayscale image (jpg or png)
representing a blending<br>
alpha for each layer. May do that both ways too.<br>
<br>
<br>
<div class="moz-cite-prefix">On 1/21/2015 10:06 PM, Dave A wrote:<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.07090007.09030806@realmofconcepts.com" alt=""><br>
<pre class="moz-signature" cols="72">--
Follow me! @thatvrguy</pre>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre wrap="">------------------------------------------------------------------------------
New Year. New Location. New Benefits. New Data Center in Ashburn, VA.
GigeNET is offering a free month of service with a new server in Ashburn.
Choose from 2 high performing configs, both with 100TB of bandwidth.
Higher redundancy.Lower latency.Increased capacity.Completely compliant.
<a class="moz-txt-link-freetext" href="http://p.sf.net/sfu/gigenet">http://p.sf.net/sfu/gigenet</a></pre>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre wrap="">_______________________________________________
X3dom-users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:X3dom-users@lists.sourceforge.net">X3dom-users@lists.sourceforge.net</a>
<a class="moz-txt-link-freetext" href="https://lists.sourceforge.net/lists/listinfo/x3dom-users">https://lists.sourceforge.net/lists/listinfo/x3dom-users</a>
</pre>
</blockquote>
<br>
<pre class="moz-signature" cols="72">--
Follow me! @thatvrguy</pre>
</body>
</html>