Commit Graph

3028 Commits

Author SHA1 Message Date
2daa901ec0 Fix #35883: freestyle + envmap render crashed. 2013-06-26 19:23:03 +00:00
d3b6117068 Fix typo made back in svn rev35785
Callback handle was assigning to wrong storage in RE_draw_lock_cb.
So far it was completely harmless because all the callbacks are
using the same handle, so test_break_callback was using correct
handle, and since draw_lock_callback didn't use handle at all
nobody noticed this.

But this typo lead to draw_lock_callback using NULL instead of
real RenderJob, which is bad for the feature we're working in
GSoC branch.
2013-06-25 07:22:28 +00:00
0309f442bb Render stats text: show elapsed time for blender internal, hide useless "Single Layer"
at the start, more clearly indicate what the render time of the last frame was, some
other tweaks for consistency.
2013-06-24 22:41:24 +00:00
2df82a2a2b Code cleanup: fix some vs2012 compiler warnings 2013-06-21 12:33:19 +00:00
a92468c7d7 Fix #35807: blender internal motion blur render without antialiasing would
give black speckles (self intersection errors) in raytraced shadows.

Motion blur does some extra offsets for free antialiasing in the motion blur
samples, but did not take them into account everywhere.
2013-06-20 11:47:09 +00:00
a384612cce Fix #35439: Render Border have weird influence on compositing
Issue was caused by render result passing to a compositor
was having a resolution of border when using a camera border
in cases there's no Render Layer nodes.

Made it so resolution in which compositor works does not
depend on whether Render Layers present or not.
2013-06-20 11:32:08 +00:00
94cb20ff4e when setting the subframe for large frames (250,000+) the precision was very poor.
now use double precision when combining the frame+subframe.
2013-06-16 04:06:38 +00:00
14cc35d1ab Fix blender internal showing SSS preprocessing status message even if there isn't
any SSS material in the scene.
2013-06-13 18:29:56 +00:00
7d478ac0a7 Fix #35664: blender internal material index pass + ztransp + multiple materials
assigned to a mesh did not work correct.
2013-06-13 15:02:42 +00:00
a754423bd1 Fix #35735: blender internal viewport rendering was missing SSS update when
changing angle of view.
2013-06-13 14:40:22 +00:00
5520331215 Fix #35561: freestyle + read full sample layers = crash.
Now add_freestyle() in pipeline.c takes a second argument to enable/disable
stroke rendering.  When stroke rendering is disabled, the function allocates
data structures but does not perform stroke rendering.  The allocated data
structures (mostly left unpopulated with data elements) are intended to allow
for the Read Full Sample Layers (Shift-R) command in the compositor.
2013-06-11 02:32:01 +00:00
ab52b15964 Fix #35681: cycles excluded layers still got evaluated before and after
rendering even if they were not used on any render layers.
2013-06-10 13:53:38 +00:00
c423e3ed8f code cleanup: warn undefined compiler defines. 2013-06-08 05:24:55 +00:00
f47cb7e2d9 Fix for r56965 by Tamito:
* Panorama Camera was not working for Blender Internal and Cycles anymore.

Code checked for Freestyle render layer flag, but as the flag is enabled per default, it broke Panorama camera in all cases. It made no sense to check this on a render layer basis anyway... check if Freestyle is enabled in general now instead.
2013-06-01 02:14:07 +00:00
9fb3d3e032 remove redundant includes from cmake and scons. 2013-05-30 02:16:22 +00:00
9e05f6571f Make sure bool will always have the same size in C and C++
There were an issues with data structures defined in headers
and being used by both C and C++ on systems with stdbool
unavailable.

This happened because bool in this case will be defined as
unsigned int, which is 4 bytes. But C++'s bool is only 1
byte and this lead to alignment issues.

Now bool is always 1 byte, also made sure there's no situation
like bool foo = BitField & BitFlag, which could give overflow
issues. Use (BitField & BitFlag) != 0 instead.

Fixes #35553: Compositor broken (Backdrop & Preview)
2013-05-29 11:49:39 +00:00
225c5fee6b move BLO_sys_types.h -> BLI_sys_types.h (it had nothing todo with loading)
remove MEM_sys_types.h which was a duplicate.
2013-05-28 19:35:26 +00:00
c77179a3c2 code cleanup: comment/remove unused defines 2013-05-28 01:15:59 +00:00
ec8d277c64 BLI_math rename functions:
- mult_m4_m4m4 -> mul_m4_m4m4
- mult_m3_m3m4 -> mul_m3_m3m4

