Jump to content

Object light emitter in houdini, how to? please


nmn

Recommended Posts

Thanks for the clarification anamous, i'll do some tests when i get my hands on houdini, and post what happens by then

any little explanation and step by step about the AOV would be really appreciated

Regards

Edited by nmn
Link to comment
Share on other sites

AOV's or Arbitrary Output Variables as known in RenderMan known as Extra Image Planes in Houdini are easy to do.

All you need is a Parameter VOP set up with the correct Parameter type and add an extra image plane with the same name and type as the Parameter VOP.

Detailed Steps:

- In your VOP Network, add a new Parameter VOP to your network.

- Provide a unique and meaningful name for this parameter. You can ignore the Parameter Label field as it will never be seen.

- In the Parameter VOP, toggle on: "Use Input Value if Parameter not Bound" and "Invisible"

- Set the Parameter Type to the correct type: Float, Vector, Vector4. No strings at this time.

- Wire the data you want to output as an Extra Image Plane.

- Now in any Mantra ROP, add an extra Image Plane.

- Make sure to name the output plane identical to the Parameter name.

- Make sure the "type" (float, vector, vector4, ...) is the same as the Parameter VOP.

Done.

If you want to follow Side Effects standards, you can color the Parameter VOP Green.

You can see this happening in a default Houdini material by inspecting any Green colored Parameter VOPs. These are default export parameters that can be picked up by a Mantra output extra image plane.

Link to comment
Share on other sites

lol and i was wondering why are these green export parameter nodes are used for ... thanks for the explanation old_shool, :) now crystal clear in my head.

I will try to combine all the infos i learnt from you guys to try and get the result i want, hope it will work i'll keep you updated, and ask more questions if needed.

Thanks a bunch

Regards

Link to comment
Share on other sites

some tests done already, Thanks anamous for the help it was very helpfull

though i have some remarks and questions :

1 - in lightobjectPBR_glow.hip the idea is great , though the only problem is that on the floor just beneath the teapot it doesn't look as if it is a light emitter ... i mean it's very dark, maybe compositing it with the result of the render with constant shader instead will do ? (i mean using the "teapot" only, from the lightobjectPBR_glow.hip file ad take the surroundings from a pass rendered with constant shader for the teapot instead of the lambert ), what do you think ?

2 - can you please explain to me the primary and secondary GI cache ? does it mean direct and indirect illumination or what ? ...

3 - in fact i find it bizzare, that if i render the scene with the same photonmap (generated with the teapot having constant shader), one time using constant shader on the teapot and another time using lambert, i obtain 2 different results for the illumination of the surroundings... isn't the photon map the responsible for the illumination of those parts ? so since it's the same why do i obtain 2 different results just by changing the material of the teapot ? in my opinion that means that there is smtg calculated in real time ... but what is it ? direct illumination from the teapot ?...

Thanks again

Best Regards

Edited by nmn
Link to comment
Share on other sites

1. Definitely, a compositing approach is much better and more flexible. As I mentioned, I think this rendering-based approach looks somewhat cheesy.

2. When an Eye ray hits an object, the first bounce of diffuse rays is the primary bounce, and if you setup a primary GI cache, it will not be calculated and instead only looked up in the cache file. Depending on the amount of bounces you have setup, this first bounce will probably birth some secondary bounces, which can be looked up in the secondary GI cache. The recommended procedure is to use the photon map as a lookup for secondary bounces, and let Mantra calculate the primary bounce in a normal manner - it's a good compromise between speed and quality.

3. See no. 2 for an explanation ;)

cheers,

Abdelkareem

Link to comment
Share on other sites

After lots and lots of tests, i wasn't yet able to get what i want

in fact i understood evrtg we discussed very well, but that didn't solve the problem ( unless i want to do many passes and a lot of compositing, and yet it's not it )

the thing exists in other apps with the push of a button, and houdini is the most physical out there, so i'm kind of not able to believe he can't do that,

simply creating a light bulb, a neon light or whatever object emitting light, or simply giving a texture to an object and make it emit light according to the colors of that texture. i know for HDR we plug the hdr map to an area light set to environement and that's why we are able to light the scene with the colors of that texture, but that doesn't solve the problem of "any object or texture as light emitter", i still love houdini lol but i'm pulling my hairs out...

Regards

Link to comment
Share on other sites

Two thoughts to contemplate:

- a light bulb or neon light consists of an energy emitting object (glowing coil) behind an energy transmitting object (glass bulb). If you're attempting to depict a light source, this is something that you should have in mind.

- the glow aura of a light emitting object stems from two things, the participating media surrounding the light (normally particles in air), but most importantly the effect of light diffusing and scattering inside a lens (eye). The first effect is normally too small to replicate (although you could using a volume that surrounds the light object). The second effect is too complicated to be rendered physically, and in all engines that I know of, it is applied as a post-rendering effect (called bloom or glow). Almost all pipelines apply this effect in the compositing stage for better integration with other elements and better control.

