instancing optimization : speed vs memory

BillyGames

Member
Game Developer
Apr 16, 2020
100
213
can anyone explain to me the difference between memory, speed and auto ?
i tried to look around and couldnt find anything useful
the render with more light on the back of the girl rendered with speed option
why it have more light ?

the light is ghost light (i dont know if that matter)

thank you






2-1.png
2-1-1.png
 
  • Like
Reactions: ohshi

Xomap

New Member
May 22, 2020
14
6
I'd need more information on which raytracer/system you're using for a more useful reply...
From what I gather, "speed" is a fast-rendering option that skips through many surface and lighting-related computations and branching, so the output is usually less detailed than the others. (this affects greatly on shadows, reflection and other light and surface phenomena)
"memory" probably stores intermediate computations on the system's memory, therefore a costly way of rendering that improves the outcome.
"auto" would be a middle-ground, it bails from a costly computation by detecting certain patterns, usually improving cost/benefit.
 
Last edited:

BillyGames

Member
Game Developer
Apr 16, 2020
100
213
well, what kind of information do you need?
I have GTX 1050ti, windows 10. daz 4.12.107 and latest studio driver I just downloaded it 2 days ago
from the 2 pictures that i attached the one with better lighting is the one with speed option
from what i understand from your post, memory is the best option right ? (to get the best quality)
 

Xomap

New Member
May 22, 2020
14
6
Not really the "best" option, it just means it has more detail (i.e. the light bounces between objects even if they're not a mirror, penumbra forms around shadows, surfaces emit some light even if they're not light sources, etc). If that's what you want, then yes. But more detail also has drawbacks, like color distortion, visual artifacts, blur, etc. You'd have to come to a compromise between what works best for you, fast rendering with additional options to improve quality or slow rendering with lots of detail and possible distortions.
Each graphics card has its own kink, like some ATi cards usually have a problem with lots of shadows, though I'm not sure about GTX 10xx series, you'd have to google it to find out. It doesn't mean a graphics card is bad because of that, it just means there is a trade-off between what it is good at and its shortcomings...
I don't have much experience with DAZ, though I understand it's quite popular around here, so I can't help you on the specifics... I'm mainly a programmer and very fond of mathematics and games. Although, I do have some experience with raytracers and graphics in general...
And I agree, the speed option looks more appealing. Good job, btw.
 
Last edited:

Lewdpanda95

Newbie
Sep 9, 2018
36
19
I didn't think this option would influence the rendering result at all. The Iray programmers manual says following about instancing:

3.6Instancing
Iray supports two ways of handling scene geometry: flattening and instancing. Several modes are available to control how and which geometry is instanced. The choice of mode is controlled by the following attribute on the class:

mi::IString iray_instancing
Controls the instancing mode in Iray, which can be one of the following values, where "off" is the default:

"off" If instancing is disabled (the default), all scene geometry is flattened into a single memory block. Geometry that is instanced multiple times in the scene will be duplicated. This mode almost always leads to higher memory use than using instancing "on", but often yields higher rendering performance.

"on" If instancing is enabled, all instanced geometry will only exist once, so input scene instances will also be instances in the rendering core. This may yield a significantly lower memory footprint, but may incur significant runtime costs, especially if the geometric extent of the instances overlap. Iray will also apply incremental object transform updates when instancing is enabled. This mode significantly reduces the scene preprocessing runtime overhead when moving objects around dynamically.

"user" Without further intervention, this mode behaves like the "off" mode. This mode allows for fine-grained control over what is instanced and what is flattened. Scene elements like objects, groups, and instances can be tagged for instancing, as explained in the following section. Iray will also apply incremental instance transform updates when user instancing is enabled. This mode significantly reduces the scene preprocessing runtime overhead when moving around (flattened) instances.

"auto" If instancing is set to auto mode, Iray will automatically detect and decide which objects to instance, in order to reduce the memory footprint and speed up object transform updates. Input scene instances will usually be all instanced in the rendering core, unless there is a significant downside for memory or performance. This mode may significantly reduce the scene preprocessing runtime overhead when repeatedly changing the transformation of a group or (flattened) instance. In addition, this mode responds to the same controls as the user mode.
I didn't get any smarter by this but maybe you can figure it out. If you do please tell.
 

Xomap

New Member
May 22, 2020
14
6
From what I understand, the scene is rendered by either flattening, as in losing fine-grained surface elements like roughness, brightness and little variations and taking similar elements as equals (perhaps a bit like saying parrots and canaries look just like ravens in a distance) so it just transfers the simplified ones to memory and render it all, or instancing, as in creating a whole new process just to calculate those tiny variations in relation to everything else (a nightmare when it comes to animations or overlapping instances, but actually renders faster when moving around simple or repeated instances, because it cancels out ahead of time). The "user" option allows to create just the right amount of processes to calculate these variations in the elements you choose and "auto" tries to detect some "easy" elements to calculate.
 
Last edited:

BillyGames

Member
Game Developer
Apr 16, 2020
100
213
This has escalated quickly, I just want to know why in "speed" it gave more light than "memory".
I guess I'll just have to go with good old trial and error and finds what works with me without understanding anything xD
But I do appreciate Your answers
Thank you
 
  • Like
Reactions: Xomap

Xomap

New Member
May 22, 2020
14
6
Tl;dr: it doesn't give more light, it just forgets there are shadows being cast there
 

BillyGames

Member
Game Developer
Apr 16, 2020
100
213
now thats a very good logical answer xD
But the thing is that light came from a ghost light, you said you don't know about daz, and i don't know if ghost light is a thing only on daz or not so I am going to explain it
its a surface that emits light and its transparent and its right behind that butt in the picture
so there should be no shadows :p
 
  • Angry
Reactions: Xomap

Xomap

New Member
May 22, 2020
14
6
Nope... As I said, light bounces (and it bounces in a different way depending on roughness, etc) and each bounce casts a shadow in the opposite direction... Every light source is a "ghost light" before rendering the object that emits it.
One way to see it is to imagine the "speed" option as a "before" and the other one as an "after" tracing all the shadows that it could, or a "coitus interruptus" if you will...
The fact that I don't know DAZ means I don't know "how many" it can trace not "how it does it"...
 
Last edited:

BillyGames

Member
Game Developer
Apr 16, 2020
100
213
You do seem more knowledgable than me for sure, Thank you for your input.
Maybe if I get smarter one day, I'll come back to this thread and maybe I'll understand something.
Thank you
 

Synx

Member
Jul 30, 2018
495
475
Memory and speed option has nothing to do with shadow casting or lightning and shouldnt really provide different results. The only difference it effects is render time and memory usage.

With speed option your whole scene is loaded into your GPU's memory. It gives faster rendering, but with larger GPU memory usage.

With memory option only unique geometric objects are loaded into the GPU memory. This is particulary usefull if you got a scene with a large amount of the same objects, as instead of loading them all in it will just load one of them and use the same parameters for all the objects with the same geometry. It often gives slower rendering time, but requires much less GPU memory. You mainly use this when your scene gets to large to fit in your GPU's memory at once.

It looks to me more you accidently turned of the ghost light behind the character in the first render.
 

Xomap

New Member
May 22, 2020
14
6
Thanks for clearing up what are the "speed" and "memory" options. I was confused since I believed DAZ uses IRay, as LewdPanda pointed out... Indeed, what I said applies to the IRay options "on", "off", "user" and "auto", DAZ must interface with it somehow with its own options... Perhaps "memory" is passed to IRay as "on" and "speed" is "off"? Never would have guessed turning off the ghost light, though :LOL:
 
Last edited: