Pyro Flame alpha matte problem

   17552   9   4
User Avatar
Member
4 posts
Joined: 4月 2012
Offline
Hello,

I am having trouble rendering an alpha for a Pyro FX flame. The smoke renders an alpha, and regular geometry will as well. But the flames themselves are absent in the final alpha.

What I would like in the end is a beauty pass of the flames (with an alpha that matched the opacity of the RGB) on a transparent background, plus some geometry for a simple matte that the flames wrap around.

As I've tried to solve this issue I've found some pretty big gaps in my knowledge of Houdini, but have not found the solution to this specific problem.

Attached is a simple scene with the basic components I need: lighting, camera, render node, geometry and the default Pyro DOP and Pyro shader. I have kept alterations to the scene elements at a minimum, all I've really done is add the geometry to Forced Matte and the import_pyro node to the Force Objects in the Mantra node.

If someone could point me in the right direction that would be great!

Thanks!

Attachments:
flameAlphaTestScene.hipnc (1.4 MB)

User Avatar
Member
31 posts
Joined: 8月 2010
Offline
This came up recently and it turns out that flames have no alpha (at least as far as I have managed to determine).
The reason for this is that they are not composited the same way. Flames are composited additively, so the alpha's not needed in this case.
./Sven
User Avatar
Member
4 posts
Joined: 4月 2012
Offline
Ah I see. Well that's easy haha.

Yea looking at a composite of flames an additive blend appears to do what I would want regardless of an alpha.

Thanks for clearing that up for me Sven , I was just overthinking it.

Cheers!

DL
User Avatar
Member
67 posts
Joined: 10月 2011
Offline
There is different ways to comp fire. Many compositors have their own ways.
Usually fire is not opaque. But if you want a mask or alpha, you can select the Red channel in comp ( quick fix ) … or….

If you look at the fire Shader in your shop networks, in Utils > Exports Tab you have a set of Variables that you can output in the Mantra plane.

As you can see you have the Fire Mask and Fire Color.

-In the mantra node, Properties > Output Tab add an Extra Image Plane.
-Set Vex Variable > fire_mask
-Set Vex Type > Float (It's written in the shader next to each variable)

Now when you render in ipr you can select the rendered planes individually. When you output an EXR, they will be all rendered in different channels but all in one file.

Hope it helps

lari
User Avatar
Member
4 posts
Joined: 4月 2012
Offline
Ah interesting. The image plane does seem to work, but it appears as though it does not match the C plane, at least not as well as the R channel does.

It looks like it's squashing the heat and smoke so much more of it is opaque than it is in the C render.

I'll have to watch the vids in the sticky on the pyro2 shader and some of the other related videos and see what I can learn, as this whole area is still a bit of a mystery to me.

So far I've mainly just been working with the DOP and the source. I can typically get it to behave how I want it, but not to look how I'd like.

Thanks again for the tips, I'll be back after I've learned some more I'm sure.

DL

Attachments:
fire_maskPlane.jpg (23.7 KB)

User Avatar
Member
67 posts
Joined: 10月 2011
Offline
ohhh!! This is not what you should see!
I'll report that as a bug since I got the same result.
But this is the way to go!

A quick fix, dive in your pyro shader (allow editing of the shader fisrt).
-you will see the on the top of your node tree the 4 export variables.
-add a parameter node and set the name to heat
-connect it to the export_fire_mask input!

This should get you the fire mask properly!
Thx

lari
User Avatar
Member
4 posts
Joined: 4月 2012
Offline
Ah awesome! That worked great

Interesting though, I understand that the heat parameter is driving what the mask looks like, but when I use the parm node it no longer points the out_firemask output from the pyroShade into the fire_mask. Does this mean that some information is no longer pointing into the fire_mask?

I've gotten a couple videos into pyro 2 shader tutorials so some more of this is making sense, but I am still just learning to create fields.

Thanks!

Attachments:
fire_maskPlane02.jpg (87.7 KB)

User Avatar
Member
93 posts
Joined: 3月 2014
Offline
Thank you for this topic! It works like a charm!
User Avatar
Member
12 posts
Joined: 9月 2011
Offline
edit So, I'll try to be a little more clear, was kind of late last night.
I'm trying to reproduce this, and have the flame(heat), to render better so I have the choice to comp it additive or not.

I just made a quick test. Off the shelf torus emitting a flame.

And when I render the alpha just shows the density(smoke) and very faint Alpha.
I edited the Pyro shader (added a parameter and set the name to HEAT) like Larikaram mentioned,but nothing, no change??

I'm on H 14.0.444

could someone confirm that this technique still works?

thanks

Attachments:
fire_render_test.hipnc (2.5 MB)

User Avatar
Member
12 posts
Joined: 9月 2011
Offline
my mistake! In the shader I was hooking up the out_fire onto my parameter and not doing anything with it…DUH!

Better read the instruction carefully, )

I attached a screengrab of the right way to do this and it works like a charm.

Attachments:
heat_param.JPG (17.9 KB)

  • Quick Links