UE4使用了PhysX3.4,但发现cook时依然使用BVH33格式,并未使用最新的BVH34格式,查看代码,发现是因为有bug才放弃使用BVH34的,请问这是个什么样的bug,目前最近的版本依旧不能使用BVH34吗?
原因如下:
pterdiman [10:25 AM]
Right, BVH34 currently does not work for deformable meshes, and it is only available for platforms that support SSE2 intrinsics. So it’s not enough for the platform to support “SIMD”: it has to be this specific variation of SIMD, because the code currently uses some SSE2 intrinsics and there (there was no time or resources to properly port the missing intrinsics to our SIMD wrapper).
By default the memory footprints for both midphases should be equivalent. This was done by design, to get “fair” comparisons between the two. But you can tweak the amount of memory used by mesh structures with the numTrisPerLeaf parameter in PxBVH34MidphaseDesc.
As far as performance is concerned, things depend a lot on the test scenario. Generally speaking BVH34 is as fast or faster than the previous structure. It can be a bit slower than before and there, but it can also be a LOT faster in cases that previously didn’t get a lot of attention.
For example sweeps against highly tessellated meshes can be a lot faster with BVH34.
Also generally speaking, BVH34 is a lot faster to “cook”.
If you want to get an idea about performance and memory usage, you can download the latest version and play with the parameters . There are a lot of scene-query scenes and tests that could give you a good idea of what to expect in different cases. (edited)
(: https://.com//)