Jump to content

Object light emitter in houdini, how to? please


nmn

Recommended Posts

Hi everyone

i was wondering what is the houdini way of using objects as light emitters.

the equivalent in maya would be by taking taking the color or the incandecense of that object to a high value

then render with MR FG and you will directly get a result as if your object was wmitting light

anyway of doing such a thing in houdini, and how to achieve that.

Thanks

Regards

Link to comment
Share on other sites

Pretty similar really. Just boost the color/texture values on your object, and if you're rendering with global illumination (either with the GI tools or PBR) it will act as a light. It's a pretty noisy method though, generally the larger your light object the better off you are, but you probably know that already. :]

Link to comment
Share on other sites

Pretty similar really. Just boost the color/texture values on your object, and if you're rendering with global illumination (either with the GI tools or PBR) it will act as a light. It's a pretty noisy method though, generally the larger your light object the better off you are, but you probably know that already. :]

Here is a quick example.

(Note that this is different for PBR rendering)

hou_gi_emmitor.hip

Link to comment
Share on other sites

thank you guys much appreciated, thanks jason for the file it cleared up some things.

so all i had to do is create a light template and attach a vex gi shader to it with full irradiance - the gi method

any tip of how to achieve the same also with PBR ? do you mean by that emitting photons ...etc ? because in maya emitting photons only happens from a light, and if i just delete the gi light and render with pbr ... well my object stops being a light emitter. (hope that question was clear lol)

though there are some problems i'm facing :

- is there any default light like the one in maya?because in your scene jason if i delete the gi light and render the objects with clay material render black, while if i recreate the same scene as yours whenever i delete the gi light the render falls back to a default gray as if there is some kind of default light...

- whenever i try to use anything other than the constant shader, i boost up the color and it keeps rendering black ... it doesn't emit light :| , unless i use another light like a point light for example to light it ... and it has many limits such as that it only emits from the side lit by the point light

is there any resource or tutorial or any kind of help about mantra shaders ? and especially how to use them ?

Thanks again

Best Regards

Edited by nmn
Link to comment
Share on other sites

though there are some problems i'm facing :

- is there any default light like the one in maya?because in your scene jason if i delete the gi light and render the objects with clay material render black, while if i recreate the same scene as yours whenever i delete the gi light the render falls back to a default gray as if there is some kind of default light...

I think Jason might have specified the gi light in the Mantra ROP itself. If the specified light is not found, Mantra will render black. When you recreated the scene, the Mantra ROP's Candidate Lights parameter probably has an "*" in it so it will default to a headlight if no light is found.

- whenever i try to use anything other than the constant shader, i boost up the color and it keeps rendering black ... it doesn't emit light :| , unless i use another light like a point light for example to light it ... and it has many limits such as that it only emits from the side lit by the point light

A Constant shaded object doesn't need lights but when you assign another shader, they will require lights to be shaded. As they are lit by the light from a particular direction, they will emit towards the direction of the light.

is there any resource or tutorial or any kind of help about mantra shaders ? and especially how to use them ?

Have you gone through the tutorials over at SESI's website? Go here to start. The page also lists various resources to learn Houdini.

Have fun!

Cheers!

steven

Link to comment
Share on other sites

Actually - yeah - if there is no light-source, the ROP will add one for you, thinking you might well be rendering black images. If you look at the ROP of mine, I added a RenderingParameter called "Formatting> Auto headlight creation" (vm_soho_autoheadlight) or something. Switch that off.

In PBR, producing a illuminating object is as easy as adding a constant value to the bsdf "f" variable. Note that this has changed in Houdini 10 (for the better) but this is how you do it 9.5 currently. Do you need an example?

  • Like 1
Link to comment
Share on other sites

If you look at the ROP of mine, I added a RenderingParameter called "Formatting> Auto headlight creation" (vm_soho_autoheadlight) or something. Switch that off.

Nice one Jason! Didn't know about that.

