How do I set a light to only cast spec?

Started by gregsandor, June 19, 2008, 07:32:23 AM

Previous topic - Next topic

gregsandor

How do I set a light to only cast spec?  No illumination, no shadow: I just want to hit a specular reflection on the dark side?

JimB

Make all shaders completely black and comp a render of that (should be only pure specularity showing) on top of a full render.

The only way I can think of, but maybe someone knows better.
Some bits and bobs
The Galileo Fallacy, 'Argumentum ad Galileus':
"They laughed at Galileo. They're laughing at me. Therefore I am the next Galileo."

Nope. Galileo was right for the simpler reason that he was right.

gregsandor

Thanks, Jim.  Any ideas that will keep this to one pass?

Tangled-Universe

So if I understand correctly you want some specularity on a dark side?
I suggest to add an extra lightsource (sun) and tick off everything except specular highlights as shown in the image below.
Then it is just a matter of adjusting the strength, heading and elevation.


JimB

Quote from: gregsandor on June 19, 2008, 07:41:56 AM
Thanks, Jim.  Any ideas that will keep this to one pass?
Sadly no. T-U's idea is good though, but I'd try keeping 'cast shadows' switched on to avoid light seeping through the planet and illuminating the undersides of clouds, and displaced terrain, on the opposite side.
Some bits and bobs
The Galileo Fallacy, 'Argumentum ad Galileus':
"They laughed at Galileo. They're laughing at me. Therefore I am the next Galileo."

Nope. Galileo was right for the simpler reason that he was right.

Tangled-Universe

No keep shadows off otherwise the shadows will be incorrect...logically.
If you only enable "cast shadows" and still uncheck shadows in terrain and atmosphere the result will be the same.

I see what you mean by your suggestion but for a still-image it isn't a problem at all, maybe for an animation it is.
Even then I doubt whether the light will seep through because disabling shadowcasting doesn't make the surfaces transparent suddenly?

gregsandor

In this case I'm lighting spaceship models, no planets or atmosphere. All I really want is just a glint on the back edges and no direct illumination.  Turning off the options except Specularity still throws visible light.  The closest its getting is with a low intensity dark grey light casting shadow. 

rcallicotte

Have you tried using Reverse Primary Rays?  I'm not 100% on what that does and Oshyan explained it once.  I know it changes the direction of the lighting and makes some changes to how things look.  It's under Render - Other Settings.
So this is Disney World.  Can we live here?

gregsandor


Matt

There's no way to do this, unfortunately. I have been avoiding certain options in the shaders and lightsources which give physically implausible results, although I haven't strictly followed this throughout. I realise that it's a useful artistic tool to be able to cast only specular reflections from a particular light source, but I would encourage you to increase the specularity/reflectivity of your materials and use a darker light source instead. With the right index of refraction and lighting angles I think you should be able to get realistic results from both your key light and back/spec light.

Matt
Just because milk is white doesn't mean that clouds are made of milk.

gregsandor

Okay, thanks.  I can adjust my shaders and lights.

Matt

I've just realised that there's a contradiction there. I allow you to disable specular but not diffuse. Disabling either is "physically implausible", so why should I allow you to disable one but not the other?

The ability to disable specularity was useful for fill lights whose contribution was only intended to be a substitute for diffuse global illumination, but not having global illumination is already an implausible situation.

I can probably add a diffuse (or specular-only) checkbox in future but I'm massively in favour of doing my bit to encourage lighting setups that are analogous to those in the real world.

I'd like to see some early examples of your project and discuss how much can be done by changing your materials and lighting angles.

Matt
Just because milk is white doesn't mean that clouds are made of milk.

gregsandor

#12
In this case I want to add a bit of a hit on the underside of a spaceship, to make it stand out against the blackness of space.  Rather than light the surface (actually the realistic way) I thought I'd kick just a bit onto the shiny parts, for some "hot" reflections.  In general I prefer real-world solutions too but it would be nice to allow for some cheats.

In the attached images, the Sun is at 0 degrees azimuth, 16.875 degrees altitude Intensity at 6 or 8.  In the second image there is a second sun at 180 degrees azimuth, -16.875 degrees altitude Intensity 0.25 (shadows on).

Much more than any other feature I really would like/must have the ability to parent objects and lights to each other -- in this case I want to fly ships with pointlights in the engines, and with even a couple of ships it is impractical to individually animate each attachment.  If you have any suggestions on how I can hack that up (or induce you to add that soon) I'm eager for it.

Matt

#13
Thanks for showing those Greg. It looks as though you might have some luck by increasing the index of refraction and/or reflectivity on your surfaces. The highlight on the sun side would also get brighter of course, but I don't think that would be a bad thing. Perhaps in other images it wouldn't work so well. Maybe a different lighting angle will bring out the specular more; maybe this will become more apparent once it's animated. I will look into adding more controls after 2.0 "final" release.

Quote
Much more than any other feature I really would like/must have the ability to parent objects and lights to each other -- in this case I want to fly ships with pointlights in the engines, and with even a couple of ships it is impractical to individually animate each attachment.  If you have any suggestions on how I can hack that up (or induce you to add that soon) I'm eager for it.

A general solution for all objects is probably not possible for 2.0 final, but light sources would be much simpler. I have been looking into allowing light sources to be parented to other objects, nulls or light sources in a way that could be extended to all objects later on (which will require a lot more planning and testing). It really depends on how fast we get everything else done first.

Matt
Just because milk is white doesn't mean that clouds are made of milk.

gregsandor

Quote from: Matt on June 27, 2008, 05:17:04 PM

A general solution for all objects is probably not possible for 2.0 final, but light sources would be much simpler. I have been looking into allowing light sources to be parented to other objects, nulls or light sources in a way that could be extended to all objects later on (which will require a lot more planning and testing).
Matt


Good, thanks, Matt.  I don't even require any planning and testing:  any way to make a null object follow a path, with a bunch of tie fighters attached at 0 0 0 that I can then individually raise and lower, move side to side, and alter pitch yaw and roll to give individuality to the squadron...