Commit Graph

70 Commits

Author SHA1 Message Date
Campbell Barton 112162e09e code cleanup: header cleanup 2012-04-30 14:24:11 +00:00
Campbell Barton 95670e03a0 style cleanup / comment formatting for bli/bke/bmesh 2012-03-03 20:19:11 +00:00
Campbell Barton 2b7ca2304a unify include guard defines, __$FILENAME__
without the underscores these clogged up the namespace for autocompleation which was annoying.
2012-02-17 18:59:41 +00:00
Miika Hamalainen 9f51785c4d Dynamic Paint:
* Wave simulation speed doesn't anymore depend on surface size, but uses relative distances instead. This change will likely change simulation behavior on existing saves, but can be easily tweaked back using the "Wave Speed" parameter.
* Added a new wave brush type, "Depth Change". It uses the change of brush intersection between frames, giving a better looking "wake" for moving objects. It also doesn't leave any "dent" to the surface while remaining still.
2011-11-16 18:32:28 +00:00
Campbell Barton 11a7a406fb DPAINT_OT_output_toggle operator was using an index option for what was really a toggle between 2 values, changed its index option to an enum.
if a value other than 1/0 was given it would use an uninitialized pointer too (compiler warning, review should pick up this stuff).

also renamed some RNA attrs:
 output_name --> output_name_a
 output_name2 --> output_name_b
 do_output1 --> use_output_a
 do_output2 --> use_output_b
 do_smudge --> use_smudge
 max_velocity --> velocity_max
