Reload all textures in Octane for Cinema 4D

Maxon Cinema 4D (Export script developed by abstrax, Integrated Plugin developed by aoktar)

Moderators: ChrisHekman, aoktar

User avatar
Ferdinand13
Licensed Customer
Posts: 154
Joined: Sun Apr 03, 2016 4:21 pm
Location: United Kingdom

Hi everyone,

I've started to include Substance Designer and Painter into my texturing workflow more and more and so far things work well with Octane Render.

However, one thing is starting to really slow me down and quite frankly getting annoying.

Every time I make changes to the textures in Substance and save those changes (i.e. the texture maps - in my case PNGs - that have been generated prior are updated/overwritten by Substance), I am faced with the issue of updating the textures in Cinema 4D. The file links have remained the same, but there doesn't seem to be a way to refresh/reload all textures linked to Octane materials within a scene in one go.

I've tried Cinema 4D's 'Reload All Textures' command, as well as selecting all the textures in Octane's 'Texture Manager' before clicking on 'Reload' in the 'Shader' tab on the right (which to be honest is already more involved then I like). None of those do the trick. So far, the only surefire ways to refresh the textures used, are to click 'Reload' for every texture in the Texture Manager, or to quit Cinema 4D and restarting it.

I've searched online and on this forum, but couldn't find any solution. Surely there must be a more user friendly way to achieve such a simple task?

So I was wondering, if any of you would know of a sure way to reload/refresh textures in Octane for Cinema 4D - ideally without even having to restart another render? That'd be really good to know.


Thanks.
Custom PC, Intel Core i7-6800K, 48GB RAM, 3x MSI GeForce RTX 2080 Super Seahawk EK, Windows 10
Razer Blade Pro 17, Intel Core i7-10875H, 32GB RAM, 1x NVIDIA GeForce RTX 3080, 1x EVGA GeForce GTX 1080 Ti Hybrid (eGPU), Windows 10
User avatar
omardex
Licensed Customer
Posts: 75
Joined: Wed Oct 21, 2015 4:45 pm
Location: Venezuela
Contact:

I can relate to this problem too, octane simply doesn't recognize texture changes saved, unless you save with another name and load such new iteration of your textures, that is a pain.

other thing that also happens is that if textures have similar names but stored in different places e.g wood_01.png, octane simple use the first assigned regardless the material you put it in. (this one is no much of an issue, but for library or db materials is trouble, the textures have to be renamed and reassigned)

there is an option in the "other" settings of octane that read " use texture caching" and I think this is the root, octane interprets, stores and caches the textures to easy read and access to the engine.

perhaps a texturing development button in the toolbar that disables temporarily this function could be useful.
Omar Tavera
Awesome Generalist

omardex.artstation.com

Octane render for c4d but moving more toward standalone with one 980ti
User avatar
aoktar
Octane Plugin Developer
Posts: 16066
Joined: Tue Mar 23, 2010 8:28 pm
Location: Türkiye
Contact:

There's a button in ImageTexture to reload current image. "Reload". Using the caching the texture option will not avoid this operation.
Attachments
a1.jpg
Octane For Cinema 4D developer / 3d generalist

3930k / 16gb / 780ti + 1070/1080 / psu 1600w / numerous hw
User avatar
omardex
Licensed Customer
Posts: 75
Joined: Wed Oct 21, 2015 4:45 pm
Location: Venezuela
Contact:

aoktar wrote:There's a button in ImageTexture to reload current image. "Reload". Using the caching the texture option will not avoid this operation.
thanks Aoktar, that helps when updating one texture, but for multiple textures on different materials becomes a time consuming option, when exporting from substance painter the user exports a material deffinition with all involved textures (albedo, roughness, metallness, height, normals, and others if neccesary) all at the same time. and in the same software you can edit multiple materials and its deffinitions.

thanks again.
Omar Tavera
Awesome Generalist

omardex.artstation.com

Octane render for c4d but moving more toward standalone with one 980ti
User avatar
aoktar
Octane Plugin Developer
Posts: 16066
Joined: Tue Mar 23, 2010 8:28 pm
Location: Türkiye
Contact:

omardex wrote:
aoktar wrote:There's a button in ImageTexture to reload current image. "Reload". Using the caching the texture option will not avoid this operation.
thanks Aoktar, that helps when updating one texture, but for multiple textures on different materials becomes a time consuming option, when exporting from substance painter the user exports a material deffinition with all involved textures (albedo, roughness, metallness, height, normals, and others if neccesary) all at the same time. and in the same software you can edit multiple materials and its deffinitions.

thanks again.
You can still write a python script for making automatised updates.
there's IMAGETEXTURE_FORCE_RELOADED parameter of ImageTexture in Bool format. It will update it if you write TRUE in to this parameter.
Octane For Cinema 4D developer / 3d generalist

3930k / 16gb / 780ti + 1070/1080 / psu 1600w / numerous hw
User avatar
omardex
Licensed Customer
Posts: 75
Joined: Wed Oct 21, 2015 4:45 pm
Location: Venezuela
Contact:

