Page 1 of 1

How to place specular/reflection precisely on objects ?

Posted: 18 Jun 2013, 00:59
by aio
Hello people i was wondering if there is a tool already made in ice or something else that could help positionning lights so that their specular hit an object in a certain manner.
Something a bit like lightpaint in hdrlight studio but for lights.
http://www.hdrlightstudio.com/lightpaint.htm

Or do you have any idea how this could be done?
Sphere constraint the light with some trigonometry related to the camera? (not sure i could do that :| )


Thanks.

Re: How to place specular/reflection precisely on objects ?

Posted: 18 Jun 2013, 01:35
by NNois
... google ?
http://julianjohnsonsblog.blogspot.fr/2 ... ights.html

If i remember correctly there is another one maked looong time ago

;-)

Re: How to place specular/reflection precisely on objects ?

Posted: 18 Jun 2013, 08:47
by Pancho
Use a null (attached to the camera so it doesn't get lost), place it visible between the camera and the highlight position, use the null to calc the vector for raycast node, calc ray hit position, rotate incoming vector around the surface normal (180 degree), add this vector to the hit position (with a vector resize to change the distance of the light to the object) and you got the light position.

10min in ice.

Cheers

Re: How to place specular/reflection precisely on objects ?

Posted: 18 Jun 2013, 11:12
by aio
thanks guys.

Re: How to place specular/reflection precisely on objects ?

Posted: 08 Jul 2015, 15:13
by caledonian_tartan
anyone successfully tried this?

Re: How to place specular/reflection precisely on objects ?

Posted: 08 Jul 2015, 15:30
by Pancho
Where's the problem? It's very simple. If you struggle post your ICE tree so that we can debug it.

Cheers
Thomas

Re: How to place specular/reflection precisely on objects ?

Posted: 08 Jul 2015, 16:16
by caledonian_tartan
you're probably right, but i don't get it right now.
it would be very nice if you could have a look at my tree.
calc_highlight.jpg

Re: How to place specular/reflection precisely on objects ?

Posted: 08 Jul 2015, 18:34
by Pancho
Mmmm, looks o.k. so far. Did you try to debug it? Try to display the tmp as a point. Is it in the right place? Would need to check later on with my tree is I chose a different approach. What happens in the magenta node? Replace it with a simple rotate vector node and for rotation use a axis and angle to rotation node. axis is the normal, angle 180°. THis should be the right way.

Re: How to place specular/reflection precisely on objects ?

Posted: 09 Jul 2015, 09:16
by caledonian_tartan
it's a bit different than described, but this works:
spec-calc1.jpg
here is the compound: (works with multiple nulls)
Place Specular Highlight.xsicompound
(67.36 KiB) Downloaded 209 times

Re: How to place specular/reflection precisely on objects ?

Posted: 09 Jul 2015, 16:44
by OzAdi
I wrote a small tool a few years ago that helps positioning a reflector or light..



just install the xsiaddon

usage: Select a polymesh, run the script from Property>Oz_Reflection Ray, you will be asked to select the Camera (select the camera itself) a NULL is created constrained to the polymesh, and a curve is created to indicate the vector on which to place the reflector or light, so it will reflect where the NULL is. move the null around..
There's also a custom proerty to change the length of the curve created, default is 100 units.
place the reflector or light somewhere on this curve..