PDA

View Full Version : Lighting question (incadescence)


sonictk
05-28-2006, 03:03 PM
The problem: I want to create a LCD screen which has an orange light. Thus, it needs to be backlit, and how I'm trying to accomplish it atm is by using a constant material and enabling the incandescence option. However, it does not appear to actually 'glow', by which I mean, shoot photons into the scene. I tried using the Glow Property next. (Render > Get > Property > Glow) which worked awesomely well, until I realised that being a post-pro effect, it did not show through other objects. I have a glass slide over the LCD screen, and the glow effect is completely obscured by it, which in real life should not be the case.

The question: Does incadescence actually cause the object to fire photons into a scene? If not, how would I go about making glowing objects that truely emit light (such as a ceiling light), unlike the Glow Property, which only applies the glow as a post-render effect?

Eismann
05-28-2006, 07:39 PM
Have a look into the "Final Gathering" section of the manual. That's what you are looking for.. In XSI only lights can shoot photons, so Final Gathering is the way to go for you.

Greetings,
E.

JDex
05-28-2006, 08:07 PM
If you need GI or Caustic photons you could set up a geolight using the new version found here. (http://forums.cgsociety.org/showthread.php?t=345713) Conversely, since you said that glow was what you want (and has nothing to do with photons) you can add a volumetric property to the light (actually there's several approaches... the actual volumetric property or using volume shaders).

sonictk
05-29-2006, 03:38 AM
Sorry, I should have been slightly more clear. I meant 'glow' as in the object itself shooting/casting photons into the scene. So in other words, I would have an entirely dark scene lit only by, say, a box which has its incadescence turned on. (Kind of like the Advanced Override Lighting Material in MAX with the Luminance values is what I want to achieve) And the manual is nice and vague where Incandescence is concerned. =\

I did a few simple tests in XSI to see if it did really emit light, or was just shaded to look like it was emitting light. It was emitting light after all, but what was odd was that when I used the mental ray diagnostic mode to check for photons being emitted, the results came up completely negative (the colour map was totally blue). Could anyone please explain this?

My main problem here is that I want to create an object that emits light by itself, say, a sun, or a box-shaped ceiling light. How would I go about doing this? And the related question was: does Incandescence actually cause an object to cast/generate photons into a scene?

Also, what is the geolight?

Studev
05-29-2006, 04:56 AM
It looks like you're trying to accomplish the whole shot into one render pass. Why not do a compositing instead ? Personally, i never done a post glow FX in 3d app, it's very risky for the future changes.

sonictk
05-29-2006, 10:43 AM
No, the point is not about having a seperate pass to render the glow, the point is how do I actually get the glow to exist without having to resort to post-production methods? I am trying to get an object to actually emit light by itself. Like the Sun, for example, or motlen metal.

Felipe
05-29-2006, 01:58 PM
You could try 2 solutions:

1) Use a constant material plugging the image in the color port and turn on FG to iluminate the scene with it (you can use the ambient port too); Incandescence doesn't fire photons, ambient does and constant shader does as well

2) Use an area light with image projection node, so you can even use volmetric effects if you want.

Hope that helps.

Cheers,
Felipe

sonictk
05-29-2006, 03:08 PM
Err...I can't find an ambient port in the Constant shader to plug it into. And using color does not work; no photons are generated, just that the object looks...well, constant. :)

) Use an area light with image projection node
An area light doesn't match the geometry of the model exactly, which is why I'm trying to avoid using it. =\

Felipe
05-29-2006, 03:18 PM
Sorry, I meant the ambient port in lambert, phong, blinn etc shaders. The constant shader OR ambient port of the other shaders work as a light source when using FG.

Let me know if you get the results you want.

Felipe

sonictk
05-29-2006, 03:48 PM
Made a simple lighting test - Scene has one light set to zero intensity, and an area light with Cylinder geometry selected. The model has a phong shader, with Ambient set to full and color set to orange; translucency set to 4 and transparency set to zero.
http://img107.imageshack.us/img107/4958/lighttest6yx.jpg

Seems ok, but the light doesn't match the geometry exactly, which could be a problem for more complex meshes.

Using the constant shader and connecting it to the ambient node of a phong shader, constant set to full white, phong set to orange:

Not working; apparently the light doesn't emit, or is not intense enough =\
http://img530.imageshack.us/img530/2077/lighttest4tf.jpg

