Single ray to calculate reflections

Hi All,

I have been toying with this idea for a while and wanted to put it to the panel to see if anyone had any ideas on how to approach it.

The Problem:
During the lighting process of my scenes I have to estimate the line of reflection from camera to surface to surface to surface...
We are emulating studio photographic lighting, which involves a lot of bouncing and reflecting.

The Idea:
I want to develop a tool that will cast a ray from a point (the camera position) and bounce it n number of times. Perhaps the number of bounces could be a variable in the script.

The existing "Place Highlight" tool does half the job but I need it to go further.
Ideally it would be good to have a spline joining the dots between the ray hits.

Anyone got any ideas on where to start?

Many Thanks

Danny

Comments

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
amandapaige844's picture

Thanks for sharing your idea.

Thanks for sharing your idea. I learned a lot from your basic idea and I know you have something to share with us. refinancing a mortgage

MrTyner's picture

Thank you, Emehl - your code

Thank you, Emehl - your code got me started in the right direction!

emehl's picture

Camera ray reflections

I was just thinking about this today, funny you started a thread so recently.

Here's the code I came up with. It's very basic - make sure you are looking through a camera, select an object, run the script, click your point and it draws a line. Defaults to 100 units in length.

Plenty of room for improvements here, but hopefully it can get you started.

If you want multiple reflections, inside the click handler, you could probably use "intersectRay" recursively to go deeper into the reflection sequence, but I haven't tried it myself.

Code attached, for some reason it thinks it is spam if I put it inline.

AttachmentSize
ray.ms 1.62 KB
FATdan's picture

any thoughts anyone?

any thoughts anyone?

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.