How do Iray shaders impact GPU RAM?
in The Commons
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
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
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.
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.
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