Results 1 to 6 of 6

Thread: Multi-part simple render question

  1. #1
    Member Newbie
    Join Date
    Mar 2005
    Posts
    47

    Multi-part simple render question

    Guys

    I have a model created from many sub parts.....

    In my main rendering code I do this

    For lngCounter1 = 1 To glngNumPIDs
    ......glPushMatrix
    ...........glCallList lngCounter1
    ......glPopMatrix
    Next

    As you can see, I loop round the various parts of my model contained in display lists.

    The problem with this is that if parts share a common boundary then the boundary isn't displayed correctly when I spin the model round in realtime.

    Consider a simple example of 2 cubes touching.

    In the code above I would render each cube individually and there are 2 common faces that probably wont render correctly (because the parts are rendered separately)

    Obviously I could create a new display list that does not contain the 2 common faces but I am trying to avoid doing additional calculations.

    At the moment I precalculate the display lists in a part of the code where the user is expecting a wait (I could have 100K quads in each part)

    Ideally I don't want to re-calculate the external faces 'on the fly'

    Is there a way round this or do I have to build a new single display list from the others?

    Many thanks for any input

  2. #2
    Senior Member Regular Contributor
    Join Date
    Jan 2004
    Posts
    314

    Re: Multi-part simple render question

    In what way are they not rendered correctly?

    As long as you're using the depth buffer the results should be correct (apart from possible z-fighting).

  3. #3
    Member Newbie
    Join Date
    Mar 2005
    Posts
    47

    Re: Multi-part simple render question

    Thanks for the reply.

    I have made some progress and have been playing with glPolygonOffset. I suspect it's a tollerance issue - large facets infront of small ones etc...

  4. #4
    Member Newbie
    Join Date
    Mar 2005
    Posts
    47

    Re: Multi-part simple render question

    A picture of what I am talking about is here

    http://www.cadfem.com/ogl5.gif

    Note the annoying 'whiskers' and the 'wave' effect between the parts. The whiskers seem to retain their size and so look worse when you zoom out (so they are big as a proportion of the model size)

    With my new-found OGL skills, this plot is offensive and must be fixed

    Lots more to do yet on this app, but the whiskers need a clean shave.

    Thanks for any input

    Julian

  5. #5
    Super Moderator OpenGL Lord
    Join Date
    Dec 2003
    Location
    Grenoble - France
    Posts
    5,574

    Re: Multi-part simple render question

    those whiskers are typical of z-fighting.

    see my post here http://www.opengl.org/discussion_boards/...t=018942#000001

  6. #6
    Member Newbie
    Join Date
    Mar 2005
    Posts
    47

    Re: Multi-part simple render question

    Many thanks

    It was the Near/Far settings causing the problem.

    A quick mod to glOrto and all is well.

    Whiskers now closely shaved and smooooth

    Thanks again

    Julian

Similar Threads

  1. multi head/multi window simple program
    By advorak in forum OpenGL: Basic Coding
    Replies: 2
    Last Post: 06-13-2015, 07:56 PM
  2. OpenGl multi texturing with C#, Part II
    By Jakeop132 in forum OpenGL: Advanced Coding
    Replies: 4
    Last Post: 01-16-2011, 07:55 PM
  3. Question about Multi Display OGL render?
    By pango in forum OpenGL: Advanced Coding
    Replies: 3
    Last Post: 11-23-2008, 04:45 PM
  4. simple clouds part 1 and trying to get it to work
    By Babblin Joe in forum OpenGL: Basic Coding
    Replies: 4
    Last Post: 02-25-2006, 01:30 PM
  5. Multi-texture, multi-UV material spec question
    By JHoerner in forum COLLADA
    Replies: 3
    Last Post: 03-11-2005, 03:18 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Proudly hosted by Digital Ocean