Page 1 of 1

Texture cache size when rendering with Clarisse Python API

Unread postPosted: Wed Aug 03, 2022 9:09 am
by lzfboy007
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?

Re: Texture cache size when rendering with Clarisse Python A

Unread postPosted: Wed Aug 03, 2022 9:31 am
by anemoff
Hi,
What do you mean by texture cache does not take effect?

Re: Texture cache size when rendering with Clarisse Python A

Unread postPosted: Thu Aug 04, 2022 3:04 am
by lzfboy007
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 ?

Re: Texture cache size when rendering with Clarisse Python A

Unread postPosted: Thu Aug 04, 2022 9:56 am
by anemoff
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,

Re: Texture cache size when rendering with Clarisse Python A

Unread postPosted: Fri Aug 05, 2022 9:10 am
by lzfboy007
抱歉,是我没表述清楚
我用的是 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?

Re: Texture cache size when rendering with Clarisse Python A

Unread postPosted: Fri Aug 05, 2022 10:11 am
by anemoff
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)

Re: Texture cache size when rendering with Clarisse Python A

Unread postPosted: Fri Aug 12, 2022 8:51 am
by lzfboy007
Thanks a lot, your answer solved my problem