Commit Graph

36 Commits

Author SHA1 Message Date
1e6fa59e4f Fix T39852: Crash (Blender internal) large objects
Add check when bounds reached inf
2014-04-24 03:07:45 +10:00
7cdf5992dd Add asserts to raytrace get/set_cut functions 2014-04-24 02:30:39 +10:00
ec4ed2e3df Code Cleanup: replace global debug checks in raycast with DEBUG ifdef 2013-12-12 15:30:50 +11:00
357655af32 use static functions for raycast functions. 2013-05-08 12:55:05 +00:00
4f3ca854e1 Fix various warnings with clang build, and adjust cmake clang warnings flags
to include a few more that gcc is using too.
2013-02-26 21:58:06 +00:00
f3ece5a108 style cleanup: trailing tabs & expand some non prefix tabs into spaces. 2012-10-21 05:46:41 +00:00
32cf7fcdb1 code cleanup: spelling 2012-07-16 23:23:33 +00:00
e79c29a1d6 style cleanup: raytree code 2012-05-15 18:45:20 +00:00
343edf2722 style cleanup: function calls & whitespace. 2012-04-29 17:11:40 +00:00
e701f9b670 style cleanup: whitespace / commas 2012-04-29 15:47:02 +00:00
b340f930ec style cleanup: changes to brace placement / newlines - for/while/if/switch 2012-04-28 06:31:57 +00:00
5b88712ff9 move debug flag into its own global var (G.debug), split up debug options.
--debug
  --debug-ffmpeg
  --debug-python
  --debug-events
  --debug-wm

This makes debug output easier to read - event debug prints would flood output too much before.

For convenience:
  --debug-all turns all debug flags on (works as --debug did before).

also removed some redundant whitespace in debug prints and prefix some prints with __func__ to give some context.
2012-03-31 00:59:17 +00:00
4a1fdd80f9 style cleanup: use NULL rather than 0 for raytrace code. 2012-03-26 08:58:17 +00:00
c21c58f44c style cleanup, also remove unused externs. 2012-03-11 19:09:01 +00:00
47c373c7a9 style cleanup (mostly whitespace) 2012-02-27 10:35:39 +00:00
4a04f72069 remove $Id: tags after discussion on the mailign list: http://markmail.org/message/fp7ozcywxum3ar7n 2011-10-23 17:52:20 +00:00
f3a9b7580e spelling corrections. 2011-04-29 04:43:36 +00:00
1c6956a4d6 quiet msvc/mingw compiler warnings. 2011-04-10 09:37:04 +00:00
Nathan Letwory
a61c41c7a5 doxygen: blender/render tagged. 2011-02-27 19:31:27 +00:00
Nathan Letwory
5b607701a7 doxygen: prevent GPL license block from being parsed as doxygen comment. 2011-02-23 10:52:22 +00:00
04299657a7 Raytrace modifications from the Render Branch.
These should not have any effect on render results, except in some cases with
you have overlapping faces, where the noise seems to be slightly reduced.

There are some performance improvements, for simple scenes I wouldn't expect
more than 5-10% to be cut off the render time, for sintel scenes we got about
50% on average, that's with millions of polygons on intel quad cores. This
because memory access / cache misses were the main bottleneck for those scenes,
and the optimizations improve that.

Interal changes:

* Remove RE_raytrace.h, raytracer is now only used by render engine again.
* Split non-public parts rayobject.h into rayobject_internal.h, hopefully
 makes it clearer how the API is used.
* Added rayintersection.h to contain some of the stuff from RE_raytrace.h
* Change Isect.vec/labda to Isect.dir/dist, previously vec was sometimes
  normalized and sometimes not, confusing... now dir is always normalized
  and dist contains the distance.
* Change VECCOPY and similar to BLI_math functions.
* Force inlining of auxiliary functions for ray-triangle/quad intersection,
  helps a few percentages.
* Reorganize svbvh code so all the traversal functions are in one file
* Don't do test for root so that push_childs can be inlined
* Make shadow a template parameter so it doesn't need to be runtime checked
* Optimization in raytree building, was computing bounding boxes more often
  than necessary.
