Translating a view after camera projection

Software: Away3D 4.x

Thomas Weiss, Jr. Member
Posted: 24 July 2013 06:19 AM   Total Posts: 35

Hi there,

I’m currently trying to implement a 4x ‘split-view’ with multiple views showing the same scene from the same point of view.
So what I need is to translate the rendered view to the top left quarter of the screen, for example. Moving the camera or the meshes is obviously not the solution as it would modify the perspective - I really need to render the view with the camera facing the scene, and then scale/translate the result. I’ve tried to prepend a translation to both the camera’s viewProjection and the lens’ matrix with no success; the rendered scene is not modified at all…

Any hints would be appreciated.
Thanks
Thomas

   

John Brookes, Moderator
Posted: 24 July 2013 09:07 AM   Total Posts: 732   [ # 1 ]

This maybe?
https://gist.github.com/JohnBrookes/9ea1bb8d5cae4ab8ff48

 

   

Thomas Weiss, Jr. Member
Posted: 24 July 2013 12:21 PM   Total Posts: 35   [ # 2 ]

Hi John,

Thanks for the quick and detailed reply!
Do you have this code running somewhere? ‘cause I compiled it but instead of seeing 4x the same scene - as I would expect from reading the code indeed, I just see one scene spanning over the whole 800x600 surface.
Actually, it seems that even if you define one single view with a size of 400x300, it stills covers the entire window.

Thomas

 

   

John Brookes, Moderator
Posted: 24 July 2013 12:29 PM   Total Posts: 732   [ # 3 ]

If it doesnt look like the pic without any modifications to the file.
Update to the latest version of Away3D.

 

   

Thomas Weiss, Jr. Member
Posted: 24 July 2013 12:44 PM   Total Posts: 35   [ # 4 ]

Bummer! It works indeed with v4.1.4 but for some reason, my project is tied with v4.0.9 (mainly because we are using a custom material that I haven’t managed to re-create with v4.1 - I should probably seek some help in a separate post).

Thanks a lot.

 

   

Thomas Weiss, Jr. Member
Posted: 25 July 2013 09:35 AM   Total Posts: 35   [ # 5 ]

John,

One additional question: when setting the same BitmapTexture as each view’s background, I don’t see it 4x in each quarter but as one bitmap filling the window. Am I doing something wrong or is it the expected behavior?

Thanks again
Thomas

 

   

John Brookes, Moderator
Posted: 25 July 2013 10:50 AM   Total Posts: 732   [ # 6 ]

Seems using multiviews isnt accounted for in backgroundRenderer.
So not you.
Add an issue to the Github page
https://github.com/away3d/away3d-core-fp11/issues?state=open

 

   

Thomas Weiss, Jr. Member
Posted: 25 July 2013 01:05 PM   Total Posts: 35   [ # 7 ]

Done, thanks John.

 

   
   

X

Away3D Forum

Member Login

Username

Password

Remember_me



X