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 

wide aspect ratio causing problems with polygons on HUD


 
Post new topic   Reply to topic    OpenSceneGraph Forum Forum Index -> General
View previous topic :: View next topic  
Author Message
exedor
Newbie


Joined: 26 Dec 2017
Posts: 1

PostPosted: Tue Dec 26, 2017 10:18 pm    Post subject:
wide aspect ratio causing problems with polygons on HUD
Reply with quote

Hi,

I've recently hit a snag with a change in implementation to a really wide aspect ratio. I have a HUD tied to a camera that spans 4476x900 pixels.

Lines are not drawn using normal OpenGL line drawing because the maximum width is apparently pathetically low (like 10 pixels) so the software I'm trying to update is using an OpenGL QUAD (I know it's deprecated in versions 3.x, but for now it's what I have to work with.)

The vertical lines seem to be drawn fine. The horizontal lines are squished...presumably because the line is rendered as a Quad on such a large width aspect ratio display. I have 2 questions:

1: Is this the right way to get around line width issues?
2: How can I ensure that width of the lines are consistent regardless of if they are vertical or horizontal?


Thank you!

Cheers,
Vector
Back to top
View user's profile Send private message
robertosfield
OSG Project Lead


Joined: 18 Mar 2009
Posts: 12094

PostPosted: Thu Jan 04, 2018 4:00 pm    Post subject:
wide aspect ratio causing problems with polygons on HUD
Reply with quote

HI Vector (really you have to address yourself as a
container/mathematical concept? We are humans in this community, not
computers, please just use your own name, or a at least a human name.)

As for drawing lines on a hud, it's hard to give specific advice as
you don't describe how you are doing the hud or doing placing the
elements in to your HUD scene. There are a number of different ways
one can implement this functionality so giving specific advice for the
way you have done things is impossible to do.

The best I can say is that in principle one just needs to set up the
object space of your HUD subgraph so that the X and Y axis are
proportional, this would usually be done by choosing a projection
matrix horizontal and vertical aspect ratio that matches the display
aspect ratio.

Robert.



On 26 December 2017 at 22:18, John Smith <> wrote:
Quote:
Hi,

I've recently hit a snag with a change in implementation to a really wide aspect ratio. I have a HUD tied to a camera that spans 4476x900 pixels.

Lines are not drawn using normal OpenGL line drawing because the maximum width is apparently pathetically low (like 10 pixels) so the software I'm trying to update is using an OpenGL QUAD (I know it's deprecated in versions 3.x, but for now it's what I have to work with.)

The vertical lines seem to be drawn fine. The horizontal lines are squished...presumably because the line is rendered as a Quad on such a large width aspect ratio display. I have 2 questions:

1: Is this the right way to get around line width issues?
2: How can I ensure that width of the lines are consistent regardless of if they are vertical or horizontal?


Thank you!

Cheers,
Vector

------------------
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=72640#72640








------------------
Post generated by Mail2Forum
Back to top
View user's profile Send private message
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 Problems porting from osg-3.4.0 to os... hvarma General 5 Wed Sep 12, 2018 3:29 pm View latest post
No new posts problems with osg-3.4.0 port to osg-3... Herman Varma General 4 Wed Sep 12, 2018 2:26 pm View latest post
No new posts Drawable - recent commit causing prob... gwaldron General 3 Thu Aug 30, 2018 12:19 pm View latest post
No new posts osglight demo problems with Intel gra... eventhorizon5 General 2 Mon Jul 09, 2018 8:52 pm View latest post
No new posts Problems with MRT romulogcerqueira General 9 Sat May 12, 2018 4:46 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