Announcements

The Autodesk Community Forums has a new look. Read more about what's changed on the Community Announcements board.

Operators - Collection

CiroCardoso3v
Advisor

Operators - Collection

CiroCardoso3v
Advisor
Advisor

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?

Lead Enviroment Artist @Axis Studios

Arnold Discord Server


Ciro Cardoso

EESignature

0 Likes
Reply
Accepted solutions (1)
1,849 Views
27 Replies
Replies (27)

Stephen.Blair
Community Manager
Community Manager

I would do something like

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

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



// Stephen Blair
// Arnold Renderer Support
0 Likes

CiroCardoso3v
Advisor
Advisor

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?

Lead Enviroment Artist @Axis Studios

Arnold Discord Server


Ciro Cardoso

EESignature

0 Likes

Stephen.Blair
Community Manager
Community Manager

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




// Stephen Blair
// Arnold Renderer Support
0 Likes

CiroCardoso3v
Advisor
Advisor

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

Lead Enviroment Artist @Axis Studios

Arnold Discord Server


Ciro Cardoso

EESignature

0 Likes

CiroCardoso3v
Advisor
Advisor

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.

Lead Enviroment Artist @Axis Studios

Arnold Discord Server


Ciro Cardoso

EESignature

0 Likes

madsd
Advisor
Advisor

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.

0 Likes

Stephen.Blair
Community Manager
Community Manager

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")



// Stephen Blair
// Arnold Renderer Support
0 Likes

CiroCardoso3v
Advisor
Advisor

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



Lead Enviroment Artist @Axis Studios

Arnold Discord Server


Ciro Cardoso

EESignature

0 Likes

CiroCardoso3v
Advisor
Advisor

found the solution

and not (name == '/Box002')


Lead Enviroment Artist @Axis Studios

Arnold Discord Server


Ciro Cardoso

EESignature

0 Likes

CiroCardoso3v
Advisor
Advisor

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.

Lead Enviroment Artist @Axis Studios

Arnold Discord Server


Ciro Cardoso

EESignature

0 Likes

Stephen.Blair
Community Manager
Community Manager

I'll take a look.

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



// Stephen Blair
// Arnold Renderer Support
0 Likes

CiroCardoso3v
Advisor
Advisor

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


Lead Enviroment Artist @Axis Studios

Arnold Discord Server


Ciro Cardoso

EESignature

0 Likes

Stephen.Blair
Community Manager
Community Manager

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'))




// Stephen Blair
// Arnold Renderer Support
0 Likes

CiroCardoso3v
Advisor
Advisor

Ok, good point. But the ARV not updating seems a bug right? I am going to run a couple of more tests.

Another question is related to filter things by layer, which I don't think is possible (is a shame), but if I have a couple of geometries linked to a dummy, let's say dummy_people, then will something like this work

and not (name == '/dummy_people/*')


Lead Enviroment Artist @Axis Studios

Arnold Discord Server


Ciro Cardoso

EESignature

0 Likes

Stephen.Blair
Community Manager
Community Manager

I didn't check the ARV yet...

Layers is not supported yet.

How are the geometries linked?



// Stephen Blair
// Arnold Renderer Support
0 Likes

CiroCardoso3v
Advisor
Advisor

Hi @ Stephen,

The

@node == 'polymesh' does pick the Forest Pack, but perhaps adding the ginstance can work as a second layer of filtering


The linking that I am doing is something like this

d.jpg

So with the dummy I can control all those elements. It does simplify the process, because all I have to do is using /dum_test/* and everything inside that dummy is affected. I am going to run now the shadow matte material and see if this setup works.

Lead Enviroment Artist @Axis Studios

Arnold Discord Server


Ciro Cardoso

EESignature

0 Likes

Stephen.Blair
Community Manager
Community Manager

Ok, I see. MAXtoA uses the hierarchy of objects for the object names, so yes, you can do something like that.

There is some weirdness with the IPR and operators. I see different sets of objects being touched by the operator.




// Stephen Blair
// Arnold Renderer Support
0 Likes

CiroCardoso3v
Advisor
Advisor

Just submitted an error report 302868409 and 302868738 because Arnold Operators don't like using the Shadow Matte. ARV interactive or just render completely crashes my scene.

Do you want the scene to test it? Everything works really nice until I use the Shadow Matte. The goal here is for me to mimic the render isolate option that you have in Corona, for example.

Lead Enviroment Artist @Axis Studios

Arnold Discord Server


Ciro Cardoso

EESignature

0 Likes

Stephen.Blair
Community Manager
Community Manager

@Ciro

I have problems with the scene you already sent, so I do have enough to log some bugs.

3ds Max stops responding after I try to apply a Map to Material (so far I tried with Shadow Matte and then Utility).

I haven't crashed yet though, so no CER reports

I have ForestPro Lite btw



// Stephen Blair
// Arnold Renderer Support
0 Likes