And I regularly create HDR's out of bracketed photos of real light sources and studio reflectors and diffusors (butterflies etc.) and apply them as textures to objects. And the results are as expected: the texture object emits light.

cheers,

Abdelkareem

Link to comment
Share on other sites

- a light bulb or neon light consists of an energy emitting object (glowing coil) behind an energy transmitting object (glass bulb). If you're attempting to depict a light source, this is something that you should have in mind.

you're right about the light bulb, not the neon though, in a neon the light emitting part is not a coil like the bulb

Inside a fluorescent light is low-pressure mercury vapor. When ionized, mercury vapor emits ultraviolet light. The inside of the fluorescent light is coated with a phosphor that accepts the energy of ultraviolet photons and emits visible photons.

so that's how it works which makes it more like a whole object emitting ...

for the glows no problem once we get the objects to illuminate their surroundings and "HAVE THE LOOK" of a light source, the glow thingy becomes a very minor issue that we can tackle in post as you say.

And I regularly create HDR's out of bracketed photos of real light sources and studio reflectors and diffusors (butterflies etc.) and apply them as textures to objects. And the results are as expected: the texture object emits light.

here i didn't get it, if it works out of the box why weren't we able to replicate that with a non constant material ?

if i'm not mistaken what you are basically saying is, you create any material, you attach the texture you've made to it, and you render with vex global illum or with pbr and photons ( with no lights in the scene of course ) and you get the effect of object emitting light ? :|

some clarification of this point would be really appreciated.

thanks for your time and effort anamous , much appreciated

Regards

Edited by nmn
Link to comment
Share on other sites

I omitted the details of the neon light for brevity's sake, but the principle is the same: some light emitting object behind a transmitting object (the glass tube) - but of course, your description of the neon light is correct.

I'm still not sure what look you are trying to go for. When I mentioned using HDR's as light sources, I used a constant material with an HDR texture - after all, I'm interested in emitting light, not receiving it. And that's the key characteristic and also the reason for my differentiation between the light (or energy) emitting part (coil or coating) and the encasing part (mostly glass). The emitting part receives light energy, but due to the high levels it emits, the incoming light is almost always insignificant - the dominant visible effect is that of the emission, not scattering.

post-1116-1238586223_thumb.jpg

This is a (low quality) image of a neon light source. Notice that the actual emission is basically a constant color (with some brightness variation which we can easily introduce using an HDR). Towards the upper edge there is a falloff - the explanation is that first of all the surrounding glass tube has a fresnel-based reflection that increases towards grazing angles, and thus the refraction decreases towards these angles. Secondly, there is a slight gap between outer glass tube and the inner glass tube that is visible at this angle and less visible when front facing. This is all we need to know to implement the actual light source in CG.

When we lower the exposure time (not my picture), we get this:

post-1116-1238586794_thumb.jpg

Which still exhibits all the effects described. Also notice that the lens of the cheap cell phone camera is quite overwhelmed with the amount of incoming light and the internal scattering leads to a glow-y, hazy look - we already agreed on leaving that effect to the compositing stage.

And here is a quick render to demonstrate the effect. I simply applied an edge falloff as a multiplier to the constant - the physical approach (which you would need for close-ups for example) would be to model and shade the emitting tube and the glass tube independently, but for this case a falloff has approximately the same effect (darkening the edges) while rendering much quicker and removing the need for caustics - in "real life", the effect of light transmission is a caustic. Note that due to (non-)tone mapping and color theory issues, the maximum color achieved is not white but a very bright blue - this can easily be corrected in tone-mapping stage, however. Applying glow/glare afterwards further enhances the illusion.

post-1116-1238589036_thumb.jpg

So to reiterate, right now I don't understand the need for a classical shading model on the light emitting object to simulate light sources.

cheers,

Abdelkareem

Link to comment
Share on other sites

:) that was a nice recapitulation, and the examples were good

and you're totally right when you said that the received light for a light source can be ignored

so yes a constant shader is what we need "for real simulation", but then for simulating a simple thingy you will have to do it "physically close" to get the effect which ... well for sure will take a long time to render.

as an example imagine a colored frosted glass behind which there is a lamp, of course modeling the glass giving it the color and transparency from a texture then putting an object with constant shader behind it to emit the light would be the most correct way, but in other softs you can simulate that by applying the texture directly to your glass object and make it emit light.

and the second problem comes when you see MR for example with FG can give the same effect much smoother for a render time a lot lot smaller, or am i doing smtg wrong here?

for the falloff you applied to your object, you used a "facing ratio" ( i know that's a maya word but i don't know the equivalent in houdini yet ) and you multiplied it by the color of your constant shader inside the vex network ?

basically what i'm looking for is smtg similar to the second image, but the shapes of the object lights are more parallelipedic instead of cylindrical.

Cheers

Edited by nmn
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...