PDA

View Full Version : question about freezing objects



Beau_M
06-30-2007, 07:20 PM
Sorry if this has been asked before, but couldn't find anything. Probably not a simple question to answer anyway.

I've started going through some scenes I was working on a while back. The objects in particular. I'm still very much a novice at much of this, but I noticed that a lot of my objects have been created with 10, 20, and sometimes 50 times as many polys as needed (one in particular, was ~15000 polys, redid it to 120...). Getting to the point, is there any difference in rendering speed between subpatched objects and frozen objects?

Sensei
06-30-2007, 07:28 PM
is there any difference in rendering speed between subpatched objects and frozen objects?

Only in early preparation stage, that in simple scenes just flashes and ends in miliseconds.. When progress slider goes and main preview is updated, it's after that stage..

Beau_M
06-30-2007, 07:42 PM
Ok, thanks for that. So if I'm understanding you correctly, it's slightly faster using subpatches, but nothing really noticeable. Guess I'll keep cutting those polys down anyway.

SplineGod
06-30-2007, 09:38 PM
Its faster to use polys rather then SubDs. A good rule of thumb is to only keep things subpatched that will be deformed. If its not going to be deformed I would freeze the geometry (but also keep a SubD version saved).
LW has to do additional calculations when dealing with SubDs.

Wonderpup
07-01-2007, 07:14 AM
If you reduce your subpatch level level before freezing you can generate lower res versions of your objects.

hrgiger
07-01-2007, 08:19 AM
I generally avoid freezing in most cases. If it's a background object that won't be seen in detail in your render, then freeze away. However, if it's going to appear close up, you may regret freezing the object if you can see faceted edges at all. The advantage of subpatch is that you can change the resolution at will in Layout to smooth it out. I haven't found in most cases that rendering polygons is significantly faster then rendering subpatch objects. It does cause some initial delay since Lightwave has to calculate the subdivision, but I don't think it's worth losing the ability to subdivide at rendertime on key objects.

omeone
07-01-2007, 08:33 AM
Another time to keep things patched is for LOD (level of detail) control.

Wasn't there something about having the render subpatch level the same as display, thus preventing the pre-calculation?

Andyjaggy
07-01-2007, 10:18 AM
I used to always freeze my subpatched objects but when subpatched UV's came around I stopped the habit. I have never noticed a significant difference in rendering speed, and I like being able to adjust the subpatch level in layout.

However if you do freeze your mesh do yourself a huge favor and be sure to save the original subpatched version somewhere for easier editing, modification in the future.

Beau_M
07-01-2007, 10:58 AM
However if you do freeze your mesh do yourself a huge favor and be sure to save the original subpatched version somewhere for easier editing, modification in the future.

That was in the back of my mind when I bought this question up actually. I'm finding that I have a lot of remodeling to do now since when I started using LW I went on a freezing spree.



Another time to keep things patched is for LOD (level of detail) control.

That did cross my mind, but since I only use LW for static scenes, I don't think it would be an issue for me.

I did some quick tests and found the speed difference to be rather negligable (even on my rather old machine right here). I think just for simplicity I'll stick with subpatches.

scenicdave
07-01-2007, 11:23 AM
Hey Guys,
Such disparate views!

My experience has been that subpatches are much slower and that freezing non-deforming models greatly speeds up the renders.

Maybe a few bits and pieces don't really slow LightWave down but I've found that interaction/hub swapping/rendering all benefit from freezing non deforming geometry just as Larry Shultz advised earlier.

One thing to bear in mind; if you keep a copy of geometry in a separate layer in the same object, even if it's not loaded in the scene, Layout still has to load it into ram. So if you're going to keep a spare subpatch version around, I suggest keeping it in a separate file.
regards
Dave Tracey
Sydney

Sensei
07-01-2007, 12:37 PM
I prepared test scene, with frozen and non frozen object with 1 mln poly.

On my dual-core laptop T2500 2.0 GHz rendering non-frozen took 8.2 seconds, and frozen 3.2 seconds. It's all because freezing took more than 6 seconds.. The more time is spend in rendering stage the less you gain. Loading frozen scene takes considerable more time.. It's worth mentioning that loading time is counted just once per render node, but freezing must be done each frame while rendering in renderfarm. For 1000 frames difference will be 6 * 1000 = 6000 / 60 = 100 minutes versus 6 seconds..

http://www2.trueart.pl/Tests/Test%20Sub-Patch%20Speed.rar

Beau_M
07-01-2007, 01:16 PM
Hmm, I didn't use a test model with anywhere near as many polys you tried Sensei. But after having a quick look, there's a huge difference in the rendering. It's a bit of a toss-up for me really. Slower render times or slower layout (my poor little computer could hardly handle me pushing 1mil+ polys around)

Andyjaggy
07-01-2007, 02:14 PM
That's how I understood it was that LW had to convert the subpatched model at the beginning of the rendering process, and therefore adding time to the render. However if you have a long render such as 30 minutes or so I wonder if you still get a speed bump with frozen meshes.We'll just leave the loading time of the mesh out of the equation here.

............ running off to do some tests.

Andyjaggy
07-01-2007, 02:35 PM
Okay so the basic mesh in modeler has 60k polys.

The subpatched model had a total poly count of 1 million at rendering time and took 3 m 8s to render.

