Home

2011 Ocean Simulation Branch
Closed, ArchivedPublic

Description
This is the submission of the latest patch (should be updated for 2.59) from the work done on the Ocean Sim branch by Matt Ebb. The project has been organized by me (Todd McIntosh), and we are now at the stage to submit the patch for review, and hopefully inclusion in the Blender trunk.

The relevant/new parts of this branch include: the Ocean Modifier, the Ocean Texture, and the internal code for generating the ocean wave algorithm.

The fundraising/information website for the project can be found at: http://www.savetheoceansim.com

The wiki documentation page can be found at: http://wiki.blender.org/index.php/User:Broken/OceanSimulation
Added "ocean_patch_v2_dingto.diff". This new patch works fine with SVN 39644.

Had to manually fix some stuff in properties_texture.py, due to recent API changes. Also removed a unnecessary line there.
pkhg (Peter K.H. Gragert) added a comment.Via Old WorldSep 26 2011, 4:13 PM
Tried in the SVN of today
What am I missing in which file what?
[100%] Built target buildinfo
Scanning dependencies of target blender
[100%] Building C object source/creator/CMakeFiles/blender.dir/creator.c.obj
[100%] Building RC object source/creator/CMakeFiles/blender.dir/__/icons/winblender.rc.obj
[100%] Building C object source/creator/CMakeFiles/blender.dir/buildinfo.c.obj
Linking CXX executable ..\..\bin\blender.exe
Creating library file: ..\..\bin\libblender.dll.a
..\..\lib\libbf_editor_object.a(object_modifier.c.obj):object_modifier.c:(.text+0x41): undefined reference to `BKE_free_ocean'
..\..\lib\libbf_editor_object.a(object_modifier.c.obj):object_modifier.c:(.text+0xa8): undefined reference to `BKE_bake_ocean'
..\..\lib\libbf_editor_object.a(object_modifier.c.obj):object_modifier.c:(.text+0x5d5): undefined reference to `BKE_init_ocean_cache'
..\..\lib\libbf_editor_object.a(object_modifier.c.obj):object_modifier.c:(.text+0x668): undefined reference to `BKE_add_ocean'
..\..\lib\libbf_editor_object.a(object_modifier.c.obj):object_modifier.c:(.text+0x702): undefined reference to `BKE_init_ocean'
..\..\lib\libbf_render.a(texture_ocean.c.obj):texture_ocean.c:(.text+0xeb): undefined reference to `BKE_ocean_eval_uv'
..\..\lib\libbf_render.a(texture_ocean.c.obj):texture_ocean.c:(.text+0x103): undefined reference to `BKE_ocean_jminus_to_foam'
..\..\lib\libbf_render.a(texture_ocean.c.obj):texture_ocean.c:(.text+0x1ed): undefined reference to `BKE_ocean_eval_uv_catrom'
..\..\lib\libbf_render.a(texture_ocean.c.obj):texture_ocean.c:(.text+0x3b4): undefined reference to `BKE_ocean_cache_eval_uv'
..\..\lib\libbf_modifiers.a(MOD_ocean.c.obj):MOD_ocean.c:(.text+0x25): undefined reference to `BKE_free_ocean'
..\..\lib\libbf_modifiers.a(MOD_ocean.c.obj):MOD_ocean.c:(.text+0x72): undefined reference to `BKE_free_ocean_data'
..\..\lib\libbf_modifiers.a(MOD_ocean.c.obj):MOD_ocean.c:(.text+0x103): undefined reference to `BKE_init_ocean'
..\..\lib\libbf_modifiers.a(MOD_ocean.c.obj):MOD_ocean.c:(.text+0x13a): undefined reference to `BKE_simulate_ocean'
..\..\lib\libbf_modifiers.a(MOD_ocean.c.obj):MOD_ocean.c:(.text+0x1fe): undefined reference to `BKE_add_ocean'
..\..\lib\libbf_modifiers.a(MOD_ocean.c.obj):MOD_ocean.c:(.text+0x2e1): undefined reference to `BKE_add_ocean'
..\..\lib\libbf_modifiers.a(MOD_ocean.c.obj):MOD_ocean.c:(.text+0x35c): undefined reference to `BKE_simulate_ocean_cache'
..\..\lib\libbf_modifiers.a(MOD_ocean.c.obj):MOD_ocean.c:(.text+0x40f): undefined reference to `BKE_free_ocean_cache'
..\..\lib\libbf_modifiers.a(MOD_ocean.c.obj):MOD_ocean.c:(.text+0x78e): undefined reference to `BKE_ocean_eval_uv'
..\..\lib\libbf_modifiers.a(MOD_ocean.c.obj):MOD_ocean.c:(.text+0x80d): undefined reference to `BKE_ocean_cache_eval_uv'
..\..\lib\libbf_modifiers.a(MOD_ocean.c.obj):MOD_ocean.c:(.text+0x823): undefined reference to `BKE_add_ocean'
..\..\lib\libbf_modifiers.a(MOD_ocean.c.obj):MOD_ocean.c:(.text+0x8f3): undefined reference to `BKE_ocean_eval_uv'
..\..\lib\libbf_modifiers.a(MOD_ocean.c.obj):MOD_ocean.c:(.text+0x905): undefined reference to `BKE_ocean_jminus_to_foam'
..\..\lib\libbf_modifiers.a(MOD_ocean.c.obj):MOD_ocean.c:(.text+0x9c8): undefined reference to `BKE_ocean_cache_eval_uv'
..\..\lib\libbf_modifiers.a(MOD_ocean.c.obj):MOD_ocean.c:(.text+0xa67): undefined reference to `BKE_init_ocean_cache'
..\..\lib\libbf_modifiers.a(MOD_ocean.c.obj):MOD_ocean.c:(.text+0x39): undefined reference to `BKE_free_ocean_cache'
collect2: ld returned 1 exit status
Updated the patch to work with SVN r41057 (ocean_patch_v3_lukas_toenne.patch).
Cleanup version ready for review and trunk merge (ocean_patch_v4_lukastoenne.patch).

Changes by me from the original patch:

* New build setting WITH_OCEANSIM (cmake) / WITH_BF_OCEANSIM (scons) to allow disabling the modifier (like e.g. fluid sim modifier). This depends (at least for cmake) on fftw3, since oceansim uses this at its core.

* blenkernel and modifier functions are replaced by stubs if WITH_OCEANSIM is disabled. Previously all code in blenkernel ocean.c was disabled by checking FFTW3 directly, and had no stub definitions (i.e. compiler error when FFTW3 disabled).

* UI only shows "Built without OceanSim" message now when disabled. For this a new boolean prop "build_enabled" was added in RNA, which just depends on the build setting, so the ui knows this. [ Note: the fluid modifier uses a more dodgy check by testing an internal pointer, which is not created in fluid-disabled code. ]

* Minor cleanup of RNA description strings (dot at the end).

One potential problem could result when adding new OceanSim modifiers in builds that have it DISabled, and then loading these files in builds ENabled (same for fluid/boolean modifiers for that matter). This is because adding a new modifier that has disabled code will generally create uninitialized modifier data! Not a problem as long as it's not used, but probably crashes when loading in enabled builds.
Campbell's opinion is that this is a rare corner case, so i'd like to leave it as it is for now. Should this be a problem later on we can simply disable adding/copying of such modifiers to avoid creating invalid data.
Little fix for scons files: Add C compiler definition WITH_OCEANSIM in blenkernel, makesrna and modifiers when WITH_BF_OCEANSIM is enabled.
mont29 (Bastien Montagne) added a comment.Via Old WorldNov 22 2011, 4:11 PM
Closing this one, it’s in trunk now :)
mont29 (Bastien Montagne) closed this task as "Archived".Via Old WorldNov 22 2011, 4:11 PM

Add Comment