Rigid Body Tests with Armory & BGE

I’ve been running some preliminary tests on rigid body collisions in Armory. With a working prototype in BGE I can get a pretty good surface comparison. I’m getting better results than in UE4 right off the bat though at times the shots are passing through static rigid bodies where they are not intended to.

The track is between two panels that should retain the shots. I’ve enabled continuous collision detection on all appropriate surfaces. Track, shot, front and back panels including mid-frame (of the machine). It seems as though FPS will drop substantially if a shot manages to stay inside the machine frame after falling out of the track or something.

I’ve tried adjusting margins between these objects with no noticeable difference. I’ve also tried adjusting Steps Per Second and Solver Iterations. I’m curious if I shouldn’t be using CCD for everything but it seems to provide the best improvement so far. FPS is tanking when two shots collide on the track. Is this because of CCD?

Here is test bed demonstration in Armory 0.6 :

Here is prototype wire demonstration in BGE 2.76 :

While on the topic of rigid bodies I noticed objects set as this type will respond to gravity while the timeline is running. Is this because they are tied to frames in some way? :thinking:

2 Likes

Rigid bodies will fall in Blender because that is Blender’s default behavior. Armory doesn’t change the way that the bodies behave when running inside of the Blender editor.

I don’t think that changing the values in Armory actually update the physics simulation in Armory yet. I’m not 100% sure, though.

I think CCD should only be needed for the fast moving objects, but I’m no expert, I think that’s just what I’ve heard.

1 Like

Thank you for the information!

I’m getting better FPS with a Sphere collision shape rather than using the Mesh collision shape (high vertex count, decimated to adjust) and better FPS when they collide with each other. The change to Sphere collision shape appears to provide a smoother response though now it is hanging up on the track shortly after launch.

The Steps Per Second and Solver iterations do make the simulation run slower when increased to something along the lines of 120/50.

Dynamic Rigid bodies are behaving like they should as colliding and being affected by gravity but I’m referring to advancing timeline frames. In BGE when I press Right arrow on the keyboard (to advance timeline frames) The dynamic rigid bodies do not fall a bit frame by frame. In Armory when I do this the objects I’ve set as active/dynamic rigid bodies will move down a small amount with each frame starting with frame 1. This is while in editor not during project run time.

OK, then maybe it does make a difference. That would be good.

Yeah, that is because when you are in Blender and not using it as a game engine, and you enable Rigid Body physics on an object, it will respond to physics according to the timeline so that you can use the physics simulation in a Blender animation.

When using the Armory plugin, Armory doesn’t change how Blender treats the rigid body in the editor, so the rigid bodies will be animated

Oh, I hadn’t the slightest idea this happens in the editor. I’ve used it mainly for BGE, modeling without ever using rigid bodies in “Blender Render” mode (I’ve since tested it on a cube). I understand what you are saying. Thanks for the assistance!

I’ll certainly be curious to see if there are any other developments made to physics in the future. I want to say I saw some other topic concerning implementation of physics sub steps like in BGE. If I recall it is no different in Armory (in that its just calling or dividing the physics timescale, I’m not exactly sure).

Now that I’m looking at it Steps Per Second and Solver Iterations are listed in Scene tab (Blender Render 2.76) under Rigid Body World but this is retracted when using Blender Game at which point you access the World Tab to adjust Physics Steps - Logic Steps (you likely already know this).

Interesting though, I never really even knew about that just used the Physics settings in World Tab, all three set to 5. Referencing my own project, Rigid Body World is not checked when switching to Blender Render. I suppose I’m beginning to see how Armory implements the Blender Render features. I’m curious now if there is some difference in Blender Game mode Physics and Blender Render.

I mean, they both use bullet right? Blender Render and Blender Game

Still cannot recall the bullet code bit that Steps and Sub Steps access. I thought I saw it when you hover over the setting :

  • bpy.data.scenes[“MyScene”].game_settings.physics_step_max
  • bpy.data.scenes[“MyScene”].game_settings.physics_step_sub

If anything I don’t intend to press on this just provide these examples and ask some questions to better understand the engine. :slightly_smiling_face:

Sure thing. :slight_smile:

In Blender Game Engine, it would be using Bullet just like Blender Render, but in Blender Render, like you said, it has a different panel for Physics settings.

Armory tends to use the existing panels for settings, if they are there, and supplement those panels with additional Armory Props panels for settings that don’t already exist.

For the physics accuracy and timing settings, Armory would probably use the Physics world panel, but I haven’t tested it recently to see if those values are respected by the Armory game yet.

image

Edit: Also,

1 Like