Isotropix Forums

Texture cache size when rendering with Clarisse Python API

General Discussion about Isotropix and CG related topics

Texture cache size when rendering with Clarisse Python API

Unread postby lzfboy007 » Wed Aug 03, 2022 9:09 am

When I use the Python API ix.render_iamge() to render, I found that the size of the texture cache does not take effect. Is there a way to deal with it in the API?
lzfboy007
 
Posts: 8
Joined: Sun Sep 22, 2019 7:56 am

Re: Texture cache size when rendering with Clarisse Python A

Unread postby anemoff » Wed Aug 03, 2022 9:31 am

Hi,
What do you mean by texture cache does not take effect?
Anthony Nemoff
Isotropix
R&D Engineer
User avatar
anemoff
 
Posts: 471
Joined: Wed Jan 13, 2016 10:10 am

Re: Texture cache size when rendering with Clarisse Python A

Unread postby lzfboy007 » Thu Aug 04, 2022 3:04 am

cnode -texture_cache 66560
The parameters set by this option do not take effect in ix.render_image()
When I render with cnode set to 66560, render time is 40 minutes
But the same parameter does not take effect in the ix.render_image() function, and the rendering will take 30 hours
So is there any way for ix.render_image() to adjust the texture cache ?
lzfboy007
 
Posts: 8
Joined: Sun Sep 22, 2019 7:56 am

Re: Texture cache size when rendering with Clarisse Python A

Unread postby anemoff » Thu Aug 04, 2022 9:56 am

The option -texture_cache works only in CNode. You can check this by seeing that -texture_cache is not documented in "clarisse -help".
Are you rendering in Clarisse?

In CNode, the -texture_cache option modifies the Preference "Input Output > Stream Texture Cache".
Therefore, you can use the following equivalent command-line option for Clarisse and CNode:
Code: Select all
-Input_Output.stream_texture_cache SIZE_IN_MiB

If you didn't know, you can obtain any preference command-line modifier by opening the Preferences window, right-mouse-click on an item, and select "Copy command-line argument".

Cheers,
Anthony Nemoff
Isotropix
R&D Engineer
User avatar
anemoff
 
Posts: 471
Joined: Wed Jan 13, 2016 10:10 am

Re: Texture cache size when rendering with Clarisse Python A

Unread postby lzfboy007 » Fri Aug 05, 2022 9:10 am

抱歉,是我没表述清楚
我用的是 Embedding Clarisse in a Python Host
然后执行下列python代码:
Code: Select all
from ix_helper import *

# creating clarisse application (this created an AppObject)
create_application('C:/Program Files/Isotropix/Clarisse iFX 4.0/Clarisse/module')

# loading the miniride project using Clarisse API
ix.load_project('C:/Program Files/Isotropix/Clarisse iFX 4.0/content/canyon/miniride.project')

# launch the evaluation and render the image at the current frame
render = ix.render_image('project://canyon/miniride')
   
# save the resulting image as a 8 bit PNG
ix.save_png8(render, 'C:/tmp/miniride')

The above code does not get the correct preference "Input Output > Streaming Texture Cache" size when rendering
May I ask what ptyhon code can be used to correctly set the Texture Cache size?
lzfboy007
 
Posts: 8
Joined: Sun Sep 22, 2019 7:56 am

Re: Texture cache size when rendering with Clarisse Python A

Unread postby anemoff » Fri Aug 05, 2022 10:11 am

Please only English on the forums.

Have you tried setting the preference via Python like this:

python code

ix.application.get_prefs().get_item("Input_Output", "stream_texture_cache").set_double_value(66560)
Anthony Nemoff
Isotropix
R&D Engineer
User avatar
anemoff
 
Posts: 471
Joined: Wed Jan 13, 2016 10:10 am


Return to General Discussion