Karma mipmap textures memory usage optimisation

   2918   5   5
User Avatar
Member
30 posts
Joined: Feb. 2021
Offline
Hello,

we are dealing with a vast environment scene, loading a large number of 4k udims chokes the karma render. by using mips we thought we could optimise the io traffic and avoid unnecessary texture data processing. Currently we are using rat files and generally the render is very slow, the memory usage is over 150G. note that the geometry itself is not impacting very much on the memory usage, possibly the displacement is effecting it in part. Any suggestion about how to optimise a karma render from a texture strategy prospective is appreciated.


Moreover, I have a few questions about mipmaps used in karma for debugging purposes, and just to make sure we are using them correctly:

  • how do I display the level info of a rat file? tried to use iinfo command but it does not show it.
  • is any advantage to use mipmaps exrs rather than rat files?
  • can i force the mipmap levels in solaris/karma? the texture node does not seem having a mip level attribute
  • how can I visually debug mipmaps that are applied in the in the render scene? is it possible to output a mip aov in the render?
  • by loading the texture in mplay, does it show individually the mipmap levels?


Cheers,
R.
User Avatar
Staff
2590 posts
Joined: July 2005
Offline
Looking at render stats should help figure out where memory is being used up. With verbosity, the log should show how much memory was used by .rat files and by primvars (including displacement memory). Displacement memory should be better in H19.5.

- .rat files are always MIP Mapped. I don't think there are any tools to extract a specific MIP level.
- imaketxcan be used to make mipmapped .exr or .rat files (or even .tif files). The advantage of .exr is that there are a lot of other tools that can be used (for example houdini ships with hoiiotool- the OIIO Swiss-army knife utility). The disadvantage of mipmapped .exr files is that they are 16 bit float images, so you can't create an 8-bit texture for example.
- karma uses the screen space of the surface to determine the mip levels automatically. The shading quality can be adjusted using the shading quality multiplier in the render settings.
- For debugging mip maps, it's probably best to use .exr files since it's easy to create a map that has different diagnostics on each MIP level
- loading a .rat file in mplay will only display the largest MIP level.
User Avatar
Member
30 posts
Joined: Feb. 2021
Offline
Thanks for the help, these are very useful information.

for some reason I can not get detailed information rendering through pdg and deadline, do you have any tip?

R.
User Avatar
Member
30 posts
Joined: Feb. 2021
Offline
Hello,

I have further question, could large textures influence the io, increasing the network traffic and memory usage in significant way regardless the mipmap level they are using during the rendering?. would be a better strategy make sure the texture size does not exceed the real need of the render scene or it does not really matter if we are using mipmap textures? with mipmaps in Karma will the texture lookup request only the mipmap level necessary for the render for even given sample without trying to load the entire texture?

Cheers
R.
User Avatar
Staff
2590 posts
Joined: July 2005
Offline
Having tiled mipmapped files means that the renderer only loads the portions of the texture that are required for rendering. So this saves on I/O.

Even if you have a 21K x 21K texture (https://visibleearth.nasa.gov/images/73909/december-blue-marble-next-generation-w-topography-and-bathymetry), if it's tiled and mip-mapped, the renderer will only load the portions of the image it needs to render. If you used the .png or .jpg as a texture, then the entire image would have to be read by the renderer.
User Avatar
Member
30 posts
Joined: Feb. 2021
Offline
Cheers Mark
  • Quick Links