Commit Graph

3514 Commits

Author SHA1 Message Date
Brecht Van Lommel
60ca0558c0 Fix issue in last subsurface commit with branched path tracing, was rendering too bright. 2013-08-24 15:36:14 +00:00
Brecht Van Lommel
722d0d92ad Cycles: reduce noise using regular path tracing + subsurface scattering with
new cubic and gaussian falloff. Like the branched path tracer, this will now
shade all intersection points instead of using one at random.
2013-08-24 15:02:08 +00:00
Campbell Barton
af1c274be7 skip building moto if its not needed. 2013-08-24 10:23:41 +00:00
Campbell Barton
b97334f992 add GPL header to treehash.c and add missing includes to cmake. 2013-08-24 03:17:28 +00:00
Thomas Dinges
8b20dfe60e Cycles:
* Fix Cycles using wrong AA sample values, after integrator renaming.
2013-08-24 00:27:20 +00:00
Brecht Van Lommel
e25ad0778f Fix #36545: crash with branched path tracing, correlated multi-jittered
sampling and subsurface scattering.
2013-08-23 23:04:50 +00:00
Bastien Montagne
5b83a89c81 Followup to r59434 : py UI scripts edits.
Notes:
* Made those edits by full checking of py files, so I should have spoted most needed edits, yet it remains quite probable I missed a few ones, we'll fix if/when someone notice it...
* Also made some cleanup "on the road"!
2013-08-23 20:41:21 +00:00
Brecht Van Lommel
01e22d1b9f Cycles: more code refactoring to rename things internally as well. Also change
property name back so we keep compatibility.
2013-08-23 14:34:34 +00:00
Brecht Van Lommel
22f4874877 Cycles: change Progressive sampling option in UI to an enum of "Path Tracing"
and "Branched Path Tracing", to try to make it more clear that this is not
related to progressive refinement, non-progressive was always a bad name anyway.
2013-08-23 14:08:40 +00:00
Brecht Van Lommel
805cca3903 Fix clang compile warning. 2013-08-23 14:08:39 +00:00
Thomas Dinges
f560d25666 Code cleanup / Cycles:
* Some style tweaks for hair code.
2013-08-23 12:19:35 +00:00
Thomas Dinges
e203c4c390 Cycles / Sampling UI:
* Do not show Total Samples print for Progressive, when Square Samples are disabled. In this case it's obvious even without the print. :)
2013-08-23 11:39:48 +00:00
Campbell Barton
e8dced9074 style cleanup: pep8 2013-08-23 04:04:46 +00:00
Thomas Dinges
fc9d4bdf73 Cycles / Sampling UI:
* Add a "Total Samples" info at the bottom of the panel.
This makes understanding the Non-Progressive integrator easier, as it displays how many samples are used for the different ray types. 

* Rename Squared Samples to Square samples, to indicate that the action is not already done. The new Total Samples info should make this easier to understand now as well. Also added back for Progressive integrator, for consistency. 

