OpenSceneGraph Forum Forum Index OpenSceneGraph Forum
Official forum which mirrors the existent OSG mailing lists. Messages posted here are forwarded to the mailing list and vice versa.
 
   FAQFAQ    SearchSearch    MemberlistMemberlist    RulesRules    UsergroupsUsergroups    RegisterRegister 
 Mail2Forum SettingsMail2Forum Settings  ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
   AlbumAlbum  OpenSceneGraph IRC ChatOpenSceneGraph IRC Chat   SmartFeedSmartFeed 

EXTERNAL: Re: What coordinate system does OSG use?


 
Post new topic   Reply to topic    OpenSceneGraph Forum Forum Index -> General
View previous topic :: View next topic  
Author Message
Rowley, Marlin R
Guest





PostPosted: Tue Apr 10, 2018 8:50 pm    Post subject:
EXTERNAL: Re: What coordinate system does OSG use?
Reply with quote

Robert,

The camera manipulators is probably what we are basing our coordinate system off of. Thanks for the answer there. I’ll try to remember that going forward.

I understand the model, world, view, projection, divide-by-w, and screen space coordinate transformations. When dealing with matrices though, you just have either a left or right handed system, row or column major ordering. I was just a little stumped with how some of these matrices look after going through the model, world, and view space transformations.

It’s going to be hard to be too specific with questions and issues as I’m sure all of us are working on applications that have several library dependencies. It would be more troublesome to create an example unless we can isolate it by writing another smaller program. Not saying I wouldn’t, but I think going the general question route first and then getting more specific as we go along without any solution should be OK, right?

Thanks for the quick feedback though! 😊

----------------------------------------
Marlin Rowley
Software Engineer, Staff

Missiles and Fire Control
972-603-1931 (office)
214-926-0622 (mobile)
(
Only registered users can see emails on this board!
Get registred or enter the forums!
)

From: osg-users [mailto:] On Behalf Of Robert Osfield
Sent: Tuesday, April 10, 2018 2:56 PM
To: OpenSceneGraph Users <>
Subject: EXTERNAL: Re: What coordinate system does OSG use?

There is nothing magical about what the OSG does. It just loads data, sets up the camera view and project matrices that you application sets and passes them to OpenGL without any modifications.


Now if you are loading data for standard OSG plugoins like OpenFlight then these models will be loaded in world coords where Z is up, Y is north, X is east, and the OSG camera manipulators default to this convention so they set the view so it looks north, Z up, X to the right.



OpenGL coordinate frame is not a fixed thing, the coordinate frame that objects are in depends upon their modelview matrix. The only thing that is fixed in OpenGL coordinate frames is the eye coordinate frame that is Y up, X to the right and Z out from the screen. Eye coordinates and world coordinates are a very different thing though and you shouldn't conflate the two. It sounds like to me like you assume that OpenGL eye coordinates is what all OpenGL coordinate fame are. I'm afraid this is just a common misconception about coordinate frames in OpenGL and real time graphics in general.



As to what to suggest for you it's difficult to guess what you do and don't know about OpenGL, the OSG and graphics in general, so it's hard to know where to start when explain stuff.



Robert.



On 10 April 2018 at 21:03, Rowley, Marlin R < (
Only registered users can see emails on this board!
Get registred or enter the forums!
)> wrote:
Quote:

Hello,

I’m very confused by this coordinate system. It appears that our conventional left-handed and right-handed systems are NOT used, which causes havoc with the OpenGL coordinate frame.

It seems like getting the view matrix at the origin looking down what would be a left-handed +z-axis but rotated 90-degress about the x-axis so that z is pointing up seems to be the coordinate frame.

In a function call for getting the view matrix from a camera, for example. You get these values for the matrix (assuming it’s column-major order)

Mat[2] : [0, -1, 0] ç LOOK
Mat[1]: [0, 0, 1] çUP
Mat[0]: [1, 0, 0] ç RIGHT

This is confusing me with getting transforms and moving them into the vertex shaders.

-M

----------------------------------------
Marlin Rowley
Software Engineer, Staff

Missiles and Fire Control
972-603-1931 (office)
214-926-0622 (mobile)
(
Only registered users can see emails on this board!
Get registred or enter the forums!
)




_______________________________________________
osg-users mailing list
(
Only registered users can see emails on this board!
Get registred or enter the forums!
)
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


------------------
Post generated by Mail2Forum
Back to top
Display posts from previous:   
Post new topic   Reply to topic    OpenSceneGraph Forum Forum Index -> General All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You cannot download files in this forum

Similar Topics
Topic Author Forum Replies Posted
No new posts [Help] OSG + ArKit: Problem convertin... Brayner General 4 Mon Oct 08, 2018 7:07 pm View latest post
No new posts EXTERNAL: Re: Value of a variable in... Rowley, Marlin R General 3 Fri Sep 28, 2018 1:39 pm View latest post
No new posts EXTERNAL: Re: LookAt() function param... Rowley, Marlin R General 0 Mon Aug 13, 2018 2:59 pm View latest post
No new posts EXTERNAL: Re: World space normal. Rowley, Marlin R General 1 Wed Jul 11, 2018 4:30 pm View latest post
No new posts EXTERNAL: Announcement: VulkanSceneGr... Rowley, Marlin R General 0 Mon Jun 04, 2018 3:00 pm View latest post


Board Security Anti Bot Question MOD - phpBB MOD against Spam Bots
Powered by phpBB © 2001, 2005 phpBB Group
Protected by Anti-Spam ACP