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 

wireframe mode and degenerate triangles


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


Joined: 14 Mar 2012
Posts: 316

PostPosted: Fri Dec 30, 2016 1:39 pm    Post subject:
wireframe mode and degenerate triangles
Reply with quote

Hi all,


I have just optimized a human model that had around 150 individual GL_LINE_STRIP drawables by adjoining these. This requires doubling the last vertex of a strip and the first vertex of the next strip which is to be appended, generating a couple of degenerate triangles.


The model still renders fine and the OSG stats viewer now shows a much lower drawable count.


A quirk appears when rendering this in wireframe mode (using the 'w' hotkey implemented in one of the builtin Event handlers). I assume this enables a GL PolygonMode of GL_FRONT_AND_BACK, GL_LINE. Now the degenerate triangles are still rendered, making the model look broken (arms look fused to the body).


Here's my question: Shouln't wireframe rendering mode hide degenerate triangles, as they wouldn't be passed on to the rasterizer in any case?

------------------
Post generated by Mail2Forum
Back to top
View user's profile Send private message
robertosfield
OSG Project Lead


Joined: 18 Mar 2009
Posts: 12205

PostPosted: Thu Jan 05, 2017 10:25 am    Post subject:
wireframe mode and degenerate triangles
Reply with quote

Hi Christian,

glPolygonMode/osg::PolygonMode controls how primitives are rasterized,
if the hardware doesn't have any explicit support for rejecting
degenerate triangles prior to triangle setup/rasterization stage then
they will make it though along with all other primitives and be
rasterized if possible. For fill degenerate triangles isn't an non
op, but for wire frame you'd expect that that it's possible to
rasterize as it will be two valid length edges.

Given this I think you are wanting something to happen that your
hardware just doesn't support.

Robert.

On 30 December 2016 at 13:38, Christian Buchner
<> wrote:
Quote:
Hi all,

I have just optimized a human model that had around 150 individual
GL_LINE_STRIP drawables by adjoining these. This requires doubling the last
vertex of a strip and the first vertex of the next strip which is to be
appended, generating a couple of degenerate triangles.

The model still renders fine and the OSG stats viewer now shows a much lower
drawable count.

A quirk appears when rendering this in wireframe mode (using the 'w' hotkey
implemented in one of the builtin Event handlers). I assume this enables a
GL PolygonMode of GL_FRONT_AND_BACK, GL_LINE. Now the degenerate triangles
are still rendered, making the model look broken (arms look fused to the
body).

Here's my question: Shouln't wireframe rendering mode hide degenerate
triangles, as they wouldn't be passed on to the rasterizer in any case?






------------------
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 osgEarth often crashes in multi-displ... xdfanfan General 0 Mon Nov 26, 2018 8:07 am View latest post
No new posts Toggling between wireframe modes Igor Naigovzin General 2 Wed Nov 07, 2018 9:41 am View latest post
No new posts Idea to implement a kind of 'rubber m... christoph General 16 Tue Sep 11, 2018 11:51 am View latest post
No new posts Converting PrimitiveSet to use triang... Waaayoff General 7 Fri Jul 27, 2018 12:06 pm View latest post
No new posts osgText: problem with SCREEN_COORDS mode gwaldron General 9 Thu May 17, 2018 3:56 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