question

Ciro Cardoso avatar image
Ciro Cardoso asked ·

Operators - Collection

I want to use more Operators to control my scenes. Going to the next level, I have hope. For this particular situation, what I have is a massive scene, with trees, grass, forest pack, tons of stuff. Now what I need to do is adding some people, but I don't want to render the entire scene again.


I want to apply a shadow matte to everything except to those 3 or 4 models. In my mind it is easier to select everything and subtract those models and then apply the shadow matte.


My question is what parameter do I need to add to the Collection Operator for that to happen?

operatorscollection
10 |600 characters needed characters left characters exceeded

Up to 5 attachments (including images) can be used with a maximum of 2.0 MiB each and 9.8 MiB total.

Ciro Cardoso avatar image
Ciro Cardoso answered ·

Ok, thanks to Stephen for the reply and help with this. A summary of the workflow

*.(@node=='polymesh' or @node=='ginstance') and not(name== '/model1' or name =='/dummy/*'))


Then to change the material and if you are using Shadow Matte, you need to assign the not the Map to Material node, but the Shadow Matte map.

shader="/shader_name"

10 |600 characters needed characters left characters exceeded

Up to 5 attachments (including images) can be used with a maximum of 2.0 MiB each and 9.8 MiB total.

Ciro Cardoso avatar image
Ciro Cardoso answered ·

Still a little bit buggy the work with ARV and Operators, at least with the Shadow Matte.

mt-shadow.jpg


Using the ginstances to apply to the Forest Pack. Sometimes it works, others times it doesn't. Gosh I really hate Forest Pack. We need Bifrost as soon as possible.


mt-shadow.jpg (197.0 KiB)
1 comment
10 |600 characters needed characters left characters exceeded

Up to 5 attachments (including images) can be used with a maximum of 2.0 MiB each and 9.8 MiB total.

So, if the a Target node is active and you start ARV, doesn't apply the effect. You need to clear target and set target again.

0 Likes 0 ·
Ciro Cardoso avatar image
Ciro Cardoso answered ·

A couple of issues with this setup.


Sometimes the ARV doesn't respect the operator. The image bellow shows that

op2.jpg


But if I render it kind of works. Box002 isn't rendered with the material, but at the same time, Forest Pack gets ignored. Forest Pack and the geometry that is been scattered have unique names.

op3.jpg


Could this be a bug?


Here is the scene

https://we.tl/t-evhD2ukVfi


If you want to have a go.


op2.jpg (195.8 KiB)
op3.jpg (81.1 KiB)
14 comments
10 |600 characters needed characters left characters exceeded

Up to 5 attachments (including images) can be used with a maximum of 2.0 MiB each and 9.8 MiB total.

I'll take a look.

In the second screenshot, what is the expected result? The instances on the plane should be "red" ?

0 Likes 0 ·
Ciro Cardoso avatar image Ciro Cardoso Stephen Blair ♦♦ ·

Thanks Stephen. On the second screenshot the result should be seeing the green box only and everything else is red. I have a gif that shows the issue. Give me a second and I will upload it

https://we.tl/t-f8E6cknTwo


0 Likes 0 ·

Hi @Ciro

You'll need to test for ginstance nodes too. They have shaders applied to them too, and that overrides whatever shader is applied to the original polymesh.

*.((@node=='polymesh' or @node=='ginstance') and not (name== '/Box002'))


0 Likes 0 ·
Show more comments
Ciro Cardoso avatar image
Ciro Cardoso answered ·

Ok, for this scene I have 5 forest packs, but I can't find the number 5 on this list, so I am not sure how Forest Pack is interpreted.

00:01:08 68666MB         | there are 36 lights and 156367 objects:
00:01:08 68666MB         |       3 persp_camera
00:01:08 68666MB         |      35 quad_light
00:01:08 68666MB         |       1 skydome_light
00:01:08 68666MB         |     501 image
00:01:08 68666MB         |       1 utility
00:01:08 68666MB         |     358 standard_surface
00:01:08 68666MB         |     712 bump2d
00:01:08 68666MB         |     107 add
00:01:08 68666MB         |     765 complement
00:01:08 68666MB         |       6 divide
00:01:08 68666MB         |    1098 float_to_int
00:01:08 68666MB         |    1057 float_to_rgb
00:01:08 68666MB         |     159 fraction
00:01:08 68666MB         |       8 matrix_multiply_vector
00:01:08 68666MB         |      96 modulo
00:01:08 68666MB         |     504 multiply
00:01:08 68666MB         |      49 normal_map
00:01:08 68666MB         |       6 ramp_float
00:01:08 68666MB         |     918 shuffle
00:01:08 68666MB         |     998 state_float
00:01:08 68666MB         |     554 subtract
00:01:08 68666MB         |      12 switch_rgba
00:01:08 68666MB         |      60 switch_shader
00:01:08 68666MB         |      48 user_data_int
00:01:08 68666MB         |     918 user_data_rgba
00:01:08 68666MB         |       2 user_data_rgb
00:01:08 68666MB         |       8 vector_to_rgb
00:01:08 68666MB         |      27 driver_exr
00:01:08 68666MB         |       1 imager_exposure
00:01:08 68666MB         |       2 gaussian_filter
00:01:08 68666MB         |       1 closest_filter
00:01:08 68666MB         |       2 variance_filter
00:01:08 68666MB         |     237 polymesh
00:01:08 68666MB         |  156129 ginstance
00:01:08 68666MB         |       1 list_aggregate
00:01:08 68666MB         |       1 cryptomatte
00:01:08 68666MB         |      37 Max_Adapter
00:01:08 68666MB         |       1 max_driver

