Planetside Software Forums

General => Terragen Discussion => Topic started by: cyphyr on September 07, 2018, 07:30:42 AM

Title: Starburst render layer ?
Post by: cyphyr on September 07, 2018, 07:30:42 AM
I know the starburst is a post process effect but is there any way to have it available as a separate render layer?
It seems not possible to match the beauty pass output with one created via merging render layers.

I think this may have been asked before but I can't find the thread.
Title: Re: Starburst render layer ?
Post by: Matt on September 07, 2018, 01:51:07 PM
Do you mean render element? I might be able to add this. Somewhat counter to intuition, some pixels will have negative values. This is because it redistributes energy from bright pixels to dark pixels (just like a blur does), therefore the brighter pixels become less bright, so for an "additive workflow" the render element will be negative in those areas. Thankfully, EXR and Nuke eat this stuff for breakfast (but not all tools do).

EDIT: If you are using compositing software that doesn't like negative values, clamping at 0 would be visually OK, but wouldn't reproduce the beauty element 100%.
Title: Re: Starburst render layer ?
Post by: cyphyr on September 07, 2018, 04:37:00 PM
Yes render elements.
Awesome, actually I am using Nuke.
I tried subtracting (minus) the comped output (which perfectly matches the .tgrgb output) from the base "beauty" output, which has the starburst embedded, but the result was not a pure starburst.

Looking forward to seeing this as a capability. Other post process effects could also be useful.
Title: Re: Starburst render layer ?
Post by: Matt on September 07, 2018, 07:21:07 PM
Quote from: cyphyr on September 07, 2018, 04:37:00 PM
Yes render elements.
Awesome, actually I am using Nuke.
I tried subtracting (minus) the comped output (which perfectly matches the .tgrgb output) from the base "beauty" output, which has the starburst embedded, but the result was not a pure starburst.

This is exactly what I would do in code (beauty - tgRgb) to get a "tgLens" element. So you're already there. But it'll also include bloom if you have that enabled. I'd expect the brighter parts of the scene to end up negative, surrounded by positive streaks and glows, but it's probably quite an interesting image. Is that what you're seeing, or something else? Care to show us a picture?

Matt
Title: Re: Starburst render layer ?
Post by: cyphyr on September 07, 2018, 07:39:38 PM
Here's a screeny.
I was hoping for a simple black image with a white (I guess it would be coloured by the source pixels actually but pretty "white" anyway) starburst.
Is this the AA bloom maybe?
Title: Re: Starburst render layer ?
Post by: WAS on September 07, 2018, 08:02:03 PM
Quote from: cyphyr on September 07, 2018, 07:39:38 PM
Here's a screeny.
I was hoping for a simple black image with a white (I guess it would be coloured by the source pixels actually but pretty "white" anyway) starburst.
Is this the AA bloom maybe?

Perhaps it's negative values detracting from the original colour values of the glows. Looks like inverted colours, which I think falls in line with negative values.
Title: Re: Starburst render layer ?
Post by: Matt on September 07, 2018, 08:15:07 PM
It isn't quite what i expected. But I think it looks like this because the starburst is a global diffusion effect. It's not just applied to the brightest pixels, its applied to every pixel because it's trying to be physically correct. Darker pixels become brighter (by contributions from nearby bright pixels) and bright pixels become darkened as they distribute energy to nearby dark pixels. So it kind of resembles a film negative, except its biased by the starburst filter and by the amount of energy being moved around. But it's all centred around 0. Regions of uniform colour end up black (0) in this image. Half of the image is below 0.

Ok, that's too much maths. But basically I can see why it would look this way - it's what needs to be added to the other elements to turn them into the softened version that the sunburst filter creates. Basically, if it was just a positive image of the starburst itself it wouldn't create a physically plausible image when added to the original.

Or... there's something else happening I don't know about yet...
Title: Re: Starburst render layer ?
Post by: Matt on September 07, 2018, 08:34:13 PM
What does it look like if you offset it up by +0.5 ?
Title: Re: Starburst render layer ?
Post by: cyphyr on September 07, 2018, 08:52:58 PM
Not sure what you mean?
Title: Re: Starburst render layer ?
Post by: Matt on September 07, 2018, 09:17:54 PM
In Nuke, a Grade node with an offset of 0.5.
Title: Re: Starburst render layer ?
Post by: cyphyr on September 08, 2018, 04:15:34 AM
Ah, I see.
Here is a screen grab of the 0.5 grade when applied to the beauty (tgrgb).
Applying it to the comp of the render-elements produces black.