Reflecting watersurfaces for each edition.

With pro edition of 3DGS it is possible to create mirrors, which are reflecting everything. Also water - reflections of landscapes at watersurfaces are meant. Now you will read a step for step tutorial for a procedure which enables everyone to using with each edition such a effect. At first we need a terrainfile, which is created by a heightmap. A colour determines the sea level of your scene (see picture 1); Black is the most meaningful colour thereby. This heightmap will be created and skinned with MED (pic 2a). Save the terrain as a HMP and a MDL file. Load then again the terrain, but the source this time is the MDL file. The HMP file will be used later.

### insert picture (desc1.jpg) ###

In MED delete now all faces, which belong to the sea level. Afterwards you are be able to detect the outlines of the real used terrain in the TOP window. However those are angular (pic 2b), because the terrain consists of squares (those again are built by normal polygons). Work on each outline-vertices that some are summarized with using the Weld instruction. The result will be a smooth outline (pic 2c). Duplicate the model and mirror it vertically that both baselines are moved one on the other; all vertices of the baseline (only those ones of the outlines!) will become marked and identical by Merge folded up (pic 2d). Save this model again as a MDL file.

### insert picture (desc2.jpg) ###

To WED: Load now the created model. Place it in such a way that the baseline is really at 0 (Z=0;!). Now you need a watersurface. This consists of a sprite, which lies horizontal on the baseline and its transparency-flag is switched on (my.transparent=on; or by an alpha value!). Beside that, you create another sprite, which represents the sky as mirror image. This sprite must be posed under the deepest vertex of the terrain model (see all pic 3).

### insert picture (desc3.jpg) ###

Now weve finished the basics in representing a reflective watersurface (pic 4), but the collision - detection is missing. To achieve that, you need to load the saved HMP file of your terrain and move it that way, that it covers identically the upper part of the built model. The HMP terrain becomes invisible=on; , because only the collisiondetection is important for us. The MDL model is only used for optical aspects, it becomes the flag passable=on; The last thing which must be done, is creating a sky by using the new sky-system, beside of that an arranged environment is missing; this is however not the topic.

### insert picture (desc4.jpg) ###

Short note for standard edition: Since there is no terrain possible, you can create a same collisiondetection, too. You must only create a terrain on block foundation (search for a program called GenSurf). Use those blocks as collision-model (invisible!), load the WMP file into MED and apply all described procedures above to it.

Christian Behrenberg aka HeelX (heelx_@web.de)

__________________________________________________________________________________________________________________

Spiegelnde Wasseroberflchen fr alle Editionen.

In der Proedition des 3DGS ist es mglich Spiegel zu erstellen, die alles Mgliche reflektieren. Unter Reflexionen fallen auch Wasserspiegelungen von Landschaften. Im folgenden soll ein Verfahren erlutert werden, dass es ermglicht, mit jeder Edition so etwas anzuzeigen.

Zunchst braucht man ein Terrain, welches mit einer Heightmap erstellt wird. Eine Farbe bestimmt dabei die Wasseroberflche (siehe Bild1); Schwarz ist dabei am sinnvollsten. Diese Heightmap wird in MED in ein Terrain umgewandelt und geskinnt (Bild 2a). Dieses Terrain wird nun gespeichert, einmal als HMP und als MDL Datei, die HMP Datei wird erst spter angewendet. Bevor nun weitergearbeitet wird, werden alle Daten entladen und die gespeicherte MDL  Datei neu geladen.

### insert picture (desc1.jpg) ###

In MED werden nun alle Faces gelscht, die auf der -00- Linie liegen. Danach erkennt man im TOP Fenster die Umrisse des eigentlichen Terrains. Allerdings sind diese eckig (Bild 2b), was daran liegt, dass das Terrain aus Quadraten besteht (die wiederum aus normalen Polygonen bestehen). Durch den Weld Befehl werden nun alle Vertices der Grundlinie so zusammengefasst, dass die Umrisse annhernd rund wirken (Bild 2c). Das Modell wird nun dupliziert und vertikal gespiegelt, sodass beide Grundlinien aufeinander liegen (evntuell msen die Normalen umgedreht werden); alle Vertices der Grundlinie werden markiert und identische Vertices werden durch Merge zusammengelegt (Bild 2d). Dieses Modell wird noch mal gesichert.

### insert picture (desc2.jpg) ###

Zur Szene im WED (Bild 3): es wird nun das gerade erstellte Modell geladen. Es wird so platziert, dass die -00- Linie auch wirklich auf der selbigen liegt (Z=0;). Nun braucht man die Wasseroberflche. Diese besteht aus einem Sprite, der horizontal auf der -00- Linie liegt und transparent ist (oder durch einen Alphawert!). Zudem erstellt man einen Sprite, der den Himmel als Spiegelbild darstellt. Dieser muss unter dem tiefsten Vertex des Terrainmodells liegen.

### insert picture (desc3.jpg) ###

Optisch hat man nun alles erstellt, fehlt nur noch die Kollision. Man ldt nun das HMP Terrain und positioniert es identisch zum oberen Teil des MDL Terrains. Beim HMP Terrain wird invisible=on; gesetzt, weil nur die Kollision fr uns wichtig ist. Beim MDL Modell wird die Boundingbox gerade deshalb nicht bentigt, also wird passable=on; gesetzt. Das einzige, was noch getan werden muss, ist eine Erstellung von einem Sky ber das gleichnamige System, zudem fehlt eine gestaltete Umgebung; dies ist hier allerdings nicht das Thema.

### insert picture (desc4.jpg) ###

Kurze Anmerkung zur Standardedition: Da es kein Terrain gibt, verzichtet man gezwungen auf eine polygonale Kollision. Um dennoch eine solche Kollision zu erlangen, erstellt man ein Terrain auf Blockbasis (siehe das Programm GenSurf), benutzt diese Blocks als Kollision (invisible!), ldt die WMP Datei in MED und wendet alles oben beschriebene darauf an.

Christian Behrenberg aka HeelX (heelx_@web.de)