Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(9105)

Issue 7092051: Bullet Integration

Can't Edit
Can't Publish+Mail
Start Review
Created:
11 years, 3 months ago by sergof
Modified:
11 years, 3 months ago
Reviewers:
ideasman42, bf-codereview
Base URL:
https://svn.blender.org/svnroot/bf-blender/trunk/blender/
Visibility:
Public.

Description

This adds rigid body simulation to blender, developed during Aligorith's and my GSoC projects. Should apply and compile with current trunk. Only limitation is that WITH_BULLET needs to be true. More info here: http://wiki.blender.org/index.php/User:Sergof/GSoC2012/Design

Patch Set 1 #

Total comments: 9
Unified diffs Side-by-side diffs Delta from patch set Stats (+5977 lines, -20 lines) Patch
intern/cycles/blender/addon/ui.py View 1 chunk +3 lines, -0 lines 0 comments Download
release/scripts/startup/bl_operators/__init__.py View 1 chunk +1 line, -0 lines 0 comments Download
release/scripts/startup/bl_operators/rigidbody.py View 1 chunk +252 lines, -0 lines 0 comments Download
release/scripts/startup/bl_ui/__init__.py View 1 chunk +2 lines, -0 lines 0 comments Download
release/scripts/startup/bl_ui/properties_physics_common.py View 4 chunks +25 lines, -7 lines 0 comments Download
release/scripts/startup/bl_ui/properties_physics_rigidbody.py View 1 chunk +130 lines, -0 lines 0 comments Download
release/scripts/startup/bl_ui/properties_physics_rigidbody_constraint.py View 1 chunk +215 lines, -0 lines 0 comments Download
release/scripts/startup/bl_ui/properties_scene.py View 2 chunks +77 lines, -0 lines 0 comments Download
release/scripts/startup/bl_ui/space_time.py View 1 chunk +1 line, -0 lines 0 comments Download
release/scripts/startup/bl_ui/space_view3d_toolbar.py View 1 chunk +26 lines, -0 lines 0 comments Download
source/blender/CMakeLists.txt View 2 chunks +5 lines, -0 lines 0 comments Download
source/blender/SConscript View 1 chunk +3 lines, -0 lines 0 comments Download
source/blender/blenkernel/BKE_pointcache.h View 3 chunks +3 lines, -0 lines 0 comments Download
source/blender/blenkernel/BKE_rigidbody.h View 1 chunk +91 lines, -0 lines 0 comments Download
source/blender/blenkernel/CMakeLists.txt View 3 chunks +3 lines, -0 lines 0 comments Download
source/blender/blenkernel/SConscript View 1 chunk +1 line, -0 lines 0 comments Download
source/blender/blenkernel/intern/depsgraph.c View 1 chunk +2 lines, -0 lines 1 comment Download
source/blender/blenkernel/intern/object.c View 4 chunks +7 lines, -0 lines 0 comments Download
source/blender/blenkernel/intern/pointcache.c View 6 chunks +145 lines, -0 lines 0 comments Download
source/blender/blenkernel/intern/rigidbody.c View 1 chunk +1208 lines, -0 lines 3 comments Download
source/blender/blenkernel/intern/scene.c View 5 chunks +14 lines, -0 lines 2 comments Download
source/blender/blenlib/BLI_math_matrix.h View 1 chunk +2 lines, -0 lines 0 comments Download
source/blender/blenlib/intern/math_matrix.c View 1 chunk +27 lines, -0 lines 0 comments Download
source/blender/blenloader/intern/readfile.c View 8 chunks +65 lines, -1 line 0 comments Download
source/blender/blenloader/intern/writefile.c View 3 chunks +17 lines, -1 line 0 comments Download
source/blender/editors/include/ED_physics.h View 1 chunk +14 lines, -0 lines 0 comments Download
source/blender/editors/object/object_add.c View 4 chunks +14 lines, -4 lines 1 comment Download
source/blender/editors/object/object_edit.c View 2 chunks +2 lines, -1 line 0 comments Download
source/blender/editors/object/object_ops.c View 1 chunk +6 lines, -0 lines 0 comments Download
source/blender/editors/physics/CMakeLists.txt View 2 chunks +3 lines, -0 lines 0 comments Download
source/blender/editors/physics/SConscript View 1 chunk +1 line, -0 lines 0 comments Download
source/blender/editors/physics/physics_intern.h View 2 chunks +21 lines, -1 line 0 comments Download
source/blender/editors/physics/physics_ops.c View 1 chunk +12 lines, -0 lines 0 comments Download
source/blender/editors/physics/rigidbody_constraint.c View 1 chunk +206 lines, -0 lines 0 comments Download
source/blender/editors/physics/rigidbody_object.c View 1 chunk +668 lines, -0 lines 0 comments Download
source/blender/editors/space_time/space_time.c View 6 chunks +11 lines, -3 lines 0 comments Download
source/blender/makesdna/DNA_object_types.h View 3 chunks +5 lines, -1 line 0 comments Download
source/blender/makesdna/DNA_rigidbody_types.h View 1 chunk +276 lines, -0 lines 0 comments Download
source/blender/makesdna/DNA_scene_types.h View 1 chunk +3 lines, -0 lines 0 comments Download
source/blender/makesdna/DNA_space_types.h View 1 chunk +1 line, -0 lines 0 comments Download
source/blender/makesdna/intern/makesdna.c View 2 chunks +2 lines, -0 lines 0 comments Download
source/blender/makesrna/RNA_access.h View 1 chunk +2 lines, -0 lines 0 comments Download
source/blender/makesrna/RNA_enum_types.h View 1 chunk +4 lines, -0 lines 0 comments Download
source/blender/makesrna/SConscript View 1 chunk +1 line, -0 lines 0 comments Download
source/blender/makesrna/intern/CMakeLists.txt View 2 chunks +2 lines, -0 lines 0 comments Download
source/blender/makesrna/intern/makesrna.c View 1 chunk +1 line, -0 lines 0 comments Download
source/blender/makesrna/intern/rna_internal.h View 1 chunk +1 line, -0 lines 0 comments Download
source/blender/makesrna/intern/rna_object.c View 1 chunk +11 lines, -0 lines 0 comments Download
source/blender/makesrna/intern/rna_object_force.c View 1 chunk +1 line, -1 line 0 comments Download
source/blender/makesrna/intern/rna_rigidbody.c View 1 chunk +944 lines, -0 lines 0 comments Download
source/blender/makesrna/intern/rna_scene.c View 2 chunks +8 lines, -0 lines 0 comments Download
source/blender/makesrna/intern/rna_space.c View 1 chunk +5 lines, -0 lines 0 comments Download
source/blender/rigidbody/CMakeLists.txt View 1 chunk +38 lines, -0 lines 0 comments Download
source/blender/rigidbody/RBI_api.h View 1 chunk +311 lines, -0 lines 0 comments Download
source/blender/rigidbody/SConscript View 1 chunk +38 lines, -0 lines 0 comments Download
source/blender/rigidbody/rb_bullet_api.cpp View 1 chunk +959 lines, -0 lines 2 comments Download
source/blenderplayer/bad_level_call_stubs/stubs.c View 1 chunk +80 lines, -0 lines 0 comments Download
source/creator/CMakeLists.txt View 1 chunk +1 line, -0 lines 0 comments Download

