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

15 responses to “Cutting down render times…”

  1. Very nice, indeed. 🙂

    Like

  2. Muy bueno,
    practicamente no veo diferencia entre los renders, supongo que no se pierde mucha informacion.

    Like

  3. FANTASTICO 😀 exelente noticia!!!!!! se ven iguales la verdad y el recorte de tiempos de render es magnifico

    Like

  4. Wow! Uno mas al que le parece exelente 😉

    Like

  5. Thanks for all this information, I’m learning a lot from this project! I’m rendering Demo smoke now 🙂

    Like

  6. Ever more promising. Great work, Thanks ! I’m very impressed. Can I purchase some of your superfluous neurons ?

    Like

  7. great work!

    Like

  8. Hi,

    Matt Ebb just reviewed and included the ERT and voxeldata code.
    http://lists.blender.org/pipermail/bf-blender-cvs/2008-December/017027.html
    Now you can use sim_physics build for both Farsthary and Matt’s codes! 🙂

    thanks guys!

    Like

  9. 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!

    Like

  10. After reading this article, I just feel that I really need more info. Could you share some resources ?

    Like

  11. 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.,

    Like

  12. collectible dolls are expensive too specially if you got the premium and rare ones .

    Like

  13. 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.

    Like

  14. Wow, incredible blog structure! How lengthy have you ever been running a blog for? you made blogging glance easy. The overall glance of your web site is magnificent, well the content material!

    Like

  15. Great opinonsI will give this some thought!!!

    Like

Leave a comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Hey!

I’m Bedrock. Discover the ultimate Minetest resource – your go-to guide for expert tutorials, stunning mods, and exclusive stories. Elevate your game with insider knowledge and tips from seasoned Minetest enthusiasts.

Join the club

Stay updated with our latest tips and other news by joining our newsletter.