Jump to content

Concerning CollisionEditor and great big multi-obj model


fLUnKnhaXYU

Recommended Posts

hello and first things to the fore , Im sorry to keep doing this to you great bunch of guys but I just have to do something in the event that theres someway that I can reach out and just jam this ol' buddy along . heres hoping guys and you are the greatest ! I came across this great Kewl model of a whole city 😻 .

1. its Big 750,000 verts

2. 200 objects

3 200 mats

this story begins with the model , as is , being superlative , IMHO , I was so happy 😊

its like Torque3D must have no limitations . and as is as a scenery object , i'll call it . its great .

So , then I wanted some collisions m and I wanted the shape editor to whippem up (help me choose a emoj 👍).

1. issue 1 i cant spell good . and my vision is so that the documentation is ...

but I attack at the shape and collision editor for this :

as there are many objects , I browse the list in the collision editor and choose one , say STREETS for ex:

creates a lovely convex hulls as the street IS a few separate rectaggles .then I need one for the sidewalk or rooftops , or any one of the 200 objects that comprises the shape , right ?

2 . this presents me with the message box containg the message text which is as follows or similar :

"the will overwrite the the other one that you just made" . and thats exactly what it did .

So i made a couple of pics of this in action .

 

a random  bldg made of 2 obsjects the facade and windows ; the pics will clear up any ankst .

the windows 001 obj raised up for viewing purpose . and the convex hulls are already created as you can see .

spacer.png

for clarification , the wireframe function is engaged .

spacer.png

and this is the other part sort of the facade/bldgStruct stuff thing .

spacer.png

its wire .

spacer.png

Ok thats a lot isnt it? alright you have a great day SIR! and aprecite ya .:classic_smile:

 

Link to comment
Share on other sites

The generation of collision geometry is exactly that, a generator. Its either all or nothing at this point. You can add collision hulls to selected sub objects but it doesnt have any idea of what already exists. Thats why it re-generates everything using the v-hacd lib. Im not sure if you tried this before, but selecting the very top level node would be your best bet at getting it to generate convex hulls for everything, but in saying that it will take a while, i would tweak the settings to basically turn the buildings into boxes instead of meshes. The max verts should be per shape it generates but box % is how much it enforces a box shape so for the likes of this mesh you would want that quite alot higher than 30%. 

 

Other than that the only option would be to split the mesh up. 

Link to comment
Share on other sites

thank you marauder2k9 ,

without instructions its a bit puzzling sometimes like these . I keep trying and thank you for taking your time to offer these suggestions . If I may , is it necessary to only choose the object from within the collision editor list or should I correlate with node / detail selections from the shape editors nodes / detail lists? I had also added the collision-1 to the nodes and could not add a -1 detail  level in the shape editor . again , THANX  👍openal usage...

Link to comment
Share on other sites

Posted (edited)

this is that window object above . 1000 or so verts . as you probably notice they are planes .

spacer.png

I will re-post this IMG . you can please to notice eh the collision shapes (in purple) kabookee. after running and the result for me through various setting is quite similar . I repeat these are planes kabooki . I would feel obliged to suggest a confusion concerning the separate objects .

spacer.png

also , if youre still here ,

