In effect it’s a very simple LOD modifier or Level of Size modifier if you will.
Is this usable? Well there are a number of considerations:
- if the basic mesh density is low, the reduction is really noticable (the texture shifts), so that’s a downside, you do have to use a fairly high density to start with, maybe higher then you would need without the reduction, since the subtle texture wobbling is less noticable than abrupts texture shifts
- if the speed is high you hardly notice the reduction (visually I mean, you do notice the performance gain), so that’s good, but then again if the speed is high, why use a high subdivision in the first place? Even the speed is variable, better to base the reduction on that
- the fact that you don’t have to specify the grid density is nice, we only have to set a maximum to prevent a large plane from hogging the processor
With these considerations in mind I do think this is promising for several reasons:
* we can combine the autoreduction feature with a maximum density based on the plane’s speed (although the object actually moving the plane is better fit to take care of that, otherwise the plane would have to have a notion of it’s own speed, which I am not in favor of). Another option is to have a) a minimum and maximum density (to ensure a miminum level of quality and prevent the CPU from hogging), b) a basic coarseness which will reduce the density as the plane transforms, c) a coarseness modifier based on the plane speed which is different from simply lowering the maximum, but lowering the maximum might make for a better overall quality, we’ll simply have to try
* it will greatly reduce the number of clipping tests performed
* the cube demo already has a very small plane to start with, so the effect isn’t as huge as when you would have a 600 x 600 pixel image, the reduction would be much more effective in a plane that big
I also found a subtle bug in the DistortedPlane class, basically when you enlarge the density, the former corner point references are still stored in the interpolation grid, overwritten with the wrong values which results in a self modifying mesh. Not cool, another 2 hours of my life I’ll never get back :), but it is fixed in v4.
Download the new version with example sources here: 3d Distorted With Autodensity (553 downloads) .
Next time I’ll look into creating version 1 of a simple panorama using these same principles. See the 3d Panorama in Actionscript 2 article series for that!