blender.git
19 months agoMerge branch 'master' into blender2.8
Brecht Van Lommel [Wed, 28 Feb 2018 02:11:17 +0000 (03:11 +0100)]
Merge branch 'master' into blender2.8

19 months agoCode cleanup: fix a few harmless warnings.
Brecht Van Lommel [Wed, 28 Feb 2018 01:36:45 +0000 (02:36 +0100)]
Code cleanup: fix a few harmless warnings.

19 months agoCode cleanup: make viewport free simpler and consistent with GPU module.
Brecht Van Lommel [Wed, 28 Feb 2018 01:29:55 +0000 (02:29 +0100)]
Code cleanup: make viewport free simpler and consistent with GPU module.

19 months agoUpdate CUEW to latest version
Brecht Van Lommel [Wed, 28 Feb 2018 02:00:29 +0000 (03:00 +0100)]
Update CUEW to latest version

Some Linux distribution have only libcuda.so.1, not libcuda.so.

19 months agoCode cleanup: fix a few compiler warnings.
Brecht Van Lommel [Wed, 28 Feb 2018 01:51:45 +0000 (02:51 +0100)]
Code cleanup: fix a few compiler warnings.

19 months agoDRW: Fix broken particle drawing.
Clément Foucault [Wed, 28 Feb 2018 01:24:21 +0000 (02:24 +0100)]
DRW: Fix broken particle drawing.

Was caused by GPU_SELECT_LOAD_IF_PICKSEL_LIST not iterating at all if shgroup->instance_count == 0.

19 months agoObject Mode: Fix incorrect lightprobe wire color when in edit mode.
Clément Foucault [Wed, 28 Feb 2018 01:10:38 +0000 (02:10 +0100)]
Object Mode: Fix incorrect lightprobe wire color when in edit mode.

19 months agoCleanup: comment for depth picking code, const args
Campbell Barton [Wed, 28 Feb 2018 00:46:02 +0000 (11:46 +1100)]
Cleanup: comment for depth picking code, const args

Note that setting `glDepthFunc` isn't important,
since 2.8 branch changes this value it might seem like an error
however it's harmless in this case - so better make note of this.

19 months agoDRW: Disable depth test when drawing statistics
Clément Foucault [Wed, 28 Feb 2018 00:39:12 +0000 (01:39 +0100)]
DRW: Disable depth test when drawing statistics

19 months agoCleanup: use 'uint' for GPU_select
Campbell Barton [Wed, 28 Feb 2018 00:37:39 +0000 (11:37 +1100)]
Cleanup: use 'uint' for GPU_select

19 months agoDRW: Fix negative scale object drawing.
Clément Foucault [Wed, 28 Feb 2018 00:29:16 +0000 (01:29 +0100)]
DRW: Fix negative scale object drawing.

19 months agoDRW: Refactor & Split draw_manager.c into multiple files.
Clément Foucault [Wed, 28 Feb 2018 00:16:23 +0000 (01:16 +0100)]
DRW: Refactor & Split draw_manager.c into multiple files.

Refactor include:
- Removal of DRWInterface. (was useless)
- Split DRWCallHeader into a new struct DRWCallState that will be reused in the future.
- Use BLI_link_utils for APPEND/PREPEND.
- Creation of the new DRWManager struct type. This will enable us to create more than one manager in the future.
- Removal of some dead code.

19 months agoBLI_link_utils: Add BLI_LINKS_APPEND(list, link)
Clément Foucault [Tue, 27 Feb 2018 22:30:28 +0000 (23:30 +0100)]
BLI_link_utils: Add BLI_LINKS_APPEND(list, link)

19 months agoMerge branch 'master' into blender2.8
Brecht Van Lommel [Tue, 27 Feb 2018 23:08:16 +0000 (00:08 +0100)]
Merge branch 'master' into blender2.8

19 months agoCleanup: macros using _END, should have a _BEGIN
Campbell Barton [Tue, 27 Feb 2018 23:05:38 +0000 (10:05 +1100)]
Cleanup: macros using _END, should have a _BEGIN

Also use var names not likely to be shadowed.

19 months agoCode cleanup: refactor Cycles image metadata retrieval to use a struct.
Brecht Van Lommel [Tue, 27 Feb 2018 21:16:45 +0000 (22:16 +0100)]
Code cleanup: refactor Cycles image metadata retrieval to use a struct.