function city_001dae::onLoad(%this)  // the single big shape is this -------------------------------------------------------
{
   %this.addNode("Col-1", "", "0 0 0 0 0 1 0", "0");
   %this.addNode("ColBox-1", "Col-1", "-4.06734 23.4601 5.24164 0.577344 0.57735 0.577357 4.18879", "0");
   %this.addNode("ColBoxB-1", "Col-1", "-4.06734 23.4601 6.71075 -0.577344 -0.57735 -0.577357 2.09439", "0");
   %this.addNode("ColBoxC-1", "Col-1", "-4.06734 25.9144 5.24164 0.577344 0.57735 0.577357 4.18879", "0");
   %this.addNode("ColBoxD-1", "Col-1", "-4.06734 22.233 6.71075 0.577344 -0.57735 0.577356 2.09439", "0");
   %this.addNode("ColBoxE-1", "Col-1", "67.4877 -23.9863 19.5522 -1 0 0 1.5708", "0");
   %this.addNode("ColBoxF-1", "Col-1", "-4.06734 24.6872 5.24164 0.577344 -0.57735 0.577357 2.09439", "0");
   %this.addNode("ColBoxG-1", "Col-1", "-4.06734 25.9143 8.1939 0.577344 -0.57735 0.577357 2.09439", "0");
   %this.addNode("ColBoxH-1", "Col-1", "-4.06734 25.9144 6.71075 0.577344 -0.57735 0.577357 2.0944", "0");
   %this.addNode("ColBoxI-1", "Col-1", "-4.06734 22.233 5.24164 0.577344 -0.57735 0.577356 2.09439", "0");
   %this.addNode("ColBoxJ-1", "Col-1", "-4.06734 24.6872 6.71075 0.577344 -0.57735 0.577357 2.0944", "0");
   %this.addNode("ColBoxK-1", "Col-1", "-4.06734 25.9144 3.75849 0.57735 -0.57735 0.57735 2.09439", "0");
   %this.addNode("ColBoxL-1", "Col-1", "-4.06733 22.233 3.75849 0.57735 -0.57735 0.57735 2.09439", "0");
   %this.addNode("ColBoxM-1", "Col-1", "-4.06734 23.4601 3.75849 -0.57735 -0.57735 -0.57735 2.09439", "0");
   %this.addNode("ColBoxN-1", "Col-1", "-4.06734 24.6872 3.75849 -0.57735 -0.57735 -0.57735 2.09439", "0");
   %this.addNode("ColBoxO-1", "Col-1", "-6.37375 26.8008 0.944948 0.597216 -0.577388 0.556736 2.09434", "0");
   %this.addNode("ColBoxP-1", "Col-1", "-4.06734 24.6872 8.1939 0.577343 -0.577351 0.577357 2.09439", "0");
   %this.addNode("ColBoxQ-1", "Col-1", "-4.06734 22.233 8.1939 0.577344 -0.57735 0.577357 2.09439", "0");
   %this.addNode("ColBoxR-1", "Col-1", "-6.45302 24.0699 9.31985 -0.57735 -0.57735 -0.57735 2.09439", "0");
   %this.addNode("ColBoxS-1", "Col-1", "35.3503 -11.8775 3.64746 -1 0 0 1.5708", "0");
   %this.addCollisionDetail("-1", "Convex Hulls", "roof_170_LOD", "4", "30", "30", "32", "100", "100", "100");
}

// i run it again everything is redone , starting with the col-1 node =============================================

// and sorta reiniting a naming function , well .. maybe just the colBoxJ-1 , eh?

{
   %this.addNode("Col-1", "", "0 0 0 0 0 1 0", "0");
   %this.addNode("ColBoxJ-1", "Col-1", "7.89104 8.73106 6.60032 0.0851655 0 -0.996367 0", "0");
   %this.addNode("ColBoxW-1", "Col-1", "5.57451 8.73106 4.88066 -8.31358e-08 -1 -8.31358e-08 1.5708", "0");
   %this.addNode("ColBoxY-1", "Col-1", "9.31698 8.73106 3.16098 1.5651e-10 -1 -1.5651e-10 1.5708", "0");
   %this.addNode("ColBoxCB-1", "Col-1", "3.75087 11.4453 3.16098 -0.57735 -0.57735 0.57735 2.09439", "0");
   %this.addNode("ColBoxEB-1", "Col-1", "3.75087 12.3359 6.60032 -0.57735 -0.57735 0.57735 2.09439", "0");
   %this.addNode("ColBoxFB-1", "Col-1", "10.2076 8.73106 6.60032 -0 0 -1 0", "0");
   %this.addCollisionDetail("-1", "Convex Hulls", "windows_19_LOD", "4", "30", "30", "32", "30", "30", "30");
}

TY . have fun day

 

 

 

Edited by fLUnKnhaXYU
Link to comment
Share on other sites

Ill go through a few tips very quickly:

if you want separate collision for each window thats fine, but it would be a waste of resources to do that at places where the player cant reach, or is unlikely to reach, otherwise combine it into the mesh for the building itself, most games such as gta or whatever else do this for the bottom floor because the player is going to spend most of their time there, its why windows on bottom floors are usually breakable but higher up they are completely indestructable. For the bottom floor windows as well, i would have 1 object that just gets copied over to other window openings. 

Same goes for traffic signs, lamp posts etc, export 1 of these from the overall mesh and then just copy it into place in your level, In that mesh i can see multiple areas where the same object appears over and over again and while this is fine, if you are going to be breaking this up its best to make it easier on yourself and the engine to only do the work once.

The roads and what not that could be just one mesh as well but for flexibility i would usually break that up into sections that can be placed so you can customise this whole city layout if you want to but also so you can lod and cull parts of the mesh that arent visible to the player. same goes for rooftops and things like that, simplified geo if you are on the ground floor your not going to be able to see that roof or interact with it so it doesnt even need col geo.

 

Best way with most perfromance (summary):

Split up buildings into 2-3 categories, (ground floor, middle, top) ground floor needs the most detail and attention, 2nd floor slightly less, higher than that the player is unlikely to reach depending on the game type.

Export all assets such as signs lamp posts etc once and copy them in the level editor for placement and flexibility.

Simple collision geometry for everything, could understand capsules or cylinders for the lampposts but the rest can be done with simple boxes.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...