Planetside Software Forums

General => Terragen Discussion => Topic started by: PeanutMocha on April 24, 2011, 01:53:54 AM

Title: Sky Feature
Post by: PeanutMocha on April 24, 2011, 01:53:54 AM
I have a procedural starfield in my scene from

http://forums.planetside.co.uk/index.php?topic=4391.msg46100

Now I want to place an additional feature in the sky for which I have an image.  My thought was to add a plane, rotate it appropriately, make it big and far from the planet.  Unfortunately I can't figure out how to light my plane independently from the rest of the scene.

Am I taking the best approach?  Can I get the desired lighting this way? 

Title: Re: Sky Feature
Post by: choronr on April 24, 2011, 02:08:12 AM
Perhaps using a light source ...not sure.
Title: Re: Sky Feature
Post by: Dune on April 24, 2011, 02:24:35 AM
Just a thought; you could try self illuminating the image, by calling the image in the default shader's luminosity, and setting the luminosity at some high number (experiment). Just a thought thought, I never tried this. You'd also have to call the image (black edges I suppose, or alpha layer included?) in the opacity tab, to keep the outside black.
Title: Re: Sky Feature
Post by: PeanutMocha on April 24, 2011, 03:08:28 AM
Quote from: Dune on April 24, 2011, 02:24:35 AM
Just a thought; you could try self illuminating the image, by calling the image in the default shader's luminosity, and setting the luminosity at some high number (experiment). Just a thought thought, I never tried this. You'd also have to call the image (black edges I suppose, or alpha layer included?) in the opacity tab, to keep the outside black.

Tried to plug the image file into the default shader's luminosity file input with no success.  It's a PNG with alpha channel.

Been a long evening/night of learning TG2.  Maybe I'll have more success in the morning.
Title: Re: Sky Feature
Post by: PeanutMocha on April 24, 2011, 11:06:37 AM
Almost have it working now... was overtired and had the nodes plugged wrong.

The only remaining issue... as I  move my plane further and further from the origin, a smaller and smaller portion of the original image appears projected on the rectangle.  I'm pretty sure this has to do with projecting through the render camera, but not sure how to overcome the problem.  Do I need to create a new camera close to the rectangle's final position with the correct orientation and project through that camera?
Title: Re: Sky Feature
Post by: Hetzen on April 24, 2011, 11:22:58 AM
Yes, create another camera to use as the plane's image projector. Or, if the plane is in a 90 degree angle, you can try and use the XY projectioon type in the image node, which eliminates the need for a camera. Just make sure you type in the plane's dimensions into the image map shader's size, position it at the same location as your plane object.
Title: Re: Sky Feature
Post by: PeanutMocha on April 24, 2011, 11:37:15 AM
Worked!  I ended up just putting a new camera in front of the plane.
Title: Re: Sky Feature
Post by: Dune on April 25, 2011, 02:43:24 AM
Great, I'd like to see the result.
Title: Re: Sky Feature
Post by: PeanutMocha on April 25, 2011, 07:22:43 PM
You can see the result in the background of the pictures with the flowers in the foreground here:

http://terragen2.wordpress.com/2011/04/24/glowing-in-style/

The sky feature is the two dragons "battling" in among the stars.

I'll do a more prominent render of it when I get home tonight.
Title: Re: Sky Feature
Post by: PeanutMocha on April 27, 2011, 12:51:20 AM
Here's a more prominent rendering of the sky feature "Skydragons".