Refreshing textures in the viewport HOW?

   14802   12   4
User Avatar
Member
581 posts
Joined: July 2005
Offline
Hi all.
Maybe this topic has been covered before.
My doubt is how to update textures in the opengl viewport, if a have a model with a shader that uses textures if i apply a texture it is visualized in the viewport, but if then i change the texture i don't have anyway to refresh it in Houdini. The only way ia have found is writing again the file name in the texture parameter field or obviously restarting Houdini.
The SHOP viewer pane updates correctly when you change a texture but the OBJ and SOP viewers not, how can i solve this?
Is there any “Refresh Image” button for the textures (or something similar)?

Thanks.
Un saludo
Best Regards

Pablo Giménez
User Avatar
Member
7710 posts
Joined: July 2005
Offline
You could try running “texcache -c” in the textport.
User Avatar
Member
581 posts
Joined: July 2005
Offline
Thanks edward.
I think that the texcache should have an interface in the “Main Settings” dialog to ease the setup of the textures in the viewport.
Un saludo
Best Regards

Pablo Giménez
User Avatar
Member
581 posts
Joined: July 2005
Offline
I forget to mention> how can i force a refresh of the 3D viewer, i haven't found any hscript comand to do it.

Thanks
Un saludo
Best Regards

Pablo Giménez
User Avatar
Member
4256 posts
Joined: July 2005
Offline
lisux
Thanks edward.
I think that the texcache should have an interface in the “Main Settings” dialog to ease the setup of the textures in the viewport.

Its there already, its the bottom entry on the Cache Manager.

(Alt + Shift + M)

As for your other question,

will viewupdate do what you want?

viewupdate -u now
if(coffees<2,round(float),float)
User Avatar
Member
581 posts
Joined: July 2005
Offline
Thanks Wolfwood.
the Cache Manager is new to Houdini 8?
Every day ones learn something new
And yes, viewupdate it was i looking for.
Un saludo
Best Regards

Pablo Giménez
User Avatar
Member
581 posts
Joined: July 2005
Offline
Again working with textures in Houdini …
And is a little pain :?
There is no way to interactively refresh a texture map to view the new texture in the viewport, Houdini has very good texture tools but lack of a good preview of them:
-First, like i have said, there is no interactive way to refresh a texture map. For example, the solution could be to have a Refresh button for every image file parameter entry, as part of the gadget, this refresh will reload the texture in the cache, and recooks the SHOP so the new texture will be seen in the viewport.
-The Cache Manager doesn't work for the texture cache, at least for the 8.0.539 on linux version. It doesn't clears the cache. ( bug?)
-A way to interactively use the -f option of the texture cache to allow Houdini to scan some texture files for changes. This option is great but enabling it from the textport is not the way to go for the general user.
And, well that's enough for today … I am pretty sure that more people have suffered these problems, please SESI imrpove the usability of textures in Houdini, the hard job is done, we only need interactive ways to control the cache manager not only the texcache command.
Thanks.
Un saludo
Best Regards

Pablo Giménez
User Avatar
Member
311 posts
Joined: July 2005
Offline
I'm sure most Houdini users aren't general users, so there is no need to clutter up the interface withg buttons for everything, but I take your point.
Issues like this can be frustrating. Dude, trying working with COPs for a bit.
If it's a persistent problem then it's trivial to create a custom panel button to do that anyway.
Sometimes there might be caching isues, in which case, turn off
texture view, flush cache, (maybe step to a new frame to force an update), then display texture again. A pain maybe, but then you hopefully aren't refreshing your texture cahe alll the time.
Somrtimes we have to live with these little issues just so we don't have to use Maya. Well, i do anyway.
User Avatar
Member
581 posts
Joined: July 2005
Offline
jesta
I'm sure most Houdini users aren't general users, so there is no need to clutter up the interface withg buttons for everything, but I take your point.
Issues like this can be frustrating. Dude, trying working with COPs for a bit.
If it's a persistent problem then it's trivial to create a custom panel button to do that anyway.
Sometimes there might be caching isues, in which case, turn off
texture view, flush cache, (maybe step to a new frame to force an update), then display texture again. A pain maybe, but then you hopefully aren't refreshing your texture cahe alll the time.
Somrtimes we have to live with these little issues just so we don't have to use Maya. Well, i do anyway.
I think that use textures is for general and advanced users.
Add a button, close to the the button that opens the file dialog is not an overloading of the gui, i think.
I have worked with COPs and I have had good reults, yes it isn't have many tools like shake, nuke or fusion.
But now, what I mean is that we have excellent tools to make UV mapping, but view this results in the viewport is a pain, is a little contradiction to develop a geat UVPelt, but i can't use it because I can't previsualize, easily my textures.
And I am used to Houdini, imagine when I try to convice other people use it.
Un saludo
Best Regards

Pablo Giménez
User Avatar
Member
7024 posts
Joined: July 2005
Offline
Hey Pablo,
I don't disagree that something easier should be available, however I bind this to a hotkey

texcache -c ; viewdisplay -N all m on *.*.* ; viewdisplay -N all off *.*.*

This forces the GL to refresh by turning on and then off the display of points. A hack to be sure, but works quite well.

Cheers,

Peter B
User Avatar
Member
581 posts
Joined: July 2005
Offline
pbowmar
Hey Pablo,
I don't disagree that something easier should be available, however I bind this to a hotkey:

texcache -c ; viewdisplay -N all m on *.*.* ; viewdisplay -N all off *.*.*

This forces the GL to refresh by turning on and then off the display of points. A hack to be sure, but works quite well.

Cheers,

Peter B
Thanks Peter, always useful advices from u.
I am going to try it now!
But i guess I only can link it to a function key using alias, not? (Again the old RFE of linking a script to any key )
And, I have to teach to students how to use textures with Houdini, think when I have to say:
Well you know all of this great tools, now to refresh them type this in the texport and make this alias
For a exprienced user is no problem, for for newbies who have their first contact with Houdini is the hell.
I think I should give them a custom 123.cmd with the alias :shock:
Un saludo
Best Regards

Pablo Giménez
User Avatar
Member
581 posts
Joined: July 2005
Offline
pbowmar
texcache -c ; viewdisplay -N all m on *.*.* ; viewdisplay -N all off *.*.*

This forces the GL to refresh by turning on and then off the display of points. A hack to be sure, but works quite well.

Peter B
Another option that I prefer, is a little cleaner I think:
'texcache -c ; opcook -F `mousepath()`'
And I have added it to the OPmenu file too to a easier integration in the UI, adding this line to the OPmenu file:
“Sop/* Shop/*” refreshTextures “Refresh Textures” scripts/refreshTextures.cmd
And created a script called refreshTextures.cmd in the script directory with this code:
texcache -n ; opcook -F $arg1
I think that using the -n modificator is more optimum than using the -c.
Anyone have had luck using the -f modificator to scan for file changes in Linux., It is supose that it wll update the texure if the file changes, not?
I have tried it with no luck, and many times having crashes when I activate the file scaning.
The code is now in the exchange for everybody.
Un saludo
Best Regards

Pablo Giménez
User Avatar
Member
2 posts
Joined: Feb. 2021
Offline
i just opened the toolbar button and changed texcache to glcache and now it works.

for clarity, just type in: glcache -c
  • Quick Links