Planetside Software Forums

General => Terragen Discussion => Topic started by: Alfamike on October 05, 2008, 12:36:59 PM

Title: How can one find ceilings, i.e. the bottoms overhangs?
Post by: Alfamike on October 05, 2008, 12:36:59 PM
Fit like abody?

I have been wondering about this before but never managed to find a solution.

My question is how to restrict a certain shader to the bottom of overhangs. The 'ceiling' of the overhang that you'd see when you're standing underneath it looking straight up. I think we'd need more variables in the distrib shader or surface layer shaders, but I might be wrong.

My thoughts have been going in the direction of somehow using shadows that are created by the sun, but that pretty much was where my latest idea stopped. Not been able to do anything with it.

Anybody who can shed some light on this? Much appreciated, as always.

Cheerio.
AM.

EDIT: I'm not wanting to render an image upside down, if that's what you jokers would like to suggest.  ;)
Title: Re: How can one finding ceilings, i.e. the bottoms overhangs?
Post by: cyphyr on October 05, 2008, 01:41:46 PM
I'm thinking that your after making stalactites and hanging ferns etc. Now this is a very good idea but I'm unsure how you'd do it. Its hard enough getting objects to populate verticle surfaces. Good luck, I hope someone has a solution.
Richard
Title: Re: How can one finding ceilings, i.e. the bottoms overhangs?
Post by: Alfamike on October 05, 2008, 02:15:58 PM
Quote from: cyphyr on October 05, 2008, 01:41:46 PM
I'm thinking that your after making stalactites and hanging ferns etc. Now this is a very good idea but I'm unsure how you'd do it. Its hard enough getting objects to populate verticle surfaces. Good luck, I hope someone has a solution.
Richard

Bastard  :P ..... yes, that's the idea. We'll see if the wise men come along.
Title: Re: How can one find ceilings, i.e. the bottoms overhangs?
Post by: cyphyr on October 05, 2008, 03:14:16 PM
I have a solution now, just rendering out the image and I'll post the tgd and simple object I used. Basically the only un-obvious part was that the object had to be turned upside down otherwise it did populate the overhang but did so within the rock surface !!
Bout half an hour ...
Richard
Title: Re: How can one find ceilings, i.e. the bottoms overhangs?
Post by: bigben on October 05, 2008, 03:43:19 PM
Try restricting the slope to >90 degrees?
Title: Re: How can one find ceilings, i.e. the bottoms overhangs?
Post by: cyphyr on October 05, 2008, 04:17:26 PM
Here you go, should be fairly self explanatory, but do ask if you have any q's. By the way the overhang is just a crater shader with a large displacement restricted by height. ;)
Richard
Title: Re: How can one find ceilings, i.e. the bottoms overhangs?
Post by: Oshyan on October 06, 2008, 12:15:06 AM
Yes, use slope values greater than 90 degrees (or try negative values).

- Oshyan
Title: Re: How can one find ceilings, i.e. the bottoms overhangs?
Post by: Alfamike on October 06, 2008, 02:46:31 AM
Quote from: cyphyr on October 05, 2008, 04:17:26 PM
Here you go, should be fairly self explanatory, but do ask if you have any q's. By the way the overhang is just a crater shader with a large displacement restricted by height. ;)
Richard

Ace, guys!

The simple solutions are often the best and sometimes the only ones. I'll have a play with your TGD later today.

AM.
Title: Re: How can one find ceilings, i.e. the bottoms overhangs?
Post by: Mohawk20 on October 06, 2008, 01:18:40 PM
I actually did a test with shaders that were only visible at the underside by using negative values, see example:
Title: Re: How can one find ceilings, i.e. the bottoms overhangs?
Post by: Alfamike on October 07, 2008, 02:52:24 AM
Quote from: Mohawk20 on October 06, 2008, 01:18:40 PM
I actually did a test with shaders that were only visible at the underside by using negative values, see example:

Goedemorgen Mohawk20,

Stom dat ik niet aan negatieve hoeken heb gedacht, zat al met m'n kop in de functienoden naar normalen te kijken. Dit maakt het in ieder geval veel makkelijker.

AM.
Title: Re: How can one find ceilings, i.e. the bottoms overhangs?
Post by: Alfamike on October 07, 2008, 06:05:33 AM
This works fine when you restrict by slope, like mentioned before in this thread.

However, it does not show in the render preview.

AM.
Title: Re: How can one find ceilings, i.e. the bottoms overhangs?
Post by: Alfamike on October 07, 2008, 06:06:44 AM
Quote from: Alfamike on October 07, 2008, 06:05:33 AM
This works fine when you restrict by slope, like mentioned before in this thread.

However, it does not show in the render preview.

AM.

I take that back. TG was in the process of crashing. Now, after a restart it does show up in the preview.

AM.