question

Soal Givord avatar image
Soal Givord asked ·

MaterialX and Namespaces

Hello,

I wouls like to use MaterialX in our rendering pipeline, and i would like to do one export of a MaterialX File per asset then load the file via the operator and assign it to the the asset under a namespace in my rende scene.

For instance, if i have an asset loaded 3 times with 3 different namescpaces (ex : Fish_1:, Fish_2:, Fish_3:) in my scene i would use my materialX file once with 3 materialX operators.

Ho can i do this please?

Have a good day.

Soal

mtoamaterial
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.

Mads Drøschler avatar image
Mads Drøschler answered ·

Make sure your exported MaterialX file has geom="/" and not some specific name. 5th line in the MaterialX file in my test here.
I added a material and an OSL checker to the file.
Load the file in the operator node and selection was set to "/Fish*"
Draw a bunch of primitives, call a couple Fish_1, Fish_2, Fish_3 etc ->
Set the MaterialX to enable and now only those 3 items in the scene gets the material and the checker.

I cant upload files to forum for some reason, had mockups prepared, no dice.

MaterialX file that works like described above
https://www.dropbox.com/s/c6mirbjxl6bghm1/gg.mtlx?dl=0

Mockup
https://www.dropbox.com/s/ehr1if7k9gaq3eo/ss.jpg?dl=0

1 comment Share
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.

do as "mockup",my katana file works

0 Likes 0 · ·
Soal Givord avatar image
Soal Givord answered ·

Hello and thanks a lot for your precise answer, it gave me some clues but it is not what i'm trying to achieve here.

I can't have an empty geom value because i want to have specific assignments.

Let say i created an asset in maya : rnd_Char, in my maya asset shading scene

with two meshes objects in it : arm and head

rnd_Char

....-arm

....-head

i assigned a metal shader to arm and a skin shader to head

Then i select those two object and export a Mtlx file

https://www.dropbox.com/s/56ytmscs8wd0mkj/char.mtlx?dl=0

Then i export my asset in my database with default lambert shader to save space.

Now in my Maya shot lighting scene i import my asset 3 times as references under 3 different namespaces, so in maya, i have :

Char_1:rnd_Char

....-Char_1:arm

....-Char_1:head

Char_2:rnd_Char

....-Char_2:arm

....-Char_2:head

Char_3:rnd_Char

....-Char_3:arm

....-Char_3:head

Here i would like to use my Mtlx file to apply the shaders on each one (or all of them, why not)

The thing is i dont have a namespace in my Mtlx file so how can tel arnold to use my object under namespaces?

Tel me if i'm not clear enough :)

Thanks

Best regards

Soal


Share
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.

Mads Drøschler avatar image
Mads Drøschler answered ·

Small practical note.
If you want multiple LOOKS stored in same file.
Just change LOOK name, but save in the same file.

Like you save to template.mtlx
- AO
- Normals
- FlatWithdots
-Checker

You would export those shaders to the same file name but just change look name, the save will not override the old file, it will inject the new look to the same file, this way you get a list of different looks from within 1 node hook.

Share
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.

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.