Commit Graph

65357 Commits

Author SHA1 Message Date
Thomas Dinges
9b0f6fa7f7 Revert "Cycles: Use half storage for 16bit files (e.g. 16bit pngs) as well."
After discussion in IRC, 16bit int should not be converted to half, too much precision loss.
2016-08-15 01:01:43 +02:00
Thomas Dinges
4d41d8be79 Fix CUDA compilation after OpenCL changes. 2016-08-15 00:04:19 +02:00
Thomas Dinges
a18b2ba643 Cycles: Use half storage for 16bit files (e.g. 16bit pngs) as well.
Note: This only works for textures loaded from disk via OIIO, not packed textures. That's still a ToDo.
2016-08-14 22:24:29 +02:00
Mai Lavelle
9396e11180 Cycles microdisplacement: Move call to tessellate() from addon to Cycles
By calling `tessellate()` from the mesh manager in Cycles we can do pre/post
processing or even threaded tessellation without concerning client side code
with the details.
2016-08-14 15:04:21 -04:00
Thomas Dinges
5c0a67b325 Cycles: Add single channel texture support for OpenCL.
This way OpenCL devices can also benefit from a smaller memory footprint, when using e.g. bumpmaps (greyscale, 1 channel).

Additional target for my GSoC 2016.
2016-08-14 20:21:08 +02:00
Luca Rood
da77d9873f Prevent max stiffness values from going under normal stiffness values in cloth stiffness scaling.
When updating the max values under stiffness scaling, they clip at the normal stiffness values
as expected, however when updating stiffness values, you could set them higher than the max
values, and the max values weren't updated accordingly. As the stiffness scaling computes using
the absolute difference between the max values and the stiffness values, you got higher
stiffnesses in scaled areas even though your max is actually lower than the normal stiffness.

This diff fixes that behaviour, by updating the max values to be equal to the stiffness whenever
you set a higher stiffness than the max value.

Also, I have initialized the max values to the same as the stiffnesses, as they were previously
just set to zero, and caused the same problem described above.

Reviewers: lukastoenne

Reviewed By: lukastoenne

Tags: #physics

Differential Revision: https://developer.blender.org/D2147
2016-08-13 19:48:33 +03:00
Antonioya
35a6e540b1 GPencil: Cleanup code 2016-08-13 17:09:19 +02:00
Lukas Tönne
c395d044fc Fix T49082: Intermediate update call when making links can change group socket layout.
Node tree update calls in the middle of a socket loop are dangerous, they can change sockets
on group nodes and link instances in particular. Updates should only happen after the operator
has finished.

Simply removed the extra convenience check for validity now. Worst case an invalid (red) link
is created which can be removed by the user as well and should simply be ignored by node systems.

The update system in nodes needs a complete rewrite to handle complex cases like this, where an
operator may need to react to changes during its execution.
2016-08-13 16:35:34 +02:00
Julian Eisel
fcb78f2402 Add DNA_struct_find (useful for version patching) 2016-08-13 01:40:19 +02:00
Julian Eisel
25872cae29 Fix error in GPencil V2 version patching
GPencil conversion would just always run for file version 2.77.3. This wasn't an issue in master, but possibly for other branches that used the 2.77.3 block.

Wasn't aware that you have to add the asterisk for pointers either, this is kinda weird. Anyway, it's running correctly now.
2016-08-13 01:35:12 +02:00
Sergey Sharybin
04c7d9d566 Depsgraph: tag relations for update when aterial slots changes
New dependency graph puts materials to the graph in order to deal with animation
assigned to them and things like that. This leads us to a requirement to update
relations when slots changes.

This fixes: T49075 Assignment of a keyframed material using the frame_change_pre handler
                   doesn't update the keyframe using the new dependency graph
2016-08-12 14:59:11 +02:00
Sergey Sharybin
82268fa100 Depsgraph: Tag relations for update when making datablocks single user
This is mainly required for the new dependency graph where non-object
datablocks are a part of dependency graph.

This solves issue when making mesh shared by multiple objects a single
user one.
2016-08-12 13:58:48 +02:00
bac1279b03 Fix T49045: splash not working correctly on OS X, after recent bugfix. 2016-08-12 01:19:22 +02:00
f3bff6a1a1 Fix T49071: Cycles OSL build problem with oslc compilers that can't find their own stdosl.h. 2016-08-12 01:01:09 +02:00
Thomas Dinges
9d236ac06c Cycles: Enable half float support (4 channels and 1 channel) on CUDA.
Atm OpenEXR half files benefit from this and will use only 1/2 of the memory now. More space for HDRs!

