## Hybrid Bidir

Discussion related to the implementation of new features & algorithms to the Core Engine.

Moderators: jromang, tomb, zcott, coordinators

### Hybrid Bidir

Any news on this Dade?
Competition Coordinator.
Current Competition: Math is Beautiful / Abstract Wallpaper

Member of the first official jeanphi-fan club

binarycortex

Posts: 1501
Joined: Fri Feb 22, 2008 10:44 pm

### Re: Hybrid Bidir

binarycortex wrote:Any news on this Dade?

I'm connecting the first paths.

The first results looks good (NOTE: the colors shown in the below image are mostly fake, I'm just testing the ray tracing part while the correct computation for radiance/flux/weights are not yet in place):

For reference, normal BiDir:

The interesting numbers to read are:

1) Performance: the raw flow of samples/sec is good. It is 50% faster than normal bidir and hybrid bidir doesn't yet have russian roulette so it traces a lot more rays than normal bidir. However hybrid bidir doesn't have also direct light rays (so I think the disadvantage and advantage compensate a bit each other in term of performance).

2) Memory usage: the number of states required to fill a RayBuffer is extremely small. I need only about 200 states to fill a buffer and with direct light rays it will become even better. For a comparison with path tracing check viewtopic.php?f=8&t=6413 (i.e. Lux v0.9 uses 8192 states to fill a buffer).

3) GPU utilization: it is good (90%) and better than path tracing.

Dade

Posts: 4795
Joined: Sat Apr 19, 2008 6:04 pm
Location: Italy

### Re: Hybrid Bidir

Great progress Dade!

7941824% Eff

I guess it's going to be really effective!
Linux builds packager

SATtva

Posts: 5487
Joined: Tue Apr 07, 2009 12:19 pm
Location: from Siberia with love

### Re: Hybrid Bidir

I tweaked luxblend25 a bit, so you can use blender 2.5 to play with hybrid bidir if you want. As Dade noted, it doesn't give correct images atm, but it does generate some image (usually). Which is good enough for a"SQUEEEE HYBRID BIDIR!!!".

Oh, and if you have an svn build of Blender, the surface integrator menu still shows up red with bidir selected, and it doesn't highly the advanced/light strat options even though their wrong. This is because I need help with the alert code (my python-fu is still quite weak). All of that is cosmetic though, I took care of the bit behind the scenes that actually blocks the export

Oh, and one more thing: light strategy for bidir in 2.5 is back. It works differently for bidir, so it went away for awhile. I put it back as a totally separate parameter from the other light strat menu (it looks like the same menu with fewer options, but that is just some sleight-of-hand with the human-readable names)
-Jason

Material DB Admin

J the Ninja

Posts: 2210
Joined: Wed May 19, 2010 9:54 pm
Location: Portland, USA

### Re: Hybrid Bidir

I added the code for direct light sampling and russian roulette.

All the paths are still unweighted so the rendered image is till not correct however it is now possible to directly compare normal BiDir sample/secs and hybrid BiDir sample/secs:

Hybrid BiDir 106k sample/secs Vs Normal BiDir 52k samples/secs. It is more than 100% faster.

BiDir is definitively far better than Path for hybrid rendering.

P.S. keep in mind that even if the rendering may look correct it isn't at all (because of the missing weights, etc.).

Dade

Posts: 4795
Joined: Sat Apr 19, 2008 6:04 pm
Location: Italy

### Re: Hybrid Bidir

Hi,

Great progress Dade!

Jeanphi
jeanphi

Posts: 6570
Joined: Mon Jan 14, 2008 7:21 am

### Re: Hybrid Bidir

I gave this a spin last night, and for my PC, at least, I saw a similar behaviour as I do with Path; that is that the speed in terms of S/s is typically about 5-10% slower,
In terms of GPU load on the scene i tested I found i got an identical split of 10% load on each of the GTX 295s GPUs, Switching to single GPU use simply doubled the load on the one doing the work. Im not sure if that means i am bandwidth limited through the PCI-e or CPU limited but am not sure if i can tweak those settings.

Much like your image Dade, the number of contributions and efficiency is totally off the scale when i switch to Hybrid mode... so does that actually mean things are converging faster despite the speed in samples/s is worse?

Awesome to see

Eros

Posts: 415
Joined: Wed Jul 22, 2009 8:37 am

### Re: Hybrid Bidir

Eros wrote:Much like your image Dade, the number of contributions and efficiency is totally off the scale when i switch to Hybrid mode... so does that actually mean things are converging faster despite the speed in samples/s is worse?

It seems to me that the convergence speed is the same, could be better could be worse, but it's definitely not what is being reported by the stats.
Competition Coordinator.
Current Competition: Math is Beautiful / Abstract Wallpaper

Member of the first official jeanphi-fan club

binarycortex

Posts: 1501
Joined: Fri Feb 22, 2008 10:44 pm

### Re: Hybrid Bidir

Eros wrote:I gave this a spin last night, and for my PC, at least, I saw a similar behaviour as I do with Path; that is that the speed in terms of S/s is typically about 5-10% slower,
In terms of GPU load on the scene i tested I found i got an identical split of 10% load on each of the GTX 295s GPUs, Switching to single GPU use simply doubled the load on the one doing the work. Im not sure if that means i am bandwidth limited through the PCI-e or CPU limited but am not sure if i can tweak those settings.

The default settings for Hybrid are sill the same of v0.8 and they are not particularly good. I'm using the following one to achieve the results posted above:

Code: Select all
Renderer "hybrid"   "integer opencl.platform.index" [-1]   "string opencl.devices.select" ["100"]   "integer statebuffercount" [2]   "integer raybuffersize" [16000]

Use all OpenCL platforms available + use the first GPU of the 3 available + use double StateBuffer for each thread + use RayBuffer of size 16k. For more details about the new parameters check: viewtopic.php?f=8&t=6413&start=0

They should noticeably improve your performance. Indeed, you have still to use a scene with a good amount of triangles (i.e. Hybrid is never going to speed up the rendering of a cube over a plane).

Dade

Posts: 4795
Joined: Sat Apr 19, 2008 6:04 pm
Location: Italy

### Re: Hybrid Bidir

I know that it isn't rendering correct images right now, but does hybrid bidir support all the features that classic does?
Studio XPS 9100 | 2.8 Ghz Intel 930 | 12 GB RAM | Radeon 5870 1GB

A-man

Posts: 687
Joined: Sat Apr 24, 2010 4:24 pm

Next

Return to Architecture & Design

### Who is online

Users browsing this forum: No registered users and 1 guest