these temporary names were used to avoid problems when argument order was switched.
2013-05-26 18:36:25 +00:00
663f15cf2b Fix #35493: Blender crash when rendering in terminal mode
Use the same window manager for freestyle bmain as
real bmain uses. This is needed because freestyle's
bmain could be used to tag scenes for update, which
implies call of ED_render_scene_update in some cases
and that function requires proper windoew manager
to present.

Alternative would be to make render scene update does
nothing if there's no window manager, but we wanted
freestyle to be applied in rendered viewport once and
think current change is what we'll need to support
freestyle in viewport.

But a bit further, perhaps that'd make sense to not
register ED_render_scene_update as a scene update
callback when in background mode?
2013-05-24 07:56:32 +00:00
ba4fb6bf43 Temporary fix for [#35467] wrong lines with panoramic camera.
A warning message is shown when the panoramic camera is combined with Freestyle.
2013-05-22 19:21:42 +00:00
b1d7205aa9 Fix #35458: SIGSEGV ( crash ) in imagewraposa()
Was missing a NULL-check.
2013-05-22 06:22:28 +00:00
cd6b27f2b5 remove return value from MEM_freeN, it wasn't used anywhere and was cast to a different function signature. (which evidently works but error prone). 2013-05-21 07:37:59 +00:00
7b36dea115 code cleanup: scons - binreloc include was copied all over the place for no reason, -pthread too. 2013-05-20 18:55:08 +00:00
6de829cb7a code cleanup: split scons includes onto multiple lines, reduce chance of include conflicts later on. 2013-05-20 18:42:28 +00:00
7b2172cb0b 3D Viewport rendering (Blender Internal)
Added incremental re-render on view changes. That means all data preprocessing
only needs to be done once on view changes, quite faster that way.

Also fixed a bug in raytracing strands with soft shadows, was wrongly changing
coordinates in a static array.

Note: proper signals for re-renders is still on the todo. Many button options
don't signal a re-render yet. Work around: press G+ESC for quick full renders.
2013-05-17 11:13:46 +00:00
4dec85ef26 Fix #35384: animation to enable/disable render layers was applied one frame too
late when rendering animations.
2013-05-16 12:03:21 +00:00
812cd6c75e fix [#35385] freestyle rendering crash blender 2013-05-16 08:04:45 +00:00
a4b5c05aad Fixes for blender internal viewport render:
* Particles did not render at viewport resolution like meshes.
* Properties editor preview render of hair was crashing, solution is to have
  two separate flags for this preview render and viewport preview render.
2013-05-15 17:09:45 +00:00
845376e8d3 Fix for missing finalization of memory blocks allocated in the Freestyle module.
Suitable for inclusion in 2.67a.
2013-05-15 17:06:56 +00:00
6bd58ac967 fix [#35335] Crash when rendering a text object with a remesh modifier and a material texture 2013-05-13 07:13:28 +00:00
1ea1f21b63 Viewport Render Internal:
Animated characters were not rendering yet, the render code for it
caused a signal for re-draw and re-render, in eternal loop.

Solved by forcing viewport render to use the same derivedmesh data
as for 3d viewport drawing. Faster too.
2013-05-12 17:16:43 +00:00
5fcf9b1d2f 3D viewport render preview:
- Put it available as a default now (no debug value needed)
- Fixed viewport size error, viewport was badly set
  (visible with border render, property regions)
- Fixed hanging lock in conflict between drawing and initialize
  new renders.
2013-05-12 13:15:41 +00:00
359edc27d3 style cleanup 2013-05-11 01:06:01 +00:00
1c9a24b8ff Fix #35269: compositing setup with only file output node and no composite node
refused to render. It's not possible to actually see the compositing result
in the render result without that but might as well work.
2013-05-10 12:27:18 +00:00
d326d92b2f fix [#35280] blender crashes when setting Environment Map imagefile 2013-05-09 14:01:42 +00:00
4d842df17e Fix #35219: blender internal auto ray bias to avoid the terminator shadow
problem was giving light flickering on a mesh with animated hair strands.

Now strands are not used to compute this auto bias excluded from this, from
tests it does not seem to be helpful for hair and only gives issues.
2013-05-08 13:23:20 +00:00
a07dcd67eb Fix #35240: command line -t number of threads option did not work for cycles.
Now it works for blender internal, cycles and other multithreading code in
Blender in both background and UI mode.
2013-05-08 13:23:17 +00:00
a9fb183901 rename BLI_ghashIterator_notDone() -> BLI_ghashIterator_done()
was renamed fairly recently but other similar iterators not negated
	like this, would prefer to keep it as it was
2013-05-08 12:58:11 +00:00
357655af32 use static functions for raycast functions. 2013-05-08 12:55:05 +00:00
7224513f57 Fix crash rendering material with "Face Textures" option.
Example file: lib/tests/materials/crystal_cube.blend
2013-05-06 14:00:28 +00:00
3b23035282 Fix 35091: Blender internal does not render face texture alpha
Issue was introduced in svn rev54374.

Now made it so image's flag from imagewrap*() argument
is checked instead of using tex->ima, which seems how
this functions were supposed to work.

Doublechecking on this change is really welcome!
2013-04-26 14:32:06 +00:00
656213e6b2 Fix freestyle crash due to freed memory access. The render data needs to be
freed first, and then the scene that it used.
2013-04-25 15:59:15 +00:00
ee6932aa89 Fix flickering black tiles in preview render, after viewport render commit, it's
nicer when the new preview draws over the old one.

The code was changed so that the render result is freed all the time because
freestyle manipulates render layers. Now it only does it when freestyle is
enabled so cycles and regular blender internal can still avoid it.
2013-04-24 19:21:16 +00:00
dbeec2be86 Fix #34783: smoke simulation crash when changing frame while preview rendering.
Added a mutex lock for smoke data access. The render was already working with a
copy of the volume data, so it's just a short lock to copy things and should not
block the UI much.
2013-04-24 17:31:09 +00:00
Lukas Toenne
6cdc12dc74 Fix for #34739 and #35060, avoid ambiguity in compositor viewer nodes.
The design changes coming with pynodes for the node editor allow editing multiple node groups or pinning. This is great for working on different node groups without switching between them all the time, but it causes a problem for viewer nodes: these nodes all write to the same Image data by design, causing access conflicts and in some cases memory corruption. This was not a problem before pynodes because the editor would only allow 1 edited node group at any time. With the new flexibility of node editors this restriction is gone.

In order to avoid concurrent write access to the viewer image buffer and resolve the ambiguity this patch adds an "active viewer key" to the scene->nodetree (added in bNodeTree instead of Scene due to otherwise circular DNA includes). This key identifies a specific node tree/group instance, which enables the compositor to selectively enable only 1 viewer node.

The active viewer key is switched when opening/closing node groups (push/pop on the snode->treepath stack) or when selecting a viewer node. This way only the "last edited" viewer will be active.

Eventually it would be nicer if each viewer had its own buffer per node space so one could actually compare viewers without switching. But that is a major redesign of viewer nodes and images, not a quick fix for bcon4 ...
2013-04-24 16:36:50 +00:00
2cfbabc9b8 fix relating to r56260, when in vertex paint mode the mesh would have tessfaces allocated, which prevented baking from updating vertex colors.
baking now clears tessfaces.
2013-04-24 13:53:09 +00:00
2439bf0d9b fix glitch where vertex baking wouldn't always refresh the mesh. 2013-04-24 13:12:29 +00:00
a1ed1dd26b Fix for full-sample anti-aliasing (FSAA) not working with Freestyle.
Reverted the trunk revision 56136 and part of revision 56127 concerning the local Main
for Freestyle and temporary scene generation for stroke rendering.

The function do_merge_fullsample() in pipeline.c has access to the Scene of each Render,
so that the temporary Scene generated by Freestyle has to be kept for FSAA even after
stroke rendering has been done.  By the same token, the local Main has been moved from
the BlenderStrokeRenderer class to Render.  It is noted that free_all_freestyle_renders()
in pipeline.c is intended to get the temporary Scene of each Render released specifically
taking account of the FSAA case.
2013-04-23 22:40:13 +00:00
5725be6f08 Minor code clean-up & removal of unused code segments. 2013-04-20 23:00:27 +00:00