Cave...

Started by dandelO, December 24, 2007, 11:23:56 PM

Previous topic - Next topic

dandelO

I see this written everywhere, or something along these lines anyway... "I wish TG2 could do caves"...

This is a quick cave method I found whilst trying to make the doorways for the collisseum building .tgd I posted here the other day. Someone else has no doubt found the same, or a better way of making a cave but, I haven't seen it if there is one, so I'll share my findings here.

This is exactly the same method except, this time, the render camera is inside the lateraly displaced 'cave'.
The cave walls are square because the displacement image is a blank, white, square imagemap, you could use a different shaped B+W image for the displacement though, black won't displace/white will. A jagged, white circular hole on a black BG could easily be used as the cave opening...

Right, the file is very straight forward...

1. A crater shader(with negative depth value and no skirt/rim/etc. and very high rim tightness) makes the wall that the cave will be set in.

2. A second camera projects the imagemap on the wall from outside. (or an area of the wall can probably be assigned with functions, that I know nothing of, instead of an imagemap maybe?)

3. The imagemap is used as the displacement function of a basic displacement shader, which is then inserted into the Z shader of a redirect shader, the crater shader goes into the inpute node of the redirect shader before going to planet 1.

Merry Christmas!

dandelO.

[attachthumb=#]

dhavalmistry

interesting...but it looks more like a tunnel then a cave....ofcourse more study required...I will look at it and see if I can come up with anything....
"His blood-terragen level is 99.99%...he is definitely drunk on Terragen!"

dandelO

Yup, granted, it is more a tunnel but, I think it has potential... For instance, maybe (and probably maybe not at this point in T2) another displacement shader, like a PFS, could be racked up after this original horizontal displacement(the tunnel) to bump the sides in a cavelike fashion or something?

Dunno, I'll play around with it some more and post any decent results I get... Sorry, that's: If any. ;) 

dandelO

OK, here's an edited cave test file, it now has a proper entrance(instead of a square tunnel) and there's some water outside.

If you load it up in your own Terragen 2 you obviously won't have the heightfields to the left and right hand sides but you get the general idea...

Attatched is a low quality render of the very basic outline scene. Terrains, textures, lighting, etc. can all be ignored here, this is just a tester for the basic settings of a cave type render. The walls of the cave still suffer from the displacement stretching syndrome and the only way to fix that at the moment is with images being added after all of the shaders(PFS's don't work for breaking up those stretched areas, I've tried), but I haven't done that here.

Thanks for your eyeglances/suggestions/etc's.

[attachthumb=#]

rcallicotte

Wow, dude dandelO, cool.  Thanks.
So this is Disney World.  Can we live here?

monks

Very cool! Great sense of place and lots left to the imagination :)

monks

Alf15000

Very interesting...Thank you for sharing !

Vyacheslav

My version of the cave.


airflamesred


Volker Harun

Cool dungeon walkway ...

inkydigit

vry nice implementation!

DannyG

Thks dandelO and Vyacheslav (MOJO SLAV  ???)
New World Digital Art
NwdaGroup.com
Media: facebook|Twitter|Instagram

bobbystahr

Echoing DannyGordon here...well thought out mate.. ...
something borrowed,
something Blue.
Ring out the Old.
Bring in the New
Bobby Stahr, Paracosmologist