Commit Graph

3209 Commits

Author SHA1 Message Date
Campbell Barton
9d4be17de4 style cleanup 2013-02-04 00:05:15 +00:00
Brecht Van Lommel
b31d9c6cd0 Fix #34087: cycles shadow pass not properly normalized for non-progressive integrator
with > 1 samples for a lamp.
2013-02-03 13:10:56 +00:00
Stuart Broadfoot
35e89d9cfc Cycles Hair: Fixed hair shape and inclusion of multiple attributes for triangle primitives
When using triangle primitives this fix enables 'closed tip'. 

UVs and vertex colours are added when using triangle primitives for hair.

Two new preset modes have also been included to allow easy access to curves and triangle planes.
2013-02-02 01:49:57 +00:00
Brecht Van Lommel
736d7810a0 Fix an issue with the new cycles lamp MIS option not working correct with
multiple lamps.
2013-02-01 18:54:24 +00:00
Brecht Van Lommel
1a5d0edf43 Fix cycles computing UV map tangents when they weren't needed. 2013-02-01 18:00:30 +00:00
Campbell Barton
2a71e4e4f0 make WITH_HEADLESS build again. 2013-02-01 08:24:18 +00:00
Sergey Sharybin
7dc33e3ef8 Move opencl and reigidbody from source/blender/ to intern/
This modules does not depend on any blender-specific data
structures or algorithms and due to our policy better be
placed to intern/

Shall be no functional changes, tested CMake and SCons on
Linux, hopefully other platforms will work as well.

P.S. SVN history shall be preserved for the files.
2013-02-01 06:24:49 +00:00
Campbell Barton
6341919354 code cleanup: make wmEvent's 'const' in interface code (reduces manual checking that they are not modified). 2013-02-01 01:01:20 +00:00
Thomas Dinges
d319d68c65 OSL 1.3x / Windows 64:
* Added missing define into SConscript file. This also makes r54232 obsolete, so removing this again.
2013-01-31 17:38:09 +00:00
Brecht Van Lommel
122a2084b5 Attempt to fix cycles OSL link error on windows 64 bit. 2013-01-31 13:44:03 +00:00
Campbell Barton
dbf54dacf7 Add Xinerama support for GHOST_GetMainDisplayDimensions() so X11 works as it should (previously would include all monitors).
Now the active monitor size is used on startup. 
Currently the cursor position is checked for intersection with the monitor bounds to find the active screen.
2013-01-31 11:05:09 +00:00
Campbell Barton
73f301c3a8 add ghost function getAllDisplayDimensions, GHOST_GetAllDisplayDimensions
This returns the desktop size, not just the size of the active monitor, useful since this constrains the mouse and we dont have to detect the active monitor (which isn't so straightforward with xlib).

carbon/cocoa are TODO, they still use getMainDisplayDimensions().
2013-01-31 10:42:26 +00:00
Campbell Barton
c2ee59b777 initializing maximized/fullscreen windows in x11 would start normal, then maximize - causing noticeable flicker. 2013-01-31 05:55:57 +00:00
Brecht Van Lommel
b5c439db47 Fix cycles windows link errors when building with OSL master branch. 2013-01-30 21:58:47 +00:00
Brecht Van Lommel
f6f5d17a50 Fix #33984: cycles shadow pass problem with CUDA. 2013-01-30 17:04:51 +00:00
Brecht Van Lommel
dc0f4b5618 Cycles: make multiple importance sampling for lamps an option per lamp now,
disabled by default for backwards compatibility.
http://wiki.blender.org/index.php/Doc:2.6/Manual/Render/Cycles/Integrator
2013-01-30 15:57:15 +00:00
Campbell Barton
743b4f213e disable ubuntu unity workaround, causes issues with modifier keys held doun with multiple windows.
no time to fix now so disabling.
2013-01-30 13:44:24 +00:00
Sergey Sharybin
452a52575c Cycles material preview: fix for generated/packed/movie files
Issue was caused by cycles trying to find builtin images in a main
database and in case of preview render images are not in database,
they're just referenced by shader node tree.

Now builtin images in cycles have got void* pointer to store data
needed to load builtin images.

In case ob blender session, this pointer will store pointer from
PointerRNA for image datablock and used later to construct Image
class based on this pointer.

This also saves database lookup for final render which is nice :)

