Question regarding light, shadows, and restriction

Started by nvseal, March 03, 2007, 07:59:50 PM

Previous topic - Next topic

nvseal

I've been wondering if it is possible to restrict a surface layer (or distribution, just any layer) by using the location of light and shadow. Snow, for example, will not melt as quickly in a shadow as it will in direct sunlight and I thought this might be interesting to recreate in terragen. Does anyone know if this is possible? and if so, how?

mrwho

I think you'd just have to use image masks, I doubt TG would recognize sunlight/shadow. It'd be cool though

rcallicotte

Never say never, though I actually don't know.  I've seen people doing things with TG2 that -

1.  I didn't imagine possible.
2.  Someone said it couldn't be done and it was.

It might take some work, but there ya' go.
So this is Disney World.  Can we live here?

old_blaggard

While I'm all for experimentation, I'm a bit of a skeptic on this one.  If you do come up with something, though, I'll be the first to jump on the bandwagon ;).
http://www.terragen.org - A great Terragen resource with models, contests, galleries, and forums.

neon22

possibly something like this:
- assuming you have an image map for the light and shadow already
- place a camera where the light source is.
- make an image map shader and use the image projected from the new camera.
So now will be projecting from the light source's POV.
Use this as input to your distribution or surface layer

To make the map be the same as the clouds in your scene:
- place a camera at the light source.
- Do a separate render pass of your clouds but onto flat terrain. do it B&W if you can - else monochrome it after render.

Not sure about aspect ratio of this rendered image though.. would have to experiment with that to get it to fit I think..
Possibly Ben's stuff on orthogional rendering for making panoramas (or environment maps) will be helpful for this.



Oshyan

It may be possible to do this at render time through the Function nodes, however it sounds more like what you're after is a realistic result of *overall* lighting throughout the day, not immediate lighting. For that you would probably create your mask in another application like World Machine, taking into account the theoretical position of your terrain in the world, the season, and thus the amount of time the sun is in the sky and what angle it would be at. Yes, I realize this is overkill. ;) A simpler approach would be just to use an angle select in for example World Machine and use that as a partial mask for snow or other surface layers. This could be used to simulate the "south facing slopes" tendency, for example. This is not something that would likely be worthwhile to actually simulate in TG, but faking it with simple angular selection should be possible in the future inside TG2 itself.

- Oshyan