XGenRenderAPI::PatchRenderer causes clumping guide ID error after editing xgen parameters

XGenRenderAPI::PatchRenderer causes clumping guide ID error after editing xgen parameters

swflyKXVT3
New Member New Member
139 Views
4 Replies
Message 1 of 5

XGenRenderAPI::PatchRenderer causes clumping guide ID error after editing xgen parameters

swflyKXVT3
New Member
New Member

Hello,

 

We’re integrating XGen via XGenRenderAPI for our own renderer. Parsing works, but when artists edit XGen parameters and we re-parse in the same Maya session, XGen emits repeated errors:

 

“clumping guide ID larger than number in xuv file”
Deleting .xuv before parse avoids the error. In Arnold, when caches are stale, we see:
[xgen] Batch mode tests failed! proceeding with Xgeneration... using live scene data
— which appears to force a “live scene data” path and avoids stale clump caches.

 

What we’re doing:

auto* patch = XGenRenderAPI::PatchRenderer::init(&cb, cmd.c_str());
auto* par = XGenRenderAPI::ParallelRenderer::init(patch);

cb implements ProceduralCallbacks (flush/log/get* etc.). Even with an empty flush(), the stale .xuv issue persists unless we delete them first.

 

The question is: 

  • How to trigger “live scene data” reliably from a third-party renderer? Is there a documented cmd string or flag for PatchRenderer::init(...) to bypass batch caches and use live scene data (like MtoA’s fallback), or is the intended approach to fail batch validation and let XGen switch internally?

  • Best-practice cache handling: What is Autodesk’s recommended approach to avoid clump ID desync without deleting user .xuv maps? For example, does XGen provide a supported API call to regenerate clumping maps programmatically or to redirect the clump “Points Dir” per-parse to an isolated location?

Thank you very much.

 

Accepted solutions (1)
140 Views
4 Replies
Replies (4)
Message 2 of 5

957714080
Explorer
Explorer

I also encountered the same problem

0 Likes
Message 3 of 5

cheng_xi_li
Autodesk Support
Autodesk Support
Accepted solution

Hi,

 

In XGenRenderAPI::ProceduralCallbacks, there is a callback

 

bool Procedural::get(EBoolAttribute in_attr) const

You can try to return true when the in_attr is ClearDescriptionCache. It will cause XGen render reloading the description. 

 

You can use mtoa's handling policy. When it isn't exporting a file or a batch session, it will always try to clean the cache first.

 

Hope it helps.

 

Yours,

Li

Message 4 of 5

957714080
Explorer
Explorer

Thank you, it can be resolved. That's great

0 Likes
Message 5 of 5

swflyKXVT3
New Member
New Member

Thanks this totally solves the problem. 

0 Likes