Here's a PBR example nmn. Photon emission isn't limited to scenes with lights so you can optionally use them for smoother/faster renders. Definitly check out the tuts and help files like Steven suggested.

geolight.jpg

lightobjectPBR.zip

Link to comment
Share on other sites

Thank you very much everyone for your answers, it was really helpfull, in fact i'm not new to houdini though new to rendering in houdini :)

and since well ... 7 years with maya ... maybe i should get its workflow out of my head when working with houdini lol

A Constant shaded object doesn't need lights but when you assign another shader, they will require lights to be shaded. As they are lit by the light from a particular direction, they will emit towards the direction of the light.

ye sure i know what a constant shader and other non constant shaders are, but maybe the question should better be : isn't there a way to make an object with non constant shader emit without lighting it wih a light ? in order to have it lighting and its details showing up at the same time ? or maybe a better word for it would be ... having color bleeding from non constant shaders without light in the scene? i attached a jpg file to show what i mean, in fact in this image (done in maya) there is no lights in the scene (default light is also off abviously) the red object has a lambert shader, with red incandesence though, and rendered with MR with FG enabled. (hope that cleared things a bit.

Actually - yeah - if there is no light-source, the ROP will add one for you, thinking you might well be rendering black images. If you look at the ROP of mine, I added a RenderingParameter called "Formatting> Auto headlight creation" (vm_soho_autoheadlight) or something. Switch that off.

In PBR, producing a illuminating object is as easy as adding a constant value to the bsdf "f" variable. Note that this has changed in Houdini 10 (for the better) but this is how you do it 9.5 currently. Do you need an example?

Thanks for the headlight tip, and that's a cool thing that houdini can use normal objects to emit photons and not only lights, though i couldn't relate the bsdf to the photon emission, if i'm not mistaken bsdf is the bidirectional scattering distribution function which will contribute to the look of the object not to its light emission, a little bit of clarification here will be much appreciated.

besides in DaJuice's example, he didn't set explicitly a value for the f, is it because in the vex network it's already linked so it does have a value?

Here's a PBR example nmn. Photon emission isn't limited to scenes with lights so you can optionally use them for smoother/faster renders. Definitly check out the tuts and help files like Steven suggested.

