entropy Posted November 22, 2018 Share Posted November 22, 2018 I'm confused about what, exactly, the position of a camera means. It seems like this would be straightforward, but I'm seeing strange results when I switch between camera types. Here's a playground that illustrates: https://playground.babylonjs.com/#TJTYGR In the above PG, line 5 creates the camera (in this case, an AnaglyphArcRotateCamera). I confirm that it is set to the proper position and target by logging those parameters in the console. So far, so good. Now, switch to the regular ArcRotateCamera (comment out line 5, uncomment line 6). The same position, target, radius, etc., produces a different point of view--the camera is placed closer to the boxes. The console log confirms all of the camera parameters are the same. Is there some reason for this behavior? Quote Link to comment Share on other sites More sharing options...
eps Posted November 22, 2018 Share Posted November 22, 2018 It looks like the RIG_MODE is specifically set when the ANAGLYPH version of that ArcRotateCamera is used so I'd suspect the difference is in there... but I'm not very familiar with that code. Quote Link to comment Share on other sites More sharing options...
Sebavan Posted November 23, 2018 Share Posted November 23, 2018 You are right this comes down to the computation of Rigs which is not identical to the default computation to account for interaxial distance for instance. This impacts the camera projection matrix Quote Link to comment Share on other sites More sharing options...
entropy Posted November 23, 2018 Author Share Posted November 23, 2018 Thanks for the replies so far. This leads me to another point of confusion: if we play the same game using the UniversalCamera (switching between the regular and anaglyph versions), there is no change in perspective. In the following PG, you can switch between them on lines 5 and 6: https://playground.babylonjs.com/#TJTYGR#1 Overall, UniversalCamera, AnaglyphUniversalCamera, and ArcRotateCamera all render the scene from the same perspective (all other things being equal)--only AnaglyphArcRotateCamera is different. The main reason I created this topic is that I'm seeing rendering differences between AnaglyphUniversalCamera and AnaglyphArcRotateCamera, so I'm trying to decide if the difference stated above is a feature or a bug. I was trying to create a scene where I can switch between AnaglyphUniversalCamera and AnaglyphArcRotateCamera to study the rendering differences in greater detail, but noticed this change in perspective when placing them in the same position. Quote Link to comment Share on other sites More sharing options...
Sebavan Posted November 23, 2018 Share Posted November 23, 2018 Interesting indeed, I know @Deltakosh made some changes recently on the anaglyph so this might come from here ? Let s check with him in a week once he ll be back from vacation. Quote Link to comment Share on other sites More sharing options...
entropy Posted November 23, 2018 Author Share Posted November 23, 2018 10 minutes ago, Sebavan said: Interesting indeed, I know @Deltakosh made some changes recently on the anaglyph so this might come from here ? Let s check with him in a week once he ll be back from vacation. Yes, I think those changes were made, in part, due to bug reports I filed here: I wanted to make sure that this latest issue I was seeing was not due to a misunderstanding on my part before bothering Deltakosh! Edit: I should also mention that I tried to look at the source code to find where any changes in perspective might arise. I can't seem to find any difference in the rigging between the different cameras (but I'm very much a novice in TS/JS, and its hard to find all the possible locations in the code where it might be set). Quote Link to comment Share on other sites More sharing options...
Sebavan Posted November 24, 2018 Share Posted November 24, 2018 Fixed and Deployed, thanks for reporting. entropy 1 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.