View topic - Per piece collision volumes issues



All times are UTC + 1 hour


Post new topic Reply to topic  [ 6 posts ] 
Author Message
PostPosted: 15 Feb 2012, 03:51 
Evolution RTS Developer
User avatar

Joined: 17 Nov 2005, 02:43
Location: Raegquitting Spring on 04/24/12
So, I have this factory, and every thing should be just fine. However, I noticed that the boxes for the per piece collision volumes, which the right size, were well off to one side.

Looked in upspring, and I had set the model center to the big tower thing. I moved it back to 0 and the boxes lined up... Ok weird...

So I take another look in game...

WTF? There is this big red box around everything (and shots impact this box and do no damage to the unit), and then if you look lower there is a short purple box around... nothing.

What the hell is going on?

What am I doing so massively wrong that none of this makes sense?

Image

Image

Unitdef:
https://code.google.com/p/evolutionrts/ ... actory.lua

http://www.imagebam.com/image/cd6d9e174861084


Top
 Offline Profile  
 
PostPosted: 15 Feb 2012, 05:06 
User avatar

Joined: 14 Jan 2006, 04:09
Forboding Angel wrote:
So, I have this factory, and every thing should be just fine. However, I noticed that the boxes for the per piece collision volumes, which the right size, were well off to one side.

Looked in upspring, and I had set the model center to the big tower thing. I moved it back to 0 and the boxes lined up... Ok weird...


I run into the same issue some time ago. To fix this you need to set modelCenterOffset in the unitDef to the same value as model center in UpSpring. Don't ask me why...
Or alternatively set the model center to 0 like you did.


Top
 Offline Profile  
 
PostPosted: 15 Feb 2012, 06:46 
Evolution RTS Developer
User avatar

Joined: 17 Nov 2005, 02:43
Location: Raegquitting Spring on 04/24/12
No, you are completely missing the issue. Red box, purple box. There are no pieces that cover that area.

Look at the model in upspring and compare it to the hitboxes. Notice 2 boxes that shouldn't be there?


Top
 Offline Profile  
 
PostPosted: 15 Feb 2012, 07:49 
Evolution RTS Developer
User avatar

Joined: 17 Nov 2005, 02:43
Location: Raegquitting Spring on 04/24/12
Ok, found the solution,

Basically, rafal was right about the issue he thought I was talking about.

I had face edited that model to delete half of it. Apparently you need to recalculate the normals in upspring otherwise it still thinks that the parts of the model you deleted are still there. That fixed the boxes issue.

Now the other issue was when I moved the hitsphere around, it moved the collision boxes around. Setting same values in unitdef as in upspring like rafal said fixed that.


Top
 Offline Profile  
 
PostPosted: 15 Feb 2012, 21:53 
User avatar

Joined: 08 Jun 2009, 16:59
Location: Croatia
Usually you don't need collision volumes for each and every piece, as many overlap.
A good tutorail about collision volumes is on the spring wiki, and a simple but effective way to customize collision volumes is with the Dynamic Collision Volume gadget (don't forget the CV config file).


Top
 Offline Profile  
 
PostPosted: 16 Feb 2012, 10:19 
Evolution RTS Developer
User avatar

Joined: 17 Nov 2005, 02:43
Location: Raegquitting Spring on 04/24/12
In evo, the models are very highly optimized. That factory that you see only has about 5 actual pieces.

The vast majority of evo models (including mobile units except the all terrains) have 3 pieces or less. Even the All terrain tanks usually only have 11 pieces (or less).

I have gleaned a lot of data about collision volumes and how they + spring work. I'm not going to go into detail right now though as it's an exhaustive list of results and frankly at this very moment, I cba.


Top
 Offline Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 6 posts ] 

All times are UTC + 1 hour


Who is online

Users browsing this forum: No registered users and 0 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group

Site layout created by Roflcopter et al.