Welcome! Log In Create A New Profile

Advanced
Re: Looking for huge (mpd) models
avatarMarch 04, 2013 10:47AM
Quote
Ben Supnik
Quote
Roland Melkert
I use a single set of VBO's per brick (triangles, edges, indices), these have no color component at all. I just issue a plain glColor before the drawelements call.

How do you handle parts like 122c01, where the the plate is user-colored, the wheels are red, and the axle is..metalic I guess? In BrickSmith the color is tagged as a mix of red, metalic, and user-set. If you pass immediate mode color I would think you'd need (at a minimum) 3 draw calls and some side data to tell you which part of the VBO gets which color.

Note: it's been a really long time since I wrote LDView's current rendering code, so I could be mis-remembering.

I think LDView behaves similarly to what Roland describes. It splits the geometry into two VBOs per part: one with hard-coded colors, and one for geometry of color 16. It then uses glColor before drawelements for the color 16 geometry, and none of that geometry includes color data in the vertex data. For the hard-coded colors, the vertex data includes the color data, and that is drawn in a second call. So, there will always be two calls for parts that contain non color 16 geometry, but only one call for parts that are purely color 16.
SubjectAuthorViewsPosted
Looking for huge (mpd) models Roland Melkert1256January 08, 2013 10:15AM
Re: Looking for huge (mpd) models Travis Cobbs498January 08, 2013 10:38AM
Re: Looking for huge (mpd) models Roland Melkert432January 08, 2013 10:53AM
Re: Looking for huge (mpd) models Travis Cobbs433January 08, 2013 12:44PM
Re: Looking for huge (mpd) models Roland Melkert400January 08, 2013 01:15PM
Re: Looking for huge (mpd) models Attachments Michael Heidemann450January 09, 2013 09:00AM
Re: Looking for huge (mpd) models Roland Melkert360January 09, 2013 09:44AM
Re: Looking for huge (mpd) models Michael Heidemann387January 10, 2013 09:19AM
Re: Looking for huge (mpd) models Tim Gould334March 01, 2013 01:12PM
Re: Looking for huge (mpd) models Michael Heidemann304March 01, 2013 01:44PM
Re: Looking for huge (mpd) models Tim Gould307March 01, 2013 01:47PM
Re: Looking for huge (mpd) models Michael Heidemann337March 01, 2013 03:33PM
Re: Looking for huge (mpd) models Attachments Jaco van der Molen352March 01, 2013 05:15AM
Re: Looking for huge (mpd) models Roland Melkert381March 01, 2013 09:20AM
Re: Looking for huge (mpd) models Jaco van der Molen286March 04, 2013 04:56AM
Re: Looking for huge (mpd) models Roland Melkert260March 04, 2013 10:17AM
Re: Looking for huge (mpd) models Ben Supnik314March 02, 2013 12:14PM
Re: Looking for huge (mpd) models Roland Melkert327March 02, 2013 02:02PM
Re: Looking for huge (mpd) models Ben Supnik315March 02, 2013 05:35PM
Re: Looking for huge (mpd) models Roland Melkert284March 03, 2013 10:16AM
Re: Looking for huge (mpd) models Ben Supnik287March 03, 2013 06:00PM
Re: Looking for huge (mpd) models Roland Melkert245March 04, 2013 10:24AM
Re: Looking for huge (mpd) models Travis Cobbs500March 04, 2013 10:47AM



Sorry, only registered users may post in this forum.

Click here to login