Blender Git Loki

Blenderin Git "master"-kehityshaaran kommitit.

Page: 2726 / 5574

December 24, 2014, 21:50 (GMT)
Cycles: Correction for node tail copy on packing BVH

This is harmless for now because tail of the node is zero in there, but better
to fix it early so in the case of extending BVH nodes this code doesn't give
issues.
December 24, 2014, 21:50 (GMT)
Cycles: Enable QBVH optimization structure for SSE2 CPUs

This commit enables QBVH optimization structure automatically if rendering
with CPU and SSE2 support is detected.

This brings render time of agent shot back to the speed it used to be before
the watertight intersections commit, single koro and sponza scenes are about
7% faster here.
December 24, 2014, 21:50 (GMT)
Cycles: Implement QBVH tree traversal

This commit implements traversal for QBVH tree, which is based on the old loop
code for traversal itself and Embree for node intersection.

This commit also does some changes to the loop inspired by Embree:

- Visibility flags are only checked for primitives.

Doing visibility check for every node cost quite reasonable amount of time
and in most cases those checks are true-positive.

Other idea here would be to do visibility checks for leaf nodes only, but
this would need to be investigated further.

- For minimum hair width we extend all the nodes' bounding boxes.

Again doing curve visibility check is quite costly for each of the nodes and
those checks returns truth for most of the hierarchy anyway.

There are number of possible optimization still, but current state is good
enough in terms it makes rendering faster a little bit after recent watertight
commit.

Currently QBVH is only implemented for CPU with SSE2 support at least. All
other devices would need to be supported later (if that'd make sense from
performance point of view).

The code is enabled for compilation in kernel. but blender wouldn't use it
still.
December 24, 2014, 21:50 (GMT)
Cycles: Store proper empty boundbox for missing child nodes in QBVH

The idea is to make sure those childs would never be intersected with a ray
in order to make it so kernel never worries about number of child nodes.
December 24, 2014, 21:50 (GMT)
Cycles: Code cleanup, de-duplicate definition of FEATURE

Previously every BVH traversal file was defining macro to check which features
should be compiled in, now this macro is defined in the parent header.
December 24, 2014, 21:50 (GMT)
Cycles: Rework BVH functions calls a little bit

Basic idea is to allow multiple implementation per feature-set, meaning this
commit tries to make it easier to hook new algorithms for BVH traversal.
December 24, 2014, 21:50 (GMT)
Cycles: Add some utility functions and structures

Most of them are not currently used but are essential for the further work.

- CPU kernels with SSE2 support will now have sse3b, sse3f and sse3i

- Added templatedversions of min4, max4 which are handy to use with register
variables.

- Added util_swap function which gets arguments by pointers.
So hopefully it'll be a portable version of std::swap.
December 24, 2014, 21:50 (GMT)
Cycles: Implement watertight ray/triangle intersection

Using this paper: Sven Woop, Watertight Ray/Triangle Intersection

http://jcgt.org/published/0002/01/05/paper.pdf

This change is expected to address quite reasonable amount of reports from the
bug tracker, plus it might help reducing the noise in some scenes.

Unfortunately, it's currently about 7% slower than the previous solution with
pre-computed triangle plane equations, but maybe with some smart tweaks to the
code (tests reshuffle, using SIMD in a nice way or so) we can avoid the speed
regression.

But perhaps smartest thing to do here would be to change single triangle / ray
intersection with multiple triangles / ray intersections. That's how Embree does
this and it's watertight single ray intersection is not any faster that this.

Currently only triangle intersection is modified accordingly to the paper, in
the future we would also want to modify the node / ray intersection.

Reviewers: brecht, juicyfruit

Subscribers: dingto, ton

Differential Revision: https://developer.blender.org/D819
December 24, 2014, 21:50 (GMT)
Cycles: Optimize storage of QBVH node by one float4

The idea is to store visibility flags for leaf nodes only since visibility check
for inner nodes costs too much for QBVH hence it is not optimal to perform.

Leaf QBVH nodes have plenty of space to store all sort of flags, so we can make
nodes one element smaller, saving noticeable amount of memory.
December 24, 2014, 21:50 (GMT)
Cycles; Code cleanup, make it more obvious what #endif belongs to
December 24, 2014, 21:50 (GMT)
Cycles: Make it more clear offsets in BVH construction

Previously offsets were calculated based on the BVH node size,
which is wrong and real PITA in cases when some extra data is
to be added into (or removed from) the node.

Now use offsets which are not calculated form the node size.
December 24, 2014, 21:50 (GMT)
Cycles: Replace magic constant in the code with actual node size
December 24, 2014, 21:50 (GMT)
Cycles: Avoid over-allocation in packing BVH instances

This solves quite an over-allocation in BVH instances packing code,
unfortunately, it's not a magic bullet to solve memory bump caused
by the recent QBVH changes.

For that we'll likely need to decouple storage for leaf and inner
nodes. However, it's not really clear for now if it's something
important since that'd still be just a fraction of memory comparing
to all the hi-res textures.
December 24, 2014, 21:50 (GMT)
Cycles: Implement refit_nodes for QBVH

Title says it all, quite straightforward implementation.

Would only mention that there's a bit of code duplication around packing node
into pack.nodes. Trying to de-duplicate it ends up in quite hairy code (like
functions with loads of arguments some of which could be NULL in certain
circumstances etc..). Leaving solving this duplication for later.
December 24, 2014, 21:50 (GMT)
Cycles: Use proper node counter to allocate QBVH nodes

Before all the nodes were counted and allocated, leading to situations when
bunch of allocated memory is not used because reasonable amount of nodes are
simply ignored.
December 24, 2014, 21:50 (GMT)
Cycles: Don't do node visibility check in subsurface and volume traversal

Visibility flags are set to all visibility anyway, So there was no reason
to perform that test.

TODO: We need to investigate if having primitive intersection functions
which doesn't do visibility check gives any speedup here as well.
December 24, 2014, 21:50 (GMT)
Cycles: Move triangle intersection functions into own file

This way extending intersection routines with some pre-calculation step wouldn't
explode the single file size, hopefully keeping them all in a nice maintainable
state.
December 24, 2014, 21:45 (GMT)
Cycles: Optimize vector math node without links to single values.
Revision 76b4fad by Julian Eisel
December 24, 2014, 18:51 (GMT)
Fix T42879: File Browser - disable selecting ".." entry (Parent Directory)
Revision 703bb0f by Julian Eisel
December 24, 2014, 18:35 (GMT)
Ref T42873: Print "Camera Pano" for panoramic camera view onto viewport
Tehnyt: Miika HämäläinenViimeksi päivitetty: 07.11.2014 14:18MiikaH:n Sivut a.k.a. MiikaHweb | 2003-2021