Part of my GSoC 2016.
2016-08-11 22:47:53 +02:00
Thomas Dinges
5ac7ef873b Cycles: Change code order for Image Data Types.
Now we have the 4 component ones first (float4, byte4, half4) followed by the 1 component ones (float, byte, half).
Makes code a bit more consistent and also reduces code a bit when enabling half support on GPU in next commit.

This also exposed a typo in half CPU images for 3D textures, which wasn't used yet, but good to have that one fixed anyway.
2016-08-11 22:30:03 +02:00
Mai Lavelle
3aed54dbd5 Cycles: Fix change of sign warning 2016-08-11 15:09:58 -04:00
Mai Lavelle
013a5c27a5 Cycles: Remove odd definition from CMake file
This was causing Cycles standalone to fail to build from Blender repo.
Hopefully nothing breaks from removing this.
2016-08-11 14:35:43 -04:00
Alexander Gavrilov
1fe9d671cf Fix T49004 and motion blur of cloth, softbody, etc past the end frame.
Point cache read code contains checks designed to prevent it reading
stale data when the relevant simulation code should instead compute
the next frame from the previous one. However in some situations like
motion blur subframes the simulation can't possibly do it and just
exits. This causes completely incorrect motion blur at or after the
last cached frame.

To fix, add a parameter that tells the cache code whether it should
apply the checks and exit, or read what it can even if stale (true
means exactly same as old behavior).

Doing this in cache rather than clamping the frame number better in
the caller lets it handle the case of incomplete cache that stops
before the official last frame.

Reviewed By: mont29, lukastoenne

Maniphest Tasks: T49004

Differential Revision: https://developer.blender.org/D2144
2016-08-11 13:36:29 +03:00
Sergey Sharybin
fdc43f993d Cycles: Use static assert to control structures alignment 2016-08-11 10:12:06 +02:00
Sergey Sharybin
a501668cc5 Revert "Cycles Tests: Add test for correct 16 byte alignment of KernelData structs"
Using unit tests is a wrong way to control static behavior of the
application. They should only be used for checking dynamic behavior,
all the rest is easily controllable at compile time.

Doing tests at ocmpile time are actually more robust approach since
we don't have strict policy of runnign unit tests before accepting
any change.

Proper alignment control is coming shortly.

This reverts commit 7c3a06c34918567e6b0ab67bded60725ff63073b.
2016-08-11 10:08:23 +02:00
Lukas Stockner
7c3a06c349 Cycles Tests: Add test for correct 16 byte alignment of KernelData structs 2016-08-10 20:49:45 +02:00
Mai Lavelle
4d1bf1472e Cycles Standalone: Fix building after microdisp changes 2016-08-10 14:08:13 -04:00
Lukas Stockner
82e65abfef Cycles: Fix KernelIntegrator padding to 16-byte boundary 2016-08-10 20:04:52 +02:00
Bastien Montagne
498b7bd7ce Updated install_deps.sh to OSD 3.0.5 (and switch from git repo to download archive of sources). 2016-08-10 19:19:46 +02:00
Lukas Stockner
ef27d8ec5a Cycles Standalone: Add option to set the tile size from the command line
Since the optimal values depend on the device used, this option doesn't make much sense in the XML.
Therefore, it's now specified via the command line, just like the device itself.
2016-08-10 19:17:03 +02:00
Lukas Stockner
bbbc079a6c Cycles: Correct maximum number of textures on pre-Kepler CUDA cards
Commit c96ae81160ad added three data textures and therefore removed three image texture slots, but the value in util_textures.h wasn't updated.
2016-08-10 17:19:16 +02:00
Antonioya
ebdb5490b3 GPencil: Avoid segment fault if new stroke function is called without colorname 2016-08-10 15:51:40 +02:00
Antonioya
774beb7c3c GPencil: Rename color name property to keep consistency in naming 2016-08-10 12:21:18 +02:00
Bastien Montagne
c19d527ed8 Fix crash in id remapping of Graph editor.
dopsheet data pointer is not guaranteed to be set it seems...
2016-08-09 20:00:53 +02:00
Sergey Sharybin
0433ae3026 Cycles: Use proper property getter 2016-08-09 16:37:40 +02:00
Sergey Sharybin
02719521d2 Attempt to fix previous commit for non-c++11 builds 2016-08-09 15:47:51 +02:00
Lukas Tönne
3bbf8fbaeb Fix for isfinite breaking builds when WITH_CXX11 is enabled.
This happens when cmath.h is included after math.h in cpp code.
Kudos to Sergey for pointing this out.
2016-08-09 15:34:38 +02:00
Sergey Sharybin
d5a0ae00d0 Fix T48916: Proxy Custom File is broken 2016-08-09 14:58:34 +02:00
Sergey Sharybin
1647d89cf1 Fix T49027: Sequence uses too much memory when rendering scene with lots of movie strips
Now we free sequencer cache and close all unneeded FFmpeg handles when rendering.
This is the same logic as image sequence memory freeding.
2016-08-09 14:33:00 +02:00
Sergey Sharybin
f990518041 CMake: Once again, don't use find_package to get hardcoded libraries 2016-08-09 12:38:09 +02:00
Sergey Sharybin
62b670633c CMake: Remove hardcoded DIR_ROOT for alembic and MinGW
Do it for until precompiled libraries are there so we can allow
MinGW users to compile their own library and pass it via ROOT_DIR.
2016-08-09 12:38:09 +02:00
Sergey Sharybin
f0bf33fd1b CMake: Use proper way to define debug/release libraries for alembic
Please do not spread platform+library specific code all over the CMake file,
we already have sections dedicated to that.
2016-08-09 12:38:09 +02:00
Sergey Sharybin
bccaa994f1 CMake: Do not force set root folder for Alembic
it is incorrect to set ROOT_DIR and then call find_package.