Final test: using a Constant shader alone.
Mesh is washed out thanks to the constant shader AND the light emitted can barely illuminate the scene (there is a box right beside the light, and it's barely being illuminated), thus this won't do either.

EDIT: Goddamnit the last one won't show, just, uh, take my word for it.

Could someone please point me in the right direction?

visualboo
05-29-2006, 05:00 PM
All you need is a constant shader on your object that you want to be a light source.

Set your script editor to jscript in the preferences then run this:

CreatePrim("Grid", "MeshSurface", null, null);
SetValue("grid.grid.ulength", 50, null);
SetValue("grid.grid.vlength", 50, null);
CreatePrim("Sphere", "MeshSurface", null, null);
SetValue("sphere.polymsh.geom.subdivu", 24, null);
SetValue("sphere.polymsh.geom.subdivv", 24, null);
SetValue("sphere.sphere.radius", 2, null);
SetViewDisplayMode("textured");
Translate(null, 0, 2.09857680557195, 0, siRelative, siGlobal, siObj, siXYZ, null, null, null, null, null, null, null, null, null, 0, null);
SelectObj("grid", null, true);
ApplyShader(null, "", null, "", siLetLocalMaterialsOverlap);
SetValue("grid.Material.Phong.ambient.red", 0, null);
SetValue("grid.Material.Phong.ambient.blue", 0, null);
SetValue("grid.Material.Phong.ambient.green", 0, null);
SetValue("grid.Material.Phong.specular.red", 0, null);
SetValue("grid.Material.Phong.specular.blue", 0, null);
SetValue("grid.Material.Phong.specular.green", 0, null);
SelectObj("sphere", null, true);
ApplyShader("Material\\Constant", "", null, "", siLetLocalMaterialsOverlap);
SetValue("sphere.Material1.Constant.color.red", 1, null);
SetValue("sphere.Material1.Constant.color.green", 0.776, null);
SetValue("sphere.Material1.Constant.color.blue", 0, null);
InspectObj("ViewRenderOptions", "", null, 1, null);
SetValue("ViewRenderOptions.EnableFinalGather", true, null);
SetValue("ViewRenderOptions.FinalGatherDiffuseDepth", 2, null);
SetValue("light.light.soft_light.intensity", 0, null);
SetUserPref("SCR_MSGLOG_ENABLED", false);
SetUserPref("SCR_CMDLOG_ENABLED", false);

Also, don't forget that you MUST have 1 light in your scene. Just set it's intensity to 0.

Felipe
05-29-2006, 05:28 PM
You have to plug the constant shader directly in the surface port of the material, you donīt need to use the phong shader.

EDIT: I saw you have already done that. You could try to increase the FG effect using the multiplier in the FG options. Try to increase to 5, 10 whatever value you feel its getting enough illumination from it.

sonictk
05-30-2006, 01:44 AM
Increasing the FG multplier does indeed help, but this would be a cause for concern, as this is a global effect and might have adverse effects on other objects. It is a temporary solution though, thanks! :)
http://img154.imageshack.us/img154/7519/lighttest9cx.jpg

I'm a little disappointed with the results of setting the Constant > Indirect Illumination/caustics/finalgathering radiance multiplier to a higher value, though; (leaving the FG multiplier as 1) though the object does indeed seem to be lit better, somehow other objects cannot receive the light being emitted.

http://img150.imageshack.us/img150/9718/lighttest8km.jpg

EDIT: Hey! I just set the Indirect Illumination > Radiance value of the object which I want to be affected by the light to be a higher value, and it works! I still just wish you could set how much light a constant material is supposed to emit, though...

http://img248.imageshack.us/img248/397/lighttest2so.jpg

Or, is there a way to get a a normal light to achieve this same effect?

Felipe
05-30-2006, 03:23 AM
Actually you can control the intensity of the light in the constant shader itself. A RGB value of 1 is the same as having an intensity of 1. You can increase the value above 1 if needed. If you want to get a colored effect, change the input field from RGB to HLS and increase L (level) as you wish, leaving H (hue) and S (saturation) as they are.

Cheers,
Felipe

Chris-TC
05-30-2006, 04:38 AM
I'm a little disappointed with the results of setting the Constant > Indirect Illumination/caustics/finalgathering radiance multiplier to a higher value, though; (leaving the FG multiplier as 1) though the object does indeed seem to be lit better, somehow other objects cannot receive the light being emitted.


That's because this is a multiplier for the object itself, not for other objects. If you increase this setting the object will receive more indirect illumination but it won't help you illuminating other objects.

The best way to make an object emit light is the Geo_Light shader because it's area light based and a very clean solution.
All other ways depend entirely on Final Gathering and it's often impossible to get rid of the splotches caused by these pseudo lights.