Screenshot:
http://www.pasteall.org/pic/show.php?id=57980
2013-08-22 19:57:56 +00:00
Brecht Van Lommel
0b42f14079 Fix #36526: SSS + hair crash after recent changes. 2013-08-21 12:20:38 +00:00
Brecht Van Lommel
5d97c93c08 Fix compiler warning due to undefined BVH_FUNCTION_FEATURES with patch by Campbell,
and a coverity warning about use of uninitialized variables with OSL.
2013-08-20 18:25:59 +00:00
Thomas Dinges
605f7f4b9f Code cleanup / Cycles:
* Remove unused hair presets enum.
2013-08-20 11:22:26 +00:00
Campbell Barton
f3654ce6b6 fix incorrect docs [#36518] Vector.rotate() does not return value as documented 2013-08-20 08:41:34 +00:00
Sergey Sharybin
ba6b83d63d Get rid of PATH_MAX in Ghost System X11
The reason of this is because PATH_MAX is not guaranteed
to be defined on all platforms and Hurd doesn't define it.

So either we need to support arbitrary long file path or
we need to define own maximum path length.

The rule here would be:

- If it's not big trouble to support arbitrary long paths
  (i.e. in ghost by using std::string instead of char*)
  then arbitrary long path shall be implemented.

- For other cases to use PATH_MAX please include BLI_fileops.h
  which takes care of making sure PATH_MAX is defined.

Additional change: get rid of own changes made yesterday
which were supposed to make storage.c work fine in cases
PATH_MAX is not define, but on the second though it lead
to unneeded complication of the code.

Thanks Campbell for review!
2013-08-20 08:33:04 +00:00
Campbell Barton
20fdea918d code cleanup: confirm include guards to our convention 2013-08-19 14:40:16 +00:00
Sergey Sharybin
cbfd2a8e62 Apparently sizeof(unsigned) is 4 bytes on both 32 and 64 bit platforms
For now assume sizeof(int) == 4 for all supported platforms, could be
changed in the future.

Added an assert to functions which depends on this this, so we'll
easily notice bad things happening.
2013-08-19 14:03:44 +00:00
Bastien Montagne
c79e175d9b Fix [#36454] 'Tiles' settings in Render/Performance panel don't respect keyframes
These are not animatable! Note this is the case of most (all?) render settings, maybe we should go over both Cycles and internal ones, there are still quite a bunch of them that are marked as animatable... :/
2013-08-19 13:30:17 +00:00
Sergey Sharybin
499ccf731b Forgot this in previous commit
Solves compilation issues on Win and OSX

--
svn merge -r59180:59181 ^/branches/soc-2013-depsgraph_mt
2013-08-19 10:53:10 +00:00
Sergey Sharybin
c0f8e15295 Speedup for guarded allocator
- Re-arrange locks, so no actual memory allocation
  (which is relatively slow) happens from inside
  the lock. operation system will take care of locks
  which might be needed there on it's own.

- Use spin lock instead of mutex, since it's just
  list operations happens from inside lock, no need
  in mutex here.

- Use atomic operations for memory in use and total
  used blocks counters.

This makes guarded allocator almost the same speed
as non-guarded one in files from Tube project.

There're still MemHead/MemTail overhead which might
be bad for CPU cache utilization
2013-08-19 10:51:40 +00:00
Sergey Sharybin
efa836531e Commit atomic operations file
Not currently used, but needed for some further changes
2013-08-19 10:44:18 +00:00
Sergey Sharybin
018ab045e3 Added check for whether thread lock is being removed while thread is using guarded alloc.
--
svn merge -r58788:58789 ^/branches/soc-2013-depsgraph_mt
2013-08-19 10:38:27 +00:00
Campbell Barton
47c23750e8 style cleanup: indent/whitespace 2013-08-19 01:48:44 +00:00
Thomas Dinges
676b019846 Cycles:
* Fix 16 byte alignment for constant hair kernel data.
2013-08-18 22:25:37 +00:00
Thomas Dinges
8080c10c32 Cycles / SSS:
* OSL rendered Black with Compatible Fallof option, fixed. 

Note: OSL uses compatible scattering when "Compatible" or "Bicubic" is selected. I guess compatible will be removed later? If not we need to fix this properly.
2013-08-18 20:49:58 +00:00
Stuart Broadfoot
a71f84606a Fix compile of last commit 2013-08-18 15:09:51 +00:00
Brecht Van Lommel
b9ce231060 Cycles: relicense GNU GPL source code to Apache version 2.0.
More information in this post:
http://code.blender.org/

Thanks to all contributes for giving their permission!
2013-08-18 14:16:15 +00:00
Brecht Van Lommel
d43682d51b Cycles: Subsurface Scattering
New features:

* Bump mapping now works with SSS
* Texture Blur factor for SSS, see the documentation for details:
http://wiki.blender.org/index.php/Doc:2.6/Manual/Render/Cycles/Nodes/Shaders#Subsurface_Scattering

Work in progress for feedback:

Initial implementation of the "BSSRDF Importance Sampling" paper, which uses
a different importance sampling method. It gives better quality results in
many ways, with the availability of both Cubic and Gaussian falloff functions,
but also tends to be more noisy when using the progressive integrator and does
not give great results with some geometry. It works quite well for the
non-progressive integrator and is often less noisy there.

This code may still change a lot, so unless you're testing it may be best to
stick to the Compatible falloff function.

Skin test render and file that takes advantage of the gaussian falloff:
http://www.pasteall.org/pic/show.php?id=57661
http://www.pasteall.org/pic/show.php?id=57662
http://www.pasteall.org/blend/23501
2013-08-18 14:15:57 +00:00
Stuart Broadfoot
2fd11a6617 Updates for the Cycle Hair UI. With the following changes
- Removed the cycles subdivision and interpolation of hairkeys.
- Removed the parent settings.
- Removed all of the advanced settings and presets.
- This simplifies the UI to a few settings for the primitive type and a shape mode.
2013-08-18 13:41:53 +00:00
Sergey Sharybin
58d7ae891d Blender might be compiled without guardedalloc again
This is useful for benchmark tests, to make CPU cache
utilization as good as we could with current design.
2013-08-15 07:36:56 +00:00
Joerg Mueller
c8f75fb5b1 Adding a new state for sound handles in audaspace: stopped.
Now sounds that stopped playing but are still kept in the device can be differentiated from paused sounds with this state.
This should also fix the performance issues mentioned in [#36466] End of SequencerEntrys not set correctly.
Please test if sound pausing, resuming and stopping works fine in the BGE and sequencer, my tests all worked fine, but there might be a use case that needs some fixing.
2013-08-14 21:21:00 +00:00
Thomas Dinges
2c2206a272 Cycles:
* Remove an unneeded return in shader_bsdf_eval(), function is void. 
* if / else if tweak in shader_bsdf_ao().
2013-08-14 19:38:14 +00:00
Campbell Barton
2f5e10f7b8 include order change for osl, fixes gcc compile error - undefined uintptr_t 2013-08-14 06:51:18 +00:00
Thomas Dinges
8cda3264bd Code cleanup:
* Some typo fixes.
2013-08-13 08:43:31 +00:00
Lukas Toenne
795fa1f199 Fix #36437 Cycles no longer rendering Emitter object (Particle Systems). The change r58999 was ignoring the "show_emitter" setting by particles (the result would be the same as long as hair was not
used). If particle emitters are forced to show all other of the usual duplicator hiding should be disabled.
2013-08-12 06:53:17 +00:00
Thomas Dinges
9dfd2823c4 Code cleanup / Cycles:
* Remove unused "PathThroughput" variable.
* Don't compile unused voronoi code, we only use Distance Squared atm. 
* Various typo and comment fixes.
2013-08-11 16:55:24 +00:00
Thomas Dinges
48ae40ccdf Code cleanup / Cycles:
* Rename "curve_kernel_data" to just "curve", to avoid redundant naming.
2013-08-11 15:27:04 +00:00
Thomas Dinges
30f279be26 Code cleanup / Cycles:
* Remove code for the unused Wave texture variations. 

We have quite some unused code in the texture area, I guess it doesn't harm to clean a bit up here. 
We can always get the code back from SVN if we need something.
2013-08-10 00:52:57 +00:00
Thomas Dinges
743a7a4a4b Cycles:
* GPU kernel can now be compiled without __NON_PROGRESSIVE__ again, was broken after my last commit. Also add a check for have_error(), in case the GPU kernel comes without Non-Progressive, to avoid a crash.

* Don't compile progressive kernel twice on CPU, if __NON_PROGRESSIVE__ would be disabled there.
2013-08-09 20:03:49 +00:00
Brecht Van Lommel
be7b4e26b1 Fix cycles not rendering with 1x1 resolution anymore, not so common for users
but nice for debugging.
2013-08-09 19:55:46 +00:00
Brecht Van Lommel
fd263bf725 Fix cycles passes UI panel to line up better. 2013-08-09 19:55:45 +00:00
Thomas Dinges
a18112249d Cycles / Non-Progressive integrator:
* Non-Progressive integrator is now available on the GPU (CUDA, sm_20 and above). 

Implementation details:
* kernel_path_trace() has been split up into two functions:
kernel_path_trace_non_progressive() and kernel_path_trace_progressive().

* We compile two CUDA kernel entry functions (in kernel.cu) for the two integrators, they are still inside one .cubin file but due to the kernel separation there should be no performance problem. I tested with the BMW file on my Geforce 540M and the render times were the same for 100 samples (1.57 min in my case).

This is part of my GSoC project, SVN merge of r59032 + manual merge of UI changes for this from my branch.
2013-08-09 18:47:25 +00:00
Brecht Van Lommel
9d9c64582b Fix #36355: cycles render of objects with both duplis and hair would not render
the hair in some cases.
2013-08-07 19:02:15 +00:00
Campbell Barton
4f29aeeff2 code cleanup: some structs were declaring data when only typedef's were intended, make local vars and functions static. 2013-08-07 03:44:05 +00:00
Thomas Dinges
da4679f6d8 * Make MSVC happy. 2013-08-06 23:47:47 +00:00
Campbell Barton
d58a385084 minor edits to float/double conversion suggested by DingTo 2013-08-06 23:34:47 +00:00