exelix11 / EditorCore

Extensible 3D level editor
42 stars 11 forks source link

KCL Model splitting sometimes inaccurate. #14

Open KillzXGaming opened 5 years ago

KillzXGaming commented 5 years ago

Depending on the model imported, some spots will not detect collision. This is because of the way model splitting can be somewhat inaccurate. A way of replicating this is to export an original KCL that uses multiple models and import one back. Some of the models/polygons will be of a different global model octree node which can cause the polygons to not be collidable. (Would use the wrong cube of the 8 used).

exelix11 commented 5 years ago

Can you provide an obj model that has this problem ? Iirc the octree splitting code will duplicate a triangle if it's needed in multiple parts of the global octree

KillzXGaming commented 5 years ago

Collsion Test.zip

For the map.obj file, it basically would fall through always at these spots

image

In the original this part will be one full model in the second model / using the second global octree

image

The KCL library instead splits it to model 3 (using the 4th global model octree node). Not duped or anything in other models. I changed the kcl manually for the second global octree to index the third model and it prevented me falling through.

image

Another obj file i send is an example in Odyssey

https://cdn.discordapp.com/attachments/494222965882224641/572191790527021101/2019-04-28_15-45-21.gif image

Which is located right here on the obj file

image