Author Topic: Mapping Randomizer performance cost  (Read 118 times)

Today at 10:39:35

John_Do

  • Active Users
  • **
  • Posts: 261
    • View Profile
Hi,

I converted a material to stochastic tiling and saw a noticeable impact on performance, much more than what I was expecting.

The scene is just a plane with a material :





Results with a stop condition of 10 passes
  • base : around 20M rays/s
  • with mapping randomizer - HQ blending : 4M rays/s
  • with mapping randomizer - no HQ blending : 10.1M rays/s
(Corona 13 / C4D 2025.3.3)

I know there is some performance penalty to expect when using the shader but this much, is it normal ?

Thanks !

Today at 12:39:07
Reply #1

romullus

  • Global Moderator
  • Active Users
  • ****
  • Posts: 9337
  • Let's move this topic, shall we?
    • View Profile
    • My Models
What is the amount of blending in your example? I find that outside of HQ blending the amount has the most impact on performance. I always try to reduce it as much as possible, since the default value is way too generous. I find that with textures that are stochastic in nature like in your example you can get away with values as low as 0.05, especially if HQ blending is enabled. Reducing blending amount not only greatly improves performance, but also doesn't degrade texture quality as much as higher blending amount values do.
I'm not Corona Team member. Everything i say, is my personal opinion only.
My Models | My Videos | My Pictures

Today at 14:46:08
Reply #2

John_Do

  • Active Users
  • **
  • Posts: 261
    • View Profile
What is the amount of blending in your example?

The default value so 0.25.

Tried your suggestion with 0.05, rays/s are now equal to the standard blending scenario but with a visually much better result. Good tip !

Still, it's half of the base performance, I'm wondering if there is room for improvement.

Today at 15:45:12
Reply #3

romullus

  • Global Moderator
  • Active Users
  • ****
  • Posts: 9337
  • Let's move this topic, shall we?
    • View Profile
    • My Models
My guess is that you're seeing such big difference in performance because there's nothing else in the scene apart the plane with randomized material on it which occupies most of the screen space. In a more typical scene where many objects have materials without randomizer, its impact on overall performance should be much smaller.
I'm not Corona Team member. Everything i say, is my personal opinion only.
My Models | My Videos | My Pictures

Today at 16:11:15
Reply #4

maru

  • Corona Team
  • Active Users
  • ****
  • Posts: 13849
  • Marcin
    • View Profile
Out of curiosity: is the performance difference substantially lower if you disable bump mapping in that material? My guess is that randomizing a normal map may be costly.
Marcin Miodek | chaos-corona.com
3D Support Team Lead - Corona | contact us