To LUGNET HomepageTo LUGNET News HomepageTo LUGNET Guide Homepage
 Help on Searching
 
Post new message to lugnet.cad.devOpen lugnet.cad.dev in your NNTP NewsreaderTo LUGNET News Traffic PageSign In (Members)
 CAD / Development / 10486
10485  |  10487
Subject: 
Re: Maximum depth of ldraw models?
Newsgroups: 
lugnet.cad.dev
Date: 
Thu, 7 Sep 2006 02:39:57 GMT
Viewed: 
6976 times
  
In lugnet.cad.dev, Steve Bliss wrote:
> In lugnet.cad.dev, Mark Tarrabain wrote:
> > I notice that no maximum depth is given by the standard.  How
> > potentially non-compliant would a renderer be if it fails because parts
> > in a model are too deeply nested (a maximum of as little as 16 on some
> > OpenGL implementations).  I notice that no existing parts are nested
> > more than 7 files deep, but I want to be sure.
> 
> Hmm.  I use MPD models a lot, there can be several levels of nesting within a
> single .mpd file, and I have been known to refer to .mpd files from other .mpd
> files.
> 
> I'm not sure how deep my nesting of model files goes, but I'd be a little
> concerned about a limit of 16 levels.  I wonder if ldraw renderers tend to
> flatten out the nesting in part files?

I tested the performance of, and saw a decent gain from flattening part
geometry. (Perhaps 15% in BrickDraw3D for QuickDraw3D or OpenGL.)

What this means is that when a part is prepared into a drawing list, it is not a
list of calls to primitives with a transformation, but instead the primitives
are copied out and all coordinates pre-transformed, all the way down.  (With the
exception of studs and changes of color.) Or, a part is created as a single mesh
with an attempt to join triangles into triangle mesh and to join line segments
into line primitives.

This can speed up rendering by eliminating a large number of camera stack
operations, eliminating duplicate vertices, and by increasing the memory cache
hit rate, at the cost of a reasonable amount of extra memory used.

Think of it as calling primitives by value instead of by reference.

However technology changes and yesterday's optimization isn't necessarily
today's.

-Erik



Message has 2 Replies:
  Re: Maximum depth of ldraw models?
 
(...) Same here for LDView. LDView always flattens part geometry, and this seems to improve performance enough to be noticed. LDView does use a display list for each part, and a nested display list for each nesting level above that (as long as you (...) (20 years ago, 7-Sep-06, to lugnet.cad.dev)
  Re: Maximum depth of ldraw models?
 
(...) Okay... 15% speedup is substantial... that means that it's better to pre-transform the subfiles when generating the operations for the current file. I won't worry about the maximum depth any more then. (...) How does a renderer know which (...) (20 years ago, 7-Sep-06, to lugnet.cad.dev)

Message is in Reply To:
  Re: Maximum depth of ldraw models?
 
(...) Hmm. I use MPD models a lot, there can be several levels of nesting within a single .mpd file, and I have been known to refer to .mpd files from other .mpd files. I'm not sure how deep my nesting of model files goes, but I'd be a little (...) (20 years ago, 6-Sep-06, to lugnet.cad.dev)

11 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
    

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