Force Rhino to refresh textures cache

Is there a way to refresh the cache for the material textures when a vray texture bitmap is modified ?
I have this annoying problem where I modify a texture in a material, although it renders properly, it doesn’t show up updated in the viewport.
The cache seems to be in C:\Users\Username\AppData\Local\Temp\McNeel\RDK\Texture Cache
Is this the cache folder for vray or for Rhino rendering engine … or is it the same for both?
If I uncheck ‘plugin’ in the object properties material tab, the texture gets updated because Rhino renderer takes the
proper path and assigns it to the equivalent Rhino material.
However, when I check the ‘plugin’ box, it wants to assign the texture in cache and it’s still the old one.
Of course if I empty manually the cache folder, then I get blank textures in the viewport because Rhino doesn’t find them anymore …
How can I force vray to refresh the texture with the most recent one ?

Hi Juan, for the Rhino viewport try to use the command _RefreshAllTextures.

c.

Hi Clment,
Refreshalltextures doesn’t update the viewport. I still see the old texture …
Not even switching to Rhino render.
However, both vray and rhino engines render th new texture but the viewport still doesn’t update …

I know this problem from V4 times when i baked textures and updated them, the old images where shown even when overwritten. The only way i remeber to get around it is to rename the texture and reassign it.I think this is maybe a bug. btw. i never change anything in the cache folder, just cleaning it up from time to time if the content got too big.

c.

I’d say it is a bug. That’s what I tried earlier, to rename the texture but still shows the old one …

Hi Juan, thats strange. If i rename and reassign, it updates immediately the viewport without using _RefreshAllTextures. On my side VRay renders the file which is on disk when i overwrite the last one, i do not think it uses the cache folder rhino uses. Maybe @matt_newberg can sheed some light here, if VRay uses a cache for textures at all?

c.

Both Vray and Rhino engine render fine like I said earlier but the viewport wont update. Even I tried now to assign atotally different texture to the material and still didn’t update.
The thing is that if I go to the object properties (or layer if the material is bylayer) and I untick under material tab ‘plugin’ it will revert to a similar rhino material with that texture and as soon I I click in the texture source for ‘color’ the texture updates instabtly in the viewport. However, if I tick again ‘plugin’ as the material type, I get the old one …

Still stuck with this problem … has anybody found a solution ? @matt_newberg ?
I tried also to figure out in twhat folder the textures are cached.
I tried emptying:
C:\Users\Juan\AppData\Local\Temp
C:\Users\Juan\AppData\Local\Temp\McNeel\RDK\Texture Cache
C:\Users\Juan\AppData\Local\Temp\ChaosGroupTextureCache
… and the stubborn old texture keeps showing up in the viewport even though vray renders the new one properly.
grrrr …

I don’t use Vray for Rhino so I don’t experience the problem you are having. When you saved the file did you check the “save textures” box? If so, perhaps that’s saved in the file and over writing something? Just an idea.

@juancarreras

Which version of v-ray are you using? Can you email me a file with textures that does this to matt.newberg@usa.chaosgroup.com. You can just export one object / texture so I can test this.

Thanks @ra_mull I didn’tt check the ‘save textures’ box.

Hi @matt_newberg
I’m using
Rhino Version 5 SR12 64-bit (5.12.50810.13095, 8/10/2015)
Vray 2.00.26400 sent on Oct 29, 2015
This was an internal release sent by Chaos support a while ago that
solved another issue that I was having with single decals tiling in the
viewport.
Unfortunately (or fortunately for me) last night I managed finally to
get rid of the cached texture after trying all sorts of things, clearing
temp files, etc. so now it displays the right texture and I cannot
reproduce the problem at the moment. I will definitely contact you
again as soon as the issue re-appears.
Thanks for you prompt support anyways
Juan