[1471] | 1 | This module is based on a fast, iterative approximation method to obtain the point hit by a reflection or refraction ray. The calculation uses the distance impostors storing distance values in environment map texels. This approximation is used to localize environment mapped reflections and refractions, that is, to make them dependant on where they occur. On the other hand, placing the camera to the light source, the method is also good to generate real-time caustics. Computing a map for each refractor surface, we can even evaluate multiple refractions without tracing rays. The method is fast and accurate if the scene consists of larger planar faces, when the results are similar to that of ray-tracing.
|
---|
| 2 |
|
---|
| 3 | This program can demonstrate three different effects, reflection, refraction, and caustics. All three effects are implemented both in the classical and our localized environment mapped method. The effects have control parameters. For example the reflection is controlled by Fresnel factor, the refraction is controlled by refraction index. These parameters can be changed at runtime by a GUI slider.
|
---|
| 4 |
|
---|
| 5 | Run
|
---|
| 6 | ---
|
---|
| 7 | Copy RayTraceEffects.exe (from the Debug or Release directory) to the solution'S directory and run.
|
---|
| 8 |
|
---|
| 9 | Build
|
---|
| 10 | -----
|
---|
| 11 | Simply load and build the solution file (RayTraceEffects.sln)
|
---|
| 12 |
|
---|
| 13 | Usage
|
---|
| 14 | -----
|
---|
| 15 | There are many parameters that can be set on the graphics user interface (e.g. sliders, checkboxes, or keyboard shortcuts) to experiment with the system.
|
---|
| 16 | F1 displays information about the general controls. Note that for easier reading, the actual scene will be darkened while the help text is displayed. Press F1 again to hide the help text and restore the original brightness of the scene.
|
---|
| 17 | To move the central object, use the arrow keys and Page Up / Page Down, respectively. To move the light source, you should press the ALT button simultaneously.
|
---|
| 18 | You can change all parameters using the GUI sliders and checkboxes. If you prefer using your keyboard, press SPACE to enter to Edit parameters mode. In this mode, you can use the arrow keys to select a parameter and to change its value. Press Alt + Arrow keys to change the parameters in bigger steps.
|
---|
| 19 | The user interface controls are the followings:
|
---|
| 20 | o Left click drag: Rotate mesh
|
---|
| 21 | o Mouse wheel: Zoom
|
---|
| 22 | o Arrow keys: Move central object the reflector/refractor object
|
---|
| 23 | o Alt+Arrow keys: Move light object
|
---|
| 24 | o F2: Settings
|
---|
| 25 | o F3: Switch to REF device
|
---|
| 26 | o F4: Show parameters ON/OFF
|
---|
| 27 | o F5: Show HUD ON/OFF
|
---|
| 28 | o F8: Switch to Wireframe mode
|
---|
| 29 | o 1-5: Choose mesh
|
---|
| 30 | o C: Caustics Effect ON/OFF
|
---|
| 31 | o S: Shadow ON/OFF
|
---|
| 32 | o X: Central Object render ON/OFF
|
---|
| 33 | o D: Switch classic / our new distance impostor method
|
---|
| 34 | o Y: Reset parameters
|
---|
| 35 | o V: Independent Snippet size ON/OFF we can adjust the snippets size automatically or it can be constant
|
---|
| 36 | o M: Show Texture sample ON/OFF
|
---|
| 37 |
|
---|
| 38 | If the central object rendering is switched off, the central object is rendered with a single color.
|
---|
| 39 | For the sake of uniformity, all meshes (including the rather simple meshes of the surrounding: room and columns) are stored in X file format of DirectX.
|
---|
| 40 | The user can switch between different central objects by pressing the 1, 2, 3, 4, 5 and 6 buttons. Each central mesh is rescaled to (approximately) the same size and is translated to the center of the room.
|
---|