Community
Arnold for Cinema 4D Forum
Rendering with Arnold in CINEMA 4D using the C4DtoA plug-in.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Correct way to setup procedurals

14 REPLIES 14
Reply
Message 1 of 15
infoMMJ2X
965 Views, 14 Replies

Correct way to setup procedurals

Hi guys,

I'm currently working on some scenes that use Procedurals quite a lot, but I can't for the life of it figure out the correct way to set this whole thing up correctly.

The problem is - sometimes it works, and then all of the sudden C4DtoA can't find the *.ass files anymore. I already searched the forums and found a relevant topic ( https://answers.arnoldrenderer.com/questions/2775/strange-behaviour-on-ass-file-with-relative-path.h... ) .

But as suggested there I already put all my *.ass files into the tex folder.

Might the problem be, that I use nested Procedurals?

Basically I have vegetation assets that I scatter in a very large scene, which causes C4D to slow down a lot, because it has problems with handling huge amounts of scattered objects. So I converted the scattered vegetation to an *.ass, which then should contain all scattered procedurals which are my actual vegetation assets.

So for example I have a 80MB "Grass Scattered" Procedural, which contains 150.000 scattered Grass Objects as Procedurals.

As this whole setup needs to work on a renderfarm and relative paths don't work as the other thread states I've put all my procedurals (both the Scattered Procedurals and the actual Asset Procedurals) in the tex folder.

Sadly though I still seem to do something wrong, because for some reason this setup works once, and then randomly seems to stop working, because the files can't be found anymore.

"C4DtoA | 00:00:56 7039MB ERROR| [ass] can't read in Vegetation_Carpinus_J.ass: No such file or directory".

Looking forward for any help - thanks in advance!

Labels (3)
14 REPLIES 14
Message 2 of 15

Does it fail locally or only on the farm (Team Render)?

Team Render clients download the assets from the server, so the plugin has to specify where the assets (e.g. ASS files) are located. The content of a procedural is basically hidden from the plugin, and you have a procedural inside a procedural, so basically the plugin does not know about the low level ASS files. You have to specify those on the Assets tab of your Arnold Procedural in your main scene. (If they are in the tex folder then just set the file name.)

However if it also fails locally (without Team Render) then it should be something else. Let me know.

Message 3 of 15
infoMMJ2X
in reply to: infoMMJ2X

Hi Peter!

Thanks for taking time to help me 🙂

So far I've only worked locally. The low level assets have been specified in the Top-Level Assets (entered the file name), and ALL assets are in the tex folder.

I just tried entering "./tex" in the Procedural Search Path and now it seems to be working again - but to be honest, I'm not 100% sure if that's really the fix.

Because as mentioned in my opening post, when I first converted all the assets etc. it worked perfectly fine, and then after restarting the IPR/C4D it all of the sudden didn't work anymore. So it just sporadically out of nowhere stopped working, so I'm not 100% convinced yet, that everything is fine now, because if I understood correctly, I shouldn't have to enter any search path when the assets are in the tex folder.

One thought that came to my mind:

In the Top-Level Assets I reference the Low-Level assets in the Assets tab. Could it be, that when I only enter the file name of the Low-Level assets, that they might not be found because somehow Arnold thinks of the tex folder as the root folder (since the asset is located there), and so by only entering the file name searches for a "second tex folder" inside the actual tex folder?

I'm not sure I'm making 100% sense here, but I'm quite confused right now, because I just can't figure out how at first this worked and then just stops 😕

Thanks again! 🙂

Message 4 of 15
Stephen.Blair
in reply to: infoMMJ2X

That error is because a nested procedural has just the filename, with no path. If there was any path, it would be in the message.

"C4DtoA | 00:00:56 7039MB ERROR| [ass] can't read in Vegetation_Carpinus_J.ass: No such file or directory".


// Stephen Blair
// Arnold Renderer Support
Message 5 of 15
infoMMJ2X
in reply to: infoMMJ2X

Hi Stephen,

thanks for taking the time to help!

I'm not sure I fully understand what you mean or much rather how I would set this up correctly. I thought if all Assets are in the tex folder no paths are needed. Also I can't use absolute paths, because I need to send this job to a renderfarm later on.

Here is a screenshot of the way I set it up:

787-2018-01-19-201414.jpg

Message 6 of 15

OK, I think I see where the problem is. The plugin finds the assets in export time, and so it can send them to the TR client, but it does not actually add the tex folder to the search path. So the low-level assets are not found in render time. Adding ./tex to the search path is not a good workaround, because it's relative to the current working directory, which is undefined inside C4D (not necessarily the project root). This is definitely a bug with nested procedurals. I'll try to fix this on Monday and send you a build.

Message 7 of 15
infoMMJ2X
in reply to: infoMMJ2X

That would be awesome Peter! As always thanks for the great support! 🙂

Message 8 of 15

Could you please try this build? Let me know if the issue is still there.

https://safeshare.solidangle.com/index.php/s/CA5VRslOwaqPhCl

password: 9h5XZWAN

Message 9 of 15
infoMMJ2X
in reply to: infoMMJ2X

Hi Peter,

thanks for the new build! I gave it a try, but I again run into some inconsitencies. As far as I can tell the path issue seems to be resolved, but on my first try I got following error messages:

828-2018-01-23-204352.jpg

After that I did nothing but deactivate/activate the Procedurals and restart the render a few times and then the Procedurals all of the sudden rendered fine without any problems at all.

I could see that the error messages might occur because I directly convert Cloner-/Surface Spread Objects to ASS, but what I don't get is why they sometimes work and sometimes don't, without anything having changed in the scene/settings.

I only tested for an hour so far, so nothing I said here is 100% certain. If I can help testing in any way let me know!

Thanks again! 🙂

Message 10 of 15

It might be a collision in node names. Nodes are identified by names, so if two nodes (two shaders for instance) have the same name in two different procedurals, they collide and the result depends on which procedural is loaded first. You can avoid this if you specify different namespaces per procedural.

I'm not completely sure that's the problem with your scene, but the inconsistencies might come from that.

Message 11 of 15

Btw, if you can reproduce the issue and send me a scene, then I can take a closer look.

Message 12 of 15
infoMMJ2X
in reply to: infoMMJ2X

Hi Peter,

I'll look into the namespaces - I encountered this part of the manual while looking for a solution initally, but didn't quite understand the namespaces at first. I'll definetly give that a try.

On what level would collisions between shaders for example occur? Do they occur when 2 nodes in the same Network have the same name, or do they occur when an object has more than one material applied and nodes in those 2 different networks have the same name?

Also are there any specifics to have in mind when declaring namespaces?

I'm sure the solution is in there, as I think the paths now seem to work fine 🙂

Thanks!

Message 13 of 15

Only procedurals can collide, the plugin takes care of other objects and shaders in the scene. So for instance if you have two shaders with the same name in a network, then the plugin adds an index to the second when exports it to Arnold. However the plugin can not change the content of the procedurals, they are black boxes.

Don't use any special characters in the namespaces, otherwise there's no special rule.

Message 14 of 15
infoMMJ2X
in reply to: infoMMJ2X

Ok, just to check that I get it right:

For example I have 5 gras assets that all get the same material applied, then for each of the 5 objects I should use a separate namespace per asset?

Message 15 of 15

Yes, exactly, than you can be sure they won't collide.

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report