HomeForumsWhat's newResources 
 
 
Reflection and refraction
Quick Man - Oct 14, 2005
 Quick Man Oct 14, 2005
I'm enchanted by Sonic R's beautiful reflective chrome Sonic head loading screen and wonder if the principles it employs could be utilised in order to create realistic reflection (mirrors) and refraction (water effects, maybe lenses) effects using the Saturn hardware.

Does anybody have any information on how this is accomplished?

 RockinB Oct 14, 2005
You may have a look at my Texture Coordinate Demo Topic... and the related page at my website....

 Quick Man Oct 14, 2005
Could you produce a BIN/CUE pair which uses 2352-byte blocks and therefore runs correctly in Cassini? None of the examples SaturnOrbit uses and nothing produced by compiled code will work because it uses the incorrect 2048-byte block size.

Cassini is the only emulator which runs correctly on my system, so I'm forced to use it for my testing.

 KuKzz Oct 15, 2005
Um ? Mode 1 is right on saturn, you can convert it to 2352 with many software.

 Quick Man Oct 15, 2005
Okay, I found the necessaries in CDRWIN to do that, so that's okay.

That explains how Sonic R does it - the model rotates while the texture stays in the same place. I assume the metallic sheen to it is a simple light vector? Or is there something else going on?

 M3d10n Oct 24, 2005
The texture just doesn't stay in place. The texture coordinate for each vertex is re-calculated based on the vertex screen position and it's screen normal at every frame.

There is no light whatsoever: it's all in the texture.

 RockinB Oct 25, 2005

Quick Man said:
I assume the metallic sheen to it is a simple light vector? Or is there something else going on?



M3d10n said:
There is no light whatsoever: it's all in the texture.


It would work this way.

In Wipeout 2097, there is all in the texture. For Sonic R, I can't tell, since it seems to use all software rendering.

But for my TC stuff, there is no difference to normal polygons. Hence I can apply gouraud (in fact it's used in TC#3) and everything else.


Quick Man said:
That explains how Sonic R does it - the model rotates while the texture stays in the same place.



M3d10n said:
The texture just doesn't stay in place. The texture coordinate for each vertex is re-calculated based on the vertex screen position and it's screen normal at every frame.


Everything is relative. In my implementation, there is a 3D texture space, in which the intermediate surface on which the texture is mapped, too, stays in it's place.

To be correct: to my knowledge, the texture coordinates are computed from object/world space, not screen space.

 M3d10n Oct 25, 2005
AFAIK, "true" reflection is view dependant. You can get a quite cool effect by taking the X and Y components of the screen space normal, and X and Y components of the screen space vertex position, and scale them by different weigths, then multiply them together to get a U and V coordinates.

More weight for the vertex positions gives a more flat effect, more weight for the normals give a more distorted effect.

 Coolgame Dec 9, 2011
i think this is done with color shadow and the k-coeficient table.