The frozen model had a total poly count of 900k at rendering time and took 3m 30s to render.

Very interesting. According to my test subpatched models are actually faster in real world application. (A render that is more then 10 seconds.)

Andyjaggy
07-01-2007, 02:55 PM
Okay another test just to make sure. I also changed some stuff, added DOF etc... just to see if maybe that changes things.

Base mesh in modeler is 15k

The subpatched model was 200k at rendering and took 2m 1s

The frozen model was 175k at rendering and took 2m 30s

Okay you are all wrong and I am right :) Just kidding, I am wondering if the new rendering engine in 9.0 has changed things. I know it is supposed to be much faster with high poly counts and perhaps this is the opposite of what would have happened pre 9.x.

Feel free to do some tests to prove me wrong guys.

Sensei
07-01-2007, 03:17 PM
Andy, you must have exactly the same poly count from frozen and un-frozen - use Layout File > Save Trans Object.. to have it.. It can't have APS, just simple Sub-Division.. Also having exactly the same Display Sub-Patch Level as Render Sub-Patch Level makes test useless - they must be different, otherwise object is already sub-divided and used as-is from display.. (in other words - sub-division was done already at display preparation, but was not counted in render time)..

Andyjaggy
07-01-2007, 04:50 PM
Andy, you must have exactly the same poly count from frozen and un-frozen - use Layout File > Save Trans Object.. to have it.. It can't have APS, just simple Sub-Division.. Also having exactly the same Display Sub-Patch Level as Render Sub-Patch Level makes test useless - they must be different, otherwise object is already sub-divided and used as-is from display.. (in other words - sub-division was done already at display preparation, but was not counted in render time)..

Gotcha. I was wondering why the poly counts were different. I thought since the render level was the same as the level I converted them too they should have the same poly count. Is there a difference between the modeler and layout subdivision level. I still find it interesting though that even though my test was pretty much useless :) that LW still rendered the subpatch object with more polys faster. Any explanation on that?

And Sensei I'm interested in you virtualrender plugin. Any limitations when rendering one still across a renderfarm with it?

Sensei
07-01-2007, 04:52 PM
Gotcha. I was wondering why the poly counts were different. I thought since the render level was the same as the level I converted them too they should have the same poly count. Is there a difference between the modeler and layout subdivision level?

Yes, default Modeler sub-division level is 5, and Layout 3 IIRC..
Also after LW v9.0 you must make sure you have right Sub-D Type selected in Modeler, and remember which is enabled.. In my example I used standard Sub-Patch, not Catmull-Clark Sub-D..

Andyjaggy
07-01-2007, 04:57 PM
That would explain it. Thanks. As for CC sub's as much as I would like to use them they are just too slow and buggy at the moment.

Sensei
07-01-2007, 05:08 PM
That would explain it. Thanks. As for CC sub's as much as I would like to use them they are just too slow and buggy at the moment.

I don't find them buggy by themself and uses them all the time when I am playing with modeling.. They have edge weight map implemented as standard per poly weight map.. That was the only way to keep them compatible at LWO file format level.. In other words - it's tools that are not prepared for them and tools need to be fixed, not CC by themself (their own source code)..

Second thing- speed.. You must realise they are different than Sub-Patch- sub-division of CC gives power of 2 polygons - CC level 5 will give you 2^5 * 2^5 = 32 * 32 = 1024 polygons.. Traditional Sub-Patch at level 5 gives just 5 * 5 = 25 polygons.. It's almost 41 times more polygons! Even OpenGL by itself would notice such huge poly count change..

Try this - Shift- X, make poly, press tab, press ctl+d to freeze.. make another poly, change Sub-D Type to 2nd type, press tab, press ctrl+d to freeze.. You will see difference in final frozen poly count..

Beau_M
07-01-2007, 05:12 PM
Well here's what I ended up with;

Default scene layout (640 x 480, default camera, 1 distant light). I'm still on 9.0 too.

subpatched : 1581126 polys at render time

display subp level 3
render time - 13.2 seconds

display subp level 0
render time - 12.9 seconds

frozen - couldn't even finish loading it... Got through 2 cigarettes, a cup of tea, and three songs before I gave up. Checked my mem stats, was eating its way through its second gig of ram when I looked. Load times were atrocious for both, but don't know why frozen would be so much slower to load.

Interesting stuff about CC there Sensei.

Andyjaggy
07-01-2007, 05:22 PM
That is weird that your load times are so slow. I've loaded 3 million poly meshes into layout before and it only took about 2 minutes.

Thanks for all the info Sensei.

Beau_M
07-01-2007, 05:28 PM
That is weird that your load times are so slow. I've loaded 3 million poly meshes into layout before and it only took about 2 minutes.

I'm working with a pretty old computer here. Really pushing its limits doing any 3D work on it honestly. But I don't usually mind sitting here and waiting for things to happen.

Surrealist.
07-01-2007, 10:25 PM
I included the subD and CC math in my tutorial for this very reason. You can check it out at www.lightwiki.com. It is called "The Fundamentals of Subpatch Modeling" in the modeler tutorials section.

You also have to factor in - when doing the math - that layout also triples the polygons when you render so that also doubles the count from the subdivision level. Other than that the math is the same between layout and modeler on a level by level basis. You can check this out for yourself of course.