If something is expected to be in a given location use hardcoded
locations (for the precompiled libraries). Otherwise just use
find_package() and let users to set ROOT_DIT when it is required.
2016-08-09 12:38:09 +02:00
Alexander Gavrilov
a7f6f900f3 Cycles: avoid making NaNs in Vector Math node by normalizing zero vectors.
Since inputs are user controlled, the node can't assume they aren't zero.
2016-08-09 13:20:22 +03:00
Thomas Dinges
c2a7317d1f CUDA: We don't support Toolkits < 7.5, update error message. 2016-08-09 11:41:25 +02:00
Alexander Romanov
151390069a Bugfix. glDisable with bad enum argument in GPU_texture_unbind
Reported by @panzergame in D1414.

`glDisable` calls with bad enum argument `GL_TEXTURE_2D_MULTISAMPLE` that came from this line:
`tex->target = (n == 1) ? GL_TEXTURE_1D : (samples ? GL_TEXTURE_2D_MULTISAMPLE : GL_TEXTURE_2D);`

Reviewers: brecht

Reviewed By: brecht

Subscribers: AlexKowel, yurikovelenov, panzergame

Differential Revision: https://developer.blender.org/D2145
2016-08-09 12:34:52 +03:00
Julian Eisel
b53eca1711 Cycles: Fix crash in empty scenes
To recreate, just delete default cube and render.

Simple fix, but @maiself or @sergey may want to double-check ;)
2016-08-09 04:32:38 +02:00
040fa75d7b Fix Cycles CUDA adaptive kernel not working correctly after recent closure changes. 2016-08-09 01:31:07 +02:00
lazydodo
d1b9306cd5 Alembic: fix finding boost headers for win32 2016-08-08 16:57:04 -06:00
lazydodo
903e9ce0c9 Make previous alembic fix only apply to MSVC 2016-08-08 14:17:43 -06:00
Thomas Dinges
01350910fd Fix extra ; warning for OpenCL as well. 2016-08-08 20:01:21 +02:00
lazydodo
8534071521 Alembic/ msvc : Link alembic_d.lib instead of alembic.lib when doing debug builds. 2016-08-08 11:19:41 -06:00
Kévin Dietrich
b745a2401b Fix ID types DAG update tagging.
The first character of the ID type was used to tag IDs for updates which
is weak since different IDs can have the same first character (for
example meshes, materials and metaballs), causing unnecessary updates of
unrelated IDs.

Now we use a unique index per ID type to tag for updates, unifying IDs
arrays indexing along the way.

Reviewers: sergey, mont29

Differential Revision: https://developer.blender.org/D2139
2016-08-08 17:51:15 +02:00
Porteries Tristan
5e5d3d6391 BGE: Call DNA_sdna_current_init when launching blenderplayer.
Don't calling DNA_sdna_current_init was creating a crash because a global uninitialized
variable was used when reading blender files.
2016-08-08 15:41:19 +00:00