We implemented the technique described in this document: http://www.cbloom.com/3d/techdocs/splatting.txt
I re-wrote our level 0 patch renderer to use layered alpha blended textures. Each of these patches is 128 meters x 128 meters. All of the level 1+ textures continued to use the pre-rendered textures, but for the level 0 we layers splats onto the terrain with blending. Each level 0 patch is rendered with a series of "splats" in a decal group. 1 to N splats are layers and rendered with repeated passes. Each splat has a high density tiled seamless texture in texture unit 1 and a greyscale alpha map in unit 2. Tye alpha mask is unique per patch and per splat. We combine using the alpha from unit 2 and the rgb from unit 1. After fooling around with various options we found that using an alpha map of 64x64 texels was sufficient for nice blending between between splats. This allows for moss to be blended into rock and so forth. You can use a perlin noise filter to set the alpha so that the alpha for each splat is contiguous, seamless and organic in nature. The advantage is that the density of the terrain texturing is exceedingly high, but you are really only re-using the same 10,20 or 30 textures across your terrain, just blending them together differently. The tests from last night was on a Geforce 4 with 128 MB and a 2 GH Athelon. With level 0 patches visible to 500 meters the frame rate with 4 blended splats ( which is 4 multitextured passes per patch ) we had frame rates drop from 90 to 70, and sometimes as low as 60. I do not yet know about the Geforce II, but can test that tonight. But losing that much frame rate is probably going to be unacceptable. However I have not given up hope yet. I think I will add one more level of patches (down) to a 64 meter x 64 meter range and see how splatting works with a reduced number. Perhaps the trick is to render the area immediatly around the user with a moving mesh and merge it with the less dense textures at level 1+. One thing which troubled me. (And a question for the Sun engineers) In a few cases I could see a blended splat *through* a hill. So the texture was for an occluded patch, yet the alpha splat was visible through the hill. This suprises me since I am using decal groups for the shapes. Since the bottom texture is *not* transparent and only the coplanar ones are, then I would assume this would not be rendered in a seperate alpha pass. For me to see a layer through an opaque hill it would require that Java3d was rendering all the layers as transparent objects *and* disabling zbuffer writing for all layers. This could also contribute to a performance degradation since that means even more overdraw than is necessary. Dave Yazel =========================================================================== 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".