19 months agoCycles point density texture
Dalai Felinto [Tue, 27 Feb 2018 21:20:55 +0000 (18:20 -0300)]
Cycles point density texture

This still does not make point density to work in Cycles, but at least it pass
the depsgraph down the line.

Note this was working fine before the depsgraph/render refactor to pass
evaluated depsgraph to the engines.

19 months agoFix Cycles to mostly work with render layer / depsgraph changes.
Brecht Van Lommel [Mon, 26 Feb 2018 15:46:48 +0000 (16:46 +0100)]
Fix Cycles to mostly work with render layer / depsgraph changes.

Point density texture and motion blur are still broken, and many more changes
are needed in general to used evaluated datablocks.

19 months agoRefactor depsgraph/render logic to serve evaluated depsgraph to engines
Dalai Felinto [Tue, 20 Feb 2018 15:55:02 +0000 (12:55 -0300)]
Refactor depsgraph/render logic to serve evaluated depsgraph to engines

User notes
----------
Compositing, rendering of multi-layers in Eevee should be fully working now.

Development notes
-----------------
Up until now we were still using the same depsgraph for rendering and viewport
evaluation. And we had to go out of our ways to be sure the depsgraphs were
updated.

Now we iterate over the (to be rendered) view layers and create a depsgraph to
each one, fully evaluated and call the render engines (Cycles, Eevee, ...) with
this viewlayer/depsgraph/evaluation context.

At this time we are not handling data persistency, Depsgraph is created from
scratch prior to rendering each frame.  So I got rid of most of the partial
update calls we had during the render pipeline.

Cycles: Brecht Van Lommel did a patch to tackle some of the required Cycles
changes but this commit mark these changes as TODOs. Basically Cycles needs to
render one layer at a time.

Reviewers: sergey, brecht

Differential Revision: https://developer.blender.org/D3073

19 months agoDepsgraph: Expose query to get view layer to RNA
Dalai Felinto [Fri, 23 Feb 2018 12:22:35 +0000 (09:22 -0300)]
Depsgraph: Expose query to get view layer to RNA

19 months agoMerge branch 'master' into blender2.8
Gaia Clary [Tue, 27 Feb 2018 20:06:29 +0000 (21:06 +0100)]
Merge branch 'master' into blender2.8

19 months agoCollada: Added tests for Animation export
Gaia Clary [Tue, 27 Feb 2018 19:41:34 +0000 (20:41 +0100)]
Collada: Added tests for Animation export

19 months agomerge Collada changtes from master
Gaia Clary [Tue, 27 Feb 2018 16:53:53 +0000 (17:53 +0100)]
merge Collada changtes from master

19 months agoMerge commit '6aadd61bd892d3908ed8151' into blender2.8
Dalai Felinto [Tue, 27 Feb 2018 16:48:26 +0000 (13:48 -0300)]
Merge commit '6aadd61bd892d3908ed8151' into blender2.8

19 months agoCollada: commented out code was previously left over with an unresolved conflict...
Gaia Clary [Tue, 27 Feb 2018 16:12:53 +0000 (17:12 +0100)]
Collada: commented out code was previously left over with an unresolved conflict in it. Deleting as its no longer needed

19 months agoCollada: Remove obsolete code
Gaia Clary [Tue, 27 Feb 2018 16:08:40 +0000 (17:08 +0100)]
Collada: Remove obsolete code

19 months agofix: Collada Matrixdata Importer tried to fix rotations where nothing was to fix...
Gaia Clary [Tue, 27 Feb 2018 16:02:37 +0000 (17:02 +0100)]
fix: Collada Matrixdata Importer tried to fix rotations where nothing was to fix. The matrixdata import is now only doing a matrix decompose and then pplies the decomposed values to 3 trans-, 3 scale- and 4 rot-curves)

