Planetside Software Forums

General => Terragen Discussion => Topic started by: mrwho on August 25, 2008, 01:46:23 PM

Title: Another river-creating question
Post by: mrwho on August 25, 2008, 01:46:23 PM
How do I get the riverbed and terrain to appear? I've attached the TGD and image mask. thanks!
Title: Re: Another river-creating question
Post by: Tangled-Universe on August 25, 2008, 02:35:44 PM
Hi Ryan,

I hope you didn't spend too much time solving this...
The reason the terrain doesn't show up is because the camera is placed almost completely outside the heighthfield, see picture.
Simply move the camera into the heighthfield to get your terrain or increase the size of the heighthfield so you won't have to re-adjust the position of the maskprojection-camera.

If you simply move the camera into the heighthfield, then calculate the difference in coordinates and add/subtract these as well for your maskprojection-camera so the relation won't be lost.

Martin
Title: Re: Another river-creating question
Post by: mrwho on August 25, 2008, 02:43:46 PM
weird.... before I made the original post, I was able to get terrain just fine. The camera was pointing where I wanted it. Now I can't even open the file or the backup of the the TGD..........
Title: Re: Another river-creating question
Post by: Tangled-Universe on August 25, 2008, 02:45:13 PM
Well, this is what showed up when opening the tgd you posted here :)

But if your terrain showed up before posting this, what was the problem then?
Title: Re: Another river-creating question
Post by: mrwho on August 25, 2008, 02:48:30 PM
I wanted both the terrain and riverbed to show at the same time, I could only get the riverbed if I used the mask. Since I had to invert it to get the displacement going down, I couldn't use the same mask to get the rest of the terrain to appear normally where the river didn't exist. I tried using another image mask, but it didn't work.
Title: Re: Another river-creating question
Post by: mrwho on August 25, 2008, 02:55:05 PM
weird, I can open the TGD file now.... Anyways, here's 2 screenshots (rez reduced to get them both on here) of what I get when I have the image mask enabled, then disabled
Title: Re: Another river-creating question
Post by: Tangled-Universe on August 25, 2008, 03:00:09 PM
You mean this?

Title: Re: Another river-creating question
Post by: mrwho on August 25, 2008, 03:07:43 PM
:glares at his computer:

I see terrain in your screenshot, but when I open the file up all I can see is the riverbed. I can't ever recall having these kinds of issues with terrains before
Title: Re: Another river-creating question
Post by: Tangled-Universe on August 25, 2008, 03:11:06 PM
Sorry to ask this stupid question but you didn't forgot to press "generate terrain" ?
Title: Re: Another river-creating question
Post by: mrwho on August 25, 2008, 03:15:13 PM
no, I pressed that little button  :D

Although, should I have to? I wanted to used the Fractal Terrain, not the heightfield
Title: Re: Another river-creating question
Post by: Tangled-Universe on August 25, 2008, 03:19:47 PM
Aside from your peculiar setup I don't seem to have problems with your file...strange...

The peculiar thing is that your mask is b&w and that the river should appear where the white of the mask is. Yes, that works, but you're using a positive value for displacement which is the opposite of what you should use normally. Somehow this whole thing/principle seems to be inverted, but it works...weird ;D
Title: Re: Another river-creating question
Post by: mrwho on August 25, 2008, 03:21:09 PM
yeah, don't ask. I don't normally do things like that, but it didn't work right the other way. I should just try a different method for the river, any suggestions?
Title: Re: Another river-creating question
Post by: Oshyan on August 27, 2008, 10:54:01 PM
Are you using it as a Blend Shader? Blend Shader essentially acts like an alpha, so it will mask out your power fractal terrain so it only shows where the white (river) is. What you should probably do is just put the Image Map shader after the Power Fractal in the terrain network, before Compute Terrain, turn off Apply Color and turn on Apply Displacement, then adjust to negative displacement. That ought to work.

- Oshyan
Title: Re: Another river-creating question
Post by: bigben on September 01, 2008, 08:11:37 AM
The image map is outside the primary terrain. This is probably just because the terrain is positioned by lower left. Change it to "position centre" and the terrain will coincide with your image map, after you generate it...  ;)

Now for the river... back soon (it matches something I'm working on at the moment anyway)
Title: Re: Another river-creating question
Post by: bigben on September 01, 2008, 09:04:33 AM
OK... here's one possible approach based on comments from Matt if my memory serves me correctly..

Normally I work with DEM data and place rivers where they exist in real life so that the terrain surface should be reasonably smooth where the river should be.

1: Create a duplicate terrain node and connect your terrain to an "adjust vertical" node. Set the adjust vertical node to a small negative number and feed the result into your water shader. This represents your "water table"

2: After the original terrain insert a displacement shader with a larger negative displacement than the adjust vertical value above.  Use the image map node as the displacement function. This creates your river bed, lowering the terrain below the lake object.

With fractal terrains it gets a bit trickier as it's much harder to create a realistic mask, and the surface of the river is invariably quite rough.  Further displacement of the terrain can also cause problems by lowerin other parts of the terrain below the water table.  There are of course other ways to do this.  If you have an even altitude drop along the river, a carefully positioned plane object would also serve as a useful river surface.
Title: Re: Another river-creating question
Post by: mrwho on September 02, 2008, 10:38:19 AM
thanks for all the help guys, these are great suggestions/ways to do this