PlanarReflectionMethod: Wrong perspective after Viewport y-Update (@MrLenaert)

Software: Away3D 4.x

liquid, Newbie
Posted: 29 April 2015 06:46 AM   Total Posts: 8

Hi,

I have an Application with Starling+Away3D Interoperation (two Starling Layers, two 3D-Layers). One of the 3D Layers contains a Mesh with a reflection on the floor.

Everything works fine so far, but:
As soon as I change the Viewport Y-Position or -height of the second Away3D Scene, the calculation of the reflection becomes wrong (moves up or down in relation to the Mesh, X-Position and width of the reflection looks good).

I had a look at the source of the PlanarReflectionTexture.as and in its render()-method you already take care on the actual view.width and .height. The Camera uses the PerspectiveLens, the position of the MirrorMesh is fine.

Is that a known issue? Did I miss something? Do I have to add something to the Matrix of the SceneTransform?
_reflectiontexture.applyTransform(_mirrorMesh.scenetransform)

Thanks in advance!


Ps: The rendering of the reflection is a frame behind, is it just my render order or is there a trick?

   

liquid, Newbie
Posted: 09 May 2015 06:35 AM   Total Posts: 8   [ # 1 ]

Sadly there’s still no progress on this.

As soon as I used “setRenderToTexture()” to draw the Away3D-View into a TextureBase which I share with a Starling Layer (as discussed here http://away3d.com/forum/viewthread/5196/), the resulting Texture was empty.

When I turned off the PlanarReflection, everything worked fine.

Sorry, I have to give up for now. ;(

Luckily my scene contains just a single 3D Model, some Lights and a ground. So I could easily clone and invert it to “fake” my reflection. It’s a temporary fix, but it solves my delayed rendering of the reflection issue too.

   
   

X

Away3D Forum

Member Login

Username

Password

Remember_me



X