Welcome, Guest. Please login or register.

Login with username, password and session length

 
Advanced search

11991 Posts in 1587 Topics- by 3508 Members - Latest Member: PienueDut

26. May 2012, 10:19:20 am
Xith3D CommunityGeneral CategorySupport (Moderator: Marvin Fröhlich)View setScreenScale is not working properly
Pages: [1]
Print
Author Topic: View setScreenScale is not working properly  (Read 1345 times)
khangharoth
Enjoying the stay
*
Offline Offline

Posts: 67


View Profile Email
« on: 05. February 2007, 12:06:30 pm »

Hi if i render a scene with multiple views like FourViewsPanelTest example,
 I am not able to set different screen scale to different Views .Say in FourViewsPanelTest i want to see the cube in diffrent size.

It takes default views screenScale values for all views.
Am i missing anything?
Logged
Marvin Fröhlich
Xith Lord
Administrator
Guru
*****
Offline Offline

Posts: 4381


May the 4th, be with you...


View Profile
« Reply #1 on: 05. February 2007, 01:39:12 pm »

Hi if i render a scene with multiple views like FourViewsPanelTest example,
 I am not able to set different screen scale to different Views .Say in FourViewsPanelTest i want to see the cube in diffrent size.

It takes default views screenScale values for all views.
Am i missing anything?

Hi, kangaroth

I had a look at the projection matrix calculation of the View. And the screenscale is only used in parallel projection. And I think, this makes sense. Isn't, what you want to achieve, simple done by moving the View closer to the cube?

Marvin
Logged
khangharoth
Enjoying the stay
*
Offline Offline

Posts: 67


View Profile Email
« Reply #2 on: 06. February 2007, 04:51:18 am »

I had a look at the projection matrix calculation of the View. And the screenscale is only used in parallel projection. And I think, this makes sense. Isn't, what you want to achieve, simple done by moving the View closer to the cube?
Hi Marvin  i think that in Parallel projection it does not matter from how far you are viewing.To change the size we need to change the screen scale , it was working like this till xith 8 .
On debugging i found that in set(RenderPassConfigProvider template) of View.java ,all  View's screenScale and other parameters are set what RenderPassConfigProvider params are .
I just commented out 
Code:
this.screenScale = template.getScreenScale();
from this method and now its behaving as expected. 
Logged
Marvin Fröhlich
Xith Lord
Administrator
Guru
*****
Offline Offline

Posts: 4381


May the 4th, be with you...


View Profile
« Reply #3 on: 06. February 2007, 11:17:54 am »

Hi Marvin  i think that in Parallel projection it does not matter from how far you are viewing.

Well, that was, what I said Wink.

To change the size we need to change the screen scale , it was working like this till xith 8 .
On debugging i found that in set(RenderPassConfigProvider template) of View.java ,all  View's screenScale and other parameters are set what RenderPassConfigProvider params are .
I just commented out 
Code:
this.screenScale = template.getScreenScale();
from this method and now its behaving as expected. 

OK, I will check that. Thanks for the hint.

Marvin
Logged
Marvin Fröhlich
Xith Lord
Administrator
Guru
*****
Offline Offline

Posts: 4381


May the 4th, be with you...


View Profile
« Reply #4 on: 07. February 2007, 01:48:35 am »

Hi if i render a scene with multiple views like FourViewsPanelTest example,
 I am not able to set different screen scale to different Views .Say in FourViewsPanelTest i want to see the cube in diffrent size.

It takes default views screenScale values for all views.
Am i missing anything?

This issue is now fixed.

I have created a test case, that does the four views thing with only one View and one Canvas3D, but four RenderPasses (with four different Viewports and different view transforms). It is way faster, and absolutely stable.

Please have look at org.xith3d.test.ui.QuadViewportTest

Note, that the QuadDivider Widget, I used there is extreme-alpha!!!

I think, this is a lot better, than using four Canvas3Ds and Views.

Marvin
Logged
khangharoth
Enjoying the stay
*
Offline Offline

Posts: 67


View Profile Email
« Reply #5 on: 07. February 2007, 04:15:47 am »

Once again thanks for such a prompt response. Smiley

Will try out the org.xith3d.test.ui.QuadViewportTest.It looks tempting if we dont have
to create four different canvases and views.
But if we want four views to be totaly independent say no effect of one View shift ,rotating ,scaling etc on other views ,will four RenderPasses will cater to this need.
Logged
Marvin Fröhlich
Xith Lord
Administrator
Guru
*****
Offline Offline

Posts: 4381


May the 4th, be with you...


View Profile
« Reply #6 on: 07. February 2007, 08:46:37 am »

Will try out the org.xith3d.test.ui.QuadViewportTest.It looks tempting if we dont have
to create four different canvases and views.
But if we want four views to be totaly independent say no effect of one View shift ,rotating ,scaling etc on other views ,will four RenderPasses will cater to this need.

Yes, they're independent also in this manner.

Marvin
Logged
Pages: [1]
Print
Jump to:  

Theme orange-lt created by panic