|
|
Rendering Overlay masks in Terragen for use in trueSpace
About Truespace Archives
These pages are a copy of the official truespace forums prior to their removal somewhere around 2011.
They are retained here for archive purposes only.
Rendering Overlay masks in Terragen for use in trueSpace // Archive: Tech Forum
Post by GraySho // Aug 4, 2006, 7:36am
|
GraySho
Total Posts: 695
|
Some time ago I said I would post how to render out overlay masks using terragen and it's neat surface distribution system. It might very well be possible to create such a shader in tS7 itself, but I'm not a coder.
http://www.spacerat.at/tutorials/ts_tg_layers/image01.jpg
First screenshot shows the terrain and preview render in terragen, as well as the surface tree (surface map). It would be possible to set up the camera and render the landscape from a bird's eye view to get a surface map, the problem is that very high resolution images are needed (4k+) for closeup shots of the terrain in truespace. So I'm rendering masks and assemble the shader in trueSpace with tileable "lowres" textures or even procedurals.
http://www.spacerat.at/tutorials/ts_tg_layers/image02.jpg
First we need to modify each surface layer. The output should be a greyscale image that defines where grass, rock, etc should be shown. "Bumpiness" and "Mimic Terrain" is to be set to 0, color set to black, except the layer that should be rendered out as mask (white, in this case the Rock Layer).
http://www.spacerat.at/tutorials/ts_tg_layers/image03.jpg
Next the camera has to be set up to render the satelite view. The newest version of terragen has a nice autosetup button that does all the work. Orthographic has to be checked.
http://www.spacerat.at/tutorials/ts_tg_layers/image04.jpg
Next is atmosphere. Put all density sliders to 0, haze and atmosphere is not wanted for this purpose.
http://www.spacerat.at/tutorials/ts_tg_layers/image05.jpg
Set sun altitude to 90 for equal lighting of all features, deactivate shadows.
The output resolution has to be square, like 512x512 (which can be rendered with the free version). The layer mask should look similar to that (depending on the terrain):
http://www.spacerat.at/tutorials/ts_tg_layers/image06.jpg
Now you have to set that rock layer to black, and the next layer to white and repeat the step until you have a mask of each layer.
Back in truespace we create a material with a base layer similar to the base layer in terragen (no mask needed). Add a layer, choose a texture and select transparency map for the transparency channel. Now load the appropriate mask and go on to the next layer.
Note: For the use in trueSpace, the masks have to be inverted, as white means transparent and black solid.
http://www.spacerat.at/tutorials/ts_tg_layers/image07.jpg
If painted on the imported terrain it might look something like this:
http://www.spacerat.at/tutorials/ts_tg_layers/image08.jpg |
Post by Rareth // Aug 4, 2006, 9:08am
|
Rareth
Total Posts: 149
|
I'm going to have to try this when I get home |
Post by b_scotty // Aug 4, 2006, 10:13am
|
b_scotty
Total Posts: 176
|
Thanks GraySho, that looks like something I'll have to try. :) |
Post by Steinie // Aug 4, 2006, 10:41am
|
Steinie
Total Posts: 3667
|
Graysho, to show you my sincerest form of flattery I changed my Avatar back for one day.;) |
Post by spacekdet // Aug 4, 2006, 1:09pm
|
spacekdet
Total Posts: 1360
|
Nice tut!
I added a link to your post on my tutorial roundup page. (http://www.spacekdet.com/tutorials/) |
Post by GraySho // Aug 4, 2006, 2:11pm
|
GraySho
Total Posts: 695
|
Nice tut!
I added a link to your post on my tutorial roundup page. (http://www.spacekdet.com/tutorials/)
Good to see that it might be useful to some of you.
Graysho, to show you my sincerest form of flattery I changed my Avatar back for one day.
I'm flattered, I can still see that cowfrog :D
BTW, if you find any misspelling you can keep it (them), I do hope it's not too bad, english isn't my first language. |
Post by Tiles // Aug 4, 2006, 9:16pm
|
Tiles
Total Posts: 1037
|
Klasse Tutorial! Und nun das Ganze noch in Deutsch :)
Great tutorial. And now the whole stuff in German :) |
Post by Rareth // Aug 5, 2006, 9:18am
|
Rareth
Total Posts: 149
|
Yours looks a whole lot better than mine does, I need to play with it more
the first pic is after laying the textures single light source no fall off..
the second pic is single light source, no fall off, shadows and over cast sky, with a ground fog foreground shader. |
Post by GraySho // Aug 5, 2006, 9:26am
|
GraySho
Total Posts: 695
|
Of course the result depends heavily on a good surface distribution in terragen, and the textures you use in trueSpace. Here is another example with snow (procedural texture):
http://www.spacerat.at/temp/render1.jpg |
Post by Rareth // Aug 5, 2006, 11:33am
|
Rareth
Total Posts: 149
|
here is another one |
Post by Birdnest // Aug 19, 2006, 2:36pm
|
Birdnest
Total Posts: 152
|
I'm lost at the layer part in TrueSpace...:o :( |
Post by GraySho // Aug 19, 2006, 8:39pm
|
GraySho
Total Posts: 695
|
I'm lost at the layer part in TrueSpace...:o :(
Right click on the Material Preview and click "Add new Layer". Click and hold the blueish icon on color and bump channel and choose "Color blend: mask alpha". Then load the grayscale mask you've rendered in terragen. |
Post by Birdnest // Aug 20, 2006, 6:15am
|
Birdnest
Total Posts: 152
|
Right click on the Material Preview and click "Add new Layer". Click and hold the blueish icon on color and bump channel and choose "Color blend: mask alpha". Then load the grayscale mask you've rendered in terragen.
lol let me rephrase, I knew how to do it lol.
I meant: what am I suppost to add on the VERY first layer? anything I want? If so,
I tried it and it worked pretty good! |
Post by GraySho // Aug 20, 2006, 6:26am
|
GraySho
Total Posts: 695
|
lol let me rephrase, I knew how to do it lol.
I meant: what am I suppost to add on the VERY first layer? anything I want? If so,
I tried it and it worked pretty good!
The first layer should be a base material, it's shown wherever the rest of the layers don't cover. You can use a plain color (red/purple) first to see where it shines through to decide which material it should be. Sorry Birdnest, didn't know your experience with tS, but your question wasn't precise either ;) |
|