Commit Graph

2880 Commits

Author SHA1 Message Date
Brecht Van Lommel
54729df020 Cycles OSL: diffuse_toon and specular_toon closures. These are toon shaders with
a size parameter between 0.0 and 1.0 that gives a angle of reflection between
0° and 90°, and a smooth parameter that gives and angle over which a smooth
transition from full to no reflection happens.

These work with global illumination and do importance sampling of the area within
the angle. Note that unlike most other BSDF's these are not energy conserving in
general, in particular if their weight is 1.0 and size > 2/3 (or 60°) they will
add more energy in each bounce.

Diffuse: http://www.pasteall.org/pic/show.php?id=42119
Specular: http://www.pasteall.org/pic/show.php?id=42120
2012-12-19 21:17:16 +00:00
Sergey Sharybin
6571713ddb Ambient occlusion baker from multi-resolution mesh
This implements AO baking directly from multi-resolution mesh with much
less memory overhead than regular baker.

Uses rays distribution implementation from Morten Mikkelsen, raycast
is based on RayObject also used by Blender Internal.

Works in single-thread yet, multi-threading would be implemented later.
2012-12-18 17:46:42 +00:00
Bastien Montagne
ab2c273b12 Added GPL header to sconscripts!
Also changed shebang to '#!/usr/bin/env python', this is more portable across unixes...
2012-12-17 08:01:43 +00:00
Brecht Van Lommel
a0855a95db Cycles: add "Textures" panel in particle properties, to make it possble to add
textures when Cycles is selected as render engine.
2012-12-16 12:55:52 +00:00
Brecht Van Lommel
176292067e Cycles OSL: small optimization to geometry node, tangent output still was
not properly optimized out in some cases.

For reference, setting this will give detailed information about OSL shaders:
export OSL_OPTIONS="statistics:level=1,debug=1,llvm_debug=1"
2012-12-16 09:37:32 +00:00
Brecht Van Lommel
caf2324d56 Fix cycles build error with OSL disabled. 2012-12-15 20:43:25 +00:00
Jens Verwiebe
b0edc38856 OSX: makeKeyAndOrderFront would show window from orderedWindows list on every loop, so use makeKeyWindow only to avoid flicker when closing app 2012-12-15 18:32:53 +00:00
Jens Verwiebe
f98c2c936c OSX/availability: use of the numerical value instead of the symbol in the #if MAC_OS_X_VERSION_MIN_REQUIRED comparison clause: If the code is loaded on an older system that does not include the symbol definition, the comparison still works 2012-12-15 11:15:05 +00:00
Brecht Van Lommel
06888b7beb Cycles OSL minor optimizations: recycle shading context, don't do memory
allocations for trace data, avoid some virtual function calls. Only helps
a few percentages.
2012-12-15 10:18:42 +00:00
Brecht Van Lommel
f1d487d1c4 Fix mac build error with SDK < 10.7, this version is not then defined then as
pointed out by Patrick Boelens on the mailing list.
2012-12-14 20:56:14 +00:00
Brecht Van Lommel
0f5b5bb5f1 Cycles: make "Open Shading Language" a boolean toggle, the other option "GPU Compatible" was confusing. 2012-12-14 15:26:49 +00:00
Jens Verwiebe
3d99ba125f OSX/nativePixel: fix compile for OSX < 10.7 2012-12-14 08:48:48 +00:00
Ton Roosendaal
d06876f45a Bugfix, IRC report
(Error in 2.65 release too)

Mac OS X: on closing Blender, it 'flashed', which appeared to be a white window opening
and closing quickly. Caused by code trying to send focus to another opened window, and
accidentally focusing the closed one - causing it to reopen.
2012-12-13 14:25:15 +00:00
Campbell Barton
60808c5ed6 disable openmp thread assert, would fail in cases where the caller was locking for its self (sculpt mode) 2012-12-13 10:37:04 +00:00
Brecht Van Lommel
5d520c2b5a Cycles: shuffle addon import statements a bit to try to fix a strange import
error in some builds.
2012-12-13 08:45:55 +00:00
Jens Verwiebe
8af6721eb5 OSX: make cmake and scons both compile jack and ndof with newer sdk's 2012-12-12 19:54:14 +00:00
Sergey Sharybin
fc65922124 GHOST should now be finally fixed 2012-12-12 19:20:36 +00:00
Ton Roosendaal
12b642062c Holiday coding log :)
Nice formatted version (pictures soon):
http://wiki.blender.org/index.php/Dev:Ref/Release_Notes/2.66/Usability

