Age | Commit message (Collapse) | Author |
|
Summary:
Issue was caused by the same tile being written twice to
the EXR file. This was happening because of partial update
of work-in-progress tiles was merging result to the final
render result in order to make color management pipeline
happy.
We need to avoid such a merges and keep memory usage as
low as possible when Save Buffers is enabled.
Now render pipeline will allocate special display buffer
in render layer which will contain combined pass in the
display space. This keeps memory usage as low as we can
do at this moment.
There's one weak thing which is changing color management
settings during rendering would lead to lossy conversion.
This is because render result's display buffer uses color
space from the time when rendering was invoked.
This is actually what was happening in previous release
already actually so not a big issue.
Reviewers: brecht
Reviewed By: brecht
Differential Revision: https://developer.blender.org/D162
|
|
Reviewed By: brecht
|
|
|
|
Reported by @plasmasolutions in IRC.
|
|
Summary:
Original issue was caused by wring detection of whether
SS modifier is being applied for render/viewport. After
recent dependency graph commit this was no longer an
issue.
But it still might have happen conflict between viewport
draw and scene_update_for_newframe() invoked from render
thread when using external engines like Cycles.
Solved by adding viewport lock while scene is being
updated and objects being exported to the render engine.
Same lock was already used for Blender Internal.
Reviewers: brecht
Reviewed By: brecht
Maniphest Tasks: T36474
Differential Revision: https://developer.blender.org/D138
|
|
|
|
Summary:
Made objects update happening from multiple threads. It is a task-based
scheduling system which uses current dependency graph for spawning new
tasks. This means threading happens on object level, but the system is
flexible enough for higher granularity.
Technical details:
- Uses task scheduler which was recently committed to trunk
(that one which Brecht ported from Cycles).
- Added two utility functions to dependency graph:
* DAG_threaded_update_begin, which is called to initialize threaded
objects update. It will also schedule root DAG node to the queue,
hence starting evaluation process.
Initialization will calculate how much parents are to be evaluation
before current DAG node can be scheduled. This value is used by task
threads for faster detecting which nodes might be scheduled.
* DAG_threaded_update_handle_node_updated which is called from task
thread function when node was fully handled.
This function decreases num_pending_parents of node children and
schedules children with zero valency.
As it might have become clear, task thread receives DAG nodes and
decides which callback to call for it.
Currently only BKE_object_handle_update is called for object nodes.
In the future it'll call node->callback() from Ali's new DAG.
- This required adding some workarounds to the render pipeline.
Mainly to stop using get_object_dm() from modifiers' apply callback.
Such a call was only a workaround for dependency graph glitch when
rendering scene with, say, boolean modifiers before displaying
this scene.
Such change moves workaround from one place to another, so overall
hackentropy remains the same.
- Added paradigm of EvaluaitonContext. Currently it's more like just a
more reliable replacement for G.is_rendering which fails in some
circumstances.
Future idea of this context is to also store all the local data needed
for objects evaluation such as local time, Copy-on-Write data and so.
There're two types of EvaluationContext:
* Context used for viewport updated and owned by Main. In the future
this context might be easily moved to Window or Screen to allo
per-window/per-screen local time.
* Context used by render engines to evaluate objects for render purposes.
Render engine is an owner of this context.
This context is passed to all object update routines.
Reviewers: brecht, campbellbarton
Reviewed By: brecht
CC: lukastoenne
Differential Revision: https://developer.blender.org/D94
|
|
|
|
Summary:
Mainly addressed to solve old TODO with color managed fallback
to CPU mode when displaying render result during rendering.
That fallback was caused by the fact that partial image update
was always acquiring image buffer for composite output and was
only modifying display buffer directly.
This was a big issue for Cycles rendering which renders layers
one by one and wanted to display progress of each individual
layer. This lead to situations when display buffer was based on
what Cycles passes via RenderResult and didn't take layer/pass
from image editor header into account.
Now made it so image buffer which partial update is operating
with always corresponds to what is set in image editor header.
To make Cycles displaying progress of all the layers one by one
made it so image_rect_update switches image editor user to
newly rendering render layer. It happens only once when render
engine starts rendering next render layer, so should not be
annoying for navigation during rendering.
Additional change to render engines was done to make it so
they're able to merge composite output to final result
without marking tile as done. This is done via do_merge_result
argument to end_result() callback. This argument is optional
so should not break script compatibility.
Additional changes:
- Partial display update for Blender Internal now happens from
the same thread as tile rendering. This makes it so display
conversion (which could be pretty heavy actually) is done in
separate threads. Also gives better UI feedback when rendering
easy scene with small tiles.
- Avoid freeing/allocating byte buffer for render result
if it's owned by the image buffer. Only mark it as invalid
for color management.
Saves loads of buffer re-allocations in cases when having
several image editors opened with render result. This change
in conjunction with the rest of the patch gave around
50%-100% speedup of render time when displaying non-combined
pass during rendering on my laptop.
- Partial display buffer update was wrong for buffers with number
of channels different from 4.
- Remove unused window from RenderJob.
- Made image_buffer_rect_update static since it's only used
in single file.
Reviewers: brecht
Reviewed By: brecht
CC: dingto
Differential Revision: http://developer.blender.org/D98
|
|
Summary:
Behaves very much the same as cache for Movie Clip datablock:
- Image now have `MovieCache *cache` field which replaced
legacy `ListBase ibufs`.
This allows image datablock to easily keep of image
buffers which are owned by itself. This field isn't
saved to the file and getting restored on undo steps.
However, cache limit is global for movies, sequences
and image datablocks now. So overall cached image buffers
size will not go above cache limit size in user
preferences.
- Image buffers which are marked as BITMAPDIRTY will never
be freed from the cache.
- Added utility function to iterate over image buffers
saved in movie cache.
- Movie cache cleanup check callback now have ImBuf argument
which can be used in a condition of cleanup.
- Added some utility functions which replaces legacy ibufs
iterations with image cache iteration which happens from
inside a lock.
- Fixed `image_mem_size()` which was only counting one of
the buffers if both float and byte buffer present.
Additional notes:
- `BKE_image_get_first_ibuf()` is rather stupid, but direct
access to ibufs->first was also the same stupid idea.
Would consider avoid this function is another project.
- There are some places which doesn't look threadsafe, but
they already were not so much threadsafe anyway before.
So think not a big deal with solving this later.
Finally solves infinite memory usage by image sequences! :)
Reviewers: brecht, campbellbarton
Reviewed By: brecht
CC: sebastian_k
Differential Revision: http://developer.blender.org/D95
|
|
|
|
|
|
This patch changes most of the reamining degrees usage in internal code into radians.
I let a few which I know off asside, for reasons explained below - and I'm not sure to have found out all of them.
WARNING: this introduces forward incompatibility, which means files saved from this version won't open 100% correctly
in previous versions (a few angle properties would use radians values as degrees...).
Details:
- Data:
-- Lamp.spotsize: Game engine exposed this setting in degrees, to not break the API here I kept it as such
(using getter/setter functions), still using radians internally.
-- Mesh.smoothresh: Didn't touch to this one, as we will hopefully replace it completely by loop normals currently in dev.
- Modifiers:
-- EdgeSplitModifierData.split_angle, BevelModifierData.bevel_angle: Done.
- Postprocessing:
-- WipeVars.angle (sequencer's effect), NodeBokehImage.angle, NodeBoxMask.rotation, NodeEllipseMask.rotation: Done.
- BGE:
-- bConstraintActuator: Orientation type done (the minloc[0] & maxloc[0] cases). Did not touch to 'limit location' type,
it can also limit rotation, but it exposes through RNA the same limit_min/limit_max, which hence
can be either distance or angle values, depending on the mode. Will leave this to BGE team.
-- bSoundActuator.cone_outer_angle_3d, bSoundActuator.cone_inner_angle_3d: Done (note I kept degrees in BGE itself,
as it seems this is the expected value here...).
-- bRadarSensor.angle: Done.
Reviewers: brecht, campbellbarton, sergey, gaiaclary, dfelinto, moguri, jbakker, lukastoenne, howardt
Reviewed By: brecht, campbellbarton, sergey, gaiaclary, moguri, jbakker, lukastoenne, howardt
Thanks to all!
Differential Revision: http://developer.blender.org/D59
|
|
Summary:
Curve ORCO was not calculating properly for cyclic 2D curves.
- Needed to split vertices for blender internal renderer.
Otherwise it's not possible to map last face to a proper
texture location.
- Needed to tweak curve->mesh conversion to respect cyclic
flag along U direction.
- Removed check for orcodm in curve.c:add_orco_dm since
this code is only called if there're enabled constructive
modifiers on the curve.
Reviewers: brecht
Maniphest Tasks: T37225
Differential Revision: http://developer.blender.org/D45
|
|
information such as light vector from specified Lamp.
For now this provides the following outputs:
- Color
- Light Vector
- Distance
- Shadow
- Visibility Factor
Note: Color output is multiplied by the lamp energy. Multiplication of
color*max(dot(light_vector,normal_vector),0)*shadow*visibility_factor
produces the exact same result as the Lambert shader.
Many thanks to Brecht for code review and discussion!
|
|
using a material as brush color
|
|
Skip byte->float conversion if output file format
supports high bit depths but configured to only
output 8 bits per channel.
Gives around 30% speedup when re-exporting movie file
to PNG image sequence here on laptop.
Possible further optimization:
- Skip color space conversion in imbuf_for_write
function if we've got already have buffer in
that space.
This doesn't seem to happen often after tweak
to render result to imbuf.
- Skip black alpha-under if original image is
opaque,
This is a bit tricky to detect.
|
|
|
|
* Remove Stars feature. This was a quite minimalistic feature and there are
better alternatives with more control (particles for example).
Removal discussed during BCon13 developer meeting and already years before, time to do it..
Reviewed By: brecht
Differential Revision: http://developer.blender.org/D17
|
|
* Remove "Edge" post processing effect and the corresponding render layer.
Since we have freestyle, this is not needed anymore and was a very simple effect anyway (Zbuffer filter effect, could be added to the compositor if really needed again).
Reviewed By: brecht, ton
Differential Revision: http://developer.blender.org/D14
|
|
Revert "Code cleanup: remove unused block from multire baker"
This reverts commit 63b01f6beee8eced14ff013ca93732f5c176ad10.
Multires displacement baker in fact uses level 0 for the
original subdivided mesh. Missed this when was making an
original commit.
|
|
so that it becomes (1.0, 1.0, 1.0) when AO is disabled.
For materials using AO pass, this makes the material preview and the GLSL
preview more accurate, but shouldn't affect final rendering in most cases
because we usually enable AO when using the AO pass in node tree.
Thanks to Brecht for code review.
|
|
|
|
Mapping from grid on ll 0 was not used and was incorrect
since bmesh merge anyway.
|
|
from Lawrence D'Oliveiro (ldo)
|
|
|
|
|
|
|
|
Issue was caused by Blender Internal changing LIB_DOIT flag
for scene when it gets updated for new frame. This leads into
conflict with flag used for tagging scenes fr render,
For now made it so nodes are being tagged instead of scene.
Only none node from those who're sharing the scene will be
tagged. And rendering scenes for node tree now checks for
node flag instead of scene's datablock one.
Ideally this tag would be replaced with scenes stored in an
array, but then it's not so clear how to check which node
to update.
|
|
Update tagging was happening only after full triangle was handled.
Now made it so images are updating once in 0.5sec, progress bar
will still update only after the whole triangle is done.
|
|
|
|
Code was rather confusing, get_object_orco was only
checking for orco in cache for some objects and was
actually allocating orco for other objects.
Now made it so get_object_orco always only checks
the cache and only call set_object_orco if there's
no orco for it yet.
|
|
checks for vectors.
|
|
|
|
Replaces ThreadedWorker and is gonna to be used
for threaded object update in the future and
some more upcoming changes.
But in general, it's to be used for any task
based subsystem in Blender.
Originally written by Brecht, with some fixes
and tweaks by self.
|
|
reflection color was set to 1 1 1. BSSRDF parameter fit not converging properly
due to float precision issues.
|
|
|
|
|
|
|
|
It allows effects such as baking vertex dirt maps to textures.
Also vertex based painting painting may be faster in the future,
so this is useful to have.
Thanks to Sergey for the review!
|
|
place is wrong.
With mblur the render function was setting scene frame for each blur sample and calling DAG update, but not after the last sample is finished, leaving the scene in the wrong frame.
|
|
Added support for derivative map baking, which
is accessable as a dedicated baker type. Works
pretty much the same as displacement map baker,
but gives you derivative map.
In fact, inernally this baker is just a filter
which applies on the result of displacement map.
Both regular and multires baking are supported.
Patch by Morten Mikkelsen and self.
|
|
backside of objects, after bugfix in revision 56145.
It now still always renders one step, but step size is clamped to fit within
the halo volume.
|
|
|
|
This makes more sense to have no displacement if baking
non-normalized displacement map or have mid-level displacement
(which is likely be close to no displacement as well) when
baking normalized displacement.
In any way it's better than using default black color.
|
|
|
|
Issue was caused by missing NULL-pointer check in user-data
initialization.
This issue might have lead to wrong displacement map being
baked.
|
|
rendering, in case some script wants to set it in the render_pre callback. In
case of decoupled 3d view layers or local view it will still override this
though.
|
|
|
|
This is kind of another way to animate layers which is disabled, but add an
exception to make this case work.
|