Planetside Software Forums

General => File Sharing => Terrains => Topic started by: dandelO on December 24, 2007, 11:23:56 PM

Title: Cave...
Post by: dandelO on December 24, 2007, 11:23:56 PM
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=#]
Title: Re: Cave...
Post by: dhavalmistry on December 25, 2007, 12:23:49 AM
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....
Title: Re: Cave...
Post by: dandelO on December 29, 2007, 05:35:11 PM
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. ;) 
Title: Re: Cave...
Post by: dandelO on January 01, 2008, 11:05:29 PM
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=#]
Title: Re: Cave...
Post by: rcallicotte on January 02, 2008, 12:18:45 PM
Wow, dude dandelO, cool.  Thanks.
Title: Re: Cave...
Post by: monks on January 03, 2008, 09:15:22 AM
Very cool! Great sense of place and lots left to the imagination :)

monks
Title: Re: Cave...
Post by: Alf15000 on January 06, 2008, 11:50:25 AM
Very interesting...Thank you for sharing !
Title: Re: Cave...
Post by: Vyacheslav on March 04, 2011, 12:08:54 PM
My version of the cave.

Title: Re: Cave...
Post by: airflamesred on March 04, 2011, 12:28:31 PM
Interesting
Title: Re: Cave...
Post by: Volker Harun on March 04, 2011, 12:39:44 PM
Cool dungeon walkway ...
Title: Re: Cave...
Post by: inkydigit on March 07, 2011, 06:52:21 AM
vry nice implementation!
Title: Re: Cave...
Post by: DannyG on March 13, 2011, 12:02:39 PM
Thks dandelO and Vyacheslav (MOJO SLAV  ???)
Title: Re: Cave...
Post by: bobbystahr on May 03, 2011, 10:51:58 AM
Echoing DannyGordon here...well thought out mate.. ...