Planetside Software Forums

General => Terragen Discussion => Topic started by: Dune on June 18, 2018, 08:39:15 AM

Title: gradual transparency method
Post by: Dune on June 18, 2018, 08:39:15 AM
I thought this was the way to make a gradual transparency. Glass shader followed by a surface shader masked by a greyscale texture, as texture on card. I added a firetexture (color) to the luminosity input.
But I get a strange background, so this might not work at all. It was even worse when adding a second card for smoke, done the same way. I tried several variables in the glass shader, but to no avail.
Any feedback is greatly appreciated, as always.

My aim was to add flames to the logs. Clouds are too 'rough' for these tiny sizes.
Title: Re: gradual transparency method
Post by: Hetzen on June 18, 2018, 09:16:23 AM
Do it in Photoshop.  :)
Title: Re: gradual transparency method
Post by: Dune on June 18, 2018, 09:33:53 AM
Yeah, that would be the fastest and easiest way  :P And I think I will actually.
Title: Re: gradual transparency method
Post by: WAS on June 18, 2018, 12:43:57 PM
Quote from: Dune on June 18, 2018, 08:39:15 AM
I thought this was the way to make a gradual transparency. Glass shader followed by a surface shader masked by a greyscale texture, as texture on card. I added a firetexture (color) to the luminosity input.
But I get a strange background, so this might not work at all. It was even worse when adding a second card for smoke, done the same way. I tried several variables in the glass shader, but to no avail.
Any feedback is greatly appreciated, as always.

My aim was to add flames to the logs. Clouds are too 'rough' for these tiny sizes.
my fire pit flames we're only 1.5 feet long. It can be done with clouds. The cloud jitter breakups clouds on small scale.
Title: Re: gradual transparency method
Post by: j meyer on June 18, 2018, 02:18:06 PM
Shouldn't the glass shader be connected to the child input to work properly?
And there may still be the 'AO behind transparent surfaces' problem in TG4.
Title: Re: gradual transparency method
Post by: Dune on June 19, 2018, 12:56:32 AM
I'll try both, but painting in is what I've done now. Thanks.
Title: Re: gradual transparency method
Post by: mhaze on June 19, 2018, 04:22:06 AM
When, oh when, will be get true grey scale transparency?
Title: Re: gradual transparency method
Post by: bobbystahr on June 19, 2018, 07:19:52 AM
Quote from: mhaze on June 19, 2018, 04:22:06 AM
When, oh when, will be get true grey scale transparency?

Hear Hear...seems like a no brainer from all the other apps it's in
Title: Re: gradual transparency method
Post by: Hannes on June 19, 2018, 09:09:33 AM
I guess, this is basically the same method you mentioned once before when I tried to create fake motion blurred rotors for a helicopter during the roadside contest, right?
This worked for me perfectly for creating cigarette smoke for my "To B in the living room" image for example. No idea, why this doesn't work here. Did you increase the ray detail multiplier?

Just in case I attached the setup you showed me at the time.
Title: Re: gradual transparency method
Post by: Dune on June 19, 2018, 09:21:16 AM
Thanks Hannes. Yes, that's the way I thought it worked, but apparently not this time  :P Maybe the luminosity (from another mask) is playing havoc. With just a basic color in the surface shader it might work as expected. And I didn't increase it, no. I'll have another go, just for the sake of it.
Title: Re: gradual transparency method
Post by: Hannes on June 19, 2018, 09:40:48 AM
I'll think you'll have to increase it, because otherwise everything behind the (glass-) plane might look pixellated. Maybe that's one of the reasons?
Title: Re: gradual transparency method
Post by: Hannes on June 19, 2018, 09:41:20 AM
... and you might play with the IOR.
Title: Re: gradual transparency method
Post by: Dune on June 19, 2018, 11:13:29 AM
Yeah, but IOR is already at 1.
Title: Re: gradual transparency method
Post by: Matt on June 19, 2018, 12:45:42 PM
It seems to be affecting just the terrain. Anything unusual with advanced render subdiv settings?

Can you simplify the scene so it demonstrates just this issue, with only the terrain, fire and light sources?

Matt
Title: Re: gradual transparency method
Post by: Dune on June 19, 2018, 01:09:06 PM
Yes, it does. And no fancy settings there. I'll do a simple setup.....
Title: Re: gradual transparency method
Post by: Dune on June 20, 2018, 07:53:54 AM
Got the culprit; doublesidedness of the card (and subdiv settings were needed to get the haze of low res background off).
Title: Re: gradual transparency method
Post by: Hannes on June 20, 2018, 08:19:37 AM
Good to hear!
Title: Re: gradual transparency method
Post by: Dune on June 21, 2018, 12:03:40 PM
Yes, but I'm still having problems. There seems to be some inconsistency when rendering; one time background is transparent, but ground turns black, second time it turns white. I had it working once, but in a second render it was wrong again. Very weird. And also when using 2 cards (fire and smoke), it's not always going well.
Okay, painting in is easier, but I'd still like to know why. And it may be something that needs debugging.
So here's a few files (you have to recall png's) and a test I did.
Anyone has a better solution, please post.
Title: Re: gradual transparency method
Post by: Hannes on June 21, 2018, 01:38:54 PM
Weird! If you use two cards there may be some difficulties when there are two glass shaders involved. I had the problem that when I have two objects with glass shaders behind each other the one behind renders black in some cases.
Title: Re: gradual transparency method
Post by: luvsmuzik on June 21, 2018, 04:50:54 PM
You may also be able to do your transluparency trick w/o the glass shader. Give it lots of specular and some reddish/orange luminosity and transparency. I am glad to know I am not the only one this inconsistency happens to, however. Sometimes I even have to change an image made with an alpha channel to alpha from color, fiddling with tolerance also. There has to be some other trickery that gets in the way.
Title: Re: gradual transparency method
Post by: WAS on June 21, 2018, 09:00:08 PM
While this is more of a possible bug solving issue with setup, I still adivse to just do it in TG. You'll have a more natural final product for the scene. Additionally you have animation control and can vary it's look easily for different shots without a repeating stock elements.

