Search the Community
Showing results for tags 'frustum'.
-
I am using Unigine 2.15.0.1 I noticed a bug in the display of the frustum in the editor for physically-based camera. Frustum is displayed correctly when using vertical mode (see vertical.png). Screenshots below display the same camera set using both modes. Both modes give the same accurate screenshot using Tools->Video Grabber. In physically-based mode focal length and film gate are set in pixels as unit and not in mm but it shouldn't matter since it's used as a ratio to compute FoV. I am guessing the mistake is an inversion of width and height to display frustum because in physically based mode the FoV is computed horizontally whereas in vertical mode it's.. vertical FoV. When I put 1080 in film gate I get a correct frustum but an incorrect screenshot (see physically_based_vertical_filmgate.png)
-
Hi there I'm migrating our application to Version 2.2.1. And facing some problems in the newer approach to render custom made frustums. We used the method renderViewport and passed different projection and modelview matrices to adjust the frustum to the players position in front of the screen. Now, I see that you removed this call and create some new classes, such as WidgetSpriteViewport. I don't see right now how to start to get our old functionality back. Could you please give me a hint, how to start? Kind regards, Renato
-
Hi everybody The Math matrix function frustum() returns a mat4 variable, which I use for a asymmetric viewing frustum. I started with setting the params in meters but this didn't gave me the wished result. As I understand the returned mat4 contains integer values. Wouldn't be floats better? With a bit of try-and-error I found some params which results in a acceptable result. See the attached pictures. But I can't figure out how the params resolve the viewed image. The best result I get with overwriting the returned mat4 value .m11 with a float value... dmat4 frstmM = frustum(-0.035f, 0.0875f, -0.034453f, 0.034453f, 0.1f, 40000.0f); frstmM.m11 = 1.72f; player.setProjection(frstmM); Can somebody give me a hint? Thanks
-
[SOLVED] Angle mismatch in modelview and projection matrix
renato.semadeni posted a topic in C++ Programming
Hi there, As you can see on the image we are realizing a multiscreen application. The application has different frustums since the person doesn't sit in the middle of the screen, but with an offset to the left or the right. We are using a derivative of the AppWall implementation with some additional functions. We observe now a strange behavior: The frustums we are calculating for all 3 screens and applying them as the projection matrix. Then for the side screens, we additionally rotate the camera due to the screens physical setup and pass them as the Modelview matrix. Now when we use the same rotation angle for the modelview matrix as for the frustum calculation, we get the following offset: But if we use a smaller rotation angle, we get a better result. Do we miss something with the modelview and projection matrix. Because I'm quite sure, the rotation angle should be the same as we need for the calculation of the frustums. Thanks for any help, Renato -
Hi folks I'd like to change the viewing frustum on a single screen setup. If I'm running the simulation on a big screen, while the gamer is not sitting in the middle of the screen but f.ex. displaced to the left, see the attached picture for a possible center of the viewing frustum. I'm trying to adjust the projection matrix of PlayerDummy, but I'm not getting the expected result. If I translate the matrix, the center of the frustum comes a long. Do i missunderstand something?Could you please give me a hint, how to approach this task. Thanks a lot