Re[4]: [Algorithms] create lightmap for arbitrary scene
Brought to you by:
vexxed72
From: Oles V. S. <ol...@gs...> - 2002-07-04 12:07:51
|
Hello jason, Wednesday, July 03, 2002, 21:37:23, you wrote: jz> Thank you for the hints about what speed could be reasonable. jz> Now I'll look into the codes to find the bottle neck. jz> By the way, what spatial partition algorithm do you use for ray-trace? We use rather simple structure: 1. 3D grid 2. In each cell: no-leaf-AABB-tree Another suggestion(s). 1. Try to localize/cull your lights before ray-tracing using all vis-info u have. (we have sector-portal info + dedicated (simple) geometry for occlusion culling) 2. Try to cache occluder polygons per light - usually lumels from which rays r casted are spatially near. >> jz> It is better than brutal-force method. But It is still slow. Much slower than >> jz> that of bsp-scene and too slow that radiosity computation seems impossible. >> jz> There is a program called lightscape with 3dsmax(Do you heard of it?). It can >> jz> compute the game scene within a few hours incluing radiosity, and my program needs >> jz> a few days approximately . I wonder whether there is a magic method I had never >> jz> thought of. >> >> Well, I don't know why u r getting such poor performance... >> >> Our brute-force solution uses ~6 hours for the following conditions >> (last level compiled): >> >> * 1.8 M tris on level >> * 412 light sources >> * 11 lightmaps created (packed) >> * 1024x1024 lmap size >> * 9 ray-casts per lumel per light (jittering) >> * around 30% partially-transparent triangles (which we ray-casted using >> alpha calculated from shader definition and texture(s) combination) >> >> But this time also includes sub-lightmaps color/gradients analysis >> and around 40% recalculations under condition that lightmap can be >> shrinked down. >> Plus, all sub-lightmaps was specifically packed to allow DXT1 >> compression (this takes some time too). >> >> So, all I can suggest - use good spatial partition for ray-testing. -- Best regards, Oles V. Shishkovtsov GSC-Game World ol...@gs... |