Short list of main changes:

- Transparent region option (over main region), added code to blend in/out such panels.
- Min size window now 640 x 480
- Fixed DPI for ui - lots of cleanup and changes everywhere. Icon image need correct size still, layer-in-use icon needs remake.
- Macbook retina support, use command line --no-native-pixels to disable it
- Timeline Marker label was drawing wrong
- Trackpad and magic mouse: supports zoom (hold ctrl)
- Fix for splash position: removed ghost function and made window size update after creation immediate
- Fast undo buffer save now adds UI as well. Could be checked for regular file save even...
  Quit.blend and temp file saving use this now.
- Dixed filename in window on reading quit.blend or temp saves, and they now add a warning in window title: "(Recovered)"
- New Userpref option "Keep Session" - this always saves quit.blend, and loads on start.
  This allows keeping UI and data without actual saves, until you actually save.
  When you load startup.blend and quit, it recognises the quit.blend as a startup (no file name in header)
- Added 3D view copy/paste buffers (selected objects). Shortcuts ctrl-c, ctrl-v (OSX, cmd-c, cmd-v). 
  Coded partial file saving for it. Could be used for other purposes. Todo: use OS clipboards. 
- User preferences (themes, keymaps, user settings) now can be saved as a separate file.
  Old option is called "Save Startup File" the new one "Save User Settings".
  To visualise this difference, the 'save startup file' button has been removed from user preferences window. That option is available as CTRL+U and in File menu still.
- OSX: fixed bug that stopped giving mouse events outside window.
  This also fixes "Continuous Grab" for OSX. (error since 2009)
