Commit Graph

4368 Commits

Author SHA1 Message Date
Campbell Barton
bba80ed7af Cleanup 2014-08-17 12:18:40 +10:00
Bastien Montagne
fe2b461398 Fix poll func of CYCLES_OT_use_shading_nodes.
Operators' poll func might be called from anywhere in Blender, so they should
not make any assumption about available context. material, lamp and world
are specific to context from Properties space...
2014-08-16 22:42:02 +02:00
Campbell Barton
88ee650263 Comments 2014-08-16 10:51:07 +10:00
Bastien Montagne
9a29b0f155 Fix compilation on linux (implicit conversion from double/float to size_t treated as error here). 2014-08-15 15:44:50 +02:00
Dalai Felinto
983cbafd18 Final Fix T41222 Blender gives weird ouput when baking (4096*4096) resolution on GPU
It now uses the tile size to split the job. For CPU this may add
overhead, but for GPU this is highly needed.

Reviewers: sergey

Differential Revision: https://developer.blender.org/D690
2014-08-15 11:27:42 +02:00
Dalai Felinto
2c5b6859d9 Revert "Fix T41222 Blender gives weird output when baking (4096*4096) resolution on GPU"
This reverts commit a48b372b04421b00644a0660bfdf42229b5ffceb.

Leaving only the part that fix device_multi.cpp
2014-08-15 11:27:42 +02:00
Thomas Dinges
5bdea81319 Cycles: Don't check closure flag in kernel_volume_decoupled_scatter(), we check this before the function already. 2014-08-14 21:25:52 +02:00
Thomas Dinges
32a5313b41 Cycles: Optimize Equi-Angular sampling using binary range search.
Patch by Lukas Tönne and myself.
2014-08-14 20:21:36 +02:00
Thomas Dinges
5af00a3d12 Cycles: Optimization for Heterogeneous Volume Shadows.
* Don't compute expf() for every step, instead sum the intermediate values and calculate it every N (8 for now) steps. This helps a few percent (~5% on a cube with wave texture) in my tests here.
2014-08-14 20:09:25 +02:00
Thomas Dinges
8ff3cf3e56 Cleanup: typos and extra brackets. 2014-08-14 16:31:53 +02:00
Thomas Dinges
5a74fe63d0 Cycles: Avoid intermediate function when we sample all lamps. 2014-08-14 16:09:40 +02:00
Thomas Dinges
6e5d188d17 Cycles: Avoid segment NULL check, we access it before this function already. 2014-08-14 15:52:19 +02:00
Sergey Sharybin
c256072e91 Cycles: Correction to previous commit -- forgot to take instancing into account 2014-08-14 11:48:50 +06:00
Jens Verwiebe
fc2b6a2b9d OSX: fix paranthesis in last commit 2014-08-13 15:32:35 +02:00
Jens Verwiebe
3bbba7d2b1 OSX: add a fix for lion_fs loosing handles after calling fs from key shortcut, also reenabled lion_fs for OSX >= 10.9 again 2014-08-13 15:27:41 +02:00
Sergey Sharybin
bfaf4f2d0d Fix T41219: Cycles backface detection doesn't work properly
Root of the issue goes back to the on-fly normals commit and the
latest fix for it wasn't actually correct. I've mixed two fixes
in there.

So the idea here goes back to storing negative scaled object flag
and flip runtime-calculated normal if this flag is set, which is
pretty much the same as the original fix for the issue from me.

The issue with motion blur wasn't caused by the rumtime normals
patch and it had issues before, because it already did runtime
normals calculation. Now made it so motion triangles takes the
negative scale flag into account.

This actually makes code more clean imo and avoids rather confusing
flipping code in mesh.cpp.
2014-08-13 16:35:54 +06:00
Sergey Sharybin
2eebe611e4 Fix T40717: Screen does not update while scrolling or zooming with touchpad on a laptop
This is rather workaround solution for now, which seems to
work and it's not that huge to maintain (one liner apart from
the comment).

