Planetside Software Forums

General => Terragen Discussion => Topic started by: cyphyr on January 10, 2011, 07:56:00 AM

Title: Terragens volumetric lighting in TRON: Legacy
Post by: cyphyr on January 10, 2011, 07:56:00 AM
I have still to see the film, don't see much cinema out here in the sticks but looking at the images on Planetsides website here (http://www.planetside.co.uk/content/view/62/100/) and I am suitably impressed :)
I've had a quick go with a long tube and some very high luminosity and its clear a different technique was used in TRON: Legacy.
Any ideas what that technique may be?
Cheers
Richard
Title: Re: Terragens volumetric lighting in TRON: Legacy
Post by: Tangled-Universe on January 10, 2011, 08:14:19 AM
I think the volumetric clouds are just a seperate pass, layered in Nuke (or other compositing software) and lighting effects added there as well.
Title: Re: Terragens volumetric lighting in TRON: Legacy
Post by: Oshyan on January 10, 2011, 11:58:16 PM
Correct, there are a lot of layers, composited in post, which allows a lot of tweaking and tuning.

- Oshyan
Title: Re: Terragens volumetric lighting in TRON: Legacy
Post by: Tangled-Universe on January 15, 2011, 07:29:18 AM
CHECK THIS  :o

http://www.digitaldomainvip.com/ (http://www.digitaldomainvip.com/)
Title: Re: Terragens volumetric lighting in TRON: Legacy
Post by: Matt on January 15, 2011, 05:53:38 PM
For the beam we used functions linked to the final density modulator to create the rapid falloff. To illuminate the nearby clouds, a series of point lights were used.

Matt
Title: Re: Terragens volumetric lighting in TRON: Legacy
Post by: cyphyr on January 15, 2011, 06:12:50 PM
Quote from: Matt on January 15, 2011, 05:53:38 PM
For the beam we used functions linked to the final density modulator to create the rapid falloff. To illuminate the nearby clouds, a series of point lights were used.

Matt

Ahh that was the answer I was looking for :) How many point lights were used? And any chance of a clue as to how you used functions to control the light fall off.
:)
Richard
Title: Re: Terragens volumetric lighting in TRON: Legacy
Post by: Matt on January 15, 2011, 07:19:22 PM
Quote from: cyphyr on January 15, 2011, 06:12:50 PM
Ahh that was the answer I was looking for :) How many point lights were used? And any chance of a clue as to how you used functions to control the light fall off.

I don't remember how many lights were used. The fewer you can get away with to cheat the effect, the better. You probably don't need many if your clouds are far enough away. Make sure to choose a maximum distance on each light source, because this makes a big difference to render times.

For the beam falloff function I didn't actually control the lighting, but I controlled the density. I made a very bright cloud by entering a high value for its ambient parameter, which you need to make the core bright enough. Then the effect is created by modulating the density.

Roughly speaking, it goes something like this. To position the line you use a Constant Vector. Any point on the line will do; a line will pass through this point. Subtract the constant vector from Get Position. This gives you the vector from the point you specified to the current position. However, since we want to falloff from a line, not from a point, we need to exclude one of the components of this vector. We can do this using a Build Vector node. For example, if I want my line to travel in the X direction, I will need to build a new vector from the Y and Z components, leaving the X input empty. By excluding the X vector, I now have the vector from the closest point on the line, not just the vector from the point I entered in the Constant Vector.

EDIT: For the Build Vector, make sure its first input labelled "input" is empty, otherwise you will be modifying another vector when really you need to build a new vector from scratch. Use Y to Scalar and Z to Scalar nodes to get the Y and Z components of the Subtract Vector, and plug those into the Y and Z inputs of the Build Vector.

Now I can create my density function with falloff by using a Divide Scalar. The first input to the Divide Scalar is a constant scalar with a positive value (try 10, but it will depend on how large you want the beam to be). The second input is your Build Vector which provides the distance from the line. (The Divide Scalar expects scalar inputs, but it will automatically turn your vector into a scalar by calculating its length, which is exactly what we want from it.)

If you connect all that to the final density modulator of your cloud layer, and the cloud is sufficiently illuminated with the ambient parameter, you should get a beam with a falloff. It will be noisy though, and it has the problem that it forms a singularity at the beam itself. You can fix this by Add Scalar'ing a Constant Scalar to the Build Vector before you divide by it. The larger the constant, the lower the intensity at the centre of the beam.
Title: Re: Terragens volumetric lighting in TRON: Legacy
Post by: cyphyr on January 15, 2011, 07:43:57 PM


thankyou, homework time I guess :)

Richard
Title: Re: Terragens volumetric lighting in TRON: Legacy
Post by: Dune on January 16, 2011, 03:37:17 AM
Thank you for your explanation, Matt. I quickly set it up and it works (no surprise). I only added a color adjust to narrow the beam.
Title: Re: Terragens volumetric lighting in TRON: Legacy
Post by: Henry Blewer on January 16, 2011, 08:20:57 AM
Ulco, I am glad you posted the node group. Matt's explanation left me puzzled, but seeing it makes sense. Sometimes I feel like I'm in 3rd grade math attempting differential calculus. :-[
Title: Re: Terragens volumetric lighting in TRON: Legacy
Post by: cyphyr on January 16, 2011, 08:38:24 AM
Yes thank you both, had a play with Ulco's screen-grab and Matt's explanation and it works very well. I can see a stack of possibilities for this. I was looking a while back for a way to illuminate a "Ring-World" from a central core, this may be it.

This is also a great explanation of how the function nodes work. We can see a great example in the final state and get a much deeper understanding of the more esoteric aspects of the blue function nodes.

More like this please :)

Richard
Title: Re: Terragens volumetric lighting in TRON: Legacy
Post by: rcallicotte on January 18, 2011, 10:49:31 AM
Thanks everyone!  I wouldn't have dared ask and am thrilled Matt answered.  This is great.