Refreshing .rat textures, how?
1822 8 1- sniegockiszymon
- Member
- 67 posts
- Joined: June 2022
- Online
Hey guys, how are you refreshing textures in XPU? Since .rat files on xpu I've got issue when updating textrues (in that scenario I'm using cops and render them to disk) but houdini doesnt udpate .rat files whenever original textures is updated. I cant even delete this rat texture without closing houdini because windows says its being used
Edited by sniegockiszymon - Feb. 20, 2024 06:39:02
- Soothsayer
- Member
- 874 posts
- Joined: Oct. 2008
- Offline
- BrianHanke
- Member
- 448 posts
- Joined: April 2018
- Offline
I've often wondered about this myself, but I don't think it's possible to refresh textures. I imagine the intended workflow is to increase the version in the file name any time you update a texture.
Subscribe to my Patreon for the best CG tips, tricks and tutorials! https://patreon.com/bhgc [patreon.com]
Twitter: https://twitter.com/brianhanke [twitter.com]
Behance: https://www.behance.net/brianhanke/projects [www.behance.net]
Twitter: https://twitter.com/brianhanke [twitter.com]
Behance: https://www.behance.net/brianhanke/projects [www.behance.net]
- Hamilton Meathouse
- Member
- 200 posts
- Joined: Nov. 2013
- Offline
A few things you can try are mentioned in this thread. Seems you're not the first to run into texture refresh issues.
https://www.sidefx.com/forum/topic/81603/ [www.sidefx.com]
https://www.sidefx.com/forum/topic/81603/ [www.sidefx.com]
- BrianHanke
- Member
- 448 posts
- Joined: April 2018
- Offline
I dug into this some more to try to get reproducible steps. Here's what does and doesn't work for me on Houdini 20.0.610 on Windows 10:
Karma CPU
- Can't overwrite texture while CPU running
- Can't overwrite texture while CPU paused
- Can't overwrite texture after switching to GL
- Can overwrite texture after switching to XPU
- Once CPU releases the texture then it reads the updated texture without any extra steps
Karma XPU
- Can overwrite texture at any time
- Pause or restart does not update texture
- Switch to GL, Reset Karma XPU, switch to XPU does not update texture
- Render > Update Textures while XPU running does not update texture
- Render > Update Textures, restart render, texture now all black
- Repeat above step again, texture now updated
- Render > Update Textures, switch to GL, Reset XPU, switch to XPU, texture now all black
- Render > Update Textures again, restart render, texture now updated
I think there are some other combos that work with XPU, but you get the idea.
Long story short, neither CPU or XPU gets it right. CPU locks the texture, XPU does it right. CPU updates the texture without any extra steps, XPU does not. I think the way it should be in both CPU and XPU is the texture never gets locked and it updates automatically.
Karma CPU
- Can't overwrite texture while CPU running
- Can't overwrite texture while CPU paused
- Can't overwrite texture after switching to GL
- Can overwrite texture after switching to XPU
- Once CPU releases the texture then it reads the updated texture without any extra steps
Karma XPU
- Can overwrite texture at any time
- Pause or restart does not update texture
- Switch to GL, Reset Karma XPU, switch to XPU does not update texture
- Render > Update Textures while XPU running does not update texture
- Render > Update Textures, restart render, texture now all black
- Repeat above step again, texture now updated
- Render > Update Textures, switch to GL, Reset XPU, switch to XPU, texture now all black
- Render > Update Textures again, restart render, texture now updated
I think there are some other combos that work with XPU, but you get the idea.
Long story short, neither CPU or XPU gets it right. CPU locks the texture, XPU does it right. CPU updates the texture without any extra steps, XPU does not. I think the way it should be in both CPU and XPU is the texture never gets locked and it updates automatically.
Edited by BrianHanke - Feb. 23, 2024 08:38:58
Subscribe to my Patreon for the best CG tips, tricks and tutorials! https://patreon.com/bhgc [patreon.com]
Twitter: https://twitter.com/brianhanke [twitter.com]
Behance: https://www.behance.net/brianhanke/projects [www.behance.net]
Twitter: https://twitter.com/brianhanke [twitter.com]
Behance: https://www.behance.net/brianhanke/projects [www.behance.net]
- jsmack
- Member
- 8046 posts
- Joined: Sept. 2011
- Online
BrianHanke
Karma XPU
- Can overwrite texture at any time
- Pause or restart does not update texture
- Switch to GL, Reset Karma XPU, switch to XPU does not update texture
- Render > Update Textures while XPU running does not update texture
- Render > Update Textures, restart render, texture now all black
- Repeat above step again, texture now updated
- Render > Update Textures, switch to GL, Reset XPU, switch to XPU, texture now all black
- Render > Update Textures again, restart render, texture now updated
I think there are some other combos that work with XPU, but you get the idea.
Long story short, neither CPU or XPU gets it right. CPU locks the texture, XPU does it right. CPU updates the texture without any extra steps, XPU does not. I think the way it should be in both CPU and XPU is the texture never gets locked and it updates automatically.
did you get the automatically generated rat files to regenerate? XPU doesn't use the textures directly if they don't have mip maps.
I wonder if the hscript command texcache -c will delete them, or if the external command line htexcache -c is needed.
Edited by jsmack - Feb. 23, 2024 13:16:35
- BrianHanke
- Member
- 448 posts
- Joined: April 2018
- Offline
Yes, the XPU steps create an updated .rat file (the original texture is .jpg in my test). Here's a clip showing the texture corruption that happens with texcache -c (which I assume is what Render > Update Textures is doing).
Image Not Found
Subscribe to my Patreon for the best CG tips, tricks and tutorials! https://patreon.com/bhgc [patreon.com]
Twitter: https://twitter.com/brianhanke [twitter.com]
Behance: https://www.behance.net/brianhanke/projects [www.behance.net]
Twitter: https://twitter.com/brianhanke [twitter.com]
Behance: https://www.behance.net/brianhanke/projects [www.behance.net]
- jsmack
- Member
- 8046 posts
- Joined: Sept. 2011
- Online
- ben_the_animator
- Member
- 4 posts
- Joined: Nov. 2023
- Offline
-
- Quick Links