Collosion Mesh LOD?

I know there are plenty of frame increasing and memory freeing scripts/addons about LOD and MeshReplacing, but actually I’ve almost red 'em all and still have no clue how to get to the result I want BECAUSE :

I’m programming on a huge project, wich is actually quite advanced and (except the textures) almost done (and ready to be sold :wink: so I can’t upload it here if asked sry :s ) but now I need to get the whole Physics (like trees and the whole map) to be physically disabled when the player is NOT in a certain range - like an octree or like dynamic loading.

But the problem with those two is, that I already tried to impent an octree and dynamic loading in the way to work but both didn’t seem to work…

So I’m (for me) understandable depressed and I really hope there are People they can help me to solve (in comparison to the rest of the game) this little Problem.

I’m agreeing with every kind of solution (even heighmaps or dynamic meshreplacement or something similar/else)

(Btw I excuse myself for any grammar faults…)

edit : and the main problem with DL and the OT is that I didn’t understand the most of the script and the server sided scripts or scripts they open new .blend files… sry I know my areas and I#M the head of the team when to script physical behaviour - what is also really clean written and already improved, so I defenatily can’t decrease that behaviour…)

I would roll through the list of dynamic objects , X parts per frame,

if the object is too far away do object.suspendDynamics()

if it’s close do object.restoreDynamics()

you can use My LOD guts as a template.


LODTestWithAddedObjectExampleAndRemoveTolerance.blend (632 KB)

thx for the quick help :3
But the dynamic physics ain’t the problem - I fixed them - furthermore just the static objects in range that I want to disable

But thx for the template maybe it would help me even more with my other physics I will give it a try.

edit: 've just seen your template and it seems like replacing the statics as well (sry I’m pretty unused to the replace mesh “tactics” yet) so it would work with every physics type? or just replacing the objects with objects with no collision?

unless there is a dynamic object interacting with a static, I don’t think they generate physics,

do you have static objects inside each other?

is your physics usage high?

are all of your armature meshes no collision?

are you using simple physics bounds for your actors?

Well I have some characters (one character type and some npc’s) and scripts that are sending raycasts through sensors with classic hitPosition stuff (wich are looking for static actors)…

no statics inside each other

Not really because I just have a few rigidbodys but they get replaced with statics if there are certain conditions for

they are

except the main mesh (Plane/Terrain, wich is triangle) I use the simple ones

Edit : It is a huge diff. when I delete the parented static object of the no coll trees (my coll mesh) ->>> 2% of physics

Update : I may found the failure : one of my mates didn’t told me that he implentet a script wich adds a single tree and duplicates it at each empty point - so there are hundreds of trees with the exact same id/mesh/name - duplicatet - may this the huge mistake why the physics are that used?

But to really make sure : I know (and already succesfully tested) that you could replace objects like adding an empty and give it a code wich says that it has to add a Plane e.g. when the cameraview is close enough - but does anyone has practical expirience with this technique in large scenes? or dou you think it might work and reduce the amount of physics they are needed for the woods?

well, one trouble it can add is if you dont delete the emitter in the same frame,
otherwise you may be adding 2 trees (double execution)

the system I sent you uses replace mesh,

note that there are 2 switches ,


but I think this only works with triangle mesh, (replace physics mesh)

i had a character that was totally immune to any ray sensor.

it was built with an armature (No Collision) a cosmetic mesh (No Collision), and a Working Cube (Character Phy,movement stats, Camera referee ), for some strange reason it never detect any ray sensor (bullet, melee attack) was like invisible! , but if i used to test it alone it works fine.

after a day of test and noob-combos on setting i simply added a new “Health Mesh” (a Static cube without bottom surface, like a potato-bag, its Health property is copyed by the Working Cube ) over the entire character sys for detect the ray of other AI, and it worked fine.

the Character physics sys (with actor active) could be covered by the simple presence of other element that have a volume bigger? (like the skeleton when arms are wide open, also if No collision is ok)

i should post the File.Blend XD But i prefer put my Alpha Demo complete !

Solved, please close

(Nvidia for ever <3 , ATI = good for 486)

Thank you for your help but I found another solution on my own(cuz I got a new setup of my whole CC-System in my House and had no connection the last days).

Prbly I will share it soon when I have the time but basicly it’s based on BluePrintRandom’s MeshReplacement but I replaced those commands with object addings and the result is a quite fast replacing of objects and the perfect boost for performance I wanted to have (3000 static Objects with collisions and logic and still 60fps); the system also bases on a kind of “footprint” system: the player drops an object in freq. 50 and deletes it after the same freq. So we have a constantly refreshing “LODList” (furthermore 4 for my using). I first thought it would be to logic intensive but already testet it on much weaker systems and it worked perfectly fine, so maybe in one week when I’m really sure it works when you have a huge map with thousand of trees… , I will make a new thread about it.

And BluePrintRandom thank you very much for your Replacement sample, is just awesome!

Problem solved

No problem, glad to be of service.

i did this :slight_smile: ty to all community for help ! (i will add the map later !)
simplest AI, but with varios level of interation status (Friend near, nearest,far, Standing, StandingActive,Attacking,Reloading, Enemy near,nearest,far and various combo directly depending by combo of elements)

ty again community :slight_smile: