Finally - My procedural cave

Started by dandelO, May 06, 2009, 09:27:34 PM

Previous topic - Next topic

dandelO

I've been trying this cave thing since starting out with TG2, nearly a couple of years back now. I've had none-to-limited success, up until today.
I had an epiphony on the bus home from work(I get most of my good TG ideas when I'm away from the computer.)

The 'epiphony' was false, however. I'd imagined I could displace a vertical cliff(of planet terrain) running left/right and simply use a redirect shader to apply Z-depth displacement with the crater shader. Nope! No cigar.

I wasn't about to let that beat me when I knew I was so close, so, I hacked away a bit more and found my solution; Make a plane object >> apply the same colour/displacement as your terrain >> add a crater shader >> rotate the plane onto its vertical! This rotates the crater, and any other displacements, too! :o ;D

This is just a low quality proof of concept image, entirely TG generated, and quick!:

[attachimg=#]

More to follow...

neuspadrin

So simple! Brilliant!

Great job, but what does it look like zoomed out ;) that'll be the trick, making caves from a distance too. But this looks like a great method to get some mid/close up caves now.

cyphyr

#2
I've never used the plane for anything, couldn't see much point in it really.
But this opens up some interesting posibilities.
Good find, could you use an image shader too/instead (or painter shader even), make the edges more gagged?
rivhard
www.richardfraservfx.com
https://www.facebook.com/RichardFraserVFX/
/|\

Ryzen 9 5950X OC@4Ghz, 64Gb (TG4 benchmark 4:13)

dandelO

#3
Nope, I've been doing/playing with it with images and paint shaders for months, it works to a point but it isn't what I was after. This, however, is. Entirely procedural displacements. You don't even need computed normals because it's on a plane object which will convert the crater to the lateral of the plane's vertical.

As said, this is just a proof-test, cheap and nasty. The edge jagging will come tommorow when I start with a redirect shader(maybe more than one) and some strata on the walls...

Stay tuned, it's all working just as it should, so far. I've literaly just 'got it' in the last few minutes so I'll update it and really make it something better than the above soon...

Neuspadrin: Ha-ha, this cave is actually 100m across, I've fooled perceptions with this test, it looks smaller.
If you make the crater, say, 1000m diameter and zoomed further away, whilst adjusting fractal displacements on the walls to match, this could be easily(I'm hoping) blended into a coastal landscape etc. with some creative licence. I'll plug at this tommorow, got to sleep now, working in the morning. :(

dandelO

QuoteI've never used the plane for anything, couldn't see much point in it really.

I rather like to use planes. It's great for creating terrains and such. Also, you can use planes, stacked up, to have the lower one protrude through the upper, this is how I made the 'puddles' on the table top in my 'Sweaty Balls' image, the lower plane has a water shader with fractal displacement, which protrudes through the upper 'tabletop plane'...  http://forums.planetside.co.uk/index.php?topic=4744.0

rcallicotte

Congrats, dandelO.  Caves are a big thing around here and you've come up with something ingeniously simple.  Now, if I can just understand what you did.   ;D
So this is Disney World.  Can we live here?

dwilson

Great Job.  This will be a project that we will all learn from.

Seth

i use canyon structure to do caves... with pretty convincing result i think.
http://farm4.static.flickr.com/3329/3227355141_d2f114a6aa_o.jpg
http://farm4.static.flickr.com/3098/3227354753_cc5f78db90_o.jpg

but you worked on a very ingenious technique ! good job ^^

j meyer

How about covering a canyon with a horizontal plane with the
visible side downwards? One could add a second plane facing
upwards for distance shots maybe,lots of fiddling,but should be
possible.

FrankB

Great job and good use of your imagination!

Frank

rcallicotte

I've done this a year or so ago and it works.  But, this method here seems more realistic.  Or maybe I just didn't implement it like you're thinking.


Quote from: j meyer on May 07, 2009, 10:23:44 AM
How about covering a canyon with a horizontal plane with the
visible side downwards? One could add a second plane facing
upwards for distance shots maybe,lots of fiddling,but should be
possible.
So this is Disney World.  Can we live here?

dandelO

Here's another preview image of where I'm going with this procedural cave, so far.

Texturing - not so great yet.
Displacements - getting there.

[attachimg=#]

The ground is the main planet terrain, the cave is a plane. It's blending quite seamlessly.

Now to manipulate the cliff/cave plane so that the straight edges(unseen in these shots) can be blended into a landscape, this'll be the hard(if not impossible) part.
I've a few ideas about an opacity channel combined with a larger scaled fractal displacement function, using the inverse of the cave shaders as bleding shader, to remove the straight plane edges. This way, the cave structure would be unaffected, whilst the edges of the plane could be feathered. Maybe...


Dune

I have been experimenting with a cave as well by using a crater shader, an angled water plane halfway across the crater and an angled POV. It's tricky moving around, and the sky is vertical. No time to get it any further at the moment.


---Dune

Hetzen

I'm just rendering out something I've been working on today, and had a go at doing a cave. I think I cracked it. Will post it up in the Image area later once it's rendered (went a bit mad with the cloud quality, so it's taking ages), but basicaly I used a paint shader to mask a new PF with a displacement of 1000, the important bit was to add a compute normal between the basic landscape and the painted cave diplacement, then plugged that into the compute terrain node.

I then found I could then apply lateral displacement to the cave walls with another compute normal through a surface shader mask.

Aagam

Wow that's quite impressive, nice work!. This will actually work quite well for something I'm working on...