Rendering speed and subparting


Rendering speed and subparting
#1
Never got a clear answer about this... is it useful to make subparts for parts that has symmetries or repetitions, strictly for rendering speed? (I won't discuss here the other benefits of subparting such as file size savings).
Reply
Re: Rendering speed and subparting
#2
I think no. Almost all render engines first parse all subparts and then render all polygons from them. So i think there is no difference.
Reply
Re: Rendering speed and subparting
#3
Speed wise you want as much in a single mesh as possible as it reduces (api) overhead. Subparts could help reduce the preparation time needed though.
Reply
Re: Rendering speed and subparting
#4
OK, thanks both !
Reply
Re: Rendering speed and subparting
#5
Roland Melkert Wrote:Speed wise you want as much in a single mesh as possible as it reduces (api) overhead. Subparts could help reduce the preparation time needed though.

There's a limit to how much processing can be 'cached' on sub-parts because each sub-part can (1) be modified by parent commands (scale, BFC inverse, change of texture environment, etc.) and (2) may interact with neighbors (e.g. for smoothing and calculating normals).

There are some cases where there could be some computation savings: if we have a rule "no smoothing between triangles across lines" (that is, lines induce creases) then we can reduce the set of "open" edges in a sub-part once. A few pathological cases are beig wins here: a 32x32 baseplate with 1024 studs - the studs are mostly pre-creased, so we eliminate almost 32k edge checks from sub-parts. But this case is already taken care of in the library.

I think a good rule of thumb might be: the humans will get annoyed with a huge file before the renderers get slow at pre-processing with repetition. :-)

cheers
Ben
Reply
Re: Rendering speed and subparting
#6
Like your rule of thumb! Wink
Reply
Re: Rendering speed and subparting
#7
I think you understand but to be sure Smile ..

I didn't mean to make the LDraw files large, I meant rending wise it won't speed things up. Once the files are read they should be used to create the recursive flat data (mesh) needed for rendering.

In LDCad for example I do this on the part level but all vertices etc are cached on the .dat file level. Another advantage of many subparts is the possibility for multithreaded loading/caching/preparing.
Reply
« Next Oldest | Next Newest »



Forum Jump:


Users browsing this thread: 1 Guest(s)