Generating a heightmap 2004-02-24 - By Lucas Meijer
Back Ian Thomas wrote: > Lucas, > Thanks... I actually tried that (and it was very, very slow.)
Hmm.. well for the sake of argument, and not to mean that this is the best method, a few thoughts on speeding it up:
- don't mode the far clipping plane a small about closer, but say twice as close each time. If you've gone too far, push it back 50%, etc... that should limit the amount of times you need to check if a render is totally black.
- to speed up checking if a render is totally black, make the bgcolor black, and have all shaders render pure white. Then you can copyPixel your image down to a much smaller image. If there was a pure white pixel present in the original, it will be much darker in the small image, but that doesn't matter, you only want to know if something is totally black or not. You'll have to do a few tests with the copypixels command however to examin exactly how it performs its downscaling, and to see how far you can scale down without getting a risk of 'missing' a white pixel.
I haven't actually ever tried what happens when you compare two image references with eachother... does it check the actual pixel content, or does it only tell me if they're referencing the same object or not? If it's the former you can just make your own black image, and check if renderImage<>blackImage then etc..
Anyway, I think it would be a lot easier to use a 3d authoring app, but since you're working from lingo I assume you don't have access to one.
Bye, Lucas __ ____ ____ ____ ____ ____ ____ ____ ____ ____ Dir3d-l mailing list Dir3d-l@(protected) http://nuttybar.drama.uga.edu/mailman/listinfo/dir3d-l
|
|