Planetside Software Forums

General => Terragen Discussion => Topic started by: N-drju on August 13, 2018, 04:57:57 AM

Title: Hole in the wall
Post by: N-drju on August 13, 2018, 04:57:57 AM
I'm not sure whether it is possible in Terragen... but I would like to create a shallow cave in a hillside.

The regular negative displacement is out of the question of course because it points straight downwards. Take a look at the image to see what I mean. Also, note the dimensions of the said, planned cave:

[attachimg=1]

So far, I have found this method:

https://planetside.co.uk/forums/index.php/topic,23709.msg239806.html#msg239806

Is there any other way to do it? If any?
Title: Re: Hole in the wall
Post by: Dune on August 13, 2018, 06:59:02 AM
Redirect or vector displace by simple shape or painted shader and/or distribution shader for altitudes, something like that.
Title: Re: Hole in the wall
Post by: N-drju on August 13, 2018, 03:02:16 PM
I think this should do quite well. The only limitation is that the "insides" of the cave are almost flat and cannot be displaced in a traditional way. For the current project it is irrelevant but for the future, I would like to know how to improve it. :-\
Title: Re: Hole in the wall
Post by: WAS on August 13, 2018, 03:09:57 PM
Quote from: N-drju on August 13, 2018, 03:02:16 PM
I think this should do quite well. The only limitation is that the "insides" of the cave are almost flat and cannot be displaced in a traditional way. For the current project it is irrelevant but for the future, I would like to know how to improve it. :-\

Warp the shape making the caves. I'd imagine that'd "carve out" a relatively similar shape in the mountain.
Title: Re: Hole in the wall
Post by: Dune on August 14, 2018, 01:33:38 AM
If you push that cave in, add a compute terrain/compute normal+XYZ shader after it and you could probably displace extra. It all depends on how deep you need that cave to be.
Title: Re: Hole in the wall
Post by: René on August 14, 2018, 02:56:47 AM
Or use a lateral only displacement.
Title: Re: Hole in the wall
Post by: N-drju on August 14, 2018, 07:12:56 AM
Quote from: WASasquatch on August 13, 2018, 03:09:57 PM
Warp the shape making the caves. I'd imagine that'd "carve out" a relatively similar shape in the mountain.

This is just what I do. First, I make a decent, irregular shape for the hole, then "push" it in.

@ Dune, René, these are really good tips guys. I thought this is going to be far more difficult! Oh, and the cave dimensions are right there on the drawing.
Title: Re: Hole in the wall
Post by: N-drju on August 15, 2018, 10:09:16 AM
Okay, a follow-up question...

Can I populate objects inside the cave now, PLUS bend them relative to the cave's walls? :-\ Populator will only consider the area of the original terrain and not the newly carved cavern.
Title: Re: Hole in the wall
Post by: bobbystahr on August 15, 2018, 01:38:41 PM
Quote from: N-drju on August 15, 2018, 10:09:16 AM
Okay, a follow-up question...

Can I populate objects inside the cave now, PLUS bend them relative to the cave's walls? :-\ Populator will only consider the area of the original terrain and not the newly carved cavern.


If you hang a Compute Terrain off the bottom(no out put connection to planet, just dangling there)of your Shader stack you should be able to pop inside the cave using that as your Anchor. Also use Lean to Terrain Normal should help with the walls.
Title: Re: Hole in the wall
Post by: N-drju on August 16, 2018, 02:44:19 AM
It won't work. :-[ The populator still puts all items on top and even on the "phantom" hillside. Two, maybe three objects out of 100 make it into the cave.

I tried reducing or expanding compute terrain's grid size and of course put the population center inside the cave rather than top of it, but it's not successful.
Title: Re: Hole in the wall
Post by: René on August 16, 2018, 04:45:31 AM
I tried it with the 'lateral only' displacement. Doesn't work either. No idea why not.
Title: Re: Hole in the wall
Post by: Dune on August 16, 2018, 05:56:27 AM
I encountered that problem too (once upon a time), and can't remember what I did. Maybe an altitude restriction helps. Did you try masking by painted shader (set to 3D!)?
Title: Re: Hole in the wall
Post by: N-drju on August 16, 2018, 12:05:22 PM
Quote from: Dune on August 16, 2018, 05:56:27 AM
I encountered that problem too (once upon a time), and can't remember what I did. Maybe an altitude restriction helps. Did you try masking by painted shader (set to 3D!)?

I think I did... But the setup was different, so I might try that once more. In a way I understand that the program considers "raw" terrain, without exotic modificators. But still... ::)

Alternatively, one can create an invisible cube that can serve as a basement for a given population. Then, shove this cube into a cave and place it so that it touches the cave's walls. This way, you can even force your population upside-down!

That may, sort of, solve the problem but unfortunately is veeery time-consuming. ::)


[attach=1]

Title: Re: Hole in the wall
Post by: Dune on August 16, 2018, 01:13:08 PM
That is indeed quite some work. If you want to have hanging plants, you have to rotate the pop 180º.
Title: Re: Hole in the wall
Post by: N-drju on August 16, 2018, 01:43:47 PM
Well, I just discovered that for some reason objects populated with this method clump together in several "pockets" across the population plane leaving the rest of the area completely empty! ??? I have no idea what's wrong, especially that the first pop turned out well. I am now using cyphyr's crystals but I can see no reason why these objects in particular would be "broken" while populating on object! I guess I'll just have to do the whole damn thing by hand! ???
Title: Re: Hole in the wall
Post by: Dune on August 17, 2018, 01:56:56 AM
It works for me. See this (quickly setup) example.
Title: Re: Hole in the wall
Post by: N-drju on August 17, 2018, 02:18:35 AM
Oh wow! Well done Ulco! I'll get my hands on it as soon as I get a chance.

As far as the population clustering and rotation is concerned, I forgot that you can set the rotation angle of pop objects via the object maker. ::) One does not need a cube foundation to do this...

Also, modifying the heading and elevation values in the object maker seems to resolve the "clustering" problem. But this is the first time I see such a strange behavior when populating...
Title: Re: Hole in the wall
Post by: N-drju on August 18, 2018, 04:25:31 AM
I'm sorry. I just can't get it to work... While the .tgd file is pretty simple and works magic, when I try to translate it into my project, it barely hits the spot.

It seems that the solution is correct as some objects made it into the cave. But very few... The rest sit happily on the hill's side as before...

Please have a look at this demo and tell me what else is there. :-[

I use cyphyr's crystal #2 as an object.

______________________

EDIT: Gahhh! I forgot to change painted shader plane to "3D"! It does work! Wonderful!

Title: Re: Hole in the wall
Post by: Dune on August 18, 2018, 06:00:54 AM
 :)
Title: Re: Hole in the wall
Post by: luvsmuzik on August 18, 2018, 08:44:40 AM
Can't wait to see this!  :)
Title: Re: Hole in the wall
Post by: N-drju on August 18, 2018, 02:57:39 PM
Quote from: luvsmuzik on August 18, 2018, 08:44:40 AM
Can't wait to see this!  :)

You mean my cave image luvs? Don't want to bring you down, but I intend to keep it in my private collection. ;) And as a proof of concept of course.

BUT - I already have an idea for a similar setting that I wish to share here for the community's enjoyment.