* Leave out logf() factor in SAH, makes tree build quicker with no
  noticeable influence on raytracing on performance?
* Set max childs to 4, simplifies traversal code a bit, but also seems
  to help slightly in general.
* Store child pointers and child bb just as fixed arrays of size 4 in nodes,
  nearly all nodes have this many children, so overall it actually reduces
  memory usage a bit and avoids a pointer indirection.
2011-02-05 13:41:29 +00:00
8f21a43535 split BKE_utildefines.h, now it only has blender specific defines like GS() MAKE_ID, FILE_MAXDIR, moved the generic defines to BLI_utildefines.h.
no functional changes.
2011-01-07 18:36:47 +00:00
9b518710c6 update for MingW/CMake
- ignore MSVC warnings when FREE_WINDOWS is defined to quiet warnings.
- the CMake flags were not being set correctly making blender have weirdo colors (no -funsigned-char).
2010-09-15 16:13:32 +00:00
75410037fd - correct some spelling errors.
- remove FreeCamera struct (wasnt used)
- remove world color alpha values (not used anywhre).
2010-07-20 10:41:08 +00:00
081c1205a3 correct fsf address 2010-02-12 13:34:04 +00:00
6a0308aad3 Raytrace: only print debug info when running with -d option. 2010-01-12 19:45:01 +00:00
fcaad00bda Some fixes to get blender compiling on solaris.
Kent
2009-12-17 17:42:26 +00:00
Nathan Letwory
c2b71607d2 * provide SCons support to enabling jaguarandi SIMD raytracer optimizations for real :)
Until now only SSE switches were defined, but to really enjoy the SIMD structures, the
  __SSE__ define needs to be given. This can now be done with setting in your user-config.py

          WITH_BF_RAYOPTIMIZATION=True

  (or WITH_BF_RAYOPTIMIZATION=1 on command-line)
2009-12-05 00:26:20 +00:00
022be64517 Bugfix: raytracer building could crash (abort due to an assert), when
using for example a text object scaled down to size zero. This was due
to nan's generated through division by zero.
2009-10-20 18:27:46 +00:00
401c185fbc Get 2.5 trunk to compile. this C++ code failed for gcc 3.3.
Error log:

/usr/include/gcc/darwin/3.3/c++/cmath: In function `float std::ceil(float)':
/usr/include/gcc/darwin/3.3/c++/cmath:175: error: parse error before `(' token
/usr/include/gcc/darwin/3.3/c++/cmath: In function `float std::floor(float)':
/usr/include/gcc/darwin/3.3/c++/cmath:249: error: parse error before `(' token
/usr/include/gcc/darwin/3.3/c++/cmath: In function `float std::fmod(float, 
   float)':
/usr/include/gcc/darwin/3.3/c++/cmath:267: error: parse error before `(' token
2009-10-19 17:47:24 +00:00
64af3a2618 *introduced new method for packing/optimizing trees after building
(this is a generalization of some of the experimental stuff i tried during SoC,
 but only had time to improve a few days ago)
 - it should yield slightly better results
 - the cost model can somehow be tweaked to optimize for diferent trees.

*cleaned up some code
*added counters for number of SIMD BB tests
*added GPL license block on missing files
2009-09-06 19:14:06 +00:00
ea18c6ef0a Code reorganization
-separated vbvh, svbvh, qbvh in diferent files (before the only way to switch between them was at compile time)
2009-08-29 17:24:45 +00:00
aec7f2f2c4 *Changed RayObject_ calls to RE_rayobject to keep consistency on calls
*Moved part of counters code to a separated file (rayobject_raycounter.c)
2009-08-25 20:26:50 +00:00
cb40f0ff80 Another tree pass during build to increase the number of nodes that have multipe of 4childs 2009-08-13 15:56:24 +00:00
5d40c1b597 *Added a tree structure with a variable number of childs per node, but with groupped childs (for SIMD)
*SIMD support for the first 4*N childs of each node
*Some bvh code organized
2009-08-11 00:33:51 +00:00
2830f25ff3 Another try with building better trees (this should never make worst trees)
Expected number of BB tests should reduce a bit (depending on the scene)
2009-07-17 19:09:42 +00:00