PDA

View Full Version : Is HCE this limited?



L283023
July 17th, 2010, 12:39 AM
I don't usually post here at Modacity, but the people at Halomaps are
err..
Not so technical.

Anyways, I've been working on getting a giant grunt in-game. Things have been going decent so far.
http://screenshot.xfire.com/s/101026464-4.jpg




http://www.xfire.com/video/30cea7
Except there is collision that surrounds the model, sort of like a cylinder.
http://www.xfire.com/video/30cf22/

What's the point of having a collision model, if you're just going to set the collision radius and standing collision height, and it will act as collision that surrounds the air around your model.

Is there no way that I can fix this?

Skarma
July 17th, 2010, 11:16 AM
I don't know much about modeling but when reversing some Halo code, I found a function that utilizes bounding spheres for collision detection so I'm actually wondering more about this myself. What are you trying to fix exactly?

L283023
July 17th, 2010, 12:05 PM
As you can see in the video, the player can shoot the area surrounding the grunt, and recognize it as collision. The problem is, I don't want this. I have a collision model for a reason. Why does a biped have a collision radius and height, but a vehicle doesn't? Why does it need one? Why can't I just use my dang collision model?

Con
July 17th, 2010, 12:55 PM
I don't think you can. Bipeds were never intended to be that big. At normal sizes it doesn't make a difference whether a simple cylinder is used or a proper collision model. You gotta think that it's much less computationally expensive for the game to use a cylinder, especially when it's only used for collisions with objects like other players and the like. Moreover it allows for players to slide past each other in the event of a collision rather than getting caught up in collision complexity.

The reason a vehicle has it is because people will actually stand on vehicles and it matters how the collision looks.

Skarma
July 17th, 2010, 01:30 PM
What's up with the grunts animation? lol
Wonder if there is a way to change the collision detection type, as far as using a more complex collision model versus a bounding volume?

CrAsHOvErRide
July 17th, 2010, 01:35 PM
Hmm...but what about headshots? I don't think the default MC is entirely cylindrical.

L283023
July 17th, 2010, 01:44 PM
I didn't get all of the animations in-game, yet.
I think I'm going to try and set the collision radius and height to zero, and attach an effect with an object that has the playerclip shader. Because projectiles still collide with a biped's collision even if they aren't within the collision radius.

Angelus
July 23rd, 2010, 10:04 PM
You can use a script command to giant size your grunt I believe, and cut out all these steps..

L283023
July 24th, 2010, 10:09 AM
Yeah, but it doesn't scale collision.

Syuusuke
July 24th, 2010, 10:45 AM
I thought it did.

Or at least you would probably end up with the same problem again, I don't remember what happened.

Limited
July 24th, 2010, 01:54 PM
Why does it use spheres? It reduces the amount of computation down rapidly, I'm not sure if Halo itself uses it, although by your admission I assume it does. Theres a technique called bounding sphere collision. This is pretty much the simplest 3d method of collision detection. This creates a sphere around the model, the centre of the sphere is calculated to be the middle of the model. The radius of the sphere is calculated by finding the furthest vertex from the model's centre (as well as sphere centre), this distance becomes the radius value.

Why does this speed up collisions? Because its simple, check the distance from the first sphere's centre to the edge of the second sphere, subtract the radius of the second sphere from the distance to the centre of the second sphere.

:D

Usually this collision detection technique is combined with another technique such as Binary Trees which will only be run once the simpler bounding sphere collision is called. Its pretty much like bounding box collision and pixel perfect collision in 2D.

Skarma
July 24th, 2010, 03:09 PM
Halo uses both ray/line tracing with BSP and sphere bounding volumes for collision detection, as well as visibility and frustum culling.

Limited
July 24th, 2010, 05:51 PM
Thats what I just said, binary trees are similar to BSP. :)

Skarma
July 25th, 2010, 09:37 AM
You said you were unsure how Halo uses it, so I was clarifying because I already reversed it and sphere bounding volumes are used more for frustum culling than collision detection here and bsp IS a binary tree, one of the many types.