19 months agoCollada: removed unnecessary dup[licate matrix conversion in matrix data exporter
Gaia Clary [Tue, 27 Feb 2018 15:55:18 +0000 (16:55 +0100)]
Collada: removed unnecessary dup[licate matrix conversion in matrix data exporter

19 months agoCollada exporter: Replaced numbers 0/1 by boolean values fasle/true for better reading
Gaia Clary [Tue, 27 Feb 2018 15:52:51 +0000 (16:52 +0100)]
Collada exporter: Replaced numbers 0/1 by boolean values fasle/true for better reading

19 months agoCollada Shape key export can create huge datafiles and may need some optimization...
Gaia Clary [Tue, 27 Feb 2018 15:51:52 +0000 (16:51 +0100)]
Collada Shape key export can create huge datafiles and may need some optimization. Disable export by default, user can still enable on demand

19 months agoCollada enable Export of animation data by default
Gaia Clary [Tue, 27 Feb 2018 15:48:41 +0000 (16:48 +0100)]
Collada enable Export of animation data by default

19 months agoDRW: Fix multithreading conflict with material previews.
Clément Foucault [Tue, 27 Feb 2018 14:50:34 +0000 (15:50 +0100)]
DRW: Fix multithreading conflict with material previews.

19 months agoDRW: Refactor / Cleanup Builtin uniforms.
Clément Foucault [Mon, 26 Feb 2018 22:39:09 +0000 (23:39 +0100)]
DRW: Refactor / Cleanup Builtin uniforms.

-Make the view and object dependant matrices calculation isolated and separated, avoiding non-needed calculation.
-Adding a per drawcall matrix cache so that we can precompute these in advance in the future.
-Replaced integer uniform location of only view dependant builtins by DRWUniforms that are only updated once per shgroup.

19 months agoDRW: Do not recreate the common uniform buffer every frame.
Clément Foucault [Mon, 26 Feb 2018 20:12:19 +0000 (21:12 +0100)]
DRW: Do not recreate the common uniform buffer every frame.

19 months agoGWN: Query builtin uniform at shader creation.
Clément Foucault [Mon, 26 Feb 2018 19:50:11 +0000 (20:50 +0100)]
GWN: Query builtin uniform at shader creation.

This avoids having non null entries in shaderface->builtin_uniforms and a redundant check.

19 months agoFix T54179: Assert changing layers in 2nd window
Campbell Barton [Tue, 27 Feb 2018 13:07:36 +0000 (00:07 +1100)]
Fix T54179: Assert changing layers in 2nd window

19 months agoEevee preview materials
Dalai Felinto [Tue, 27 Feb 2018 12:21:54 +0000 (09:21 -0300)]
Eevee preview materials

Now that Eevee has support for offline rendering (F12) we can use it for
the Material previews.

Note: This makes the duplicated UI issue one panel worse. That happens when
Cycles if your scene engine, and Eevee is your workspace engine.

19 months agoCleanup: remove unused duplicate code
Campbell Barton [Tue, 27 Feb 2018 11:02:18 +0000 (22:02 +1100)]
Cleanup: remove unused duplicate code

19 months agoMSVC 2013 Compile Fix/Workaround for "static thread_local" vars
Joshua Leung [Thu, 22 Feb 2018 06:22:50 +0000 (19:22 +1300)]
MSVC 2013 Compile Fix/Workaround for "static thread_local" vars

Apparently MSVC 2013 has trouble with stuff that's been declared
"static thread_local" (and/or maybe even the "thread_local" keyword).

https://stackoverflow.com/questions/29399494/what-is-the-current-state-of-support-for-thread-local-across-platforms

19 months agoMerge branch 'master' into blender2.8
Sergey Sharybin [Tue, 27 Feb 2018 10:16:43 +0000 (11:16 +0100)]
Merge branch 'master' into blender2.8

19 months agoCollada: Remove unused vector of flaot[4][4] values
Sergey Sharybin [Tue, 27 Feb 2018 10:14:55 +0000 (11:14 +0100)]
Collada: Remove unused vector of flaot[4][4] values

Was in fact causing issues on macOS, something to do with
a destructor.

19 months agoCollada: Use floating point version of abs()
Sergey Sharybin [Tue, 27 Feb 2018 10:14:17 +0000 (11:14 +0100)]
Collada: Use floating point version of abs()

Avoids implicit cast of float to int.

19 months agoMerge branch 'master' into blender2.8
Campbell Barton [Tue, 27 Feb 2018 09:45:20 +0000 (20:45 +1100)]
Merge branch 'master' into blender2.8

19 months agoGPU_select: correction to select-pick-finalize
Campbell Barton [Tue, 27 Feb 2018 09:44:12 +0000 (20:44 +1100)]
GPU_select: correction to select-pick-finalize

Would run twice, harmless at the moment but could cause issues later.

19 months agoFix error in depth picking caused by GL contexts
Campbell Barton [Tue, 27 Feb 2018 09:27:56 +0000 (20:27 +1100)]
Fix error in depth picking caused by GL contexts

Depth picking needs to read the depth buffer after drawing
since GPU_select_end runs in a different OpenGL context
reading the depth buffer wasn't working.
This caused the last object to be unelectable.

19 months agoMerge branch 'master' into blender2.8
Campbell Barton [Tue, 27 Feb 2018 09:22:26 +0000 (20:22 +1100)]
Merge branch 'master' into blender2.8

19 months agoGPU_select: utility function to finalize selection
Campbell Barton [Tue, 27 Feb 2018 09:16:53 +0000 (20:16 +1100)]
GPU_select: utility function to finalize selection

Needed for depth picking in 2.8

19 months agoRevert "F12 offline Freestyle rendering support in Eevee"
Tamito Kajiyama [Tue, 27 Feb 2018 04:02:58 +0000 (13:02 +0900)]
Revert "F12 offline Freestyle rendering support in Eevee"

This reverts commit 8a7c0abc2d548d88b755a1c712aa06f0ee631076.

19 months agoFix T54106: Save blend ignores 'check_existing'
Campbell Barton [Tue, 27 Feb 2018 02:33:59 +0000 (13:33 +1100)]
Fix T54106: Save blend ignores 'check_existing'

19 months agoF12 offline Freestyle rendering support in Eevee
Tamito Kajiyama [Mon, 26 Feb 2018 14:39:37 +0000 (23:39 +0900)]
F12 offline Freestyle rendering support in Eevee

This patch adds F12 offline Freestyle rendering support to Eevee.

Most functionalities are identical with those found in Cycles.

The only major difference is that the per-view layer "use Freestyle" toggle
option is currently placed in the "Passes" panel of the "View Layers"
properties window instead of a "Layer" panel as in Cycles.  Since Freestyle
is a post-processed overlay and not a pass, the present option location is
a compromise.  To describe this fact, the per-layer "use Freestyle" option
is in a subsection labeled as "Layer".

Reviewers: fclem, brecht, campbellbarton

Reviewed By: fclem, brecht

Subscribers: dfelinto

Differential Revision: https://developer.blender.org/D3084

19 months agoMerge branch 'master' into blender2.8
Gaia Clary [Mon, 26 Feb 2018 22:38:21 +0000 (23:38 +0100)]
Merge branch 'master' into blender2.8

19 months agoCollada: removed unused variables. fixed incompatible format in console output (Anima...
Gaia Clary [Mon, 26 Feb 2018 22:37:27 +0000 (23:37 +0100)]
Collada: removed unused variables. fixed incompatible format in console output (AnimationExporter.cpp)

19 months agoMerge branch 'blender2.8' of git.blender.org:blender into blender2.8
Gaia Clary [Mon, 26 Feb 2018 21:55:15 +0000 (22:55 +0100)]
Merge branch 'blender2.8' of git.blender.org:blender into blender2.8

19 months agomerge from master
Gaia Clary [Mon, 26 Feb 2018 21:49:30 +0000 (22:49 +0100)]
merge from master

19 months agoVSE preview: Get depsgraph from EvaluationContext
Dalai Felinto [Mon, 26 Feb 2018 21:04:18 +0000 (18:04 -0300)]
VSE preview: Get depsgraph from EvaluationContext

Note: Sequencer preview is working only for Clay, for Eevee is still not working.

19 months agoGWN: Fix glitches when closing a window.
Clément Foucault [Mon, 26 Feb 2018 19:09:54 +0000 (20:09 +0100)]
GWN: Fix glitches when closing a window.

19 months agoEevee: Fix prev_persmat being used by multiple viewport.
Clément Foucault [Mon, 26 Feb 2018 19:08:48 +0000 (20:08 +0100)]
Eevee: Fix prev_persmat being used by multiple viewport.

19 months agoV3D: Vertex selection: Fix opengl error.
Clément Foucault [Mon, 26 Feb 2018 19:07:39 +0000 (20:07 +0100)]
V3D: Vertex selection: Fix opengl error.

19 months agoWM/GPU: Clear VAO cache of batch preset when switching context.
Clément Foucault [Mon, 26 Feb 2018 18:49:06 +0000 (19:49 +0100)]
WM/GPU: Clear VAO cache of batch preset when switching context.

This is needed for multiple windows to draw the batch presets.
This will not be needed once we use only one context for UI.

19 months agoDRW: Add new Draw Manager OpenGL Context.
Clément Foucault [Mon, 26 Feb 2018 18:41:17 +0000 (19:41 +0100)]
DRW: Add new Draw Manager OpenGL Context.

This separate context allows two things:
- It allows viewports in multi-windows configuration.
- F12 render can use this context in a separate thread and do a non-blocking render.

The downside is that the context cannot be used while rendering so a request to refresh a viewport will lock the UI. This is something that will be adressed in the future.

Under the hood what does that mean:
- Not adding more mess with VAOs management in gawain.
- Doing depth only draw for operators / selection needs to be done in an offscreen buffer.
- The 3D cursor "autodis" operator is still reading the backbuffer so we need to copy the result to it.
- All FBOs needed by the drawmanager must to be created/destroyed with its context active.
- We cannot use batches created for UI in the DRW context and vice-versa. There is a clear separation of resources that enables the use of safe multi-threading.

19 months agoGHOST: Add new interface to manage offscreen contexts.
Clément Foucault [Mon, 26 Feb 2018 18:10:15 +0000 (19:10 +0100)]
GHOST: Add new interface to manage offscreen contexts.

Offscreen contexts are not attached to a window and can only be used for rendering to frambuffer objects.

CGL implementation : Brecht Van Lommel (brecht)
GLX implementation : Clément Foucault (fclem)
WGL implementation : Germano Cavalcante (mano-wii)

Other implementation are just place holder for now.

19 months agosimplified collada integration in Blender. made functions mostly similar with blender2.8
Gaia Clary [Mon, 26 Feb 2018 15:49:06 +0000 (16:49 +0100)]
simplified collada integration in Blender. made functions mostly similar with blender2.8

19 months agoAdding support for Matrix Transformation export
Gaia Clary [Mon, 26 Feb 2018 15:34:45 +0000 (16:34 +0100)]
Adding support for Matrix Transformation export

The exporter does export matrix data (4*4 Transformation matrix) only for Skeletal animation. For object animation only exporting to trans/rot/loc is implemented.

This task implements Matrix export also for simple Object animation.

Differential Revision: https://developer.blender.org/D3082

19 months agocollada: fix typo in if statement
Gaia Clary [Mon, 26 Feb 2018 11:55:54 +0000 (12:55 +0100)]
collada: fix typo in if statement

19 months agoas discussed on IRC this definition seems to be not necessary
Gaia Clary [Mon, 26 Feb 2018 11:09:29 +0000 (12:09 +0100)]
as discussed on IRC this definition seems to be not necessary

19 months agooptimized the output of the collada test script for better reading
Gaia Clary [Sun, 25 Feb 2018 23:09:00 +0000 (00:09 +0100)]
optimized the output of the collada test script for better reading

19 months agoCleanup: typos
Campbell Barton [Mon, 26 Feb 2018 08:58:31 +0000 (19:58 +1100)]
Cleanup: typos

D3081 by @rjg, with others.

19 months agoRevert "changing collada parameters"
Campbell Barton [Mon, 26 Feb 2018 08:33:53 +0000 (19:33 +1100)]
Revert "changing collada parameters"

This reverts commit d91f2ac37aa02d96a00d116fa55cdc9f55afd32c.

This change makes scene.collada_export() meaningless
(ignoring the scene the method is being run on).

19 months agoPresets: remove double underscore in preset names
Campbell Barton [Mon, 26 Feb 2018 08:21:02 +0000 (19:21 +1100)]
Presets: remove double underscore in preset names

19 months agoFix T54029: Wrong preset name display in win32
Campbell Barton [Mon, 26 Feb 2018 08:05:01 +0000 (19:05 +1100)]
Fix T54029: Wrong preset name display in win32

19 months agoCleanup: use function for clearing bmesh tags
Campbell Barton [Mon, 26 Feb 2018 03:05:41 +0000 (14:05 +1100)]
Cleanup: use function for clearing bmesh tags

19 months agoFix T50132: UV sticky mode is not respected with border/circle/lasso select.
Hugo Sales [Sun, 25 Feb 2018 21:24:55 +0000 (22:24 +0100)]
Fix T50132: UV sticky mode is not respected with border/circle/lasso select.

Differential Revision: https://developer.blender.org/D3074

19 months agoFix incorrect text clipping on node link button in material properties.
Brecht Van Lommel [Sat, 24 Feb 2018 16:15:16 +0000 (17:15 +0100)]
Fix incorrect text clipping on node link button in material properties.

19 months agoObject Mode: Display meshes without faces and edges in object mode.
Clément Foucault [Sat, 24 Feb 2018 03:45:13 +0000 (04:45 +0100)]
Object Mode: Display meshes without faces and edges in object mode.

19 months agoEevee: Cleanup cascaded shadowmap code.
Clément Foucault [Sat, 24 Feb 2018 03:25:25 +0000 (04:25 +0100)]
Eevee: Cleanup cascaded shadowmap code.

19 months agoDRW/GWN: Bypass glUseProgram.
Clément Foucault [Sun, 25 Feb 2018 04:24:06 +0000 (05:24 +0100)]
DRW/GWN: Bypass glUseProgram.

Turns out to be the call that was destroying performance.

I get 18ms->6ms improvement of drawing time with 10 000 unique objects.

And we can still improve upon this!

19 months agoManipulator: rename is_visible -> poll
Campbell Barton [Sun, 25 Feb 2018 12:52:20 +0000 (23:52 +1100)]
Manipulator: rename is_visible -> poll

Rename to WM_manipulator_group_type_poll,
use convention of other poll functions.

19 months agoFix Player tm, a lifes job
Jens Verwiebe [Sun, 25 Feb 2018 09:35:08 +0000 (10:35 +0100)]
Fix Player tm, a lifes job

19 months agomerged collada rework from master into blender 2.8
Gaia Clary [Sat, 24 Feb 2018 23:06:41 +0000 (00:06 +0100)]
merged collada rework from master into blender 2.8

19 months agochanging collada parameters
Gaia Clary [Sat, 24 Feb 2018 21:15:52 +0000 (22:15 +0100)]
changing collada parameters

Differential Revision: https://developer.blender.org/D3080

19 months agoFix a whitespace slipped in
Jens Verwiebe [Sat, 24 Feb 2018 17:07:05 +0000 (18:07 +0100)]
Fix a whitespace slipped in

19 months agoFix Plyer tm
Jens Verwiebe [Sat, 24 Feb 2018 16:30:37 +0000 (17:30 +0100)]
Fix Plyer tm

19 months agoT45687: Rework the Export/Import of Animations
Gaia Clary [Sat, 24 Feb 2018 12:11:30 +0000 (13:11 +0100)]
T45687: Rework the Export/Import of Animations

This started with a fix for an animated Object Hierarchy. Then i decided to cleanup and optimize a bit. But at the end this has become a more or less full rewrite of the Animation Exporter. All of this happened in a separate local branch and i have retained all my local commits to better see what i have done.

Brief description:

* I fixed a few issues with exporting keyframed animations of object hierarchies where the objects have parent inverse matrices which differ from the Identity matrix.
* I added the option to export sampled animations with a user defined sampling rate (new user interface option)
* I briefly tested Object Animations and Rig Animations.

What is still needed:

* Cleanup the code
* Optimize the user interface
* Do the Documentation

Reviewers: mont29

Reviewed By: mont29

Differential Revision: https://developer.blender.org/D3070

19 months agoMerge branch 'master' into blender2.8
Kévin Dietrich [Sat, 24 Feb 2018 13:02:50 +0000 (14:02 +0100)]
Merge branch 'master' into blender2.8

Conflicts:
source/blender/blenkernel/BKE_blender_version.h

19 months agoSmoke: expose empty space clipping property to the UI.
Kévin Dietrich [Thu, 22 Feb 2018 15:26:50 +0000 (16:26 +0100)]
Smoke: expose empty space clipping property to the UI.

This is used to determine which voxels are to be considered empty space.

Previously it was hardcoded for converting dense grids to OpenVDB grids
to reduce disk space usage.

This value is also useful for rendering engines to know, i.e. to
optimize ray marching.

19 months agoOpenVDB : use underscores instead of spaces in grid names.
Kévin Dietrich [Mon, 29 Jan 2018 17:37:35 +0000 (18:37 +0100)]
OpenVDB : use underscores instead of spaces in grid names.

Some other software cannot handle grid names with spaces in them. We still check for names with spaces so as to not break old
files.

This fixes T53802.

19 months agoFixup for border render changes
Dalai Felinto [Fri, 23 Feb 2018 20:18:12 +0000 (17:18 -0300)]
Fixup for border render changes

Although I fixed border rendering, I broke non-border rendering.

Issue introduced on:  0305fc30b3ba6a1b24e2c9c182ae2e76d553f341

19 months agoEevee: add Principled Volume shader.
Brecht Van Lommel [Thu, 22 Feb 2018 19:04:20 +0000 (20:04 +0100)]
Eevee: add Principled Volume shader.

19 months agoEevee: add blackbody shader node support.
Brecht Van Lommel [Fri, 23 Feb 2018 03:55:54 +0000 (04:55 +0100)]
Eevee: add blackbody shader node support.

This replaces the blackbody to RGB code with the simpler and faster one from
Cycles. It's a little different but the other placing using this is the legacy
volume drawing, so no need to stay compatible with that.

19 months agoGPU: fixes for string socket types in shader nodes.
Brecht Van Lommel [Thu, 22 Feb 2018 19:52:08 +0000 (20:52 +0100)]
GPU: fixes for string socket types in shader nodes.

These are not passed to GLSL functions, but should be used to load e.g.
a texture or attribute.

19 months agoEeevee: add temperature grid support, make color grid unpremultiplied.
Brecht Van Lommel [Thu, 22 Feb 2018 17:51:20 +0000 (18:51 +0100)]
Eeevee: add temperature grid support, make color grid unpremultiplied.

This matches similar changes done for Cycles.

19 months agoMerge branch 'master' into blender2.8
Brecht Van Lommel [Fri, 23 Feb 2018 18:02:49 +0000 (19:02 +0100)]
Merge branch 'master' into blender2.8

19 months agoCycles: add Principled Volume shader.
Brecht Van Lommel [Tue, 30 Jan 2018 14:05:19 +0000 (15:05 +0100)]
Cycles: add Principled Volume shader.

Similar to the Principled BSDF, this should make it easier to set up volume
materials. Smoke and fire can be rendererd with just a single principled
volume node, the appropriate attributes will be used when available. The node
also works for simpler homogeneous volumes like water or mist.

Differential Revision: https://developer.blender.org/D3033

19 months agoCycles: change smoke color grid to not include density multiplied in.
Brecht Van Lommel [Sun, 18 Feb 2018 02:16:29 +0000 (03:16 +0100)]
Cycles: change smoke color grid to not include density multiplied in.

This breaks backwards compatibility some, making smoke colors brighters
than before. But it is also more correct this way.

19 months agoCode refactor: improve attribute handling for optional volume attributes.
Brecht Van Lommel [Sun, 18 Feb 2018 02:20:39 +0000 (03:20 +0100)]
Code refactor: improve attribute handling for optional volume attributes.

A volume shader should be able to request attributes, and still be rendered
as homogeneous if no volume attributes are available for the object.

19 months agoSmoke: change default flame temperatures to match OpenGL preview.
Brecht Van Lommel [Sun, 18 Feb 2018 02:24:40 +0000 (03:24 +0100)]
Smoke: change default flame temperatures to match OpenGL preview.

19 months agoSmoke: add temperature grid, with values 0..1 corresponding to 0..1000K.
Brecht Van Lommel [Sun, 18 Feb 2018 02:13:07 +0000 (03:13 +0100)]
Smoke: add temperature grid, with values 0..1 corresponding to 0..1000K.

19 months agoNodes: left align text for color and string sockets, same as other types.
Brecht Van Lommel [Sun, 18 Feb 2018 02:15:13 +0000 (03:15 +0100)]
Nodes: left align text for color and string sockets, same as other types.

19 months agoFix border rendering for eevee + stop passing render result around
Dalai Felinto [Fri, 23 Feb 2018 16:26:28 +0000 (13:26 -0300)]
Fix border rendering for eevee + stop passing render result around

Technically the original issue is that xof/yof in render result is calculated
for drawing border render. So a simpler patch could be:

```
- rr->xof = re->disprect.xmin;
+ rr->xof = re->disprect.xmin + BLI_rcti_cent_x(&re->disprect) - (re->winx / 2);
```

However everywhere in the code we are getting border directly from re->disprect
which we may as well do here too.

Besides I'm taking this as a chance to get rid of RenderResult in the internal
loop of eevee, to help prepare the code to the upcoming rendering pipeline
changes.

19 months agoFix T54137: OpenEXR files with long red/green/blue channel names not loading correctly.
Brecht Van Lommel [Fri, 23 Feb 2018 13:32:17 +0000 (14:32 +0100)]
Fix T54137: OpenEXR files with long red/green/blue channel names not loading correctly.