[Bf-committers] BIH, BVH news and a question

joe joeedh at gmail.com
Sun May 11 01:25:48 CEST 2008


There's an optimization in the shadow intersection code where (for
non-transparent) shadows if any intersection is found then the ray tracing
stops, as opposed to continuing to test any other additional surfaces to
find a possibly closer intersection point.  Also, remember that reflections
and the like have to perform shading, while shadows do not (unless
transparent shadows are enabled).

Joe

On Fri, May 9, 2008 at 4:01 PM, Yves Poissant <ypoissant2 at videotron.ca>
wrote:

> After some time fiddling with the BIH and then reading some more papers,
> thesis and ompf forum threads, I came to the conclusion that the BIH
> implementation that was ripped from SunFlow and adapted to Blender was
> optimal. But I was not satisfied with the results so I implemented a BVH
> just to compare. The BVH alone is faster than the BIH for half of the
> scenes
> I had for testing purposes. Then I implemented SAH (Surface Area Heuristic)
> BVH and this one is clearly the winner. It is always faster than the BIH.
> And it is as fast to much faster than the octree. So that is good news. I
> still need to implement other triangle intersection functions and test
> them.
> I'm convinced I can get even more speed with a good implementation of the
> barycentric test. And I still haven't attempted to use SSE optimization
> yet.
>
> Here is the question: There are a few bugs though and I need to trace the
> execution for specific pixels. What is the technique for tracing the code
> execution for specific pixels? Say I want to break into to code at pixel
> x:10,y:20. Is there a known way to do that? I can certainly find this out
> but if someone already knows the trick, that would help me. I plan to do
> that bug hunting this week-end.
>
> BTW, the bug is related to processing shadow rays vs non-shadow rays.
> Non-shadow rays are much slower to process than shadow rays and there are
> no
> reasons for that especially given that the non-shadow rays are quite slower
> with BIH or BVH than with the octree. For example, it is no uncomon to get
> 3
> to 6 times speed improvement with scenes that uses soft raytraced shadows
> but that same improvement is difficult to get with scene that have a lot of
> reflections. So I think there is a bug with the data returned by the
> intersector when intersecting non-shadow rays.
>
> Yves Poissant
>
> _______________________________________________
> Bf-committers mailing list
> Bf-committers at blender.org
> http://lists.blender.org/mailman/listinfo/bf-committers
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.blender.org/pipermail/bf-committers/attachments/20080510/ce75a4e0/attachment.htm 


More information about the Bf-committers mailing list