Commit Graph

2713 Commits

Author SHA1 Message Date
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
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
4ad289a22d Bugfix #34895
Error in shadowbuffer with halo effect. It had render error when you look straight into
the lamp, with something in front of lamp.

The code that was sampling the shadowbuffer exited too soon (for ray going perpendicular to buffer it should take at least 1 sample).

Code from 90ies. And still got a bug fix. Whoa :)
2013-04-18 16:26:58 +00:00
7669d3c17d Bug fix #35017
Blender Render: setting alpha to zero for ray-transp material with refraction did not
render. Was optimized away.
2013-04-18 11:44:00 +00:00
4df0c46f83 Make freestyle use local Main for temporary objects
This means main database is no longer pollutes with
temporary scene and objects needed for freestyle
render.

Actually, there're few of separated temporary mains
now. Ideally it's better to use single one, but it's
not so much trivial to pass it to all classes. Not
so big deal actually.

Required some changes to blender kernel, to make it
possible to add object to a given main, also to
check on mesh materials for objects in given main.
This is all straightforward changes.

As an additional, solved issue with main database
being infinitely polluted with text blocks created
by create_lineset_handler function.

This fixes:
- #35003: Freestyle crashes if user expands objects in FRS1_Scene
- #35012: ctrl+f12 rendering crashes when using Freestyle
2013-04-18 08:58:21 +00:00
ae58968e0a Blender Internal Render in viewport
Because of our release soon, feature has been added behind the Debug Menu.
CTRL+ALT+D and set it to -1. Or commandline --debug-value -1.

When debug set to -1, you can put the viewport to 'render' mode, just like
for Cycles. Notes for testers: (and please no bugs in tracker for this :)

- It renders without AA, MBlur, Panorama, Sequence, Composite
- Only active render layer gets rendered. Select another layer will re-render.
- But yes: it works for FreeStyle renders!
- Also does great for local view.
- BI is not well suited for incremental renders on view changes. This only
  works for non-raytrace scenes, or zoom in ortho or camera mode, or for 
  Material changes. In most cases a full re-render is being done.
- ESC works to stop the preview render.
- Borders render as well. (CTRL+B)
- Force a refresh with arrow key left/right. A lot of settings don't trigger
  re-render yet.

Tech notes:

- FreeStyle is adding a lot of temp objects/meshes in the Main database. This
caused DepsGraph to trigger changes (and redraws). I've prepended the names
for these temp objects with char number 27 (ESC), and made these names be
ignored for tag update checking.

- Fixed some bugs that were noticable with such excessive re-renders, like 
  for opening file window, quit during renders.
2013-04-16 17:39:20 +00:00
d3a878688e Fix crash rendering environment maps. I think this freestyle code was not
intended to be here and probably was left over from some earlier code, as
resetting the configuration on render would lead to data loss.
2013-04-15 23:12:54 +00:00
a1a4631f11 Fix crash rendering environment maps. 2013-04-15 23:12:52 +00:00
afb4b65167 Random number generator: replace a bunch of usage of the global random number
generator with a local one. It's not thread safe and will not give repeatable
results, so in most cases it should not be used.

Also fixes #34992 where the noise texture of a displacement modifier was not
properly random in opengl animation render, because the seed got reset to a
fixed value by an unrelated function while for final render it changed each
frame.
2013-04-15 23:12:40 +00:00
d260ccb927 Fix #34975: crash rendering curve/text with modifiers that alter topology,
was issue in new freestyle code.
2013-04-15 17:45:15 +00:00
86f306f1d9 Freestyle stroke rendering is now done before lens flare. Suggested by Ton on IRC. 2013-04-14 17:24:02 +00:00
6b37baf34c Fix for [#34913] Freestyle: Problem w/ Edge Marks combined w/ Collision.
Freestyle edge marks were messed up with Collision and other physics mesh modifiers.
The issue was due to copied Vlak instances without resetting edge marks to proper values.

Also made minor changes for avoiding unnecessary hash table lookups, and added an
assertion to check potential buffer overrun.
2013-04-14 00:27:31 +00:00
fa3770eb66 Fix #34923 Images that have their alpha calculated should not get de-premultiplied. 2013-04-11 12:37:33 +00:00
650c3115c2 Fix for [#34904] and [#34913]: broken Freestyle edge/face marks with modifiers. 2013-04-10 01:12:37 +00:00
fcf137dbd7 style cleanup 2013-04-08 04:39:09 +00:00
63d523336f freestyle lineset tag attribute was defined but not used, also some code cleanup. 2013-04-07 01:38:03 +00:00
4ff8041e0e Removed Freestyle-specific code from DerivedMesh.c.
The removed code was necessary due to a logical bug in the use of CD_ORIGINDEX
layer entries.  Previously the index values were used to refer to the edges/polys
of the derived mesh, assuming that the derived mesh edges/polys consisted of those
from the original mesh plus newly added edges/polys.  This assumption was not
correct, although it worked well for several modifiers such as Mirror and Solidify.
Now the index values are specifically used to reference the edge/polys of the
original mesh.
2013-04-06 06:09:08 +00:00
b4bd232da0 Removed CD_MASK_FREESTYLE_EDGE and CD_MASK_FREESTYLE_FACE from CD_MASK_BAREMESH
and moved them to init_render_mesh() in convertblender.c where these CustomData
layers are specifically required.
2013-04-05 19:34:26 +00:00
89926a0598 svn merge ^/trunk/blender -r55776:55813 2013-04-05 15:42:31 +00:00
5734d229a8 Fix #34867: cycles viewport render did not respect viewport visibility for
modifiers with text/curve/surface objects.

This is because the code here did not yet support the distinction between
generating the tesselated mesh at viewport/render resolution and generating a
separate displist/derivedmesh for render that is not stored in the object but
created and freed on the fly.
2013-04-05 00:33:59 +00:00
83fff218cc svn merge ^/trunk/blender -r55700:55776 2013-04-04 13:37:07 +00:00
69035e183b quiet warnings (building with -Werror) 2013-04-04 11:47:48 +00:00
f7efb51054 Fix #34803: blender internal SSS rendering black/nan with negative texture colors. 2013-04-02 17:49:31 +00:00
5524ed9ba2 Merged changes in the trunk up to revision 55700.
Conflicts resolved:
source/blender/editors/mesh/mesh_intern.h
2013-04-01 13:47:19 +00:00