Idea is to make sure PeekMessage peeks the message when window
proc receives WM_MOUSEWHEEL (some touchpad drivers seems to
swallow the messages making it so PeekMessage doesn't get
anything).
2014-08-13 13:49:30 +06:00
Campbell Barton
7df4fc5eaf Spelling 2014-08-13 09:34:37 +10:00
Campbell Barton
dfd9bfd3a8 Spelling 2014-08-13 08:38:16 +10:00
Sergey Sharybin
794277f8b6 Stupid MSVC replaces tabs to spaces spontaneously :S 2014-08-12 16:51:37 +06:00
Sergey Sharybin
0fc4289c39 Console detection now works reliably when starting blender-app directly 2014-08-12 16:48:46 +06:00
Tamito Kajiyama
7b1234be1c Removed/disabled debugging code. 2014-08-12 10:10:37 +09:00
Tamito Kajiyama
c38e80d632 WIP commit just for a record of a working snapshot of code revisions for node-based textured strokes. 2014-08-12 10:10:35 +09:00
Tamito Kajiyama
1741df1e36 Removed debug prints. 2014-08-12 10:10:11 +09:00
Tamito Kajiyama
f75d87bd76 Initial implementation of Cycles materials for Freestyle stroke rendering. 2014-08-12 10:10:06 +09:00
Campbell Barton
d124bd1cd4 Spelling 2014-08-12 10:31:07 +10:00
Campbell Barton
afe8a4040f Fix uninitialized memory use 2014-08-12 08:21:02 +10:00
Sergey Sharybin
8bed4e6040 Fix T41362: CPU and GPU rendering gives different results
We can't really make CPU and GPU results look the same in all possible
circumstances, but here we can make them look close enough to each other
by making it so sobol pattern for bounce number is the smae for both
CPU and GPU.

This makes CPU and GPU render results look the same with low number of
samples, high number of samples was never an issue.
2014-08-11 22:29:27 +06:00
Antony Riakiotakis
028fd29eeb Pie Menus C code backend.
This commit merges the code in the pie-menu branch.

As per decisions taken the last few days, there are no pie menus
included and there will be an official add-on including overrides of
some keys with pie menus. However, people will now be able to use the
new code in python.

Full Documentation is in http://wiki.blender.org/index.php/Dev:Ref/

Thanks:
Campbell Barton, Dalai Felinto and Ton Roosendaal for the code review
and design comments

Jonathan Williamson, Pawel Lyczkowski, Pablo Vazquez among others for
suggestions during the development.

Special Thanks to Sean Olson, for his support, suggestions, testing and
merciless bugging so that I would finish the pie menu code. Without him
we wouldn't be here. Also to the rest of the developers of the original
python add-on, Patrick Moore and Dan Eicher and finally to Matt Ebb, who
did the research and first implementation and whose code I used to get
started.
2014-08-11 11:02:26 +02:00
Martijn Berger
c020bd2e73 Cycles OpenCL error to string removed in favour of the same function in clew. 2014-08-09 14:27:40 +02:00
Sergey Sharybin
57c4871146 Tweaks to the recent wrapper on windows
- Forgot to handle command line arguments

- Because of the fact we need to be able to
  use stdout and stderr we need to use regular
  console application for the wrapper.

- Because of using regular application for the
  wrapper we need to check forparent PID in the
  isStartedFromCommandPrompt().

I really hope it's not gonna to become any more
complicated.
2014-08-08 00:22:57 +06:00
Thomas Dinges
e3ed13cbd4 Cleanup: Remove special code for Visual Studio 2008.
Goodbye VC2008, it has been a pleasure (more or less) :D SCons / CMake cleaenup will follow.
Differential Revision: https://developer.blender.org/D715
2014-08-07 13:52:15 +02:00
Jens Verwiebe
c0c037f41d OSX/clang: Fix T41123, crashing osl when optimization level > O0 is used for osl_shaders.cpp 2014-08-06 13:25:06 +02:00
Martijn Berger
4cf531f7a0 Fix T41318: API change in OSL, I see no other cases but there might be 2014-08-05 23:49:42 +02:00
Campbell Barton
ea9d94cf28 Spelling 2014-08-06 05:41:14 +10:00
Dalai Felinto
a48b372b04 Fix T41222 Blender gives weird output when baking (4096*4096) resolution on GPU
In collaboration with Sergey Sharybin.

Also thanks to Wolfgang Faehnle (mib2berlin) for help testing the
solutions.

Reviewers: sergey

