Commit Graph

2267 Commits

Author SHA1 Message Date
Brecht Van Lommel
f8481fed47 Fix: cycles not supporting scene background sets. 2012-05-23 09:46:33 +00:00
Campbell Barton
eb023322ef style cleanup: mmap_win32 2012-05-22 13:20:01 +00:00
Brecht Van Lommel
c3e1fce775 Cycles: add Object Info node, with outputs object location, object/material
pass index, and a random number unique to the instance of the object.

This can be useful to give some variation to a single material assigned to
multiple instances, either manually controlled through the object index, based
on the object location, or randomized for each instance. 

http://wiki.blender.org/index.php/Doc:2.6/Manual/Render/Cycles/Nodes/More#Object_Info
2012-05-21 12:52:28 +00:00
Campbell Barton
be53fde9cd code cleanup:
- remove duplicate includes
- blender builds with -Werror in C++ for fluids/smoke
2012-05-21 06:33:45 +00:00
Campbell Barton
9c9a5b882d style cleanup: ghost 2012-05-19 09:57:55 +00:00
Campbell Barton
112b1a0779 style cleanup: ghost headers 2012-05-19 09:23:08 +00:00
Campbell Barton
6522880772 style cleanup: ghost/x11 2012-05-18 20:13:40 +00:00
Brecht Van Lommel
93aa83f0a3 Fix #31518: changing cycles exposure did unnecessary rerender in viewport. 2012-05-18 14:06:53 +00:00
Brecht Van Lommel
3e83fd441d Fix #31486: cycles texture coordinate reflection output has wrong direction. 2012-05-18 12:49:22 +00:00
Bastien Montagne
2e89e0096a Spell check fix (lenght -> length)
Note: two remains, in comments in extern/bullet2/src/LinearMath/btVector3.h and extern/libmv/libmv/image/tuple.h.
2012-05-16 14:25:25 +00:00
Sergey Sharybin
7b31c3c198 Fix cosmetic typos
Patch provided by Matteo F. Vescovi, thanks!
2012-05-15 16:11:04 +00:00
Daniel Genrich
d8ae4b35f2 Patch [#31264] Elbeem Fixes by Jason Wilkins.
Thank you for submitting!
2012-05-14 16:19:58 +00:00
Sergey Sharybin
a7a79322bf Make blender compilable by gcc-4.7 and strict compilation flags:
- Remove strict flags from files, which are using FFmpeg stuff
  We're still using some symbols which are marked as deprecated.
  Ideally, we shall switch to new API, but it's a bit larger challenge
  because we don't want to break compatibility withotu actual need.
- Replace MAKE_ID with BT_MAKE_ID in bullet library.
  This is needed to prevent re-definition of MAKE_ID in bullet library.
  Seems it's only used to read blender files, so should be quite safe
  change.
2012-05-14 13:31:38 +00:00
Brecht Van Lommel
dd9c1b7fbf Cycles: OpenCL image texture support, fix an attribute node issue and refactor
feature enabling #defines a bit.
2012-05-13 12:32:44 +00:00
Campbell Barton
3bbfbfe4b1 dont use sdl include when building headless 2012-05-11 14:17:49 +00:00
Brecht Van Lommel
8148d7b1df Cycles: reviewed the task scheduler code and fixed (hopefully all) windows threading problems. 2012-05-10 22:31:16 +00:00
Brecht Van Lommel
072a882d03 Fix #31379: cycles not recognizing 16 bit tiff as float image. 2012-05-10 17:09:36 +00:00
Nicholas Bishop
10d1cde0ad Potential fix for bug #31111, Remesh modifier generates artifacts on simple surfaces
Changed one of the intersection tests to use < rather than <=

The sharp and smooth modes look fine now for the special case that was
reported broken; blocks mode looks correct but "jumps" slightly from
one octree resolution to another, so may need additional corrections.
2012-05-10 05:13:10 +00:00
Nicholas Bishop
3d65c502e1 More code cleanup in intern/dualcon.
Removed a lot of unused code, added comments and some clearer
naming. Minor code shuffles and style cleanup too.
2012-05-10 05:12:58 +00:00
Brecht Van Lommel
c8cbe63947 Cycles: fix issues with texture coordinates and object scale. Auto texture
space size and location were outdated often, and already computed on demand
by blender internal, now do that through RNA as well.
2012-05-08 23:39:31 +00:00
Nicholas Bishop
d93a935965 Fix division by zero case in dualcon. 2012-05-08 22:11:16 +00:00
Nicholas Bishop
56342f222f Code style cleanup in intern/dualcon. 2012-05-08 22:11:05 +00:00
Brecht Van Lommel
d9a70ceeb1 Fix 31370: light falloff node linear output not working code.
Fix part of thread safety issue, there's still something else wrong.
2012-05-08 19:57:56 +00:00
Mike Erwin
243304a623 ndof: restored support for older serial port 3D mice on Linux (R45951 broke it, oops) 2012-05-08 05:04:29 +00:00
Dalai Felinto
5797edfcf2 adding kernel_projection.h in CMakelists 2012-05-07 20:37:48 +00:00
Brecht Van Lommel
e6a84eb1b5 Cycles: add light falloff node, with quadratic/linear/constant falloff and a
smoothing factor to reduce high values near the light.
http://wiki.blender.org/index.php/Doc:2.6/Manual/Render/Cycles/Nodes/More#Light_Falloff

Note that this was already possible to do manually with the Ray Length, but
this adds a convenient node for it. This commit also makes the mapping node
min/max option work, fixing #31348.
2012-05-07 20:24:38 +00:00
Dalai Felinto
e11b9df3f1 cycles-fisheye: fixed formula for dir to equisolid
second time I need a scond commit to get the equisolid formula right, shame on me ;)
the formula is:
r = 2 x focallength x sin (theta / 2)
2012-05-07 17:22:13 +00:00
Dalai Felinto
9a731205e9 direction to equisolid - final fix for [#31307] Cycles panoramic fisheye lens and vector pass problem 2012-05-07 16:51:55 +00:00
Bastien Montagne
4bbcb7714e Some misc fixes to UI messages... 2012-05-07 15:50:57 +00:00
Brecht Van Lommel
b613879f34 GHOST/Cocoa: revert tablet detection commit for continuous grab, apparently it is
already doing it and this change breaks something? Still it seems strange that it
is doing tablet stuff in this part of the code then.
2012-05-07 13:42:25 +00:00
Brecht Van Lommel
97df6dab2f GHOST/Cocoa: detect tablet event to disable continuous grab. Don't have tablet
to test it though, can someone with Mac + tablet confirm if continuous grab
gets automatically disabled when using the tablet?
2012-05-07 10:53:12 +00:00
Brecht Van Lommel
022d12a721 Fix most of #31307: cycles panorama camera not working correct with speed
vectors and window texture coordinates. Only for Fisheye Equisolid it's
still not working correct yet. Patch from Dalai with modifications.
2012-05-07 10:53:09 +00:00
Sergey Sharybin
f618bada2b Cleanup of intern/SConstript: CSG is not in source tree anymore, remove option to use it 2012-05-07 09:01:55 +00:00
Brecht Van Lommel
d7f214b581 Fix mac build error after ghost cocoa changes. 2012-05-06 22:36:51 +00:00
Brecht Van Lommel
2314b77eba Fix float image loading crash in cycles after multithreading changes. 2012-05-06 22:06:14 +00:00
Campbell Barton
d5b96163f7 code cleanup: add getCursorGrabModeIsWarp(), makes the intent more clear where we check for mouse warping. 2012-05-06 15:59:57 +00:00
Campbell Barton
4504c66124 disable warping for tablet events (X11 only), added TODO's for OSX and win32. 2012-05-06 15:45:48 +00:00
Brecht Van Lommel
4f1cdb3e42 Code cleanup: patch by Thomas to fix PassType values to be consecutive. 2012-05-06 15:19:36 +00:00
Brecht Van Lommel
c0331cfc09 Cycles: minor refactoring of fisheye code to fit code style. 2012-05-05 19:44:35 +00:00
Brecht Van Lommel
8103381ded Cycles: threading optimizations
* Multithreaded image loading, each thread can load a separate image.
* Better multithreading for multiple instanced meshes, different threads can now
  build BVH's for different meshes, rather than all cooperating on the same mesh.
  Especially noticeable for dynamic BVH building for the viewport, gave about
  2x faster build on 8 core in fairly complex scene with many objects.
* The main thread waiting for worker threads can now also work itself, so
  (num_cores + 1) threads will be working, this supposedly gives better
  performance on some operating systems, but did not measure performance for
  this very detailed yet.
2012-05-05 19:44:33 +00:00
Campbell Barton
299ff91ea1 code cleanup: BKE_scene api naming.
also stop numpy from being found in /usr/include with cmake.
2012-05-05 14:33:36 +00:00
Brecht Van Lommel
a30dec8e59 Fix related to #31317: viewport render layer rendering now uses render visibility
rather than viewport visibility, is more useful that way.
2012-05-05 10:17:18 +00:00
Joerg Mueller
9466af0eab Patch [#31240] Fix audaspace deadlock
fix for [#31097] glibc error when playing sound using BGE
by Wander Lairson Costa

Note: This deadlock fix makes the code non-threadsafe again, a proper solution has to be found still.
2012-05-04 23:36:10 +00:00
Joerg Mueller
0f5e1f2ff0 Fixes for
* [#31285] VSE: audio pitch change delays audio
* [#31260] VSE Trimmed audio plays when overlaped
2012-05-04 23:28:27 +00:00
Brecht Van Lommel
0c318c4a47 Fix (harmless) uninitialized memory usage in BVH binning.
Fix unneeded warnings with c++ guardedalloc, delete NULL is valid.
2012-05-04 16:38:11 +00:00
Dalai Felinto
d710638c47 small fix for equisolid fisheye (cycles)
the FOV formular is: R = 2 * lens * sin (theta / 2)
in this case theta is fov/2 already, thus the fix
2012-05-04 16:29:41 +00:00
Dalai Felinto
d7fbe03a8a Fisheye Camera for Cycles
For sample images see:
http://www.dalaifelinto.com/?p=399 (equisolid)
http://www.dalaifelinto.com/?p=389 (equidistant)

The 'use_panorama' option is now part of a new Camera type: 'Panorama'.
Created two other panorama cameras:

- Equisolid: most of lens in the market simulate this lens - e.g. Nikon, Canon, ...)
             this works as a real lens up to an extent. The final result takes the
             sensor dimensions into account also.
             .:. to simulate a Nikon DX2S with a 10.5mm lens do:
                 sensor: 23.7 x 15.7
                 fisheye lens: 10.5
                 fisheye fov: 180
                 render dimensions: 4288 x 2848

- Equidistant: this is not a real lens model. Although the old equidistant lens simulate
               this lens. The result is always as a circular fisheye that takes the whole sensor
               (in other words, it doesn't take the sensor into consideration).
               This is perfect for fulldomes ;)

               For the UI we have 10 to 360 as soft values and 10 to 3600 as hard values (because we can).


Reference material:
http://www.hdrlabs.com/tutorials/downloads_files/HDRI%20for%20CGI.pdf
http://www.bobatkins.com/photography/technical/field_of_view.html

Note, this is not a real simulation of the light path through the lens.
The ideal solution would be this:
https://graphics.stanford.edu/wikis/cs348b-11/Assignment3
http://www.graphics.stanford.edu/papers/camera/


Thanks Brecht for the fix, suggestions and code review.
Kudos for the dome community for keeping me stimulated on the topic since 2009 ;)

Patch partly implemented during lab time at VisGraf, IMPA - Rio de Janeiro.
2012-05-04 16:20:51 +00:00
Jason Wilkins
a0ce240de9 Renamed "fake" OpenGL identifiers.
Any identifier that looks like an OpenGL identifier, but isn't, causes a false alarm by the glreport.py tool.  Most of these were in comments so I just rephrased the comments.  There were a couple of static functions/macros that were easy enough to rename.  Only the glTexco and glIndex fields of the DMVertexAttribs struct was public and had non-local uses.
2012-05-04 11:50:11 +00:00
Brecht Van Lommel
a899ce19d0 Cycles: tweak ATI OpenGL/CUDA fix more with extra error check. 2012-05-04 08:00:58 +00:00
Brecht Van Lommel
0fcf17fc72 Possible fix for #31054: cycles viewport rendering not working with CUDA for
computation and ATI card for OpenGL.
2012-05-03 23:39:42 +00:00