2011-11-14 06:46:07 +00:00
Miika Hamalainen 7bcd1a6c47 Dynamic Paint:
* Added BKE_dynamicpaint.h to CMake list.
* Changed some unsigned integers back to signed, as OpenMP can't iterate unsigned values anyway.
* Fixed more warnings.
2011-11-10 13:00:27 +00:00
Campbell Barton dfc30d1229 quiet some warnings from recent merge 2011-11-10 12:28:26 +00:00
Miika Hamalainen fae903e263 Dynamic Paint:
* More code changes pointed by Brecht in codereview.
* Some user interface improvements.
* Updating brush settings now also updates canvas preview.
2011-10-28 14:46:09 +00:00
Miika Hamalainen 30cba27987 Dynamic Paint:
* Some changes and cleanup pointed on the codereview.
2011-10-22 16:16:14 +00:00
Miika Hamalainen 8bf78d7f56 Dynamic Paint:
* Fix: Wave "timescale" also changed simulation behavior. Now different timescale values will lead to nearly identical results, just slower or faster.
* Added "Displace Factor" setting for vertex displace surfaces. You can use it to adjust final displace strength or use negative values to paint bumps.
* Added clamp/map value to wave image sequence output settings.
* RNA description tweaking.
* General code tweaking.
2011-10-13 20:00:22 +00:00
Miika Hamalainen 79ef35889f Dynamic Paint:
* Added "Initial Color" setting for surfaces. You can for example set color from UV mapped texture or from vertex colors.
* Added clamping option for "wave" brushes.
* Merged smudge and drip adjacency search code. This fixes some issues with drip effect and makes code easier to maintain.
* Some adjustments to the bounding box generation code.
* OpenMP is now completely disabled if no compile flag is set.
* Wetness values are now properly clamped on vertex surfaces. No more black dots on >1.0 wetness.
* Textured brushes now use same function calls as internal renderer, instead of modified duplicates.
* Moved operator code to editors/physics/.
* Re-enabled some particle brush optimizations.
* Fixed sometimes incorrect volume brush influence.
* Fixed possible crash when using a brush that uses "Voxel Data" texture simultaneously with material preview or render.
* Fixed texture mapping issues for "Object Center" brush.
* Fixed possible crash/corruption when duplicating brush object that uses color ramps.
* Other tweaking and code cleanup.
2011-09-05 16:04:15 +00:00
Miika Hamalainen 5b71334484 Dynamic Paint:
* Bake calculation memory is now freed if surface is deactivated or baked.
* Fixed possibly incorrect brush influence when using "Non-Closed" brush setting.
* Added new rna property descriptions.
* Added some comments and general code cleanup.
2011-08-21 19:03:47 +00:00
Miika Hamalainen 8394f65d4a Dynamic Paint:
* Object velocity can now be used to determine brush influence and color.
* Brushes can now be set to "smudge" existing paint.
* Added new operators to easily add and remove surface output mesh data layers from Dynamic Paint ui.
* Fixed drip effect algorithm to work properly on forces pointing towards surface.
* Adjusted drip effect speed.
* Drip effect can now use canvas velocity and acceleration to influence drip direction.
* Fixed texture mapping for material enabled brushes.
* "Object Center" type brushes can now use "material color" as well.
* Improved surface partitioning grid generation algorithm.
* Fixed possible invalid brush collision detection when OpenMP enabled.
* Fixed incorrect random sized particle displace/wave influence.
* Fixed "Object Center" brush color ramp falloff.
* Fixed invalid zero alpha sampling when rendering vertex colors.
* Lots of smaller tweaking.
2011-08-03 18:31:48 +00:00
Miika Hamalainen cbe1613c01 Dynamic Paint:
* Surface bake data is no longer recalculated every frame, but only when surface mesh has moved/transformed. Results in multiple times better performance on high resolution surfaces when using sub-steps or surface is still.
* Heavily optimized particle brushes when random particle size enabled. Up to 10x speedup with large radius particles.
* Added an additional "grid" space partitioning structure for surfaces.
* Added bounding box checks for brushes.
* Smaller overall optimization.
* Further OpenMP parallelization.
* Added physics tab link to modifier panel.
* Fix: "Point Density" texture cache wasn't properly updated. Brushes can now use Point Density textures as well.
* Fix: Paint dissolve resulted in black color.
* Fix: KD-tree checkups weren't completely thread safe. Fixes possible crash with OpenMP enabled particle brushes.
* Fix: When brush was set to use a specific material, it was saved incorrectly and resulted in potential crashes on next load.
2011-07-22 18:37:30 +00:00
Miika Hamalainen f8f1cbd17f Dynamic Paint:
* Canvas and brush can be now enabled simultaneously. This way it's possible for two canvases to interact.
* Added basic anti-aliasing support for vertex surfaces.
* 3D-view color preview now works even when there's subsurf modifier after Dynamic Paint in modifier stack.
* Added a new brush option to use proximity from object center.
* Default surface frame range now use scene's start and end values.
* Improved ray checks for volume brushes.
* Added new "non-closed" option for volume brushes. This way it's possible to use planar meshes as "volume" brushes with predefined ray direction.
* New carrot branch splash image by CGEffex.
* Improved brush affection code.
* Lots of smaller improvements.
* Fixed: Weight paint didn't work with particles.
* Fixed: Point cache didn't work for non-wave surfaces anymore since last commit.
2011-07-08 11:03:37 +00:00
Miika Hamalainen 901f24716b Dynamic Paint:
* Some ui and rna tweaking.
* Effects ui panel is no longer visible for non-paint surfaces.
2011-07-03 14:01:57 +00:00
Miika Hamalainen 9ae663154f * Added a new surface type "Waves" that simulates simple 2D wave motion.
* Optimized adjacency point searching for vertex surfaces.
* Separated adjacency code from effect system.
* Overall code cleaning and tweaking.
2011-07-02 18:06:39 +00:00
Miika Hamalainen cb12648656 Dynamic Paint:
* Fixed memory leak when baking image sequences.
* Fixed sub-steps when brush was controlled by a parent object.
* Added option to select active outputs for paint surfaces.
* Improved color mixing algorithm.
* Improved memory allocation behavior.
* Memory is now freed even in case of errors.
* Removed "initial color" setting, as it's better to adjust color from material.

* "Paint effects" system:
** Converted to use new data structures.
** Works now with any number of surrounding points.
** Re-implemented support for UV-image surfaces.
** Added support for vertex surfaces too.
** Improved color handling.
** Improved movement stability.
** "Drip" effect uses now Blender's force fields instead of just z-directional gravity like before. Now each surface point can have different force influence.
2011-06-27 07:30:58 +00:00
Miika Hamalainen 3de22dec26 Dynamic Paint:
Committed changes from previous weeks, biggest changes are:
* Canvas can now have multiple "surfaces" that each can have specific format, type and settings.
* Renewed UI to support this new system.
* Aside from old "image sequence" output format, Dynamic Paint can now work on vertex level as well. Currently vertex paint and displace are supported.
* Integrated vertex level painting with Point Cache.
* Added viewport preview for Point Cache surfaces.

Due to massive amount of changes, old Dynamic Paint saves are no longer supported. Also some features are temporarily missing or may not work properly.
2011-06-16 10:41:00 +00:00
Miika Hamalainen 3b41ab432b Applied Dynamic Paint 1.18f patch as a codebase for GSoC. 2011-05-24 07:08:58 +00:00