2012-12-12 18:58:11 +00:00
Brecht Van Lommel
5616c7a058 Cycles: disable scaling up of ray differentials after diffuse/glossy bounce, this
isn't working well for OSL texture filtering and wasn't very helpful to begin
with, a better solution should be possible.
2012-12-12 14:43:07 +00:00
Brecht Van Lommel
3945979f2b Fix #33486: cycles CPU image textures were offset wrong by half a pixel compared
to OpenGL/CUDA/OSL rendering.
2012-12-12 09:17:21 +00:00
Brecht Van Lommel
3759c10e5c Fix #33485: cycles OSL now autodetects the presence of emission and transparent
closures to enable multiple importance sampling and transparent shadows.
2012-12-12 06:51:06 +00:00
Campbell Barton
21a2660290 assert in debug builds if MEM_ alloc's are called in openmp threads.
note: the caller can do locking to prevent errors - but this isn't being done in blender yet, so this prevents accidental allocs in openmp for now.
2012-12-12 04:41:23 +00:00
Campbell Barton
c40030a36c replace BLI_array_declare with BLI_array_staticdeclare() and BLI_array_alloca() for smaller arrays. 2012-12-12 02:48:03 +00:00
Thomas Dinges
188718a3d5 OSL Shader Files:
* Simplify default color values, where each component was the same.
* Initialize closures as Null Closure, rather than assigning an existing closure, gets overwritten anyways.
2012-12-11 16:06:03 +00:00
Brecht Van Lommel
8d4bd2cf3b Cycles OSL: add diffuse_ramp closure in addition to phong_ramp. 2012-12-11 14:39:41 +00:00
Brecht Van Lommel
43c04eefe3 Cycles: RGB and Vector Curves nodes now supported, with the limitation that the
range must be left to the default (0..1 and -1..1).
2012-12-11 14:39:37 +00:00
Brecht Van Lommel
7c81952179 Cycles: trick to make building with OSL trunk work as well, it has a different
name for LoadMemoryShader so we make it call the right name depending on which
is available.
2012-12-11 14:39:32 +00:00
Brecht Van Lommel
68efcca5ea Fix issue reported in #32174: IK solver stretch was less stable after a code refactor
commit, epsilon was supposed to be 0.01 instead of 0.001.
2012-12-11 14:39:28 +00:00
Brecht Van Lommel
fd3068281c Fix OS X warning on startup about using deprecated function, when building against 10.8 SDK. 2012-12-11 14:39:26 +00:00
Daniel Genrich
e089c5a976 Bugfix [#33467] Fluid Simulations Speed factor animated wrong result
Thanks to Brecht for providing a patch and example blend.
I changed and extended it a bit since there was another bug in that loop.
2012-12-11 13:02:42 +00:00
Campbell Barton
08f39daf4e cmake wouldn't build since it was missing files added in r52858. 2012-12-11 05:57:42 +00:00
Joerg Mueller
245345fba5 Audaspace:
Implemented forgotten Calculator classes from boost migration.
2012-12-10 16:58:47 +00:00
Brecht Van Lommel
919311a654 Fix cycles OSL + AO enabled in world settings not working correct. 2012-12-10 12:56:56 +00:00
Brecht Van Lommel
98fab9e530 Fix #33454: cycles wasn't hiding the original object used for dupliverts or
duplifaces like blender internal.
2012-12-09 12:43:40 +00:00
Brecht Van Lommel
369b9fcf0f Fix missing mapping and influence panel for particles when cycles is selected
as render engine. Still missing is colors and texture slots, but that's too
tricky to fix this close to release.
2012-12-07 11:30:40 +00:00
Sergey Sharybin
77efd71cf8 Disable multisamples on windows for intel cards
This doesn't work nice currently and there's no simple workaround for this,
it'll require lots of statistics about cards and some further investigation
on supported combination of draw methods and multisamples supports.

For the release better be more stable and do not deliver dangerous option.
2012-12-06 16:18:35 +00:00
Brecht Van Lommel
c20292f624 Fix mapping node min/max not working OSL. 2012-12-06 09:13:57 +00:00
Miika Hamalainen
8b477463d1 Fix #33411: Smoke simulator using uninitialized noise tile
If loading an existing FFT noise tile failed the tile in memory was left uninitialized.
2012-12-05 17:58:24 +00:00
Brecht Van Lommel
2b962212c8 Fix #33411: crash baking smoke with FFT high resolution.
CMake had FFTW disabled by default, and when FFTW was not enabled it lead to
uninitialized memory usage. Now it falls back to wavelet if there is no FFTW,
and I've enabled it by default in CMake. If it's not found on Linux it will get
disabled automatically.
2012-12-05 15:46:31 +00:00
Brecht Van Lommel
690359eb8d Fix crash opening some .blend files on OS X 10.8 with double click or drag and
drop onto the application.

It seems something changed in the operating which makes our method of releasing
windows crash. Previously we called [m_window release], but on 10.8 this does
not remove the window from [NSApp orderedWindows] and perhaps other places,
leading to crashes. So instead we set setReleasedWhenClosed back to YES right
before closing, which will then do the cleanup for us.
2012-12-05 06:30:17 +00:00
Campbell Barton
767bfba808 cmake was missing some header files. 2012-12-04 14:43:42 +00:00
Konrad Kleine
38dcce2da2 FIX: OSL mix shader clamps 2nd color component to 3rd one.
Previously the OSL Mix shader node was clamping the 2nd color component (green) to the 3rd color component (blue). Now every component is clamped on its own.
2012-12-04 08:40:24 +00:00
Brecht Van Lommel
a9d889cba4 Fix #33405: preview render getting stuck in a particular .blend file, ObjectKey
operator< had wrong brackets, changed it now to be more clear.

Fix #33404: crash GPU rendering with OSL option still enabled. There was a check
to disable OSL in this case, but it shouldn't have modified scene->params because
this is used for comparison in scene->modified().
2012-12-04 07:48:09 +00:00
Campbell Barton
c0078a9879 osl style cleanup and update man-page. 2012-12-04 03:18:08 +00:00
Brecht Van Lommel
dbd44e3bf5 Fix scons not installing closure/ directory for runtime compiles of CUDA kernel. 2012-12-03 16:51:05 +00:00
Campbell Barton
4a9c522125 quiet float -> double conversion warnings and do some osl style edits. 2012-12-03 13:58:08 +00:00
Brecht Van Lommel
41f98978e3 Fix cycles issue when NaN is used for RGB ramp, can access array out of bounds then.
OSL noise() function is generating NaN's in certain cases, fix for that goes to our
OSL branch.

Also add missing minimum weight and max closure checks to OSL, forgot to add these
when fixing another bug.
2012-12-03 12:21:44 +00:00
Antony Riakiotakis
4e7a4960f7 get rid of annoying redefinition warning on cycles compilation for mingw64 2012-12-02 20:08:11 +00:00
Bastien Montagne
818a345be3 Silent a bunch of gcc warnings (usually dummy, but noisy!). 2012-12-02 16:01:06 +00:00
Campbell Barton
432193552c fix GhostSDL displaying text in multiple views.
add support for multi-sample.
2012-12-02 15:58:26 +00:00