Commit Graph

44 Commits

Author SHA1 Message Date
a25c11fd8d Cleanup: trailing space
Remove from blender/nodes, collada, blenfont & render.
2018-06-08 08:07:48 +02:00
75fc1c3507 Cleanup: trailing whitespace (comment blocks)
Strip unindented comment blocks - mainly headers to avoid conflicts.
2018-06-01 18:19:39 +02:00
357655af32 use static functions for raycast functions. 2013-05-08 12:55:05 +00:00
c411cde415 header cleanup, include BLI before BKE, also use bool for ntreeShaderExecTree 2013-01-24 21:57:13 +00:00
f3ece5a108 style cleanup: trailing tabs & expand some non prefix tabs into spaces. 2012-10-21 05:46:41 +00:00
a4ff2b9140 code cleanup: warnings 2012-09-18 03:15:12 +00:00
d724d0adfe code cleanup: quiet warnings for gcc's -Wundef, -Wmissing-declarations 2012-09-16 00:26:36 +00:00
e79c29a1d6 style cleanup: raytree code 2012-05-15 18:45:20 +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
b8a71efeba style cleanup: follow style guide for/with/if spacing 2012-03-24 07:52:14 +00:00
0863575816 tag unused function args in raytrace code. 2012-01-14 10:08:47 +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
274b9c8fb8 whitespace cleanup 2011-09-25 12:31:21 +00:00
9dfda4b002 Fix #26203: crash with empty raytree, all types should survive this now.
Also added a check for -inf/inf bounding boxes, just to be sure.
2011-03-11 22:27:06 +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
89c9aaaa25 remove references to BKE_utildefines where its not needed.
- move GS() define into DNA_ID.h
- add BLI_utildefines as an automatic include with makesrna generated files.
2011-01-07 19:18:31 +00:00
9a85013692 Merge various small changes from render branch:
* Division by zero fix for TNT SVD code.
* Sound fix, in case ffmpeg decode fails, don't use the samples.
* Fix for incorrect bounds of transformed objects in new raytracing code.
* Gave memory arena's a name used for allocations for easier memory
  usage debugging.
* Dupligroup no_draw option was using layers but not restrict view/render
  setting. (not a bugfix exactly but would do display list context switching
  while drawing for no reason).
* Fix objects instanced on hair particles not giving consistent results
  when the object is transformed.
* New math functions: madd_v4_v4fl, len_squared_v3v3, interp_v4_v4v4v4,
  mul_v4_m4v4, SH and form factor functions, box_minmax_bounds_m4.
* mul_m4_m4m4 and mul_m3_m3m3 now accept the same pointers for multiple
  arguments.
* endjob callback for WM jobs system.
* Geometry node uv/color layer now has search list/autocomplete.
* Various small buildsystem tweaks, not strictly needed yet in trunk.
2010-04-15 10:28:32 +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
37e4a311b0 Math Lib
* Convert all code to use new functions.
* Branch maintainers may want to skip this commit, and run this
  conversion script instead, if they use a lot of math functions
  in new code:
  http://www.pasteall.org/9052/python
2009-11-10 20:43:45 +00:00
55541d8a81 Added some test_break during the build process.
(Maybe later this should be done with some thread_cancel function instead of doing variable/callbacks tests)
2009-10-04 16:56:00 +00:00
8da55763b5 *Updated UI options and added UI options to:
control whether instances are used or not
	control whether vertexs are stored localy or not

*Removed unsused code
2009-10-01 18:30:59 +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
4ce316ee0f Ability to disable hints at compile time 2009-08-10 21:37:16 +00:00
51cad12120 *BLI_memarena support for any power of two alignment
*some simd stuff on bvh
2009-08-07 13:49:15 +00:00
f16df034c3 *Process leafs as soon as found instead of pushing them on stack for later evaluation (leads to early exits)
(this is mixed with some simd code commit, althouth no simd is being used up to the moment)
2009-08-06 17:45:51 +00:00
bbdba89d06 generic hints for raytracer
for now only BB hint (i am  hoping to find a decent frustum-test)
2009-08-05 12:44:11 +00:00
2160f36fea Fix point-hint 2009-08-04 18:03:04 +00:00
7e9dc51cd1 Skip BB tests on primitives
the efficiency of this depends on ray-bb and ray-triangle functions efficiency
2009-08-04 17:24:49 +00:00
29530beb90 NlogN building:
sort once
	select subsets and kept the order (on X, Y and Z)
2009-08-03 17:56:38 +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
146b54d5e8 *increased stack size (later this should be prepared for dealing with stack size in runtime)
*put cost model back to normal
2009-07-15 17:44:25 +00:00
ef1fcd8ad1 *Added support to "BB hints" (which works like a BB version of LCTS - longest common transversing subtree)
It creates a tree cut after knowing that a given point will pass on a BB.
This tree cut is used to accelarate the rays casted from a given BB, eliminating unnecessary BB tests from root till the tree cut.
2009-07-15 17:38:00 +00:00
e3f7cad32d *fix (was losing childs) 2009-07-14 23:26:00 +00:00
7afffd2950 Just another experimental stuff to optimize the expected number of BB test on bvh trees
*tree pushdowns after the pushsups :P (its still not local optimum)
2009-07-14 23:08:55 +00:00
a6b328b825 *Moved rtbuild to bf_render_raytrace
*Added vbvh - Just a experimental tree type :)
Variable Way BVH - there is no hardcoded number of childs per each Tree Node
 - idea is to optimize a tree to reduced the expected number of BB tests even after applying SAH (for that an hardcoded n-way is not enough)
 - for now childs are stored on a linked list
2009-07-12 18:04:10 +00:00