XPU seems to update when I restart the renderer from the viewport menu, but CPU stubbornly holds onto the textures. I've tried:
-bypass/unbypass the usduvtexture node
-disconnect/reconnect the wires to the usduvtexture node
-bypass/unbypass the material library
-use the render menu at the top, render->update textures
-restart the render
If I close and restart houdini then the textures are updated, but that's not great if I'm trying to do rapid lookdev.
how to force karma (cpu) to update textures?
7103 14 4-
- mestela
- Member
- 1832 posts
- Joined: May 2006
- Offline
-
- jason_iversen
- Member
- 12786 posts
- Joined: July 2005
- Online
I think you can do it from the Cache Manager, clear the viewport Textures.
Jason Iversen, Technology Supervisor & FX Pipeline/R+D Lead @ Weta FX
also, http://www.odforce.net [www.odforce.net]
also, http://www.odforce.net [www.odforce.net]
-
- mestela
- Member
- 1832 posts
- Joined: May 2006
- Offline
-
- goldleaf
- Staff
- 4227 posts
- Joined: Sept. 2007
- Offline
Render > Update Textures, then Restart Render works for me every time... If that doesn't work for you, it's probably worth logging a bug with your OS/system info (which is probably a good idea anyway, if we don't happen to catch the forum threads, or if lots of fires pop up, forum posts can slip from our radar...)
We are working to improve this area, the feedback is much appreciated
We are working to improve this area, the feedback is much appreciated
I'm o.d.d.
-
- goldleaf
- Staff
- 4227 posts
- Joined: Sept. 2007
- Offline
-
- FoamFX
- Member
- 10 posts
- Joined: May 2017
- Offline
Hello
Somewhat related, but I've noticed that it's not possible to overwrite texture files when it's being read in Karma.(Both MaterialX and PrincipleShader, and I'm on 19.0.444)
The only workaround I've found is to click on Render > Update Textures. Then it's possible to replace or delete the texture file on disk. But once we "restart render", it's not possible to do so anymore.
Wonder if there's any reason for this? Cause I've tried on Arnold and it doesn't seem to have the same problem.
Would it be a good idea to implement so that every time we restart a render, it also starts the "update textures" command to? So that we can overwrite texture anytime.
Somewhat related, but I've noticed that it's not possible to overwrite texture files when it's being read in Karma.(Both MaterialX and PrincipleShader, and I'm on 19.0.444)
The only workaround I've found is to click on Render > Update Textures. Then it's possible to replace or delete the texture file on disk. But once we "restart render", it's not possible to do so anymore.
Wonder if there's any reason for this? Cause I've tried on Arnold and it doesn't seem to have the same problem.
Would it be a good idea to implement so that every time we restart a render, it also starts the "update textures" command to? So that we can overwrite texture anytime.
Edited by FoamFX - Nov. 22, 2021 10:19:32
-
- Hamilton Meathouse
- Member
- 205 posts
- Joined: Nov. 2013
- Offline
Something like this could work in the meantime Matt. Just map it to a hotkey or something:
panes = hou.ui.paneTabs() sceneviewers = [] curDesktop = hou.ui.curDesktop() desktopName = curDesktop.name() #####identify scene viewers#### for p in panes: if p.type() == hou.paneTabType.SceneViewer: sceneviewers.append(p) for v in sceneviewers: hou.hscript("texcache -n") a = v.restartRenderer()
Edited by Hamilton Meathouse - Nov. 23, 2021 20:48:05
-
- mestela
- Member
- 1832 posts
- Joined: May 2006
- Offline
Thanks!
Sounds like the update Goldleaf mentioned earlier does that too, but I'm mainly concerned about the times when no amount of texcache forcing or viewport restarts will clear text caches. It happens 5% of the time on a good day, 50% of the time on a bad day. Lucky for me I've finished my lookdev tasks for now, hoping this'll all be more reliable the next time I take a look.
-matt
Sounds like the update Goldleaf mentioned earlier does that too, but I'm mainly concerned about the times when no amount of texcache forcing or viewport restarts will clear text caches. It happens 5% of the time on a good day, 50% of the time on a bad day. Lucky for me I've finished my lookdev tasks for now, hoping this'll all be more reliable the next time I take a look.

