We have this really annoying condition. When we swap out patches of the terrain we get minute pauses. This means we are running along and pause....run 40 meters...pause. Now the pauses are brief, no doubt about it. But they really bug me since everything else is so smooth.
I think we have eliminated everything from our end. 1. Textures are loaded in a seperate thread. The pauses is not during this time. 2. The textures are by-ref 3. The geometry for each patch is by-ref, infrequent 4. Garbage collection is at a minimum, we are using pools and caches for most heavyweight objects. 5. The pactches are reused. When patches are removed they are placed into a cache. When we need a new patch we get one from the cache, update the texture and update the geometry. 6. When we decide we need to reconfigure the patches we calculate a minimum set of changes, like "remove a level 3 patch and insert 4 level 2 patches" 7. Because we need to keep frame-to-frame coherency, we build an "update transaction" which includes commands to insert and remove the patches. 8. The transaction is executed from a behavior on wakeuponelapsedframes(0) We have to make multiple patch changes in a single atomic transaction because otherwise you would see momentary gaps in the terrain. Sometimes we are inserting as many as 10-12 patches (each from 300-1000 triangles and a 128x128 texture). These seem really lightweight, so I am not sure why we get the pauses. One thought I had would be to insert each patch into the scene, one per frame all with rendering attribiutes setVisible(false), then in one atomic transaction remove the old patches and make the new ones visible. Is it the insertion of the benchgroups into the scene which causes the pauses? Any thoughts? =========================================================================== To unsubscribe, send email to [EMAIL PROTECTED] and include in the body of the message "signoff JAVA3D-INTEREST". For general help, send email to [EMAIL PROTECTED] and include in the body of the message "help".
