Height
Maps with Real GreebleZ!
Before attempting this tutorial, please read through the Real
GreebleZ! manual sections describing the interface functions in
detail. Additionally this tutorial is meant to follow the
beginning tutorial that is included in the Real GreebleZ! zip
archive; but may be performed on it's own as well.
Why Height Maps
With the functionality provided by Real GreebleZ! these
surfaces quickly become easy to produce. However, there are times
when simulating geometry with height mappings is a more desirable
solution. The following tutorial shows an easy method of
"extracting" geometry from a surface. This technique
could be used with any model but is particularly suited to
greebled surfaces, as they rarely have "undercut"
surfaces that cannot be accurately captured or represented by way
of a height mapping.
A Quick Greebling
If continuing from the Real GreebleZ! beginning tutorial you
can skip to here.
Otherwise Start by making a SDS rectangle from the "Top"
viewport with vertex counts of twenty-one and dimensions of twenty
meters in both directions. Having a one meter grid activated will
simplify this step. Put the object in face edit mode. Adjust the
viewport so you are looking at the rectangle from the side and a
little above.
This will let us see the results of our work.

For "traditional" looking greebles the SDS object
should be in polygonal mode; this is the default rendering type
for an SDS rectangle and thus requires no change. It is worth
mentioning here that any alterations to the initial object,
setting object type, combining faces, etc. is best done before
performing any greebling operations; this will simplify operations
in the case of undoing greebling operations.
If you have not already done so, start Real GreebleZ!. The
default interface configuration consists of the first iteration of
greebles construction and the nurnie addition controls. Uncheck
the "nurnies" checkbox as it will not be needed for our
work here.

Next, click the "Random" button.

This will select random faces on the object.
The result should look something like this.

If you want more faces to be considered for greebling
operations click random again, if you would like fewer faces
selected, hold shift and click random; this will remove random
faces from the selection. Selection operations are not recorded by
Realsoft 3D or by Real GreebleZ! and as a result you can select
and unselect faces at any time during in a greebling session
without reservation.
Set the value of the "Subdivion Likelyhood" slider to
"40".

This will result in about forty percent of the selected faces
being subdivided into quads.
Set "Extrude Likelyhood" to 70,

and click the "GreebleiZe!" button.

The result should look something like this.

If more complex structure is desired click the "GreebliZe!"
button additional times taking note of the fact that the
complexity of the object increases much more each time. Also, see
the beginning tutorial included in the Real GreebleZ! archive.
Heightmap
Material
Make a new new VSL material by selecting from the right-click
menu in the materials window.

Select the new material and rename it "height_mapper".
In the "Properties" window, activate the "Advanced"
controls by clicking the checkbox.
Select the folder icon named "Material" in the
shaders list and add a shader by clicking the "Shader"
icon in the "VSL Objects" section, if it is not visible
activate it by clicking on the checkbox above this area.

Next, click on the "Constant" icon to add
this operator to the material. Leave the default output of "Color"
as is, and set the value of the constant to 1,0,0.
Click on the "Curve" VSL object to add a
curve operator to the material; again, leave the default output of
"Color" and input of "Map coords" as is.

Selecting the curve object will display the curve
controls in the lower portion of the window. Select the left point
of the red curve and set it's X value to 0 and it's Y value to 1.

Creating the Mapping
Select the greebled object and set the viewport to a
side view. Create a parallel mapping of the "height_mapper"
material by selecting "Parallel" from the "Map"
item in the right-click menu of the materials selection window.

Start at what will be the upper right corner of the
mapping and drag around the object to size the mapping; click the
left mouse button to accept the mapping object. If necessary,
adjust the mapping so the height is small amount larger than the
greebled object.

The desired result here is for the "lowest"
portion of the object to be colored black (0,0,0) and the
"highest" portion to be 100% red (1,0,0).

Adjusting the Environment
In order for the mapping to be accurate, the object
needs to be evenly lit, with no shadows or bright spots. This is
best accomplished with an ambient light. Select the "Light
Sources" tab in the toolbar and click the "Ambient"
icon. Click anywhere in the window and then click again to accept
the light source. Now open the "Props" tab and set the
"Intensity" value to 1.
Open the view properties window and select the
"Camera" tab; make sure that the projection mode for the
camera is set to "Orthographic". Additionally, the
flashlight needs to be "turned off". Do this by setting
the "Flashlight" value to 0,0,0.

Set the viewport to a top view. Here are the results
as viewed with OGL preview enabled.

Press the "f" key to center the object in
the viewport and zoom in so the object eaxctly fills the width of
the viewport. With this as the current viewport, create a camera
object by clicking on the "Creation" tab in the toolbar.
Click accept to create a camera that matches the current viewport.
In the "Image Aspect" section of the "Spec"
tab in the "Properties" window, select "Square from
the "Type" pop-up menu, to make camera's aspect ration
1.0.
Rendering
The final step in creating the heightmap is to
output it to a file in an appropriate format; lossy formats such
as .jpg are not suitable for heightmaps. Click on "Render"
under the "File" drop -down menu, to bring up the "File
Renderer" window. Set an appropriate file location and name;
it is not necessary to add the filetype suffix. In the "Available
Formats" pop-up menu, select "PNG" and click "Add",
to add this to the "Active File Formats" list, this
format is selected by default. In the "Rendering Settings"
pop-up menu, select "Quality over Speed" and the "Width"
and "Height" values in the "Resolution"
section both to 1024.

Now click the render button. The heightmap is now
ready to use.
Employing the Height Map
Create a new VSL material and rename it "heightmap_test".
In the "Properties" window activate "Advanced"
and "Preview" by clicking on the respective checkboxes.
Select "Bump map" in the "Wizard" pop-up menu,
and click the "Add" button to add a "Bump normal"
shader to the material.

Select the previously saved heightmap image in the
"File" field. The default values for "Interpolation"
and "Compute Direction" mapping type can be left at the
default values. Set the "Bump Height" value to "30",
and "Smooth" to "0.0001".

The material is now ready to use. Here is the
results of applying it as a parallel mapping to an 1 meter square
analytic rectangle.

.
|