Welcome! Log In Create A New Profile

Advanced
Re: Looking for huge (mpd) models
March 02, 2013 05:35PM
Hi Roland,

For BrickSmith I am planning to move the new rendering code from glDrawArrays to glDrawElements after I implement part smoothing, so that the vertex sharing for draw-elements can be higher.

I think that whether draw-elements vs draw-arrays is faster depends on which part of the GPU pipeline surrounding vertex/triangle processing is bogging down and how transformed vertices are cached. But either way if that's the bottleneck, the next answer is level of detail. Datsville turns into a 125,000,000 vertex model for 39,000 parts; when drawn in a window that's something like 125 vertices _per pixel_...not a good ratio. :-)

One other note: before using shaders, BrickSmith had to compute a VBO for each part in each color that was used for parts that use the 'current' color. For example, for the 2x2 plate with red wheels there'd be a gray & red version and a black & red version stored in two VBOs if the user placed the part twice with different colors.

With shaders, the shader uses a special RGBA value as a place-holder for "use the current color" - the mesh can thus encode the part as it is in the library: red wheels and "current color" plate. Only one VBO is needed, and thus that VBO can be used twice as often, resulting in fewer VBO binding changes (those aren't cheap) and higher instancing counts. It also simplifies the code a bit.

cheers
Ben
SubjectAuthorViewsPosted
Looking for huge (mpd) models Roland Melkert1108January 08, 2013 10:15AM
Re: Looking for huge (mpd) models Travis Cobbs438January 08, 2013 10:38AM
Re: Looking for huge (mpd) models Roland Melkert360January 08, 2013 10:53AM
Re: Looking for huge (mpd) models Travis Cobbs358January 08, 2013 12:44PM
Re: Looking for huge (mpd) models Roland Melkert338January 08, 2013 01:15PM
Re: Looking for huge (mpd) models Attachments Michael Heidemann398January 09, 2013 09:00AM
Re: Looking for huge (mpd) models Roland Melkert308January 09, 2013 09:44AM
Re: Looking for huge (mpd) models Michael Heidemann339January 10, 2013 09:19AM
Re: Looking for huge (mpd) models Tim Gould281March 01, 2013 01:12PM
Re: Looking for huge (mpd) models Michael Heidemann251March 01, 2013 01:44PM
Re: Looking for huge (mpd) models Tim Gould250March 01, 2013 01:47PM
Re: Looking for huge (mpd) models Michael Heidemann277March 01, 2013 03:33PM
Re: Looking for huge (mpd) models Attachments Jaco van der Molen302March 01, 2013 05:15AM
Re: Looking for huge (mpd) models Roland Melkert329March 01, 2013 09:20AM
Re: Looking for huge (mpd) models Jaco van der Molen247March 04, 2013 04:56AM
Re: Looking for huge (mpd) models Roland Melkert221March 04, 2013 10:17AM
Re: Looking for huge (mpd) models Ben Supnik260March 02, 2013 12:14PM
Re: Looking for huge (mpd) models Roland Melkert261March 02, 2013 02:02PM
Re: Looking for huge (mpd) models Ben Supnik261March 02, 2013 05:35PM
Re: Looking for huge (mpd) models Roland Melkert242March 03, 2013 10:16AM
Re: Looking for huge (mpd) models Ben Supnik246March 03, 2013 06:00PM
Re: Looking for huge (mpd) models Roland Melkert201March 04, 2013 10:24AM
Re: Looking for huge (mpd) models Travis Cobbs424March 04, 2013 10:47AM



Sorry, only registered users may post in this forum.

Click here to login