View Full Version : Multi-part simple render question

07-10-2005, 11:22 PM

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

In my main rendering code I do this

For lngCounter1 = 1 To glngNumPIDs
...........glCallList lngCounter1

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

07-10-2005, 11:50 PM
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).

07-11-2005, 07:43 AM
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...

07-11-2005, 08:23 AM
A picture of what I am talking about is here


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


07-11-2005, 09:42 AM
those whiskers are typical of z-fighting.

see my post here http://www.opengl.org/discussion_boards/...t=018942#000001 (http://www.opengl.org/discussion_boards/cgi_directory/ultimatebb.cgi?ubb=get_topic;f=2;t=018942#000001)

07-12-2005, 03:42 AM
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