How do Iray shaders impact GPU RAM?

Hi!

I'm curious as to how Iray shaders work in relation to GPU RAM Memory. Especially how the use of texture maps is handled by the GPU RAM:

Let's say I load up Victoria 7 and add the bump map to the top coat bump channel too. (By default it's only loaded into the base bump channel.) If I  render this out, will this map be loaded into GPU RAM twice or once? (it's the exact same map).

Also, what happens if I load up five Victoria 7 figures, with the exact same textures and give them a different look by using the diffuse overlay channel and/or the translucency channel? Will these texture maps be loaded into GPU RAM five times or only once?

Thanks a lot,

Kind regards,

Me

Comments

  • ChangelingChickChangelingChick Posts: 3,360

    My understanding is that each texture is loaded into RAM once no matter how many times it's used or how many other images are used with it. LIE is an exception of sorts because it actually creates a new image in a temp folder and references that image instead of the individual ones on rendering. 

  • Thanks for the reply!

    So if I use a shader that only uses a diffuse map of about 10 MB (theoretically) and use that diffuse map in like seven different channels, apply it to seven different figures, it would be applied 49 times, but only loaded up once? That would be so cool!!!

    If any one could confirm this?

    Thanks a lot,

    Me

  • nicsttnicstt Posts: 11,715

    A texture is only loaded once; it is, however, uncompressed, which takes up considerably more RAM, although it varies I belive depending on its quality.

  • HavosHavos Posts: 5,576

    Thanks for the reply!

    So if I use a shader that only uses a diffuse map of about 10 MB (theoretically) and use that diffuse map in like seven different channels, apply it to seven different figures, it would be applied 49 times, but only loaded up once? That would be so cool!!!

    If any one could confirm this?

    Thanks a lot,

    Me

    That is correct, but remember that it would be a pretty small texture map to only take 10MB. A typical 4Kx4K map used on characters will use a lot more than 10MB. Closer to 60-70MB uncompressed, although contrary to what nicstt said I was under the impression that the file was sort of compressed in the GPU, but only around 30-50%.

    What you can not do is look at the size of a texture jpg and assume that is the size it needs in GPU, it will be far more than that.

  • AllenArtAllenArt Posts: 7,175
    edited July 2018

    A shader and a texture are not the same. A texture is an image: a jpg, a png, etc. A shader is the rest of it - the settings that make the texture look shiny, matte, velvety, leathery, etc. A shader will supply gloss, refraction, volumetrics, subsurface scattering and all the settings that the textures are a part of. A shader can greatly impact render times. Overly refractive, reflective and volumetric shaders will slow a render down. If you set up a shader with diffuse only, add a texture map and render, it renders fast. Take that same texture image and add reflection, refraction or subsurface scattering and/or translucency and see how much longer it takes to render something ;). So, it's not the shaders that impact the gpu ram, but textures. The only time textures impact render times is when there are so many that you have no more slots on the gpu or the textures are so huge in size that they use up all the memory and dump the render over to cpu.

    Laurie

    Post edited by AllenArt on
  • ChoholeChohole Posts: 33,604
    edited July 2018
    And don't forget ther is a difference between a shader and a shader preset  
     
    A Shader Preset is FULL with no input needed from the USER. What you see it what it does from the file as it was meant to render. A Shader can be adjusted by the end user in many settings and applies at defaults. Those defaults are just a base the creator expects to be changed by the user to get the effect they need from the shader depending on lighting, textures and other factors.
    Thus a Preset is READY to render at load. A Shader is NOT render ready until adjusted by the user for the image it will be used in.
    Post edited by Chohole on
Sign In or Register to comment.