Commit Graph

1971 Commits

Author SHA1 Message Date
Sergey Sharybin
6825577cad Carve fixes and optimizations:
- Fixed memory lead in Carve_getIntersectedOperandMeshes
- Union manifolds only if they intersects second operand, leave manifolds
  which doesn't intersect second operand as-is.
2012-02-14 13:24:04 +00:00
Sergey Sharybin
b5f08e60be Carve: improved handling of meshes with interesting manifolds
Unioning of intersecting manifold tried to perform as little union operations
as possible, but there were some not totally correct assumption which lead to
cases when unioning of manifolds of some mesh might be happened when one of
mesh sets already had got intersecting manifolds.

This commit corrects this incorrect behavior.

Discovered this when was looking into #30175: Boolean Difference causes 2.62 RC1 crash.
2012-02-14 09:43:35 +00:00
Joerg Mueller
c0c1a9700e Fix for [#30171] "Audio Muted" Does Not Mute Audio 2012-02-13 21:27:11 +00:00
Sergey Sharybin
32c4ade29c Fix #30159: Boolean modifier creating non-concave faces
Issue was caused by merging triangles into quads policy which used to think
triangulation of non-planar/non-concave quads happens by 1-3 diagonal which
isn't actually correct in some OpenGL implementations.

Added check for non-concave faces when merging triangles. It will work fine if
original faces are flat. In case if original faces aren't flat this check might
fail and triangulate face when it's not actually needed or merge triangles in
a way which leads to OpenGL artifacts.
2012-02-13 13:23:23 +00:00
Campbell Barton
1f3df9e659 patch from Jochen Schmitt to get blender building with gcc4.7 2012-02-09 07:01:30 +00:00
Brecht Van Lommel
b6d12f11fe Fix #30004: cycles brightness/contrast node issues. The formula used did not work
very well for colors that can be outside of the 0.0..1.0 range, giving +/- infinity
results.

Now we just use a simple linear contrast factor as proposed by Paolo Sourvinos, and
clamp values to be >= 0, and also make the parameters work more in the 0..1 range
instead of the 0..100 range, to be more consistent with other nodes.
2012-02-08 17:09:30 +00:00
Brecht Van Lommel
54c7f374c8 Fix #30061: cycles single render layer through python operator parameter not
working.
2012-02-07 20:51:33 +00:00
Brecht Van Lommel
4a427a441b Fix #30049: cycles noise texture producing nan values with some
texture coordinates, due to int overflow.

Also minor tweak in shader code to avoid copying uninitialized
values, should have no effect though because they were not used.
2012-02-07 17:32:01 +00:00
Brecht Van Lommel
b67b1c8564 Fix #30086: cycles background render printing same status text twice. 2012-02-07 17:22:47 +00:00
Alexander Kuznetsov
d51a1f3ed1 Fix for [#30044] on windows
We don't know how ALT key modifies the key, so utf=0;
That way Text Object can handle it.

* Should be removed when we able to support different keyboards on Windows
2012-02-05 16:05:20 +00:00
Brecht Van Lommel
5c395b69f5 Fix for Luxrender boost::thread conflict, workaround now is to just not use it
in cycles and use pthreads instead.
2012-02-04 19:58:09 +00:00
Campbell Barton
637bc0ddea Code Cleanup: pep8 edits 2012-02-04 11:10:41 +00:00
Campbell Barton
e3958015db Code Cleanup: check is / is not when comparing singletons. 2012-02-02 21:07:56 +00:00
Brecht Van Lommel
5504ba6f50 Cycles: material pass index button was missing from material properties still. 2012-02-01 13:38:23 +00:00
Brecht Van Lommel
21554f2df5 Fix #30011 & #30027: cycles division by zero evaluating BSDF with zero weights,
showed up as NaN on GPU render.
2012-01-31 15:59:30 +00:00
Brecht Van Lommel
87149fc4b6 Fix #30034: bug in multiple importance sampling + transparency, would
give slightly wrong lighting behind transparent objects.
2012-01-31 14:57:46 +00:00
Sergey Sharybin
f07f59c760 Cache limiter will now work properly with limits >= 4Gb 2012-01-31 11:11:56 +00:00
Brecht Van Lommel
26d3b873d5 Fix #30009: cycles translucent BSDF + environment importance sampling not
working correct.
2012-01-30 18:34:01 +00:00
Sergey Sharybin
b410d06dde Fix #29976: Carve Boolenas crasher with Solidify
Issue was caused by union policy needed to deal with cases when operand intersects
two or more intersecting meshes of another operand.

Changed this policy to run union operation only if there's actual intersection
between two meshes of the same object. Should work in general but it's still
possible to make it behave incorrect -- for example object consist of two groups
if concentric cubes which intersects each other.
2012-01-30 09:19:38 +00:00
Brecht Van Lommel
b023665551 Cycles: another fix for CUDA render passes, needed to align float4 passes. 2012-01-27 13:58:32 +00:00
Sergey Sharybin
3062798de3 Fixed some possible issues and access non-initialized variable in Carve BOP interface.
Discovered when was investigating some crashes caused by Carve's triangulator.
2012-01-27 08:17:53 +00:00
Brecht Van Lommel
4fe00cd4f9 Cycles: disable environment importance sampling code for CUDA cards with
compute model < 2.x, to avoid running out of memory in the compiler.
2012-01-26 19:45:59 +00:00
Brecht Van Lommel
803286dde8 Cycles: render passes for CUDA cards with compute model >= 2.x. 2012-01-26 19:07:01 +00:00
Brecht Van Lommel
de5d5ded7b Cycles: fixes for OpenCL build after pass changes, patch by Daniel Genrich. 2012-01-26 15:37:33 +00:00
Brecht Van Lommel
7e86c8fcdc Fix #29966: cycles elapsed time not resetting in viewport after changes. 2012-01-26 14:55:39 +00:00
Brecht Van Lommel
f8bddbd347 Cycles: fix issues rendering second render layer passes, and avoid unnecessary
clear of buffer.
2012-01-26 14:55:25 +00:00
Sergey Sharybin
e19d78178d Possible fix for implicit declaration of av_rescale_q on some platforms. 2012-01-26 11:16:49 +00:00
Mike Erwin
7e4558d163 added support for USB Spaceball5000, also a partial attempt to accept button presses from unidentified 3D mice (for ancient serial devices) 2012-01-26 03:27:10 +00:00
Brecht Van Lommel
f99343d3b8 Cycles: Render Passes
Currently supported passes:
* Combined, Z, Normal, Object Index, Material Index, Emission, Environment,
  Diffuse/Glossy/Transmission x Direct/Indirect/Color

Not supported yet:
* UV, Vector, Mist

Only enabled for CPU devices at the moment, will do GPU tweaks tommorrow,
also for environment importance sampling.

Documentation:
http://wiki.blender.org/index.php/Doc:2.6/Manual/Render/Cycles/Passes
2012-01-25 17:23:52 +00:00
Thomas Dinges
c905415f6b Cycles Node Editor:
* Add Use Nodes button for World shader type
* UI was not redrawing the Node area, when enabling "Use nodes", added check for it to the listener.
2012-01-24 20:10:37 +00:00
Dalai Felinto
335ffb0ff3 Brightness/Contrast Node for Cycles
Contrast helps to adjust IBL (HDR images used for background lighting).
Note: In the UI we are caling it Bright instead of Brightness. This copy what Blender composite is doing.
Note2: the algorithm we are using produces pure black when contrast is 100. I'm not a fan of that, but it's a division by zero. I would like to look at other algorithms (what gimp does for example). But that would be only after 2.62.
2012-01-24 16:32:31 +00:00
Sergey Sharybin
69b7a3a72a Fix compilation error caused by code cleanup 2012-01-23 17:49:56 +00:00
Sergey Sharybin
e079bf8184 Carve booleans: corrected copyright header 2012-01-23 17:44:19 +00:00
Sergey Sharybin
7d22a41a3d Carve booleans: code and style cleanup 2012-01-23 17:44:05 +00:00
Sergey Sharybin
690c77dd7d Fix #29934: New Carve library can't execute boolean operations in some cases
Issue was caused by left boolean operand consist of several intersecting manifolds
which make Carve triangulator confused and which can't be resolved in general case.
Added mesh pre-processing before actual applying boolean operator on it. This
preprocessing applies union operation on intersecting manifolds of the same object
so intersection edge loop with second object wouldn't confuse tesselator and correct
result would be returned.
Detecting of intersecting manifolds is based on AABB intersection check which leads
to some extra union operation called, but it's possible to speed things up from
Carve side so union operation of two not intersecting meshes would work faster.
Additional condition for running union for manifold is this manifolds intersects
AABB of second operand, so mesh topology wouldn't be changed at all in areas
where there's definitely no intersection between operands. It might be improved
so only manifolds which actually intersects second operand would be joined
together, but it'll slow things down a bit and prefer to do it only if it'll
be really a problem.

Additional change is fixed memory leak when boolean operation fails to run -
it was missed "delete" call if exception happens in Carve library.

From side effects of this change might be named boolean operation between
suzanne and another object: suzanne is consist of three intersecting open
manifolds, so this new meshes preprocessing leads to missed eyes in result
because of failure of merging two open manifolds. Don't think making suzanne
work for all setups should really be a goal, it's a bit crappy mesh for CSG
algorithms.
2012-01-23 17:43:41 +00:00
Sergey Sharybin
d2f8be9aa2 Fix for compilation error when using scons and carve is disabled 2012-01-23 08:48:52 +00:00
Thomas Dinges
9dac61c74d Cycles Textures:
* Remove the "Use nodes" button, the TextureOutput node was never ported to trunk from the cycles branch.
2012-01-22 22:59:21 +00:00
Thomas Dinges
b3d5224390 Cycles UI:
* Use full width for the world sample as lamp properties
2012-01-22 22:43:21 +00:00
Mitchell Stokes
686ce92fe8 Committing patch "[#27676] Change window size/resolution in realtime" by me.
Description:
This patch allows the user to change the size of the window (or the resolution in fullscreen mode) using the new bge.render.setWindowSize() method. This only works in the Blenderplayer since it doesn't make a whole lot of sense for the embedded player.
2012-01-22 20:25:25 +00:00
Brecht Van Lommel
27e94f7cbe Fix #29935: missing cycles update/crash when removing world datablock form scene. 2012-01-22 13:56:39 +00:00
Brecht Van Lommel
3fa4b6ea7d Fix missing shadows with cycles world sample as lamp option, my mistake in
tweaking patch.
2012-01-22 13:26:59 +00:00
Campbell Barton
acfeb47aa3 use property definitions more consistant with other addons in trunk. (no functional change) 2012-01-20 18:31:23 +00:00
Brecht Van Lommel
5873301257 Sample as Lamp option for world shaders, to enable multiple importance sampling.
By default lighting from the world is computed solely with indirect light
sampling. However for more complex environment maps this can be too noisy, as
sampling the BSDF may not easily find the highlights in the environment map
image. By enabling this option, the world background will be sampled as a lamp,
with lighter parts automatically given more samples.

Map Resolution specifies the size of the importance map (res x res). Before
rendering starts, an importance map is generated by "baking" a grayscale image
from the world shader. This will then be used to determine which parts of the
background are light and so should receive more samples than darker parts.
Higher resolutions will result in more accurate sampling but take more setup
time and memory.

Patch by Mike Farnsworth, thanks!
2012-01-20 17:49:17 +00:00
Mike Erwin
480b1030f9 added support for the 3Dconnexion SpaceMouse Pro -- tested on Linux w/ spacenavd, Macs need latest driver (Intel only (grumble)), Windows should be good as well but have not tested 2012-01-19 06:14:50 +00:00
Brecht Van Lommel
3ce32c3fec Fix small code issue pointed out by nico_ga, was doing negation on unsigned type,
didn't seem to break anything though.
2012-01-18 22:36:12 +00:00
Campbell Barton
361ffc5784 allow building without xinput again 2012-01-18 22:32:33 +00:00
Sergey Sharybin
242a800d34 Fix #25581: No pressure sensitivity in sculpt mode
Tablet mode (stylus/eraser) wasn't properly set when pen was already hovering over
tablet surface when opening blender (i.e. in cases when blender was opened using
stylus tap).

Issue resolved by setting tablet mode when handling tablet's motion event too.
2012-01-18 11:25:30 +00:00
Campbell Barton
7001747cdc ghost tests weren't building and added some comments to ghost docs. 2012-01-18 10:16:39 +00:00
Campbell Barton
2019f636b0 misc small changes and bmesh support for testing script 2012-01-17 18:01:16 +00:00
Sergey Sharybin
7a85ad51bf Compilation error when using mingw+scons
Error was caused by boost library (which doesn't seem to be working with Cycles too
when compiling with mingw). Switched mingw to use TR1 unordered collections. Also,
there was re-declaration of strcasecmp when mingw is used.

Additional changes are related on using own process spawning when BF_TOOLSET is set to
mingw. Seems to be working fine now (i've got too long command line error) and no
warning are supressing now (as it was told in comment for commented own process spawning).
2012-01-17 10:32:17 +00:00