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=#]