Cutting down render times…

First the bad news, I have noticed that sim_physics volumetrics perform a full integration regarding the optical tickness of the object. Here is an example of the current drawback: Given a cube of very dense smoke aligned to the camera: let’s assume that it will take a render time T:  now if you scale 10 times the edges perpendicular to the viewer then render time will take 10*T with no significant difference from the previous render!

capture

That could be perfect for truly realistic renderers where every detail matter, but it also eats a lot of render time, that´s why every volumetric render engine out there implement an optimized algorithm called Early Ray Termination (ERT).

capture1

This algorithm basically stops integrating along a ray when total opacity is near the maximum value, so voxel samples behind will not contribute at all to the image pixel. In my thesis build since I accumulate alpha values from the beginning, I make the raymarch (integration) along the ray stop as soon as accumulated alpha reaches the value 1.0 (= opacity): As a result render times were incredible shorted for very dense volumetrics (denser smokes,rocks,and other special effects)

However, my build lacks optimization for empty volumes contrary to Matt Ebb’s one (“sim_physics” branch), which shines on it. Consequently, I have taken some time to mix the strength of both builds and now are the good news :)

Since sim_physics implementations are based on physics terms the most direct mapping to final opacity seems to be the total transmittance, so I only will need to check it as an additional condition to keep the volumetric integration loop, and that´s basically the modification :), simple but powerful and allow a new range of effects for sim_physics and at the same time cut down render times for thick volumetrics.

Here I show you some results :

normal-21s93

No ERT: render time = 21s 93

trrclamp-939s

ERT: 9s 39

The new Parametter added is Thickness in range from 0 to 3.0, 0 performs the full volumetric integration for every ray as is now sim_physics, while other value stops the integration when the accumulated transmitance reach the value specified for the user.

capture2

More examples:

normal2-t21s38

No ERT: 21s 38

trrclamp-01-t1629s

ERT, thickness=0.1 : 16s 29

trrclamp-02-t1438s

ERT, thickness=0.2 : 14s 38

With big volumes and denser smokes the render time gained is more noticed :)

capture3

No ERT: 1s 52                ERT, thickness=0.2 : 0s 52

Off course, the final quality is up to the user, and does not only depend on the thickness parameter, because there will always be a need for either very transparent volumetrics or very opacy ones.

Volumetrics with lot of empty areas will gain little with ERT but they are already optimized thanks to your build so now we could have best of both builds!

Also, now are possible new range of volumetric effects that sim_physiscs have lacked since it was focused on thinnier smokes, take a look:

normal3-t5s25

No ERT: 5s 25

trrclamp2-01-t447s

ERT, thickness=0.1 : 4s47

capture4

ERT,thickness=0.3: 3s 80                           ERT, thickness=0.6 : 2s 86

Now are achieved a desired effect, the volumetric blobs seems denser enough to totally occlude anything behind it and that is in control of the user, previously with combinations of density scale,absorption,emission and so this effect where very difficult if not impossible to achieve, volumetrics keep looking too transparent and that was due to the full ray integration.

Here is the very interesting effect with little render time :)

trclamp-20-t1s49

ERT, thickness=2.0: 2s 59

and finally some screen captures..

all

all2

banner2

About these ads

15 thoughts on “Cutting down render times…

  1. This is excellent news! The Renders look great! And now for some more great news; VoxelData texture has been put into the svn sim_physics branch! Graphicall.org has just approved my application! :) So I will upload a build as soon as I can. I am having some trouble building the sim_physics branch with the voxeldata.c file so it might be awhile before I can make a stable build.
    Keep up the good work!

  2. At the same, collectible dolls are?The finest of, who were unwilling.Pioneered the concept, The bandage will.Change as the to get six pack, The day of revising it You.And establish creating, person clicks on.,

  3. My greatest appreciation to this community and to the owner and members of this blog. I really appreciate your unity, you cooperation, and your love to the subject of this blog.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s