I'm not sure if the flames are placeholders or not but they're a lot less realistic than you can achieve with TG alone (little swirly). And of course, my AA quality is limited to begin with, on top of a slow PC, but even with cloud quality adjustments and GI to Still / Very High, it looks pretty darn good

You can get all sorts of looks playing with your redirector and coverage adjust such as negative values for more wispiness, making it much more like what you have.
Title: Re: gradual transparency method
Post by: Dune on June 22, 2018, 01:31:29 AM
I've been thinking to project the flames and clouds onto a small cloud, but still have to test whether that works without too much grain. Is that what you're talking about too?
This is mainly about the principle of the transparency though.
Title: Re: gradual transparency method
Post by: WAS on June 22, 2018, 11:55:39 AM
That is all 100% cloud. Grain is tied to quality which can be rendered out. Like I said my AA is locked in at 6 and grain is minimal with adjustments.

I am not sure how a projection would work though I imagine with similar quality settings to get rid of noise it could work.

Here's a copy with ridiculous cloud quality, still could be better with AA
Title: Re: gradual transparency method
Post by: Dune on June 22, 2018, 01:42:03 PM
This looks very good. So, it's procedural and on real world scale?? I need a campfire of only 50cm across and 1m high or so.
Title: Re: gradual transparency method
Post by: WAS on June 22, 2018, 03:05:32 PM
Quote from: Dune on June 22, 2018, 01:42:03 PM
This looks very good. So, it's procedural and on real world scale?? I need a campfire of only 50cm across and 1m high or so.

I'm sure it could be scaled down, this I believe is based on 2m circle shape masking the base PF. I'll send a clip.
Title: Re: gradual transparency method
Post by: Matt on June 22, 2018, 10:16:22 PM
Ulco,

With your example files I made the following changes:

Enabled both cards.
Enabled 'double-sided surface' on both Glass Shaders.
Slightly moved the position of one of the cards so that they are not in exactly the same place.

The only thing that isn't quite right is that GISD isn't applied to the ground where it is seen through the cards.

Matt
Title: Re: gradual transparency method
Post by: WAS on June 22, 2018, 10:18:34 PM
Here is a fire at 50cm. 12m render time, but the internal cloud quality settings are very high to compensate for my lack of AA. I am sure with a non-free version the clouds would be much easier to denoise with AA over absurd internal settings. Sent you a file.
Title: Re: gradual transparency method
Post by: Dune on June 23, 2018, 01:50:42 AM
Thanks guys. I wonder why I didn't get a good result then, if it worked for you. The cards weren't exactly in the same place when I tried first, but I remember having copied the one working for the other one, and not relocating again for this testfile. I'll have another go.
Title: Re: gradual transparency method
Post by: WAS on June 23, 2018, 02:03:05 AM
Quote from: Dune on June 23, 2018, 01:50:42 AM
Thanks guys. I wonder why I didn't get a good result then, if it worked for you. The cards weren't exactly in the same place when I tried first, but I remember having copied the one working for the other one, and not relocating again for this testfile. I'll have another go.
I've had some wonky stuff happen copying stuff. Who knows.
Title: Re: gradual transparency method
Post by: luvsmuzik on June 23, 2018, 08:03:31 AM
WASasquatch your examples are great! I think Ulco shared a cloud column file long ago that would convert nicely to flames or smoke with little tweaks. It uses a SSS too.
Thanks for the input on those card objects, all. I have used the shattered rock with glass shader for flames also, making the rock more egg shaped (double y value to x&z) That can add some embers in you fire bed. Pops of small fake stones floating around are doable too.
Title: Re: gradual transparency method
Post by: Hannes on June 23, 2018, 09:34:41 AM
Very interesting thread! WAS, maybe you could share your file? Looks fantastic!
Title: Re: gradual transparency method
Post by: WAS on June 23, 2018, 10:33:43 AM
Quote from: luvsmuzik on June 23, 2018, 08:03:31 AM
WASasquatch your examples are great! I think Ulco shared a cloud column file long ago that would convert nicely to flames or smoke with little tweaks. It uses a SSS too.
Thanks for the input on those card objects, all. I have used the shattered rock with glass shader for flames also, making the rock more egg shaped (double y value to x&z) That can add some embers in you fire bed. Pops of small fake stones floating around are doable too.

Thanks, the original firepit I made has a nice little pile of coals and embers. I'll setup a scene for sharing.
Title: Re: gradual transparency method
Post by: WAS on June 23, 2018, 06:56:04 PM
Alright I uploaded an example flames, and Dune, there are several edits to this setup that may improve look for your final scenes, especially in Flame colouring, which uses a new method for realism.

https://planetside.co.uk/forums/index.php/topic,24664.msg250711.html#msg250711
Title: Re: gradual transparency method
Post by: Dune on June 24, 2018, 01:01:06 AM
Thanks for your input, WAS, but as said in your sharing post; I won't be using your specific setup due to its demand for rendertime. And also because I won't use stuff that's restricting me; a lot of my work is not just for private means. So I prefer my own devices. But the setup is nicely done, and gives very believable flames. I too look forward to what people do with it.