Reviewed by Brecht.
2013-01-30 13:42:12 +00:00
Campbell Barton
7b6a34a756 patch [#34039] Fix Alt key glitch on Unity desktop
by Shinsuke Irie (irie) with own minor changes.
2013-01-30 04:12:32 +00:00
Brecht Van Lommel
3eb800169f Cycles: collapse preview render panel by default. It's a matter of personal
preference, but it slows down 3D view rendering to have two renders going so
I rather disable it by default.
2013-01-29 17:30:26 +00:00
Stuart Broadfoot
6d2f104884 Cycles Hair: Addition of render settings and static BVH strand width scaling
Addition of a RNA function to toggle between the hair settings and rebuild the cache. This enables the usage of the render step, child number and full display percentage with f12 rendering.

A scaling to the strand radius has also been added for the static bvh. This only matches up with dynamic for uniform scaling.

A very small fix is included for multiple uvs/vertex colours when using child particles.
2013-01-29 12:32:43 +00:00
Brecht Van Lommel
5ac4b38a20 Cycles: preview rendering support for world/material/lamp.
Patch by Sergey, .blend by Thomas and some further tweaks by me.

Still to solve later: allow external engines to specify own preview .blend, for
now the code here is doing too much magic hacking on the preview scene still.
2013-01-28 17:37:51 +00:00
Thomas Dinges
431619e45b Windows compile fix:
* r54117 broke Windows, __func__ not declared.
2013-01-27 15:12:52 +00:00
Campbell Barton
9d36fade8f make MEM_reallocN and MEM_recallocN behave as libc's realloc() - alloc when receiving a NULL value. 2013-01-27 11:20:50 +00:00
Brecht Van Lommel
38c94e9194 Fix cycles crash that happened with mesh emission and diffuse/glossy ray
visibility disabled on some objects.
2013-01-25 02:00:57 +00:00
Ton Roosendaal
4477d59b76 Put back minimum window sizes on 320x240.
This didnt work well with making blender areas into windows.

Real fix: check such minimums based on what's in the window itself... or just
make scaling work flawless.
2013-01-24 17:57:38 +00:00
Sergey Sharybin
5e739ddae2 Added some code which helps troubleshooting issues caused by
non-threadsafe usage of guarded allocator.

Also added small chunk of code to check consistency of begin/end
threaded malloc.

All this additional checks are commented and wouldn't affect on
builds, however found them helpful to troubleshoot issues so
decided to commit it to SVN.
2013-01-24 08:14:05 +00:00
Stuart Broadfoot
976c6b7b6e Cycles Hair: Multiple vertex colours and UV coordinates
Added export of multiple UV coordinates and vertex colour attributes.

A debugging option to export the strands without using the cache has also been removed.
2013-01-23 17:15:45 +00:00
Brecht Van Lommel
543e06ce0e Fix #33915: tweak self intersection epsilon for motion blur a bit further, still
had some cases where there were artifacts. Also fix rendering error with shutter
time set to 0.
2013-01-23 16:56:02 +00:00
Sv. Lockal
36641078f8 Fix compilation with WITH_X11_XINPUT=OFF 2013-01-23 15:01:33 +00:00
Brecht Van Lommel
7bcbbe26d5 Fix #33905: cycles crash with bsdf node plugged twice into add shader. 2013-01-23 13:13:20 +00:00
Thomas Dinges
9ce9f6a477 Cycles:
* Small code cleanup of panel registering after Bullet merge.
2013-01-23 11:02:28 +00:00
Campbell Barton
47f23c1372 fix for blender quitting in X11 if you start blender with a tablet, unplug it, then open a new window. 2013-01-23 10:32:09 +00:00
Sergej Reich
2d8637946b rigidbody: Add rigid body simulation
Add operators to add/remove rigid body world and objects.
Add UI scripts.

The rigid body simulation works on scene level and overrides the
position/orientation of rigid bodies when active.
It does not deform meshes or generate data so there is no modifier.

Usage:
* Add rigid body world in the scene tab
* Create a group
* Add objects to the group
* Assign group to the rigid body world
* Play animation
For convenience the rigid body tools operators in the tools panel of the 3d view
will add a world, group and add objects to the group automatically so you only have
to press one button to add/remove rigid bodies to the simulation.

Part of GSoC 2010 and 2012.
Authors: Joshua Leung (aligorith), Sergej Reich (sergof)
2013-01-23 05:56:44 +00:00
Ton Roosendaal
8733150ac1 OSX 10.6 error - hiding code behind a respondsToSelector. 2013-01-22 19:06:51 +00:00
Ton Roosendaal
9e30e7cdaf Bug fix #33911
When you open a Blender window larger than a screen, Macs clip it to match the height,
but they allow the width to be more.

Problem is that this clipping happens after all window opening code. That causes
check for HiDPI mode to fail.

Now it checks it again on event GHOST_kEventWindowUpdate, which is only on startup.
2013-01-22 18:07:17 +00:00
Thomas Dinges
59b096ed00 Cycles:
* Disable Lamp MIS on sm_20. Still enabled for CPU and sm_21 and above.
2013-01-22 14:49:52 +00:00
Campbell Barton
62191d935c reverting r53798 to fix [#33831], it casued bug [#33921] 2013-01-22 07:10:42 +00:00
Stuart Broadfoot
4c67b23c8d Cycles Hair: Fix of cardinal curve intersection routine
Fixed some of my own mistakes in the cardinal curve intersection routine.
2013-01-21 00:58:14 +00:00
Bastien Montagne
cef730d969 Python i18n API. Many thanks to Campbell and Brecht for the reviews and suggestions!
This commit adds:
* A new bpy.app.translations module giving some info about locales/translation stuff (current active locale, all locales currently known by blender, all translation contexts currently defined, etc.).

* The ability for addons to feature translations, using the (un)register functions of above module.

* Also cleans up "translate py string when storing into RNA prop" by removing "PROP_TRANSLATE" string's subtype, and adding a PROP_STRING_PY_TRANSLATE flag instead (this way it is no more exposed to python...).

Addon translations work with py dictionaries: each addon features a dict {lang: {(context, message): translation, ...}, ...}, which is registered when the addon is enabled (and unregistered when disabled). 

Then, when a key (context, message) is not found in regular mo catalog, a cache dict for current locale is built from all registered addon translations, and key is searched in it.

Note: currently addons writers have to do all the work by hand, will add something (probably extend "edit translation" addon) to automate messages extraction from addons soon(ish)! To get a look to expected behavior from addons, have a look at render_copy_settings/__init__.py and render_copy_settings/translations.py (rather stupid example currently, but...). Once we have a complete process, I'll also update relevant wiki pages.
2013-01-20 17:29:07 +00:00
Nicholas Bishop
3447f2ade1 Add missing virtual destructor for VirtualMemoryAllocator
Fixes a warning from GCC 4.7.2.
2013-01-20 15:36:32 +00:00
Campbell Barton
f414d2980a code cleanup: remove some paranoid checks which would have crashed anyway earlier on.
Also some minor formatting.
2013-01-20 14:50:50 +00:00
Jason Wilkins
160dd1dc3b More win32 multimon (r53923). Changed getNumDisplays so that it will actually succeed. 2013-01-20 14:40:31 +00:00
Jason Wilkins
5a8d04bbb6 Add multimon support to GHOST_DisplayManagerWin32.cpp (It seemed to work before, but recent changes to GHOST_ASSERT caused it to abort if WITH_ASSERT_ABORT was configured). 2013-01-20 13:46:53 +00:00
Thomas Dinges
1a131171cb Cycles Test App:
* Fix compile for camera xml properties.
2013-01-17 22:51:54 +00:00
Thomas Dinges
61ce87e741 Cycles:
* Fix for [#33909]. If "Progressive" checkbox was disabled but device was GPU, it still used the amount of "aa_samples" instead of "samples"
2013-01-17 19:52:59 +00:00
Campbell Barton
60e5583933 add NULL check for XInput device, since its possible only one is valid. 2013-01-17 02:06:54 +00:00
Campbell Barton
9e7b954ed0 fix for GHOST/X11 using uninitialized memory for the tablets active state. (possible cause of reported glitches in tablet use). 2013-01-16 22:00:03 +00:00
Campbell Barton
6e7ee2649d style cleanup 2013-01-16 18:16:05 +00:00
Campbell Barton
cda2b7db0f fix for glitch in X11 with tablets.
Notices this while using continuous-grab, since this is disabled when the tablet is being used.
Quite often I would use the tablet then drag a button with the mouse but blender would still have the tablet enabled.
This error would cause other parts of blender to behave incorrectly too since wmEvents would have wmTabletData set, operators check for this in some cases.


The problem was blender didn't reliably get ProximityOut events, eg:
  moving the cursor outside the window with the tablet, then back over the window with the mouse -
  meant blender didn't get a 'ProximityOut' event and would keep the active stylus value set.

For now, when the processing events and the active stylus is set, run a check that the tablet is still in proximity.
2013-01-16 18:05:17 +00:00
Sergey Sharybin
b01233b07f Movies support for Cycles
This adds support of movie textures for Cycles rendering.

Uses the same builtin images routines as packed/generated images,
but with some extra non-rna hookups from blender_session side.

Basically, it's not so clear how to give access to video frames
via C++ RNA -- it'll require exposing ImBuf to API, doing some
threading locks and so. Ended up adding two more functions which
are actually bad level call, but don't consider it's so much bad
-- we have few bad calls already, which are actually related.

Changed a bit how builtin images names are passing to image
manager. Now it's not just an ID datablock name, but also a frame
number concatenated via '@' character, which makes itpossible to
easily know frame number to be used for movie images, without
adding extra descriptors to image manager.

Decoding of builtin name is a bit slower now, but it should be
still nothing in comparison with rendering complexity.

Also exposed image user's frame_current to python API, which
is needed to get absolute frame number of movie from node's
image user.

P.S. Generated/packed images are also using bad level call but
only does it to make things more clear here.  Either all images
are using C++ RNA here or no images does. That's the most clear
for now.
2013-01-16 17:07:25 +00:00
Thomas Dinges
c997f69bf9 UI / Scene Context:
* Made Color Management and Audio panel closed by default to save space. 
* Added COMPAT_ENGINES to color management panel.
2013-01-16 13:59:19 +00:00
Ton Roosendaal
b5cffb48ea Mac OS X, Intuos tablet fix
Touch input events map nicely to trackpad input now.
However, I noticed the event values are a factor 10 scaled larger compared
to other touch delta's. Makes using touch input on the tablet not so nice.

I found a hack to detect Wacom events, but if it works for more devices?

Anyway - for me the Wacom works perfectly smooth for view manipulations now.
2013-01-16 13:45:11 +00:00
Sergey Sharybin
2095b2cddb Fix #33877: Pressure Sensitivity stop after opening User Preferences Window
Issue was caused by opening the same device id twice and closing one of
descriptors on closing window. This used to close device used by other
windows.

Now moved all device-specific code to SystemX11, so opening and closing
happens only once.
2013-01-16 12:28:25 +00:00
Campbell Barton
f2cfe4b2e9 minor changes to ghost
- use WITH_ASSERT_ABORT define, so GHOST_ASSERT will abort.
- rename XTablet -> GHOST_TabletX11, was confusing since it was named like an xlib struct.
2013-01-16 01:10:06 +00:00
Campbell Barton
769ab3eed8 code cleanup:
- cycles ui used 'cscene' for scene.cycles and scene.cycles_curves
- style cleanup
2013-01-15 23:17:45 +00:00
Brecht Van Lommel
486abf01c6 Fix CUDA compile after last commit. 2013-01-15 20:13:19 +00:00
Stuart Broadfoot
3373b8154b Cycles Hair: Introduction of Cardinal Spline Curve Segments and minor fixes.
The curve segment primitive has been added. This includes an intersection function and changes to the BVH.

A few small errors in the line segment intersection routine are also fixed.
2013-01-15 19:44:41 +00:00
Brecht Van Lommel
0967b39be1 Fix #33838: light render passes for non-progressive integrator were not correct. 2013-01-15 19:17:51 +00:00
Thomas Dinges
f146317b09 Cycles:
* CUDA: Make it more clear that sm_12 and below is not supported.
* OpenCL: __KERNEL_SHADING__ was declared twice for nvidia opencl device.
* Some reshuffle of defines in kernel_types.h. No functional changes.
2013-01-15 19:02:17 +00:00
Brecht Van Lommel
6adfd91657 Fix #33830: cycles normal mapping was not quite correct, was not correctly
respecting the assumption that normal and tangent are interpolated without
normalization.
2013-01-15 16:35:05 +00:00
Campbell Barton
dfdf07c21a fix [#33831] "Alt" key is "Alt Window Deactivated"
Patch from Patrick Zulke (pazul)
2013-01-14 20:04:36 +00:00
Antony Riakiotakis
f2891d3731 For non-windows systems, check for CUDA compiler during runtime 2013-01-14 19:33:16 +00:00
Brecht Van Lommel
8869c135e3 Cycles: enable lamp multiple importance sampling on the GPU, seems to be
working ok with sm_20 and sm_21.
2013-01-14 17:52:11 +00:00
Sergey Sharybin
e5179bfefc Remove usage WITH_CYCLES_CUDA_BINARIES in code, use check for
precompiled cubins instead,

Logic here is following now:
- If there're precompiled cubins, assume CUDA compute is available,
  otherwise
- If cuda toolkit found, assume CUDA compute is available
- In all other cases CUDA compute is not available

For windows there're still check for only precompiled binaries,
no runtime compilation is allowed.

Ended up with such decision after discussion with Brecht. The thing
is, if we'll support runtime compilation on windows we'll end up
having lots of reports about different aspects of something doesn't
work (you need particular toolkit version, msvc installed, environment
variables set properly and so) and giving feedback on such reports
will waste time.
2013-01-14 17:30:33 +00:00
Sergey Sharybin
36f44c6e02 Change some big functions from __device_inline to __device, which
makes CPU kernel compilation much faster when using MSVC.

Sideeffect of this change is that CPU rendering is few percent
faster now. CUDA rendering is the same speed.
2013-01-14 17:30:20 +00:00
Brecht Van Lommel
6cdbd1b1aa Fix #33868: cycles sample as lamp for world background not rendering with the
correct intensity on the GPU.
2013-01-14 16:24:47 +00:00
Sergey Sharybin
f102953634 Further tweaks to support libav from wheezy 2013-01-13 17:54:09 +00:00
Sergey Sharybin
21e5451c3b Tweak to ffmpeg compatibility layer to support debian's wheezy libav 2013-01-13 17:10:10 +00:00
Ton Roosendaal
fa759d8ffd Mac HiDPI ("retina") handling:
OK - so you have this nice crisp screen, and still you want to add extra 
monitors to the laptop! That means Blender should switch back and forth to HiDPI 
modes, when you move a window to another monitor.

This code makes the pixelsize scale factor a window property, and handles
an event when a window moves to another monitor. It then changes the
native pixelsize nicely and refreshes entire UI.

You can also have one Blender window on high, and other on low resolution.

Stretching a Blender window from 1 monitor to the other works too, but that
is Apple magic handling it.
2013-01-12 17:07:49 +00:00
Sergey Sharybin
aab01c86cf Patch #33837: ffmpeg1.1 and libav9.1 compatibility update
Patch makes it possible to compile blender with recent ffmpeg
and libav libraries, mainly by getting rid of deprecated API.

Original patch by Campbell Barton with own modifications to
support compilation with older ffmpeg versions.

This patch could break compatibility of FFV1 videos playing
back in older players, mainly because of alpha support changes.
Preserving compatibility with such players became a headache
and think it's high time to get rid of workarounds here.
2013-01-12 12:51:10 +00:00
Sergey Sharybin
7a90af7b5a Packed and generated images support for Cycles
This commit adds support of packed and generated images
for Cycles when using SVM backend. Movies are still not
supported. This changes also doesn't touch OSL which is
much less trivial to adopt for any images which are not
saved to disk.

Implementation details:

- When adding images to Image Manager is now possible
  to mark image as builtin. Builtin images will bypass
  OIIO loader and will use special loading callbacks.

- Callbacks are set by Blender Session and they're
  using C++ RNA interface to obtain needed data (pixels,
  dimensions, is_float flag).

- Image Manager assumes file path is used as reference
  to a builtin images, but in fact currently image
  datablock name is used for reference. This makes it
  easy to find an image in BlendData database.

- Added some extra properties to Image RNA:
  * channels, which denotes actual number of channels
    in ImBuf. This is needed to treat image's pixels
    correct (before it wasn't possible because API
    used internal number of channels for pixels which
    is in fact doesn't correlate with image depth)
  * is_float, which is truth if image is stored in
    float buffer of ImBuf.

- Implemented string lookup for C++ RNA collections
  for cases there's no manual lookup function.

OSL is not supported because it used own image loading
and filtering routines and there's seems to be no API
to feed pre-loaded pixels directly to the library.

Think we'll either need to add some API to support
such kind of feeding or consider OSL does not have
support of packed images at all.

Movies are not supported at this moment because of lack
of RNA API to load specified frame. It's not difficult
to solve, just need to consider what to best here:
* Either write some general python interface for ImBuf
  and use it via C++ API, or
* Write a PY API function which will return pixels for
  given frame, or
* Use bad-level BKE_* call

Anyway, small steps, further improvements later.

Reviewed by Brecht, thanks!
2013-01-12 10:59:13 +00:00
Campbell Barton
4d7583b66f code cleanup: warnings, also add check in crash handler that a wmWindowManager is present. 2013-01-11 03:21:24 +00:00
Brecht Van Lommel
0deb074f1c Fix #33824: cycles non-progressive render mode did not do correct path termination,
leading to too much noise when the min bounce setting was lower than max bounce.
2013-01-10 19:28:16 +00:00
Brecht Van Lommel
057f0a63d4 Fix #33821: cycles background intensity fix had uninitialized memory usage
for area lights.
2013-01-10 17:37:26 +00:00
Brecht Van Lommel
04754cc112 Fix too bright result in background multiple importance after recent changes. 2013-01-10 12:35:09 +00:00
Brecht Van Lommel
8cf374d401 Cycles: different fix for perlin noise generating nan values, now check for
the result to be finite afterwards which is a bit faster and works for OSL
too without needing to slow down OSL itself.
2013-01-09 22:06:03 +00:00
Brecht Van Lommel
ad10cbf04a Cycles: multiple importance sampling for lamps, which helps reduce noise for
big lamps and sharp glossy reflections. This was already supported for mesh
lights and the background, so lamps should do it too.

This is not for free and it's a bit slower than I hoped even though there is
no extra BVH ray intersection. I'll try to optimize it more later.

* Area lights look a bit different now, they had the wrong shape before.
* Also fixes a sampling issue in the non-progressive integrator.
* Only enabled for the CPU, will test on the GPU later.
* An option to disable this will be added for situations where it does not help.

Same time comparison before/after:
http://www.pasteall.org/pic/show.php?id=43313
http://www.pasteall.org/pic/show.php?id=43314
2013-01-09 21:09:20 +00:00
Ton Roosendaal
96b44c622c Mac HiDPI support:
With the good help from googling, here's code that compiles for
10.6 natively. Will check on 10.7 and 10.8 right after commit.
2013-01-09 11:25:16 +00:00
Sergey Sharybin
f5317b5f0c Style cleanup in OCIO area
Also fixed typo in function name.
2013-01-08 20:55:07 +00:00
Ton Roosendaal
74d85d2882 Macbook HiDPI support: reshuffled code to make it compile for 10.6 and work
in 10.7 and later. OS X Gurus might check though :)
2013-01-08 17:27:11 +00:00
Sergey Sharybin
fd35b0aa66 Fix for recent tile_order feature not working properly with persistent data 2013-01-08 16:56:04 +00:00
Campbell Barton
08358a60b0 style cleanup 2013-01-08 01:48:14 +00:00
Thomas Dinges
41c588256b Cycles / Tile Rendering:
* Added new option to chose the tile order.
In addition to the "Center" method, 4 new methods are available now, like Top -> Bottom and Right -> Left. 

Thanks to Sergey for code review and some tweaks!
2013-01-07 19:55:49 +00:00
Mike Erwin
eca21a2532 fix for bugs 30300, 31107: pen pressure with multiple open windows on MS Windows 2013-01-07 01:23:09 +00:00
Ton Roosendaal
0fd4a102e0 With some help in irc (thanks erwin, markus!) and some googling, here's code
that compiles for OSX 10.6 for new momentumPhase usage.

Jens Verwiebe can give final blessings, I'm just copypasting stuff and test it :)
2013-01-06 12:49:32 +00:00
Jason Wilkins
0ea3c285ea device_network.cpp is completely elided when WITH_NETWORK is not defined, so do not include it in the build in that case 2013-01-06 07:10:22 +00:00
Ton Roosendaal
c6a0818642 Removal of old code trying to detect trackpads.
This was causing error in previous commit "wheel only worked after using trackpad once".
2013-01-05 18:23:05 +00:00
Ton Roosendaal
8dfe7620fb New version of code to detect whether a wheel is involved, or a trackpad.
It was compiled with "deploy target 10.6" tested on macbook with 10.8.
More tests follow quick.
2013-01-05 17:13:07 +00:00
Stuart Broadfoot
ec33cacc62 Added vertex color attributes (currently limited to one) and UVs included for triangle mesh hair.
I have also included a small speedup for the intersection test.
2013-01-04 12:44:38 +00:00
Sergey Sharybin
25d9fa95f9 Silent "no previous prototype" warning, which was treating as error here 2013-01-04 08:01:35 +00:00
Brecht Van Lommel
e1004eb139 Fix CUDA build error after last commit, and remove some comments. 2013-01-03 13:18:35 +00:00
Brecht Van Lommel
b3f21a2254 Cycles Hair: add Generated texture coordinates for curves, so that procedural
textures now work without having to add a UV map.

Also made UV and intercept attributes only export when needed by the shader.
2013-01-03 12:31:05 +00:00
Brecht Van Lommel
bf25f1ea96 Cycles Hair: refactoring to store curves with the index of the first key and the
number of keys in the curve, rather than curve segments with the indices of two
keys. ShaderData.segment now stores the segment number in the curve.
2013-01-03 12:09:09 +00:00
Brecht Van Lommel
57cf48e7c6 Cycles Hair: refactoring to support generic attributes for hair curves. There
should be no functional changes yet. UV, tangent and intercept are now stored
as attributes, with the intention to add more like multiple uv's, vertex
colors, generated coordinates and motion vectors later.

Things got a bit messy due to having both triangle and curve data in the same
mesh data structure, which also gives us two sets of attributes. This will get
cleaned up when we split the mesh class.
2013-01-03 12:08:54 +00:00
Campbell Barton
c2839bfe76 add option WITH_SYSTEM_BULLET to link against the bullet installation found on the system.
Note: this doesn't work yet for everything with latest stable bullet (2.81), need to look into why and likely apply some patches upstream.
However I managed to link blender by disabling some features, likely it can be made to work without too much trouble.
2013-01-03 00:23:52 +00:00
Campbell Barton
1a7638fa94 add id property clear function (matching the same python function for dicts/lists) 2013-01-02 23:10:14 +00:00
Stuart Broadfoot
0f3931dee4 Fix for normal scaling when using triangle primitives for hair.
and some code clean ups in blender_curves and node_shader_hair_info.c
2013-01-01 19:50:29 +00:00
Stuart Broadfoot
178a877a95 Fix to prevent undefined normals being generated with `add_face_normals()', from triangles with zero area. 2013-01-01 19:44:09 +00:00
Sergey Sharybin
2e0e2cb170 Highlight currently rendering tiles
This commit implements highlight of tiles which are being currently
rendered for both Blender Internal and Cycles (and should be possible
to use it for other external engines as well).

Couple of implementation details:

- Added one extra boolean flag to render engine which should be set
  to truth if render engine wants to highlight tiles. If so, property
  use_highlight_tiles should be set to True.

- Render Part's ready boolena was changed by status enum, which could
  be NONE, IN_PROGRESS and READY. All render part with IN_PROGRESS
  status will be highlighted in image editor.

- For external engines render part's status is filling in automatically.
  Initially all render parts has got NONE status, then one external
  engine acquire render result, corresponding part will change status
  to IN_PROGRESS. As soon as render result is finished, corresponding
  render part will change status to FINISHED

  This should make it easy to highlight tiles for other engines as well.
2013-01-01 16:15:13 +00:00
Sergey Sharybin
08cea96ab0 Alpha premul pipeline cleanup
This assumptions are now made:
- Internally float buffers are always linear alpha-premul colors
- Readers should worry about delivering float buffers with that
  assumptions.
- There's an input image setting to say whether it's stored with
  straight/premul alpha on the disk.
- Byte buffers are now assumed have straight alpha, readers should
  deliver straight alpha.

Some implementation details:

- Removed scene's color unpremultiply setting, which was very
  much confusing and was wrong for default settings.
  Now all renderers assumes to deliver premultiplied alpha.

- IMB_buffer_byte_from_float will now linearize alpha when
  converting from buffer.

- Sequencer's effects were changed to assume bytes have got
  straight alpha. Most of effects will work with bytes still,
  however for glow it was more tricky to avoid data loss, so
  there's a commented out glow implementation which converts
  byte buffer to floats first, operates on floats and returns
  bytes back. It's slower and not sure if it should actually
  be used -- who're using glow on alpha anyway?

- Sequencer modifiers should also be working nice with straight
  bytes now.

- GLSL preview will predivide float textures to make nice shading,
  shading with byte textures worked nice (GLSL was assuming straight
  alpha).

- Blender Internal will set alpha=1 to the whole sky. The same
  happens in Cycles and there's no way to avoid this -- sky is
  neither straight nor premul and doesn't fit color pipeline well.

- Straight alpha mode for render result was also eliminated.

- Conversion to correct alpha need to be done before linearizing
  float buffer.

- TIFF will now load and save files with proper alpha mode setting
  in file meta data header.

- Remove Use Alpha from texture mapping and replaced with image
  datablock setting.

  Behaves much more predictable and clear from code point of view
  and solves possible regressions when non-premultiplied images were
  used as textures with ignoring alpha channel.
2012-12-31 13:52:13 +00:00
Brecht Van Lommel
97c6a55c39 Fix #33706: issue in cycles motion blur rendering after hair commit, my fault
for not finding it in review.

Also removed the hard limits on motion blur shutter time, soft limits are still
the same but it can be useful to set things lower/higher in some cases.
2012-12-31 13:07:06 +00:00
Bastien Montagne
c0a697807a Add try/catch around i18n locale setter code, just in case... 2012-12-31 12:12:50 +00:00
Bastien Montagne
b3aa368c8f Usual UI messages-related fixes... 2012-12-30 23:21:33 +00:00
Ton Roosendaal
fde101c50c Revert change from Jens, wrong pointer check in the code.
That change made all scrollwheel events be handled as if it was a swipe gesture.
Old style mouse wheel didn't work anymore.

This version should work for everyone, but we need more mac testers :)
2012-12-30 10:38:56 +00:00
Jens Verwiebe
eae167998a OSX: fix magic mouse swipes compiling on with MAC_OS_X_VERSION_MIN_REQUIRED by checking address not value 2012-12-29 19:51:44 +00:00
Ton Roosendaal
7684f2e5ac Mac OS X 10.7 supports new trackpad (and mighty mouse) events with nice seamless
scrolling and inertia.

Now Blender uses this - if you have 10.7. Otherwise it just falls back on the
old code.

Try it, makes a huge difference :)

Next todo: how to configure this well, so you can have trackpad (or mighty mouse)
zoom as default in 3d views.
2012-12-29 11:00:45 +00:00
Thomas Dinges
6b05c887d3 Cycles Hair:
* Implemented the Hair Info Node for OSL.
2012-12-29 01:57:32 +00:00
Thomas Dinges
6b211bac15 Fix for last commit, hair settings panel should also check on psys. 2012-12-29 01:14:03 +00:00
Ton Roosendaal
01fe30f50b Hrm... replacing
MAC_OS_X_VERSION_MAX_ALLOWED
with
MAC_OS_X_VERSION_MIN_REQUIRED
2012-12-28 19:26:25 +00:00
Ton Roosendaal
4e24bcf6c9 Testing commit for OS X trackpad and scroll events.
Now:
- code is wrapped for OS X releases (10.6 and 10.7)
- It now detects scrollwheel (old mouse) and gesture strokes (mighty mouse or trackpad).

If you have 10.6, things will work as for release. 

Next todo for tomorrow: make trackpad work actually smooth and not with steps.
Will also try to figure out the device type, to handle mighty mouse differently.
2012-12-28 19:10:21 +00:00
Brecht Van Lommel
cfd0b3c5f2 Fix OSL distance() of point to line segment function not being available,
implemented now in stdosl.h.
2012-12-28 18:21:07 +00:00
Thomas Dinges
81b371a451 Cycles Hair UI:
* Code cleanup, removed some unneeded code
* Moved "Cycles Hair Rendering" panel above "Cycles Hair settings"
* "Cycles Hair settings" panel is only visible when hair rendering ("use_curves") is enabled.
2012-12-28 16:25:41 +00:00
Ton Roosendaal
357b02f65f Reversion of previous fix for Mac OS X scrollwheel,
it appears I used 10.7+ options, fails for 10.6.

Back to drawing board!
2012-12-28 16:11:04 +00:00
Brecht Van Lommel
74a30d91d2 Fix cycles python error in some panels, was not updated for new list template yet. 2012-12-28 14:46:43 +00:00
Stuart Broadfoot
e9ba345c46 New feature
Patch [#33445] - Experimental Cycles Hair Rendering (CPU only)

This patch allows hair data to be exported to cycles and introduces a new line segment primitive to render with.

The UI appears under the particle tab and there is a new hair info node available.

It is only available under the experimental feature set and for cpu rendering.
2012-12-28 14:21:30 +00:00
Ton Roosendaal
9f9e35c82a Bugfix #33681
Blender didn't detect properly whether event came from a mouse-wheel or
from a trackpad in OS X.

Now you can both, and both are handled independently.

Removed back hack from 2 years ago - which disabled mouse wheel for laptops.
2012-12-28 12:48:45 +00:00
Brecht Van Lommel
7cbfe1839b Fix part of #33662: cycles crash using displacement on meshes with vertices not
attached to any face.
2012-12-26 20:59:35 +00:00
Brecht Van Lommel
4ee0087e35 Fix cycles displacement not working well with OSL and multiple objects. 2012-12-23 14:29:43 +00:00
Brecht Van Lommel
35c0b821a5 Cycles: deal a bit better with errors when CUDA runs out of memory, try to avoid crashes. 2012-12-23 12:53:58 +00:00
Brecht Van Lommel
779662aff7 Fix #33641: cycles self intersection artifacts with motion blur and one of the
X/Y/Z coordinates close to 0.
2012-12-23 12:52:10 +00:00
Brecht Van Lommel
80d22a3f12 Cycles OSL: handle new getattribute constant folding with renderstate NULL check,
and fix #33654, distance to line segment function is not implemented but compiled
anyway, now it should give a compile error.
2012-12-22 15:15:11 +00:00
Brecht Van Lommel
b5054896c3 Fix #33644: rendering to a new window and then closing it would not completely
remove it, but still stick around listed in the Window menu.

Fixed by removing the setReleasedWhenClosed:NO hack and using the proper cocoa
window delegate mechanism.
2012-12-21 11:56:02 +00:00
Brecht Van Lommel
e5b457dbc9 Cycles: merge some changes from a local branch to bring network rendering a bit
more up to date, still nowhere near working though, but might as well commit this
in case someone else is interested in working on it.
2012-12-21 11:13:46 +00:00
Brecht Van Lommel
5f4c7e5da4 Cycles: add some extra CUDA nvcc paths for runtime compile, might help for #33622. 2012-12-21 10:27:35 +00:00
Brecht Van Lommel
12117a8187 Fix cycles aliasing warnings caused by motion blur transforms. 2012-12-21 10:26:48 +00:00
Campbell Barton
47a429d161 patches from fedora:
blender-2.64-64bit.patch
blender-2.64a-big-endian.patch
by Jochen@herr-schmitt.de
2012-12-21 03:02:36 +00:00
Brecht Van Lommel
abd3c87663 Cycles: reduce memory usage of instanced objects by about 40%, as long as the
motion vector pass is not enabled.
2012-12-20 19:26:57 +00:00
Ton Roosendaal
8914433cd0 Bug fix #28915 and #33538
Mac OS X trackpad and 'mighty mouse' fix.

An old commit from Damien in 2010 tried to make mighty mouse touches work as if
this is a scrollwheel. The error in that code was that the "kinetic scrolling"
feature failed. When releasing your fingers, the events passed on to Blender
then switched from "trackpad pan" to "mousewheel zoom".

This commit makes trackpads and mighty mouse behave identical. Only difference
is that trackpad panning needs 2 fingers, mighty mouse only one.

Note that trackpad and mighty mouse 3d zoom works with holding ctrl!

All works nice with this kinetic feature now. Fun :)
2012-12-20 12:01:15 +00:00
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
Bastien Montagne
1d09d0a9c5 Silent some warnings (the one in bmesh_operator.c was even preventing build in -Werror mode). 2012-12-02 13:35:33 +00:00
Brecht Van Lommel
b8d822eb35 Fix performance issue in OSL geometry node, compiler fails to optimize out the
tangent computation, tweaked the code so this works.
2012-12-02 08:25:40 +00:00
Brecht Van Lommel
9865ee7637 Fix another cycles SVM issue with closures, was not using correct sample weight
leading to some extra noise compared to a few revisions ago.
2012-12-01 22:00:25 +00:00
Brecht Van Lommel
7c0a0bae79 Fix #33375: OSL geom:trianglevertices gave wrong coordinates for static BVH.
Also some simple OSL optimization, passing thread data pointer directly instead
of via thread local storage, and creating ustrings for attribute lookup.
2012-12-01 19:15:05 +00:00
Brecht Van Lommel
75cce01a61 Fix #33364: cycles tile rendering artifacts. 2012-11-30 18:55:04 +00:00
Brecht Van Lommel
ceedd5bd35 Fix cycles CUDA sm 1.3 build with 32 bit compiler, tweaked voronoi
and brick code so that it can be uninlined.
2012-11-30 07:27:17 +00:00
Brecht Van Lommel
1246ef714e Fix #33351: cycles OSL not loading grayscale images as RGB correctly. 2012-11-30 06:10:25 +00:00
Brecht Van Lommel
e7f594b0df Fix #33347: cycles OSL crash connecting string to vector socket. 2012-11-30 06:10:16 +00:00
Brecht Van Lommel
f1745706ad Fix cycles motion blur + OSL + object texture coordinates issue. 2012-11-29 16:11:37 +00:00
Brecht Van Lommel
186bdbd8d8 Fix #33344: cycles motion blur was still crashing on CUDA sm 2.0. Solution now
is also an optimization, use quaternion nlerp instead of slerp, there's no good
reason to use slerp, and nlerp is faster too.
2012-11-29 13:07:45 +00:00
Daniel Genrich
d387dcd110 Fix compile error with clang.
Patch by sambler via irc
2012-11-29 12:22:07 +00:00
Brecht Van Lommel
0d6976ad0c Fix #32900: object motion blur not working on the GPU. To make this work I disabled motion
blurring of scale animation, probably not a big loss in practice since it's not so common
to animate this, can be added back later.
2012-11-29 00:43:50 +00:00
Brecht Van Lommel
bb0195e039 Fix #33337: cycles crash with progressive refine and multiple render layers. 2012-11-28 19:57:29 +00:00
Brecht Van Lommel
33f81187fb Fix #33335: cycles SVM closure issue in recent bugfix, incorrectly tagging
node as done.
2012-11-28 19:13:34 +00:00
Brecht Van Lommel
4c13633582 Fix #33334: missing glossy label for OSL phong ramp caused assert. 2012-11-28 16:42:32 +00:00
Sergey Sharybin
a8905364c3 Typo fix in comment. No functional changes. 2012-11-28 09:49:26 +00:00
Brecht Van Lommel
f4c93ae935 Fix #33328: cycles not rendering dupliframes, needs an exception. 2012-11-27 21:47:55 +00:00
Brecht Van Lommel
5f8fded639 Fix cycles OSL shader loading warnings after recent bugfix. 2012-11-27 16:02:12 +00:00
Brecht Van Lommel
ceed3ef640 Fix #32907: failure rendering a complex node setup, hitting fixed max number
of closures limit. Optimized the code now so it can handle more.

Change SVM mix/add closure handling, now we transform the node graph so that
the mix weights are fed into the closure nodes directly.
2012-11-26 21:59:41 +00:00
Jason Wilkins
f5d8cd34cd -fno-rtti is a gcc option which gives a warning when using MSVC 2012-11-26 13:48:48 +00:00
Brecht Van Lommel
58ee2bdfc0 Fix: cycles light sampling crash, happens on rare occasions due to float
rounding errors.
2012-11-26 11:05:22 +00:00
Campbell Barton
7ef78723b7 code cleanup: doxy comment corrections and correct own typo animation player docs. 2012-11-26 00:59:11 +00:00
Brecht Van Lommel
ed986b62e8 Fix #33152: cycles SVM crash with certain shader nodes setups where closures would
appear multiple times after flattening the mix/add shader part of the graph into a
tree structure.
2012-11-24 14:50:21 +00:00
Campbell Barton
ae9675a585 disable GL_MULTISAMPLE_ARB by default on X11 (same as OSX cocoa) 2012-11-24 01:06:54 +00:00
Brecht Van Lommel
d8c257faa7 IK Solver:
* Rename Legacy to Standard, it's not being deprecated as far as I know.
* Make option to toggle off Location solving work with Standard.
* Make it converge a bit better in some cases by enforcing a minimum number of
  iterations before giving up.
* Move IK solver choice out of bone panel, it's an armature level setting and
  should be set there.
2012-11-24 00:18:34 +00:00
Brecht Van Lommel
2a9b5e8f81 Fix #33267: cycles math node power gave different results for CPU and GPU. The
GPU variants do not support pow(-1, 2), it doesn't check for even exponents, do
manually now.
2012-11-23 17:39:41 +00:00
Jason Wilkins
69b88cf719 Patch [#33196] Warning Fixes 11-16-2012
* MEM_CacheLimitier - Size type to int conversion, should be safe for now (doing my best Bill Gates 640k impression)
* OpenNL CMakeLists.txt - MSVC and GCC have slightly different ways to remove definitions (DEBUG) without the compiler complaining
* BLI_math inlines - The include guard name and inline option macro name should be different. Suppressed warning about not exporting any symbols from inline math library
* BLI string / utf8 - Fixed some inconsistencies between declarations and definitions
* nodes - node_composite_util is apparently not used unless you enable the legacy compositor, so it should not be compiled in that case.

Leaving out changes to BLI_fileops for now, need to do more testing.
2012-11-23 15:12:13 +00:00
Brecht Van Lommel
c25cfd3044 Fix cycles AO issue, still was missing AO pass for black/non-diffuse objects. 2012-11-23 13:41:25 +00:00
Campbell Barton
8ab5aa6e8d code cleanup: warning & style 2012-11-23 06:35:06 +00:00
Daniel Genrich
ef67ddeba9 Bugfix [#29186] Object contribute to fluid sim animation start earlier than keyframe
Also fix:
- Fluid simulation was always lagging 1 frame behind: E.g. the 250th frame in blender showed 249th frame of the fluid simulation.

Change:
- Animated enabled/disabled property only gets counted as "on" if value >= 1

Note that this bugfix should solve many problems with timings of animated fluid sim properties.
2012-11-23 05:00:07 +00:00
Dalai Felinto
f403ca34c7 final fix for Sensor Fit (AUTO, HOR, VERT) in panorama lens - patch by Brecht Van Lommel and me 2012-11-23 02:10:13 +00:00
Brecht Van Lommel
a72c03bc1c Fix cycles OSL wrong reflection texture coordinate. 2012-11-22 22:24:34 +00:00
Brecht Van Lommel
f4297c2ec5 Cycles: disable anisotropic BSDF on CUDA sm 1.x, to try to get it building again. 2012-11-22 16:08:18 +00:00
Sergey Sharybin
eb75e43685 Solved descriptors leak in OCIO module on windows
Seems was simply caused by wrong destructor used in processorRelease
2012-11-22 12:48:09 +00:00
Brecht Van Lommel
d4222c2240 Tweak macbook trackpad version check, now assumes to be there for version >= 10. 2012-11-22 11:50:15 +00:00
Jens Verwiebe
b3b3d00e06 Fix #33185 correct now, forgot stringlength incrased 2012-11-22 11:26:21 +00:00
Jens Verwiebe
d8958e02d2 Fix #33185 by taking new sysctl hw.model into accont 2012-11-22 10:59:46 +00:00
Brecht Van Lommel
6094011c90 Fixes for OS X default locale: use pclose and do error checking for file read. 2012-11-21 15:14:19 +00:00
Jens Verwiebe
d314eef7a7 OSX/locale: moved command up, so errorchecking also happens 2012-11-21 14:29:34 +00:00
Jens Verwiebe
d0b7b0d228 OSX/locale: workaround to get osx system locale from user defaults 2012-11-21 13:54:54 +00:00
Sergey Sharybin
cdcab16d12 Style cleanup: mixed tabs/spaces were used for indentation in osl_closures.h 2012-11-21 13:45:37 +00:00
Sergey Sharybin
b118512448 Cycles: solve -Wmissing-declarations for osl kernel 2012-11-21 13:41:47 +00:00
Brecht Van Lommel
a9c601ceff Fix #33257: cycles camera clipping did not work through transparent objects. 2012-11-21 13:22:24 +00:00
Brecht Van Lommel
3a67122aef Fix #33256: cycles Z pass for orthographic camera was not right, now is more
useful for e.g. fog in compositing.
2012-11-21 13:00:57 +00:00
Brecht Van Lommel
90cdf34f56 Fix #32796: cycles did not support image auto refresh option. 2012-11-21 13:00:51 +00:00
Brecht Van Lommel
36d2d090f6 Fix for #33250: animation player shortcut keys not working on OS X. 2012-11-21 03:33:49 +00:00
Dalai Felinto
8c4fa687e0 Cycles bugfix: AUTO wasn't working for Equisolid Fisheye lens
Now one no longer needs to match the sensor dimensions with the render dimensions manually.

IMPORTANT NOTE: if you were using AUTO before with mismathing sensor aspect ratio (comparing to the render dimensions)
this will change your render! We can doversion this, but apart from Tube project I don't know if anyone else
is using this yet (part due to this bug and the only recently fixed 3dview preview aspect ratio).

That should help more artists to take advantage of this fantastic Blender feature.
It still helps to know the parameters of kwnown cameras/lens though.
For example:

Nikon DX2S with a 10.5mm fisheye can be set with:
Render resolution: 4288 x 2848
Sensor 23.7 x 15.70 (15.70 can be ommitted if AUTO is used as fit method)

Note: some cameras render different sizes according to the recording mode.
For example, a Red Scarlet in 5k (@12 fps) can render a full circular fisheye with a sigma 4.5 lens.
The same camera in the 30fps recording mode renders 4k in a cropped circular image.
So it's not only the resolution that changes, but the actual sensor been used.

So just keep in mind that the more information you have from the camera/lens you want to emulate the better.
Bug found at/patch written as a follow up of the BlenderPRO2012, patch reviewed by Brecht Van Lommel
2012-11-21 01:07:30 +00:00
Brecht Van Lommel
fdadfde5c5 Fix #33158: motion vector pass wrong in cycles in some scenes, wrong vectors
due to float precision problem in matrix inverse.
2012-11-21 01:00:03 +00:00
Brecht Van Lommel
fd619cd7f1 Fix #33177: OSL render difference with missing textures and HSV nodes. 2012-11-20 17:40:21 +00:00
Brecht Van Lommel
ab1b5af08d Fix cycles OSL missing support for texture mapping paramaters found in texture
properties tab.
2012-11-20 17:40:10 +00:00
Brecht Van Lommel
a80b0915c7 Fix #33243: cycles CUDA going missing sometimes, disabled the new code now that
can detect if a device becomes available while Blender runs, appears to be
unreliable for some reason.
2012-11-20 17:39:56 +00:00
Campbell Barton
68e9fdeb81 code cleanup: comment unused members of bmesh operator slots and some osl style edits. 2012-11-20 14:31:58 +00:00
Thomas Dinges
f92359cc29 Fix [#33239] Cycles OSL : Environment Texture Rotation Incorrect:
* Projection mappings were not implemented yet.
2012-11-20 14:18:56 +00:00
Brecht Van Lommel
abce6309e3 Scons: better fix for OSL compiler path, so it also works on OS X. 2012-11-19 15:50:28 +00:00
Brecht Van Lommel
312abf8cb2 SCons: make OSL linking work on windows, and fix OSL compiler path issue to
properly expand to absolute path.
2012-11-19 14:54:35 +00:00
Sergey Sharybin
9947f70f19 Localization should not depend on debug locale library
Linking happens fine, but blender crashes on startup -- crash with familiar
backtrace happens with i18n disabled (in that case it's something to do with OIIO).
2012-11-19 13:15:11 +00:00
Jens Verwiebe
3b570440e4 OSX/scons: refine oslc compile workaround 2012-11-19 11:46:55 +00:00
Thomas Dinges
70b6e2717a Windows / OSL:
* Scons cleanup, to avoid redeclaration of /EHsc. Linking still fails.
2012-11-18 15:02:09 +00:00
Thomas Dinges
6810813068 OSL / Windows:
* Some fixes for scons, kernel/osl compiles now. 
* Still disabled per default, as relative path to oslc.exe does not work and linking fails.
2012-11-18 03:56:53 +00:00
Campbell Barton
973cb29d84 style cleanup: if's on the same line. 2012-11-18 02:41:55 +00:00
Jens Verwiebe
4ece50723b OSX/scons/osl: ready for compile now, little hack to be resolved, todo:fix a crash with shadercompile 2012-11-16 00:43:28 +00:00
Brecht Van Lommel
104a7bfb90 Fix #33170: cycles viewport update issue with motion blur enabled
(which is supposed to do nothing in this case).
2012-11-15 21:52:17 +00:00
Jens Verwiebe
69320ea595 OSX/scons/osl: initial osl compiling, todo: fix shader compile and copy to bundle 2012-11-15 21:35:25 +00:00
Brecht Van Lommel
7e97cd4b49 Fix #33188: AO pass wrong after recent change. 2012-11-15 21:32:05 +00:00
Brecht Van Lommel
2324c80f50 Cycles OSL: windows build system changes to support static OSL/OIIO. 2012-11-15 17:16:27 +00:00
Thomas Dinges
1c9b548d92 Windows / Scons OSL:
* Initial support, still commented.
2012-11-15 16:34:22 +00:00
Sergey Sharybin
5c6f6301b0 Image thread safe improvements
This commit makes BKE_image_acquire_ibuf referencing result, which means once
some area requested for image buffer, it'll be guaranteed this buffer wouldn't
be freed by image signal.

To de-reference buffer BKE_image_release_ibuf should now always be used.

To make referencing working correct we can not rely on result of
image_get_ibuf_threadsafe called outside from thread lock. This is so because
we need to guarantee getting image buffer from list of loaded buffers and it's
referencing happens atomic. Without lock here it is possible that between call
of image_get_ibuf_threadsafe and referencing the buffer IMA_SIGNAL_FREE would
be called. Image signal handling too is blocking now to prevent such a
situation.

Threads are locking by spinlock, which are faster than mutexes. There were some
slowdown reports in the past about render slowdown when using OSX on Xeon CPU.
It shouldn't happen with spin locks, but more tests on different hardware would
be really welcome. So far can not see speed regressions on own computers.

This commit also removes BKE_image_get_ibuf, because it was not so intuitive
when get_ibuf and acquire_ibuf should be used.

Thanks to Ton and Brecht for discussion/review :)
2012-11-15 15:59:58 +00:00
Brecht Van Lommel
613cf7ae37 Cycles: ambient occlusion now takes per-BSDF normals into account. 2012-11-15 15:37:58 +00:00
Brecht Van Lommel
1c410ab6e7 Fix #33183: cycles bump mapping was not executed with only an AO node in a material. 2012-11-15 14:08:46 +00:00
Sergey Sharybin
9eccf40daa OSL Scons rules
Initial support of OSL builds using SCons build system. Only tested on Linux now.
No changes to configuration files themselves -- for now check how it's configured
for linux buildbot (it was already horror to make all this changes and verify them,
changes to linux-config.py could easily be done later).

Currently WITH_BF_STATICOSL and WITH_BF_STATICLLVM are more like rudiments because
linking against oslexec requires special trick with --whole-archive. We woul either
need to find a way dealing with this oslexec less hackish or drop STATICOSL and 
STATICLLVM flags. Will keep dropping this flags for until we have "final" build
rules for OSL.

Still can not make 32bit linux rendering with OSL -- blender simply crashes when
starting rendering. So for time being this issues are solving disabled OSL for
32bit build slaves.
2012-11-15 13:11:12 +00:00
Brecht Van Lommel
16f1c86953 Fix OSL build error on linux. 2012-11-14 22:45:44 +00:00