To LUGNET HomepageTo LUGNET News HomepageTo LUGNET Guide Homepage
 Help on Searching
 
Post new message to lugnet.cad.dev.macOpen lugnet.cad.dev.mac in your NNTP NewsreaderTo LUGNET News Traffic PageSign In (Members)
 CAD / Development / Macintosh / 1050
1049  |  1051
Subject: 
Re: Bricksmith 2.4: Faster. Much Faster.
Newsgroups: 
lugnet.cad.dev.mac
Date: 
Wed, 16 Jun 2010 04:11:46 GMT
Viewed: 
36227 times
  
In lugnet.cad.dev.mac, Roland Melkert wrote:
   In lugnet.cad.dev.mac, Kevin L. Clague wrote: snip
  
  
  • Drawing speed improvements of up to 1200% snip

Just from a technical interest, how did you achieve that boost?

I’m in the midst of writing a new LDraw renderer myself, so I’m very interested in any possible improvements I can implement over the old LD4DStudio rendering method. Although I suspect it has to do with alpha blending and or conditional line rendering (none of whom are done in LD4D, but I would like to do in the new implementation).

Anyhow it sounds great, maybe I get to use it one day (I’m planning to buy an apple for some years now).

Roland

Hi Roland,

Bricksmith now recursively flattens the geometry for each referenced top-level part then sorts it according to primitive type (triangles, quads, lines). Since the primitives are sorted, each type can be enclosed in a single glBegin while display lists are compiled. I create a unique display list for each color variation of the part. Flattening and sorting the primitives allowed the display lists to perform vastly improved internal optimizations over what they were able to do with the unsorted data from the previous version of Bricksmith.

Unfortunately, all this is a bit beside the point because display lists are on their way out, deprecated, not even available on the iPhone, etc. You are supposed to be using VBOs and VAOs nowadays. Unfortunately I am not a 3D guru, wrote my program using obsolete methods to begin with, and it has taken me a while to plan a transition.

By the way, Bricksmith does not render conditional lines. I consider shading to be a sufficient substitute, and conditional lines sound difficult to optimize.

Allen



Message has 2 Replies:
  Re: Bricksmith 2.4: Faster. Much Faster.
 
(...) Heh, you hit that problem too? I've played around writing an OpenGL LDraw renderer based exclusively on display lists, but I can't for the life of me figure out how to handle conditional lines in this setup. Has anyone else solved this (...) (14 years ago, 16-Jun-10, to lugnet.cad.dev.mac, FTX)
  Re: Bricksmith 2.4: Faster. Much Faster.
 
In lugnet.cad.dev.mac, Allen Smith wrote: <snip> (...) Thanks for the insight Allen, I'm also not a 3D guru, but I like to fool around with it as much as anyone interested in 3d programming. Your method is roughly the same as what LD4DStdudio does, (...) (14 years ago, 16-Jun-10, to lugnet.cad.dev.mac, FTX)

Message is in Reply To:
  Re: Bricksmith 2.4: Faster. Much Faster.
 
In lugnet.cad.dev.mac, Kevin L. Clague wrote: <snip> (...) <snip> (...) Hi, Keving Just from a technical interest, how did you achieve that boost? I'm in the midst of writing a new LDraw renderer myself, so I'm very interested in any possible (...) (14 years ago, 14-Jun-10, to lugnet.cad.dev.mac, FTX)

21 Messages in This Thread:





Entire Thread on One Page:
Nested:  All | Brief | Compact | Dots
Linear:  All | Brief | Compact

This Message and its Replies on One Page:
Nested:  All | Brief | Compact | Dots
Linear:  All | Brief | Compact
    

Custom Search

©2005 LUGNET. All rights reserved. - hosted by steinbruch.info GbR