Refreshing .rat textures, how?

   2564   10   4
User Avatar
Member
67 posts
Joined: 6月 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 - 2024年2月20日 06:39:02
User Avatar
Member
874 posts
Joined: 10月 2008
Online
render menu -> update textures ?
--
Jobless
User Avatar
Member
453 posts
Joined: 4月 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]
User Avatar
Member
205 posts
Joined: 11月 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]
User Avatar
Member
453 posts
Joined: 4月 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.
Edited by BrianHanke - 2024年2月23日 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]
User Avatar
Member
8132 posts
Joined: 9月 2011
Offline
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 - 2024年2月23日 13:16:35
User Avatar
Member
453 posts
Joined: 4月 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

Attachments:
tex.mp4 (753.6 KB)

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]
User Avatar
Member
8132 posts
Joined: 9月 2011
Offline
BrianHanke
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).

yikes
User Avatar
Member
4 posts
Joined: 11月 2023
Offline
It's kinda hard to use the Karma for look dev if you can't update a material texture to try things out.
User Avatar
Member
3 posts
Joined: 6月 2017
Offline
Any update on this issues? I use a material baker to create textures and when I bake the textures new files are written to disk, but the materials in Houdini do not update. The *.rat files all seem out of date. "Render" -> "Update Textures" is not doing anything. I am using Houdini 20.5.550 and Solaris Karma CPU/XPU (neither works).
User Avatar
Member
453 posts
Joined: 4月 2018
Offline
No updates that I know of...
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]
  • Quick Links