Messages

Total messages: 6
sergof
11 years, 3 months ago (2013-01-14 20:17:44 UTC) #1
ideasman42
LGTM to go into trunk, however a few issues I noticed. Summery - If 'Physics ...
11 years, 3 months ago (2013-01-15 15:47:09 UTC) #2
ideasman42
Some things I should have mentioned last review... - The way groups is used I ...
11 years, 3 months ago (2013-01-15 16:08:58 UTC) #3
sergof
Thanks for the review, a few quick comments: > - Mesh conversion could be sped ...
11 years, 3 months ago (2013-01-15 20:05:02 UTC) #4
sergof
https://codereview.appspot.com/7092051/diff/1/source/blender/blenkernel/intern/scene.c File source/blender/blenkernel/intern/scene.c (right): https://codereview.appspot.com/7092051/diff/1/source/blender/blenkernel/intern/scene.c#newcode1151 source/blender/blenkernel/intern/scene.c:1151: /* quick point cache updates */ On 2013/01/15 15:47:09, ...
11 years, 3 months ago (2013-01-15 20:15:27 UTC) #5
ideasman42
11 years, 3 months ago (2013-01-17 11:16:03 UTC) #6
On 2013/01/15 20:05:02, sergof wrote:
> Thanks for the review, a few quick comments:
> 
> > - Mesh conversion could be sped up by not adding triangles one at a time
with
> > double-vertex checks, but this can be done after merge.
> 
> Right, I haven't touched that actually. Ideally we could avoid allocating the
> extra mesh by using blender's mesh data directly in bullet, would need to test
> if that could cause problems in cases where the mesh changes while the
> simulation is running.
> 
> > - I noticed scale is always removed from objects involved with physics, IIRC
> the
> > game engine manages to have scaled meshes with physics so it could be
> supported.
> 
> Scaling is supported, we create unscaled collision shapes because we scale
them
> afterwards. This also allows for dynamic scaling while the simulation is
> running.
> > 
> > - Id like to allow building with WITH_BULLET disabled, any hints as to which
> > branch I should look to getting the this change?
> 
> Sure, I'd do it myself but if you want, you can look here:
> https://gitorious.org/%7Esergof/blenderprojects/sergofs-blender
> 
> > - The way groups is used I find a bit strange, instead it could flag objects
> and
> > store in an array? - it works as is and may be annoying to change right now
> but
> > noting here.
> > Maybe other devs can explain why doing it this way is good.
> 
> Personally I'd prefer to get rid of the groups and just use arrays instead,
> since we need them for the cache anyway. It would also make the code much more
> clear.
> However, Ton insists on using groups. I guess if we'd add multiple rigid body
> worlds someday it would be easier to keep track of objects.

Using groups can be fine, its the way they are integrated, I dont make any
groups - the objects are not green - yet there are 2 groups in the dropdowns.

Since I've used groups a fair bit in blender, I found the automatic creation of
groups odd, also how the objects are in groups but not colored green?

To me its not really clear whats happening and blender is using groups in the
code but hiding it a bit from the user.

Personally - Id prefer this either uses groups like the rest of blender
(dupli-groups, group particles etc), or have some internal datastructure the
user doesnt have to know about.

If we need we could have some utility operator 'Add to physics group' if that is
a hassle to do with existing operators.


> Will fix the other issues.
Sign in to reply to this message.

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b