If you want to do it the FG way I recommend to use incandescence. Set it to a color you like and increase the intensity. If you turn on FG, the object will emit light accordingly.

Overcranking the constant's diffuse color works as well. But you will have to use HSV mode because I'm pretty sure that HLS mode screws up your Hue once you go past a lightness of 1.0

sonictk
05-31-2006, 09:06 AM
But I thought Incandescence doesn't cause an object to emit photons? Now I'm confused.

In any case, this is what happens when I set Constant shader > Indirect Illumination > Incandescence intensity to a high value, with a orange color.
http://img404.imageshack.us/img404/1836/lighttest8uy.jpg
Not a very desirable effect. :( For some reason, the light does not appear to be emitting properly.

Next, I set Incandescence intensity back to 0, and try using Constant > Illumination with the HSV sliders as suggested, setting V to an insanely high value.
http://img423.imageshack.us/img423/3646/region4rg.jpg

Almost the same as the above picture. What I'm trying to achieve, however, is something similar to:
http://img423.imageshack.us/img423/4207/region0km.jpg

Where the objects around the light source are affected by it more um, realistically.

(BTW I'm trying to find a solution that is all-rounded, meaning that the object can emit light in the form of, well, light, so that whether or not FG or GI is on, off, it WILL render the object emitting light.)

BTW, I've never used the Geolight shader before, and I'm about to install it and try it out. What's with all the Geo_<name> plugins anyway? I can't find their website on Google or anything like that. Could someone also elaborate on where I can find more information on these plugins?

(On a totally unrelated note: Is there a damn way to get the Render Tree to unlock by default? I hate it when I have to keep clicking Refresh in order to see what nodes are attached to a current object's material. I can't find anything in Preferences > Editors > Render Tree that addresses this.)

Chris-TC
05-31-2006, 02:08 PM
But I thought Incandescence doesn't cause an object to emit photons? Now I'm confused.


It doesn't emit photons. The only way to make it emit photons is by using the Geo_light.
Like I said, you're relying entirely on FG.


Almost the same as the above picture. What I'm trying to achieve, however, is something similar to:

Where the objects around the light source are affected by it more um, realistically.


Well, technically the one you like better should be the more unrealistic one because you cranked up the Radiance value, causing the objects to be affected unnaturally strong by the light.
I do agree that the two examples above look somewhat strange, I'm not sure why.


(BTW I'm trying to find a solution that is all-rounded, meaning that the object can emit light in the form of, well, light, so that whether or not FG or GI is on, off, it WILL render the object emitting light.)


You can't have an object emit light without FG or GI.

sonictk
05-31-2006, 02:20 PM
I know the last example is not exactly 'realistic', but I have no idea what to call it.

I'm a little peeved at having to get an external plugin in order to achieve this, though; isn't there a shader that works in a similar manner to MAX's Advanced Lighting Override Material > Luminance?

And where can I find more information on using the Geo_light? I can't find anything about it on Google.

CiaranM
05-31-2006, 03:14 PM
I know the last example is not exactly 'realistic', but I have no idea what to call it.

As you know by now, objects can in fact emit light by using the ctrl_geolights shader. However you should not be scared to use FG as this can be controlled on a per-object basis rather than just globaly. I suspect that your FG accuracy is too low, thus the unusual lighting appearance in your previous images.

I'm a little peeved at having to get an external plugin in order to achieve this, though; isn't there a shader that works in a similar manner to MAX's Advanced Lighting Override Material > Luminance? Does this Max shader work with Mental Ray in Max? I don't know, but I would suspect not.

And where can I find more information on using the Geo_light? I can't find anything about it on Google.Not only does the ctrl_geolights package come with brief documentation explaning correct usage of each shader, but it also comes with several example scenes. There should be everything you need right there.
If you need help actually installing the shaders, then just drag and drop the .spdl files into an xsi window to install them. Explore the plug-in manager (spdl tab) to locate the presets (these are the nodes that you drop into your render tree and in this case the geometry primitive object). Here's a hint: open the properties of the "geometry primitive" and add the geolight shader to it.

sonictk
05-31-2006, 04:13 PM
Thanks very much, I'll try the suggestions once I get back to my main rig (XSI can't run on this tablet PC for some reason). Much appreciated. :)

EDIT: BTW the AOLM I was talking about doesn't work with mr...but it can be used awesomely, as I saw in this example on 3D Total. http://67.15.36.49/team/Tutorials/edoardobelcini/edoardo1_1.asp

CGTalk Moderation
05-31-2006, 04:13 PM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.