How to place specular/reflection precisely on objects ?

General discussion about 3D DCC and other topics
Post Reply
aio
Posts: 36
Joined: 23 Oct 2012, 02:12

How to place specular/reflection precisely on objects ?

Post by aio » 18 Jun 2013, 00:59

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.

NNois
Posts: 754
Joined: 09 Jun 2009, 20:33

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

Post by NNois » 18 Jun 2013, 01:35

... google ?
http://julianjohnsonsblog.blogspot.fr/2 ... ights.html

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

;-)

Pancho
Posts: 659
Joined: 19 Sep 2010, 11:28

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

Post by Pancho » 18 Jun 2013, 08:47

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

aio
Posts: 36
Joined: 23 Oct 2012, 02:12

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

Post by aio » 18 Jun 2013, 11:12

thanks guys.

caledonian_tartan
Posts: 253
Joined: 17 Feb 2010, 15:13

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

Post by caledonian_tartan » 08 Jul 2015, 15:13

anyone successfully tried this?
SI 2015 @ WIN7-64

Pancho
Posts: 659
Joined: 19 Sep 2010, 11:28

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

Post by Pancho » 08 Jul 2015, 15:30

Where's the problem? It's very simple. If you struggle post your ICE tree so that we can debug it.

Cheers
Thomas

caledonian_tartan
Posts: 253
Joined: 17 Feb 2010, 15:13

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

Post by caledonian_tartan » 08 Jul 2015, 16:16

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
SI 2015 @ WIN7-64

Pancho
Posts: 659
Joined: 19 Sep 2010, 11:28

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

Post by Pancho » 08 Jul 2015, 18:34

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.

caledonian_tartan
Posts: 253
Joined: 17 Feb 2010, 15:13

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

Post by caledonian_tartan » 09 Jul 2015, 09:16

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 184 times
SI 2015 @ WIN7-64

OzAdi
Posts: 44
Joined: 21 Aug 2011, 13:13
Contact:

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

Post by OzAdi » 09 Jul 2015, 16:44

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..
Attachments
Oz_Reflection Ray.rar
(3.54 KiB) Downloaded 101 times
reflection ray.jpg

Post Reply

Who is online

Users browsing this forum: No registered users and 23 guests