[Closed] Scripting an Edit poly Psuedo Booleen
Thanks so much for the ideas everyone.
Looks like the simplest code has worked for my temporary solution here. Thanks Bobo your idea it took me in the right direction. In my tool I changed it just a little
$NavMesh – $
So all the artists need to do is select the the initial building or Barrier object and it will cut it into the Nav mesh.
This is still very manual in my opinion when you look at a terrain with 300 plus buildings.
By chance is anyone out there in the same boat developing tools to speed up AI navmeshes?
Just a minor tip, (sori if its not completely related to the topic, but i guess i could just add)
Say you were to subtract a sphere to a plane, tesselating the plane to TRIs (or just adding an edit mesh above it and making all the edges visible) will produce cleaner cuts for booleans.
$sphere01 – $plane01
so i guess its much safer to work with TRIs rather than quads for situations such as these…
ME3D: If the number of buldings is the problem, It’s easy to apply the idea of bobo to an selection of objects:
fn isGeometry obj = ( if ( isKindOf obj geometryClass and classof obj != TargetObject ) then true else false )
navMesh=$NavMesh
if isValidNode navMesh do (
sel=for obj in selection where (isGeometry obj and obj!=navMesh) collect obj
for obj in sel do (navMesh - obj)
)
I added some filters to avoid the most usual errors.
This script suppose that your object name is “NavMesh”
Galagast: very interesting observation.
In fact the boolean objects seem always converted to mesh internally.
It is not a good news for me because i use always polys