may i ask what was your render time to get this image ? because rendering your file here and to obtain the same result it took well... quite a logn time ( to make it look less noisy it's the pixel sampling i have to bost right ? )

Thanks again for everyone, and Best Regards

post-4469-1238277047_thumb.jpg

Link to comment
Share on other sites

besides in DaJuice's example, he didn't set explicitly a value for the f, is it because in the vex network it's already linked so it does have a value?

Yeah I just used the Constant shader from the material palette.

may i ask what was your render time to get this image ? because rendering your file here and to obtain the same result it took well... quite a logn time ( to make it look less noisy it's the pixel sampling i have to bost right ? )

That's right. It also took quite a while to render on this machine, more than 20min I think. Like I said it's a pretty noisy method. Did you use the photon map?

Link to comment
Share on other sites

That's right. It also took quite a while to render on this machine, more than 20min I think. Like I said it's a pretty noisy method. Did you use the photon map?

ye sure, in fact i regenerated it using the ROP with view-dependant photon map generation, then i used the other ROP to render.

any idea about my other quesion ? the one about the image i generated in maya

Edited by nmn
Link to comment
Share on other sites

It didn't really occur to me that self-ilumination of non-constant shaders doesn't automatically work. If I got it right you're trying to integrate, for example, lambert shading, with self-illumination on the same surface without lights present. The problem is, without light the lambert is black no matter what. And it doesn't pick up secondary bounces that maybe going through the environment from the self-illumination. Hmmm, to be honest I'm a bit stumped at the moment... :lol::unsure:

Link to comment
Share on other sites

ye DaJuice you got it right , coz as i said before in maya you can easily achieve that with any kind of shader, you just have to give it some incandesence and turn on FG.

in fact the issue is , what if you want to show those details of your object and at the same time make it emit light, as in my example above, no lights lambert shader FG on and we can see a full circle lit below the sphery object, theoretically yes non constant shading needs light to work, but ... i'm thinking out loud here ... maybe the incandesence at the end, can be a combination of the shading you have + constant shading ? and the higher you take the incandesence the closer you go towards the constant ... ?

BTW there is one other thing that got me really confused , in your PBR scene i deleted the global.map file and i rendered with the mantra1 and i get always the same result as if the photon map wasn't used :S:S:S i find that very bizzare ... as if the photons generation phase wasn't needed ?!! and if i change the color of th elight emitting teapot and i directly render using mantra1 (without regenerating the photon map, it's deleted anyway) it directly affects the illumination of the scene :S:S

any explanation for what's happening here ?

Regards

Edited by nmn
Link to comment
Share on other sites

I'm not sure what the equivalent of incandesence is. From your pic it looks like sub-surface scattering. Are you rendering with mental-ray in maya?

You know of course it's always possible to hack something together in comp, but that approach bothers me when we're talking about physically based rendering. I'd rather see it work in the shader.

BTW there is one other thing that got me really confused , in your PBR scene i deleted the global.map file and i rendered with the mantra1 and i get always the same result as if the photon map wasn't used :S:S:S i find that very bizzare ... as if the photons generation phase wasn't needed ?!! and if i change the color of th elight emitting teapot and i directly render using mantra1 (without regenerating the photon map, it's deleted anyway) it directly affects the illumination of the scene :S:S

any explanation for what's happening here ?

Regards

Are you sure you're telling mantra to use the photon map? You have to set the Secondary GI Cache to Photon Map, it's not enough to have the pmap in the Global Photon File field. I'm getting the expected behavior.

Without photons, 1min 22sec

no_photons.jpg

With photons, 1min 02sec

with_photons.jpg

The photon map smoothes out the secondary illumination in the scene. In this case the intensity of the direct illumination really overpowers it, but you can still kind of see it (plus it renders faster). Here's the scene with the constant shader set to black, so all the illumination you see is from photons+final gather. Without the photon map this renders as pure black, as you'd expect.

photons_no_light.jpg

Link to comment
Share on other sites

yes i did it with maya MR, but no sss used only incandesence with FG.

Maybe here i'm confused because i'm always thinking maya,

in fact at first i thought that only the photons are the lighting element in the scene...

- when you render without specifying "Secondary GI Cache to Photon Map" with the teapot still white, does that mean that houdini calculates the photons in real time ? and that's why it takes more time ? or it doesn't use them at all ?

- when you you specify the photons with the teapot set to black, you said the photons are the only ones acting in the scene now, so where do those photons get their energy from :S at first i thought they are emitted and got there energy form the white teapot :S

- and you talked about FG in mantra ? any clarification ... ?

in fact my main problem is still there even though i understood very well many of the things we discussed,

basically what i want to do and what drew me to open this discussion, is that i have a model faces of different colors and some have textures also, and what i wanted to do is make those faces emit light to light the surrounding objects, the problem with the constant shader is that it makes my object look flat like hell, and if i use any other shader either i don't get them to emit light-or i;m obliged to light them with norml lights and boost their colors or the light intensity really high to get the illuminatino effect which at the end also makes them flat ... and i know that houdini is very powerfull and there must be a way to achieve that !! and my time frame is coming closer :S:S

thanks for your time and effort DaJuice.

Best Regards

Edited by nmn
Link to comment
Share on other sites

- when you render without specifying "Secondary GI Cache to Photon Map" with the teapot still white, does that mean that houdini calculates the photons in real time ? and that's why it takes more time ? or it doesn't use them at all ?

Doesn't use them at all. Photons are only generated from the two photon render modes in mantra, there's no render-time calculation with micropoly, raytrace, pbr etc. The whole interface for photon usage across mantra is a bit... ambiguous, if you ask me.

- when you you specify the photons with the teapot set to black, you said the photons are the only ones acting in the scene now, so where do those photons get their energy from :S at first i thought they are emitted and got there energy form the white teapot :S

They are, but once they are stored in the photon map, they no longer rely on the original light source. btw, if you specify the photon map in the Primary GI cache only, you can visualize the photons. Looks like mray photons without the FG (if I remember right, been a long time since I worked with it).

- and you talked about FG in mantra ? any clarification ... ?

From the mantra docs:

Set the cache type to use for rendering secondary (second bounce) global illumination. The secondary cache file is used to look up diffuse global illumination indirectly to produce higher quality renders. This technique is similar to the “final gather” approach available in other renderers. When a secondary GI cache is used, only one diffuse bounce will be traced. Any additional global illumination will be taken from the cache file.

Anyways, I'll try some more things. Maybe the shader gurus here have some ideas too.

Link to comment
Share on other sites

Maya's incandesence is simply the amount and color of light that an object will emit. It's basically the constant emission that Jason already has in his scene - in maya's shaders this color is added to the shading result, and because final gathering is a two step process, a light emitting object ends up "emitting onto itself" - funny concept once you think about it ;). The closest comparable real life physical effect is that of florescent materials that give you the impression of emitting the amount of incoming light + x.

In PBR (and probably the GI light case, too), the easiest way to achieve this effect is to compute a photon map with a constant shader on the "florescent" object, and then render the beauty pass using the photon map and putting a lambert shader on the same object (sorry, don't have Houdini on me right now) - it's basically the same as in MR, except that MR's Final Gathering is implicitly two-pass whereas in Mantra you define both passes.

cheers,

Abdelkareem

Link to comment
Share on other sites

Thanks for the clarifications DaJuice, what does Primary and Seconday GI cache mean ? is it direct and indirect illumination, or... dunno i'm abit confused here

@ anamous: ye i thought of it that way also, didn't do tests yet though, but the problem here is that they won't look like neons or anything similar, you will only have the effect of them emitting light to the surroundings but they will look dull ( no glow ...etc ) any solution for that ?

btw how would you go to create glow in houdini, once again in maya it's only a check box to turn on, do you always do it in post ... ? besides, the glow material in houdini doesn't at all simulate glow it's more the equivalent of the facing ratio in maya ...

Regards

Edited by nmn
Link to comment
Share on other sites

Ok, got my hands on Houdini. As you can see in the attached file, I used takes to define a photon generation take and a beauty take. In the photon take I set the material on the teapot to an emitting constant, in the beauty take a simple lambert (more specifically an oren-nayar) shader. I made the beauty pass dependent on the photon pass, so if you render the beauty pass, the photon map should be automagically created - giving you the illusion of MR's final gathering ;)

post-1116-1238415304_thumb.jpg

cheers,

Abdelkareem

lightobjectPBR_incandesence.hip.zip

Link to comment
Share on other sites

@ anamous: ye i thought of it that way also, didn't do tests yet though, but the problem here is that they won't look like neons or anything similar, you will only have the effect of them emitting light to the surroundings but they will look dull ( no glow ...etc ) any solution for that ?

btw how would you go to create glow in houdini, once again in maya it's only a check box to turn on, do you always do it in post ... ? besides, the glow material in houdini doesn't at all simulate glow it's more the equivalent of the facing ratio in maya ...

Glow in Maya, being a post rendering effect, isn't a built-in functionality in Houdini (no pixel post processing shaders in Mantra) - and personally, I would highly recommend leaving it to the compositing stage of the pipeline. However, using COPS, it's pretty easy to add glow. You could automate the generation of glow masks by having your shader export an "I'm a glowing object" AOV, and pick that AOV up in COPs (or any other compositing application) and use it to apply the glow selectively to the "glowing" objects.

cheers,

Abdelkareem

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...