AimplainLeo / osgocean

Automatically exported from code.google.com/p/osgocean
GNU Lesser General Public License v3.0
0 stars 0 forks source link

Reflection is reversed(?) #19

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
The reflected image seems to be backwards/reversed from what it should be.  
I.e., the reflected image shows the front of the object being reflected, 
when you're looking at the rear of the object.

See the attached image and note you can see the windscreen in the 
reflection, but not in the object itself.

osgOcean r182

reflections: true

WindowsXP
VS2008
FFTSS
GeForce GTX 280

Hope this helps,
Erik

Original issue reported on code.google.com by R.Erik.J...@gmail.com on 23 Nov 2009 at 7:44

Attachments:

GoogleCodeExporter commented 9 years ago
Hi Erik,

Thanks for posting the issue. I've just tried to replicate this with two quads 
facing 
away from each other in the OceanExample and the reflection seems fine (see 
attached 
screenshot taken from front and back). 

Are you using a custom camera manipulator? I've had problems in the past with 
reflections when I've bypassed the camera manipulator completely and set the 
view independently. 

Would you be able to see if the issue remains with a cube that has different 
coloured 
sides both above the water and half submerged? It might provide further clues 
as to 
what's going on.

Cheers 

Kim

Original comment by kcb...@googlemail.com on 23 Nov 2009 at 8:22

Attachments:

GoogleCodeExporter commented 9 years ago
Kim,

Upon further investigation, it appears that the reflection is reflecting the 
*inside* 
of the geometry?  Maybe that's what I'm seeing.

Attached is a box, hovering above the water. Each side is a different texture.  
The 
reflected images do render the correct texture, but the wrong face.  For 
example, I 
would expect to see some railroad tracks in the reflection (the face behind the 
railroad tracks is a terrain/sky image).

These images are taken from within Delta3D, so there is no OSG camera 
manipulator to 
speak of (maybe that means a custom one?).

-Erik

Original comment by R.Erik.J...@gmail.com on 23 Nov 2009 at 9:12

Attachments:

GoogleCodeExporter commented 9 years ago
Here's the box file I was testing with.
-Erik

Original comment by R.Erik.J...@gmail.com on 23 Nov 2009 at 9:16

Attachments:

GoogleCodeExporter commented 9 years ago
Hi Erik,

You're absolutely right, you are seeing the insides. The reflection camera was 
missing an OVERRIDE flag to force GL_CULL_FACE to be disabled during the 
reflection 
pass and the box model was turning it on after it had passed through. This is 
now 
fixed in r184 http://code.google.com/p/osgocean/source/detail?r=184 see 
attached 
image.

Cheers.

Kim.

Original comment by kcb...@googlemail.com on 24 Nov 2009 at 7:46

Attachments:

GoogleCodeExporter commented 9 years ago
That fixed it.  Now the reflections make sense. :)

thanks!
Erik

Original comment by R.Erik.J...@gmail.com on 24 Nov 2009 at 9:06