Digital Asset - Simple Collision Box with Rotation is incorrect

   3967   6   1
User Avatar
Member
67 posts
Joined: 1月 2016
Offline
I have a slope where I want to create an angled collison box. I am using same technique for a flat floor where I create a collision box that lies on the floor and is 20 units thick below the plane of the floor. I am trying to do the same thing but on an angled floor. When I create static mesh in unreal the collision mesh is created but the rotation is not there and the size is encompassing the entire slope in a square. Not what I want.

I have included a digital asset that can toggle between the working example flat floor versus the incorrect slope version to demonstrate the issue. Also including image showing the incorrect collision mesh (green) and what I expected to be generated (red). Excuse my crappy programmer art.

thanks.

Attachments:
collisionrotation.PNG (980.2 KB)
collision_test_rotation.hdalc (29.4 KB)

User Avatar
Member
603 posts
Joined: 9月 2016
Offline
Hi, You should be using collision_geo_ucxinstead of collision_geo_simple_box. The latter is simply generating an AABB based on the entire mesh ( Exactly the same as what you can do manually in the unreal mesh editor ).
User Avatar
Member
67 posts
Joined: 1月 2016
Offline
chrisgreb
Hi, You should be using collision_geo_ucxinstead of collision_geo_simple_box. The latter is simply generating an AABB based on the entire mesh ( Exactly the same as what you can do manually in the unreal mesh editor ).

I am create a separate box that I am grouping to create the collision. Should it not create it based on this group and not on everything? I do not need convex hulls. I just need a simple box at a specific size, position, and rotation.

In the editor you can size, position, and rotate the simple collision separately from the size position and rotation of the static mesh.

It does not seem correct that when I change size and position it works but once I add rotation it does not. I have included a sample of this in the test file in the original post.
Edited by Aladin Sane - 2018年1月4日 12:24:11
User Avatar
Member
67 posts
Joined: 1月 2016
Offline
chrisgreb
Hi, You should be using collision_geo_ucxinstead of collision_geo_simple_box. The latter is simply generating an AABB based on the entire mesh ( Exactly the same as what you can do manually in the unreal mesh editor ).

I did not some more testing. I still think there is something wrong with the simple box mesh generation.

I made a plane (static mesh) and a box (mesh collision group).

Here is a simple test with the size and position different than the plane.

In the first image the mesh collision is generated properly. The mesh collision group has size and position different from the plane.

The second image the only thing I changed was added rotation transform to the mesh collision group. This caused the created collision mesh not to rotate but to get taller as seen in image two.

I believe this is incorrect behavior and should be fixed. The mesh collision creation should honor the size, position, and rotation of the geometry group.

Again I have test file attached to original post in this thread that demos both sides.

Thanks.

Attachments:
collision_01.PNG (884.0 KB)
collision_02.PNG (987.6 KB)

User Avatar
スタッフ
538 posts
Joined: 9月 2016
Offline
Hi,

As Chris said, this is actually the way the “collision_geo_simple_xxx” attributes are supposed to work.

The simple box attribute will wrap whatever geometry you're feeding it with a simple AABB collider. It's basically doing the same thing as opening the mesh editor, and adding the box collider there. (and the same can be said about the other types of simple colliders kdop, sphere, capsule etc…)

The transform info on your collider cant be used for the simple collider box, as the plug-in doesn't have any knowledge of that box's transform (as its already baked), the plugin mainly reads/gets the data on your display node.

But since you're already providing the box, there is no need for you to use the simple collider attributes, as those are meant to be used as a “shortcut” when you do not have a collider mesh defined in your hda.
In your case, since you already have the collider box created in Houdini, you're better using the “collision_geo” attribute, that will use your exact transformed box mesh for collisions.
User Avatar
Member
67 posts
Joined: 1月 2016
Offline
dpernuit
Hi,

As Chris said, this is actually the way the “collision_geo_simple_xxx” attributes are supposed to work.

The simple box attribute will wrap whatever geometry you're feeding it with a simple AABB collider. It's basically doing the same thing as opening the mesh editor, and adding the box collider there. (and the same can be said about the other types of simple colliders kdop, sphere, capsule etc…)

The transform info on your collider cant be used for the simple collider box, as the plug-in doesn't have any knowledge of that box's transform (as its already baked), the plugin mainly reads/gets the data on your display node.

But since you're already providing the box, there is no need for you to use the simple collider attributes, as those are meant to be used as a “shortcut” when you do not have a collider mesh defined in your hda.
In your case, since you already have the collider box created in Houdini, you're better using the “collision_geo” attribute, that will use your exact transformed box mesh for collisions.

Interesting, thanks for the detailed explanation. I will adjust my workflow.
User Avatar
Member
67 posts
Joined: 1月 2016
Offline
dpernuit
Hi,

As Chris said, this is actually the way the “collision_geo_simple_xxx” attributes are supposed to work.

The simple box attribute will wrap whatever geometry you're feeding it with a simple AABB collider. It's basically doing the same thing as opening the mesh editor, and adding the box collider there. (and the same can be said about the other types of simple colliders kdop, sphere, capsule etc…)

The transform info on your collider cant be used for the simple collider box, as the plug-in doesn't have any knowledge of that box's transform (as its already baked), the plugin mainly reads/gets the data on your display node.

But since you're already providing the box, there is no need for you to use the simple collider attributes, as those are meant to be used as a “shortcut” when you do not have a collider mesh defined in your hda.
In your case, since you already have the collider box created in Houdini, you're better using the “collision_geo” attribute, that will use your exact transformed box mesh for collisions.

ok I did some more testing.

collision_geo by itself did not generate anything - from what I read this is for complex as simple face collision which does not work with physics. So it is out. But I could not get it to work. Only success I have had with that is if I use rendered_collision_geo then it generates per face collision and sets the static mesh to use complex as simple.

Anyway I tried my sample I included above with collision_get_ucx and that solved the issue with my rotated geo I wanted to use as a collision mesh. Thanks again for the responses.
  • Quick Links