I am going to try and run some tests today.

4 comments
10 |600 characters needed characters left characters exceeded

Up to 5 attachments (including images) can be used with a maximum of 2.0 MiB each and 9.8 MiB total.

Forest pack is usually used to distribute a lot of instances.
So in this case, we need to find an entry with a relatively large amount of integers.
We find that the "ginstance" has 156129 ID's.

This is your main entry to forestpack, fetching the ginstance.

1 Like 1 ·

Yes, as MADs wrote, Forest Pack looks to be generating instances.

There will be one polymesh, and then a bunch of ginstances of that polymesh.

So you may have to just set the shader on one polymesh, which I imagine you can select by name. You could export an ASS file and check the name (maybe just export one "forest pack")

1 Like 1 ·
Ciro Cardoso avatar image Ciro Cardoso Stephen Blair ♦♦ ·

Thanks @ Mads and @


I did try a simple scene with a Forest Pack, Alembic and geometry. The *.(@node=='polymesh') selects everything, event the ForestPack and Alembic file.


However, the

and not (name== 'Box002')

Doesn't work

operator.jpg



0 Likes 0 ·
operator.jpg (194.9 KiB)
Show more comments
Stephen Blair avatar image
Stephen Blair answered ·

Depending on what is in the scene, you might have to use *.(@node=='abc')

If you do a test render, check the list of lights and objects. What do you get from Forest Pack? For example:

00:00:22   702MB         | there are 2 lights and 16 objects:
00:00:22   702MB         |       2 persp_camera
00:00:22   702MB         |       2 skydome_light
00:00:22   702MB         |      14 image
00:00:22   702MB         |       1 utility
00:00:22   702MB         |       1 lambert
00:00:22   702MB         |      11 standard_surface
00:00:22   702MB         |       3 bump2d
00:00:22   702MB         |       1 sky
00:00:22   702MB         |      11 color_correct
00:00:22   702MB         |       3 color_jitter
00:00:22   702MB         |       1 layer_shader
00:00:22   702MB         |       1 user_data_rgba
00:00:22   702MB         |       1 uv_transform
00:00:22   702MB         |       1 driver_exr
00:00:22   702MB         |       1 gaussian_filter
00:00:22   702MB         |       1 closest_filter
00:00:22   702MB         |      12 polymesh
00:00:22   702MB         |       1 list_aggregate
00:00:22   702MB         |       3 bifrost_graph


1 comment
10 |600 characters needed characters left characters exceeded

Up to 5 attachments (including images) can be used with a maximum of 2.0 MiB each and 9.8 MiB total.

I haven't forgot this. I will have a look during this weekend.

0 Likes 0 ·
Stephen Blair avatar image
Stephen Blair answered ·

I would do something like

*.(@node=='polymesh' and not(name== 'model1' or name =='model2'))

I'll do a quick test to verify the syntax...

1 comment
10 |600 characters needed characters left characters exceeded

Up to 5 attachments (including images) can be used with a maximum of 2.0 MiB each and 9.8 MiB total.

Thanks @ Stephen for the quick reply. But will this cover, Alembic files? In this case, the Forest Pack, wouldn't be necessary. If make all the geometry linked to a dummy, would that help?

0 Likes 0 ·

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 5 attachments (including images) can be used with a maximum of 2.0 MiB each and 9.8 MiB total.

Welcome to the Arnold Answers community.

This is the place for Arnold renderer users everywhere to ask and answer rendering questions, and share knowledge about using Arnold, Arnold plugins, workflows and developing tools with Arnold.

If you are a new user to Arnold Answers, please first check out our FAQ and User Guide for more information.

When posting questions, please be sure to select the appropriate Space for your Arnold plugin and include the plugin version you are using.

Please include images, scene and log files whenever possible as this helps the community answer your questions.

Instructions for generating full verbosity log files are available for MtoA, MaxtoA, C4DtoA, HtoA, KtoA, and Kick.

If you are looking for Arnold Documentation and Support please visit the Arnold Support site.

To try Arnold please visit the Arnold Trial page.

Bottom No panel present for this section.