Jump to content

Textures not updating in viewport


Recommended Posts

I have searched the odforce forums and seen about 8 or so previous posts on this subject.

They all seem to suggest typing in an hscript texport "texcache -c", or using the shelf tool in the "Texture" tab called "clear texture cache" which does the same thing. This doesn't work for me. I am using Houdini 12.1.185 on linux.

My test scene is a simple cube with a clay material applied using an aribtrary texture in the "Base color map" parameter.

I overwrite the map on disk and want the display in the viewport to update either dynamically or by updating manually to display the new texture.

No matter how I try, the "texcache" command doesn't seem to do this.

First thing:

Should this command do something in this case and am I doing something wrong?

Second thing:

What does seem to update the texture in my viewport is choosing the "Update Textures" from the "Render" menu.

I want to understand what commands this is running behind the scenes and what types of textures in what contexts it will update.

For example, will it only update textures in "/shop" or will it update any textures used in shop subnets elsewhere in the houdni session as well?

End goal:

Basically I am using Houdini fur and I am running into an issue when I overwrite my length map for example, and I can't get the new map to be detected without restarting my Houdini session. It is proving to be a big problem...

Any help would be great!

Cheers everyone.

Link to comment
Share on other sites

Have the same issue (but in sops - using color map or texture vops). Reported, was confirmed as bug and was suggested to use Update textures in render menu (just as you did).

Although i have some more weird things - i have my cached geo (using file sop) still visible (sometimes) in viewport even if i turn off geo node.

It may be something similair with texture problem - no recook when you're changing something or two completely different things.

Edited by bloomendale
Link to comment
Share on other sites

Well good to know I'm not just doing something stupid. What I would still love to know however is what the code is that is being run when the "Update Textures" option from the render menu is chosen. I want to put it in a shelf tool along with some other code...

Anyone know?

Link to comment
Share on other sites

texcache is now only for op:/ references in OPs, as of H11. It does not contain viewport (GL) textures; it is now more accurately an image cache.

'glcache -c' is the command that is run for clearing viewport textures, which affects the OpenGL Cache in the cache manager.

Link to comment
Share on other sites

Riiiight, thats better cheers Mark, I could see that my texture cache was being cleared because I did a

texcache -l

and I got the following message...

Cache contains 0 images

0 bytes used in texture image cache

That made me think it was a gl update issue.

Didn't see that command though. It updated my viewport as I wanted.

I can't imagine a time when you would want to clear your texture cache and not have the viewport update... seems a bit weird to me.

It'll be great when sideFX get round to updating the python equivalent of code like these too.

Thanks again!

Link to comment
Share on other sites

I was wondering about this. Running 12.1.230, and I'm trying to force Houdini to update textures per frame in a shop.

I'm doing game engine visualization using the openGL rop and the results are inconsistent. I'm animating a bunch of prerendered image sequences on sprites and having a heck of a time getting it working.

I tried adding opcook and glcache clear to my pre frame scripts but that results in a core dump.

The weird thing is, it sometimes works. I close and reopen the file and it doesn't work, just renders the first image in the texture sequence.

/edit Render> Update textures just crashes my session.

/edit #2

Trying it in 12.5 the behavior is more predictable. I can use opcook -F to force the shaders to update on each frame and that gives me a workaround for now

Edited by kurtw
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...