aoktar wrote:
omardex wrote:
aoktar wrote:There's a button in ImageTexture to reload current image. "Reload". Using the caching the texture option will not avoid this operation.
thanks Aoktar, that helps when updating one texture, but for multiple textures on different materials becomes a time consuming option, when exporting from substance painter the user exports a material deffinition with all involved textures (albedo, roughness, metallness, height, normals, and others if neccesary) all at the same time. and in the same software you can edit multiple materials and its deffinitions.

thanks again.
You can still write a python script for making automatised updates.
there's IMAGETEXTURE_FORCE_RELOADED parameter of ImageTexture in Bool format. It will update it if you write TRUE in to this parameter.
this helps a lot more, super appreciated.
Omar Tavera
Awesome Generalist

omardex.artstation.com

Octane render for c4d but moving more toward standalone with one 980ti
User avatar
aoktar
Octane Plugin Developer
Posts: 16066
Joined: Tue Mar 23, 2010 8:28 pm
Location: Türkiye
Contact:

omardex wrote: this helps a lot more, super appreciated.
Let me know for more help of writing a simple python code.
Octane For Cinema 4D developer / 3d generalist

3930k / 16gb / 780ti + 1070/1080 / psu 1600w / numerous hw
User avatar
Ferdinand13
Licensed Customer
Posts: 154
Joined: Sun Apr 03, 2016 4:21 pm
Location: United Kingdom

Hi Aoktar, hi Omardex,

Thanks a lot for your support.

Yes Omardex, I've been really struggling to update all the texture sets that Substance generates in one go.

So would this Python script (IMAGETEXTURE_FORCE_RELOADED parameter of ImageTexture in Bool format) be the solution? If it is 'automatic' would this mean, every time you'd overwrite the texture sets in Substance, the Octane plugin would immediately refresh those textures?

Apologies for being a bit thick here Aoktar, but how exactly would this be implemented? I haven't got the slightest idea about coding for Cinema/Octane. Or will you be able to produce such a script Omar? And if so, would you be willing to share it?

And Aoktar, going forward, would it be possible to add a button/setting that would activate automatic texture reloads when using Octane in C4D? That'd be super-helpful!
Custom PC, Intel Core i7-6800K, 48GB RAM, 3x MSI GeForce RTX 2080 Super Seahawk EK, Windows 10
Razer Blade Pro 17, Intel Core i7-10875H, 32GB RAM, 1x NVIDIA GeForce RTX 3080, 1x EVGA GeForce GTX 1080 Ti Hybrid (eGPU), Windows 10
User avatar
omardex
Licensed Customer
Posts: 75
Joined: Wed Oct 21, 2015 4:45 pm
Location: Venezuela
Contact:

Ferdinand13 wrote:Hi Aoktar, hi Omardex,

Thanks a lot for your support.

Yes Omardex, I've been really struggling to update all the texture sets that Substance generates in one go.

So would this Python script (IMAGETEXTURE_FORCE_RELOADED parameter of ImageTexture in Bool format) be the solution? If it is 'automatic' would this mean, every time you'd overwrite the texture sets in Substance, the Octane plugin would immediately refresh those textures?

Apologies for being a bit thick here Aoktar, but how exactly would this be implemented? I haven't got the slightest idea about coding for Cinema/Octane. Or will you be able to produce such a script Omar? And if so, would you be willing to share it?

And Aoktar, going forward, would it be possible to add a button/setting that would activate automatic texture reloads when using Octane in C4D? That'd be super-helpful!
well I'll fail miserably, my phyton skills are not stellar level.

but my understanding will go like this: (if someone interested makes a script for us)

-get all materials in the scenes, pick all octane ones (standards, blends, mix's,etc)
-get all the image textures in those materials
-run the reload command

all with the push of a button in the toolbar.

is still manual not like other workflows in other softwares that scans the directories and update the files on the air. but is better that go texture by texture, c4d standard materials in the main render or the physical render work like octane (or that way before octane), they dont update the textures until run the command "reload textures".

other solution is a command in the main software (the standalone) that temporarily scans the textures (as I said before a texture development mode)
Omar Tavera
Awesome Generalist

omardex.artstation.com

Octane render for c4d but moving more toward standalone with one 980ti
User avatar
Ferdinand13
Licensed Customer
Posts: 154
Joined: Sun Apr 03, 2016 4:21 pm
Location: United Kingdom

Hey Omardex, hi Aoktar,

Trust me, I'd fare a lot worse than you. But yes, agreed on the bullet points of what it should be able to do. To chime in, yes, the least we'd need for Cinema would be an Octane equivalent of the 'Reload all Textures' button below:
ReloadAllTextures.jpg
ReloadAllTextures.jpg (23.73 KiB) Viewed 7911 times
That'd save almost all my problems for now.


By the way, Aoktar, just FYI, my research on the forum prior to starting this post revealed the following:

viewtopic.php?f=45&t=46873

It seems like they were working on a solution to this problem in the Octane plugin for Poser, back in 2015. Did anything come of that?
Custom PC, Intel Core i7-6800K, 48GB RAM, 3x MSI GeForce RTX 2080 Super Seahawk EK, Windows 10
Razer Blade Pro 17, Intel Core i7-10875H, 32GB RAM, 1x NVIDIA GeForce RTX 3080, 1x EVGA GeForce GTX 1080 Ti Hybrid (eGPU), Windows 10
Post Reply

Return to “Maxon Cinema 4D”