Does how much is in the scene have a bearing on Iray render time?

ToobisToobis Posts: 965
May come off as a pretty dumb q: say if you put in a bunch of scenery stuff for an iray render but in the end you decide a more simple closer render shot works best with minimal props and scenery visible than you planned on using but you do NOT bother to delete all the stuff you loaded previously when you thought you'd be using more of that setup than you actually did. Would the iray render time be longer even if the majority of the scene and props you were going to use before were not in the visible rendering shot? or would the fact that the stuff is still in the scene even though not visible for the final render, cause the render time to be longer than if you were to delete beforehand the stuff you were not going to show in the final render. Sorry if I'm not explaining it great but hopefully you get the jist of what I mean.

Comments

  • DMaxDMax Posts: 637
    edited July 2020

    From my limited knowledge, even if some stuff are completely outside of your final render, they nevertheless take up render resources unless they are completely deleted from the scene. Apparently, even if you were to hide those unused stuff, they will nevertheless take up render resources. There are tools in the store (eg. Scene Optimizer) that should help with this issue; I only just recently purchased this so cannot vouch for its efficacy.

    Hopefully a Daz pro will step in here to either confirm or correct my suspicions.

    Post edited by DMax on
  • barbultbarbult Posts: 24,240

    Yes, the unseen items will still affect the rendering, because they may cast shadows in your scene or be visible in reflections. If you hide the items by clicking the eye icon in the Scene pane, I've been told that they will not be sent to the Iray render engine. FWIW, Scene Optimizer is excellent and highly recommended. There is also a tool called Camera View Optimizer that you might consider.

  • ToobisToobis Posts: 965
    edited July 2020
    barbult said:

    Yes, the unseen items will still affect the rendering, because they may cast shadows in your scene or be visible in reflections. If you hide the items by clicking the eye icon in the Scene pane, I've been told that they will not be sent to the Iray render engine. FWIW, Scene Optimizer is excellent and highly recommended. There is also a tool called Camera View Optimizer that you might consider.

    K so even without any potential shadowing or reflections, would the fact they are just in the scene even if out of camshot make the render slower?

    Post edited by Toobis on
  • barbultbarbult Posts: 24,240
    Toobis said:
    barbult said:

    Yes, the unseen items will still affect the rendering, because they may cast shadows in your scene or be visible in reflections. If you hide the items by clicking the eye icon in the Scene pane, I've been told that they will not be sent to the Iray render engine. FWIW, Scene Optimizer is excellent and highly recommended. There is also a tool called Camera View Optimizer that you might consider.

    K so even without any potential shadowing or reflections, would the fact they are just in the scene even if out of camshot make the render slower?

    Yes, Daz Studio won't "know" whether they will cause shadows or reflections ahead of time. So all those items will be rendered and will affect the ray tracing calculations and use up your GPU RAM, even if in the end they don't cause shadows or reflections in your final image. That is my understanding, anyway.

  • bytescapesbytescapes Posts: 1,841
    edited July 2020

    I would expect them to have an impact as follows:

    • Even if the items are not visible, the texture maps and geometry for each item present in the scene would need to be loaded. This will add to the time needed to set up the render.
    • If the total memory required for all data loaded exceeds the available VRAM in your GPU, then Studio will drop back to CPU rendering, and you will see a major performance hit.
    • If you're doing CPU rendering and the memory required for textures and geometry exceeds the wired memory (i.e. available RAM) in your computer, then the OS will fall back on virtual memory (using the swap disk as memory) which will require it to page data to and from the disk. Even an SSD is slower than RAM memory, so you'll take another hit there.

    As far as I know, Iray does not perform any kind of pre-optimization -- figuring out which objects are visible in the render camera and only loading geometry and textures for those. I believe that it assumes that any object that is present and unhidden in the scene could potentially contribute to the appearance of the render, and so loads that object's textures and geometry accordingly.

    Even if all your geometry and textures fit in the VRAM on the GPU, I would still expect additional objects in the scene to have an impact on the render itself (as I say, it will slow down the setup phase). It seems likely to me that the Iray renderer would have to consider all the objects present in the scene in case they contribute to the final appearance. For example, if you had a large red cube that wasn't visible in the camera, that cube would still contribute some reflected reddish light to the scene as a whole (a render without that cube present ought to look different from a render with the cube present). And that's without even considering the reflectivity of any object in the scene. So the Iray renderer needs to take that cube into account when rendering. If, in place of the cube, you had an object with a complex geometry -- such as a figure -- then the renderer needs to work even harder to figure out how it would contribute to the render. So yes, I would expect a slower render.

    Moral: if you can't see it in the viewport -- and you don't expect it to be visible as a reflection or a shadow source -- hide it manually.

    Don't take this as gospel: I'm not familiar with the implementation and I haven't done experiments to verify what I say. But this is what I'd expect and, in any case, hiding objects that you're not interested in costs you only a few seconds and could pay big dividends.

    Post edited by bytescapes on
  • ToobisToobis Posts: 965

    K i think I get it now. Thankyou guys.

  • DMaxDMax Posts: 637
    Moral: if you can't see it in the viewport -- and you don't expect it to be visible as a reflection or a shadow source -- hide it manually.


    Does hiding (the "eye") in fact work or one has to delete unused items from the scene?

  • barbultbarbult Posts: 24,240
    DMax said:
    Moral: if you can't see it in the viewport -- and you don't expect it to be visible as a reflection or a shadow source -- hide it manually.


    Does hiding (the "eye") in fact work or one has to delete unused items from the scene?

    Richard Haseltine says it works, unless I misunderstood him. It seems to work for me in 4.12.2.6 Public Beta anyway.

  • Richard HaseltineRichard Haseltine Posts: 100,793
    barbult said:
    DMax said:
    Moral: if you can't see it in the viewport -- and you don't expect it to be visible as a reflection or a shadow source -- hide it manually.


    Does hiding (the "eye") in fact work or one has to delete unused items from the scene?

    Richard Haseltine says it works, unless I misunderstood him. It seems to work for me in 4.12.2.6 Public Beta anyway.

    Yes, actually turning the mesh visibility off means it isn't sent to the render engine. Making an item's surfaces trasnparent doesn't mean that, the mesh is still sent to the render engine even if it would evaluate to wholly invisible in the render.

  • PaintboxPaintbox Posts: 1,633

    Does using Iray Section make a difference?

  • Richard HaseltineRichard Haseltine Posts: 100,793
    edited July 2020
    Paintbox said:

    Does using Iray Section make a difference?

    As far as I know Iray itself does the sectioning, so the full scene data would be sent across. In fact that must be true, otherwise it couldn't show the hidden mesh in reflections and use it to block lights (that's off by default in DS, but I I think that is the thing it was intended to do as opposed to punching a hole in model).

    Post edited by Richard Haseltine on
  • Peter_DAPeter_DA Posts: 47

    I often use turning the mesh visibility off, when there are a lot of persons in my scenes. First I set some persons (with clothes and hair) to unvisible, render the picture. In the second step I set them back to visible, set the other persons (and their clothes and hair) to invisble, render the picture again and as 3rd step I merge the pictures with photoshop to one picture.

  • bytescapesbytescapes Posts: 1,841
    Peter_DA said:

    I often use turning the mesh visibility off, when there are a lot of persons in my scenes. First I set some persons (with clothes and hair) to unvisible, render the picture. In the second step I set them back to visible, set the other persons (and their clothes and hair) to invisble, render the picture again and as 3rd step I merge the pictures with photoshop to one picture.

    I've used that trick before (although not, I think, with DAZ Studio) when for some reason the renderer couldn't cope with all the models in the scene. With Iray, it might be a good way to handle a scene with a lot of figures that would normally fill up the VRAM on the graphics card and so cause Iray to fall back to CPU rendering.

    There might be a few scenes where rendering separately and then compositing wouldn't produce the desired results. If for example, the shadow of one figure would fall on another, then you won't get the same results if you render them separately (unless you want to mess around with shadow catchers). But overall, it's a good trick to know about.

  • Peter_DAPeter_DA Posts: 47
    There might be a few scenes where rendering separately and then compositing wouldn't produce the desired results. If for example, the shadow of one figure would fall on another, then you won't get the same results if you render them separately (unless you want to mess around with shadow catchers). But overall, it's a good trick to know about.

    You are right and in some cases it requires some trickery in Photoshop, but it's faster than waiting while rendering all models at once.

  • RD2ARTRD2ART Posts: 28

    A good trick I use is to get all the items in the scene and then hide all extra items, then save and exit. Open the program again and unhide what you want. The hidden object's textures seem not to load into VRAM if they are not used perviously during a render or if they are hidden when you load the scene.

Sign In or Register to comment.