Differential Revision: https://developer.blender.org/D690
2014-08-05 13:50:50 -03:00
Sergey Sharybin
a192facd8c Fix T41276: OSL bug in getmessage ("trace", "geom:name" , output) 2014-08-05 17:54:08 +06:00
Sergey Sharybin
b3e3ca7464 Fix T41318: OSL broken on Linux kubuntu 14.04
Now for real, hopefully.
2014-08-05 15:53:00 +06:00
Martijn Berger
b9e4929846 Fix: T41318
OSL compiler signature changed with 1.5.
2014-08-05 11:11:52 +02:00
Sergey Sharybin
77b7e1fe9a Deduplicate CUDA and OpenCL wranglers
For now it was mainly about OpenCL wrangler being duplicated
between Cycles and Compositor, but with OpenSubdiv work those
wranglers were gonna to be duplicated just once again.

This commit makes it so Cycles and Compositor uses wranglers
from this repositories:

  - https://github.com/CudaWrangler/cuew
  - https://github.com/OpenCLWrangler/clew

This repositories are based on the wranglers we used before
and they'll be likely continued maintaining by us plus some
more players in the market.

Pretty much straightforward change with some tricks in the
CMake/SCons to make this libs being passed to the linker
after all other libraries in order to make OpenSubdiv linked
against those wranglers in the future.

For those who're worrying about Cycles being less standalone,
it's not truth, it's rather more flexible now and in the future
different wranglers might be used in Cycles. For now it'll
just mean those libs would need to be put into Cycles repository
together with some other libs from Blender such as mikkspace.

This is mainly platform maintenance commit, should not be any
changes to the user space.

Reviewers: juicyfruit, dingto, campbellbarton

Reviewed By: juicyfruit, dingto, campbellbarton

Differential Revision: https://developer.blender.org/D707
2014-08-05 13:57:50 +06:00
Campbell Barton
88a0d5ebe8 Make CHECK_TYPE_NONCONST macro portable
also replace __typeof -> typeof
2014-08-02 18:08:44 +10:00
Campbell Barton
9c3025cd26 Spelling 2014-08-02 16:53:52 +10:00
Thomas Dinges
59f4ba854b Cycles: Update stdosl.h for OSL 1.5. 2014-08-01 15:23:58 +02:00
Sergey Sharybin
42aef164f4 Fix T41197: Blender freezes to infinite loop when switching to PAUSED Cycles rendered viewport 2014-08-01 16:57:43 +06:00
Sergey Sharybin
eb016eb3ae Fix T41258: Crash when entering edit mode while viewport render is enabled
The issue was caused by the render engine loading edit mesh, which re-allocates
mesh array which might be referenced by other object's derived meshed.

Worst thing about this is that updating render engine happens from the end of
scene update function, after all the objects are updated and so. This is needed
so render engine gets the update objects which is correct.

The only proper way to solve the issue is to make it so viewport engine does not
leave objects in inconsistent state, meaning nobody will reference to freed data.

In order to reach this we do edit mesh loading before running objects update so
all the objects which uses that mesh will have proper references in the derived
mesh.

This also solves old creepyness which happened before when having single object
in edit mode. tweaking it will calculate derived mesh as a part of scene update,
then this derived mesh will be freed by edit mesh loading and viewport will be
creating derived mesh again.

Now render engine is expected to do nothing with meshes which are in edit mode,
but they still need to load edit data for non0meshes. It's not really easy to
do from the BKE level because needed functions are implemented in the editor.

Thanks Campbell for the review!

Differential Revision: https://developer.blender.org/D697
2014-07-31 20:25:11 +06:00
Dalai Felinto
5c3c3abb45 Cycles Bake: use size_t instead of width, height
(original patch by Sergey Sharybin)

Note: RNA API can't use size_t at the moment. Once it does this patch
can be tweaked a bit to fully benefit from size_t larger dimensions.
(right now num_pixels is passed as int)

Reviewed By: sergey, campbellbarton
Differential Revision: https://developer.blender.org/D688
2014-07-31 00:35:17 -03:00
Sergey Sharybin
946f291c46 Fix T41174: Tangent space required UV map in Cycles
Now Cycles behaves in the same way as BI in terms of using
sphere projection of orco coordinates if there's no UV map
when calculating tangent space.
2014-07-29 16:08:47 +06:00
Martijn Berger
65bf694331 Implement get_split_task_count to make device_network compile again. 2014-07-29 07:40:04 +02:00
Sergey Sharybin
34937f6547 Fix T41139: Cycles Hair BSDF roughness problem 2014-07-27 19:51:28 +06:00
Campbell Barton
648ee669b7 Style cleanup GHOST/Win32 2014-07-27 13:40:39 +10:00