Quantcast
Channel: beginners - openFrameworks
Viewing all articles
Browse latest Browse all 4929

Reflexion and Refraction using raycasting

$
0
0

@Kaito_Kid wrote:

I've been playing around with ofxRay, and I was wondering how I could use those to create reflexive surfaces (like mirrors) and surfaces with refraction (like glass).

From what i've read online, both those effects are done using raycasting, so it should be possible to do with openframeworks and the ofxRay add-on, but I can't figure out how to make it work.

I'm mostly looking for an example (where would I do the raycasting in the code, what exactly should the camera "know" about it to render it correctly, which 3D (or 2D?) objects would be the easiest to start with if I want to implement such a feature in my app, etc.

I'm using a ccamera for the rendering, and a bunch of of3dprimitives but it is flexible so I can change some of the structure if it helps.

If nobody has an example, an explanation of the way to go would be great too.

Thanks

Posts: 3

Participants: 2

Read full topic


Viewing all articles
Browse latest Browse all 4929

Trending Articles