-matt
-
- Hamilton Meathouse
- Member
- 205 posts
- Joined: Nov. 2013
- Offline
I have found that destroying the sceneviewer and putting a new one down sometimes fixes stuff like that (and there is a script from Dan Finnegan floating around odforce somewhere that does that (which is where I stole parts of my code above from). But yeah, still annoying to have to do.
You'll need to edit it to deal with LOPs viewers though, if it's something you're interested in.
*EDIT: linky https://forums.odforce.net/topic/22465-shelf-tool-solution-to-certain-houdini-viewport-bugs/?do=findComment&comment=134239 [forums.odforce.net]
You'll need to edit it to deal with LOPs viewers though, if it's something you're interested in.
*EDIT: linky https://forums.odforce.net/topic/22465-shelf-tool-solution-to-certain-houdini-viewport-bugs/?do=findComment&comment=134239 [forums.odforce.net]
Edited by Hamilton Meathouse - Nov. 23, 2021 22:15:02
-
- raincole
- Member
- 607 posts
- Joined: Aug. 2019
- Online
-
- mestela
- Member
- 1832 posts
- Joined: May 2006
- Offline
Semi-related, Karma seems super aggressive in holding locks on textures on disk, so other processes can't update or delete them.
In this case I'm using tops to pull in a variety of images in various formats, ffmpeg/imagemagick to conform them to png's that are 512x512, then tops/lops to create materials that use those images.
Several times now once Karma has generated a render, the images are locked. Swapping to HoudiniGL, restart the render, move to a node before the materials are created etc.. all the usual drills, windows can't delete the textures, tops can't update or delete the textures.
Now and then I'll have luck making another lopnet, display that context, now the textures are unlocked, but again, this isn't a viable solution in the long term.
In this case I'm using tops to pull in a variety of images in various formats, ffmpeg/imagemagick to conform them to png's that are 512x512, then tops/lops to create materials that use those images.
Several times now once Karma has generated a render, the images are locked. Swapping to HoudiniGL, restart the render, move to a node before the materials are created etc.. all the usual drills, windows can't delete the textures, tops can't update or delete the textures.
Now and then I'll have luck making another lopnet, display that context, now the textures are unlocked, but again, this isn't a viable solution in the long term.
-
- mtucker
- Staff
- 4537 posts
- Joined: July 2005
- Offline
-
- shareware
- Member
- 41 posts
- Joined: March 2018
- Offline
Hi, sorry to revive this old thread but there still seems to be a lot of issues with reloading textures. It really slows down the workflow.
It would be nice if op:// paths to cops reloaded automatically, but even an overwritten image file will not update reliably.
The hscript and python commands usually mentioned don't seem to work either, and I followed advice in another thread using a USD preview and collect node in combination with a MaterialX shader in the hopes the GL view would work.
Any more advice on getting live texture updates on image save would be great. I was hoping some post-render command would do it but alas
edit: Update Textures works better in a 'main' viewport, but not in one that's been split off.
It would be nice if op:// paths to cops reloaded automatically, but even an overwritten image file will not update reliably.
The hscript and python commands usually mentioned don't seem to work either, and I followed advice in another thread using a USD preview and collect node in combination with a MaterialX shader in the hopes the GL view would work.
Any more advice on getting live texture updates on image save would be great. I was hoping some post-render command would do it but alas
edit: Update Textures works better in a 'main' viewport, but not in one that's been split off.
Edited by shareware - Dec. 24, 2023 05:07:12
-
- ben_the_animator
- Member
- 4 posts
- Joined: Nov. 2023
- Offline
Not that this is a real solve or anything but...
If you cannot update your texture in Karma XPU, switch to CPU mode. Then go to your texture folder and delete the ".rat" file. Then go back and switch to XPU. It will regenerate the rat. They really need to make that "Render>Update Textures" menu work with Karma XPU.
If you cannot update your texture in Karma XPU, switch to CPU mode. Then go to your texture folder and delete the ".rat" file. Then go back and switch to XPU. It will regenerate the rat. They really need to make that "Render>Update Textures" menu work with Karma XPU.
-
- DASD
- Member
- 487 posts
- Joined: Feb. 2013
- Offline
This might not be relevant, but when I had texture cache update issues with baked textures (that did not show on materials), this did the trick for me:
hou.hscript("glcache -c")
You can also try:
hou.hscript("texcache -c")
or
hou.hscript("texcache -n")
(This is also kind of a note for myself for future reference.)
hou.hscript("glcache -c")
You can also try:
hou.hscript("texcache -c")
or
hou.hscript("texcache -n")
(This is also kind of a note for myself for future reference.)
-
- Quick Links