Isotropix Forums

Material transfert between alembics

General Discussion about Isotropix and CG related topics

Material transfert between alembics

Unread postby okikoulpa » Fri Jul 03, 2020 7:56 am

Hello,

Is it possible to transfert all of the materials from one alembic to an other (the same, sometimes with an animation)?
Actually, we have one clarisse project per shot, and when he have to work on a new scene, we have to assign once again the material wich correcpond to each element of each alembic file. And it's quite long !
For example, we have an animated character that we import in many scenes, with a different animation each time. And at each import of the alembic file, we have to select the body, then assign the bodymaterial ; select the pants, then assign pants material, teeths, tong, eyes, etc....
So I'm asking if it's possible to create one "reference alembic" (our character with all materials), import it, and then transfert all materials from this reference to another alembic (the same, but with another animation).

We tried to do this kind of manipulation with uv transfert as explained in this video, but it didn't work : https://www.youtube.com/watch?v=hkrp0P9cUO8

Thanks !
okikoulpa
 
Posts: 16
Joined: Tue Jan 28, 2020 9:50 am

Re: Material transfert between alembics

Unread postby dboude » Fri Jul 03, 2020 8:18 am

Hi,

That will make you happy

https://www.youtube.com/watch?v=xBd-HR8AQ1A

https://www.youtube.com/watch?v=p_2kX9gFSgs&t=2s

Cheers ;)

btw : you can't transfer materials with alembic
Démian
Isotropix
Technical Artist - Clarisse Specialist
User avatar
dboude
 
Posts: 1540
Joined: Mon Jul 03, 2017 10:51 am

Re: Material transfert between alembics

Unread postby mdkai » Fri Jul 03, 2020 8:19 am

Hi
There various ways to improve you workflow.
First of all you should use shading layers. Create one shading layer for the character using either named parts or shading groups or even hierarchies. Save the materials ,textures and shading layer with the character.

Now if a new character is cached out, bring in the shading layer and assign it to the scene. All materials will be applied automatically if the names are the same.

Second
You can also create layered alembic, where you load in the regular abc, assign shaders using shading layers or direct assignment. Then load the shot specific cache with animation in the same abc container ..this is the layered on top of the existing one and you shading and animation ..
This requires the cache to have the same pointcount of course but works nicely.
Theoretically you can load all animated caches into and enable only the one needed, this could be even automated using variables !

Cheers
Kai
Join us at the Discord https://discord.gg/G5cJj9A
mdkai
 
Posts: 340
Joined: Tue Oct 07, 2014 7:24 pm

Re: Material transfert between alembics

Unread postby okikoulpa » Fri Jul 03, 2020 11:41 am

Thank you for your answers ! I didnt' kwow shading groups shading layers, it seems very useful ! :)
I'll try that soon, and I'll tell you if it's ok.
okikoulpa
 
Posts: 16
Joined: Tue Jan 28, 2020 9:50 am

Re: Material transfert between alembics

Unread postby okikoulpa » Sun Jul 19, 2020 3:07 pm

I created a scene with all my assets, were I assigned each materials, and the, I created the shading layer. This shading layer have 220 rules/filters.
And for each shot, I import this project with all the marerials, and I assign the shading layer to the image of my shot.
It seems that shots with shading layers have a much more important time for rendering than those with direct assignement of materials (before we know about shading layers)...
Is it normal ?
okikoulpa
 
Posts: 16
Joined: Tue Jan 28, 2020 9:50 am

Re: Material transfert between alembics

Unread postby mdkai » Sun Jul 19, 2020 8:04 pm

Hard to tell without looking at the setup but rules have to be evaluated, and if some rules are very unspecific, using wildcards to liberaly, they can trigger longer searches.

It is very important to narrow down any rules as best as possible so they are fast to evaluate !
Also keep in mind you can have shading layers picking up other shading layers .. so you can build each asset with its own shading layer, then merge them all into one master shadinglayer.

Cheers
Kai
Join us at the Discord https://discord.gg/G5cJj9A
mdkai
 
Posts: 340
Joined: Tue Oct 07, 2014 7:24 pm

Re: Material transfert between alembics

Unread postby okikoulpa » Sun Jul 19, 2020 8:29 pm

Thank you for your quick answer.
It's quite hard to tell/ show how we've done. Probably too much unspecific rules as you said.
We're about to assign manually each material to each asset in each shot. Quite long unfortunally, but we don't have time to do more researches. But maybe there's a way to avoid this long work.
Is there a way to apply shading layer to a scene ? In other words, can we, with a shading layer, transfert all its materials to ojects (with corresponding names) and then delete it ?
okikoulpa
 
Posts: 16
Joined: Tue Jan 28, 2020 9:50 am

Re: Material transfert between alembics

Unread postby mdkai » Sun Jul 19, 2020 10:06 pm

We're about to assign manually each material to each asset in each shot

That sounds wrong to me and i may also wonder why each asset per shot ?
Do materials change per asset and(!) per shot ?

Overall the workflow in Clarisse is pretty simple. Load the geo ( i.e. abc), create a lookdev context with materials and textures.
Now either apply the shader directly and save the asset with all materials or create a shading layer per asset.

In your example you said you had a character with different animations.
So go for all the shading groups the character has (pants, shirt, shoes, teeth, eyes etc.) and assign materials or create the shading layer for the character.

Now on the per shot level either load the scene with applied shaders and use another animation on top, this works only on identical pointcount (try the ABC bundle)
or load the unshaded abc version you need and then import the shading layer.
If a different change in the material is neededd you can invoke an override on the material or use a shading variable to change textires per asset for example ..

Clarisse is very flexible in either swapping geo, shaders or textures and parameters, depending on the needs. But you need some preparation and follow naming conventions to keep rule based searches and variables in sync.

Is there a way to apply shading layer to a scene ?

No not without a script since each rule must be evaluated one by one for the shader to be applied. But since they evaluate in order, objects may be reassigned multiple times until the last rule is done !

Besides this is not what shading layers are intended for. IN case you think it makes sense you could request this as possible feature.
https://www.isotropix.com/user/feature

Cheers
Kai
Join us at the Discord https://discord.gg/G5cJj9A
mdkai
 
Posts: 340
Joined: Tue Oct 07, 2014 7:24 pm

Re: Material transfert between alembics

Unread postby esmith » Tue Jul 21, 2020 4:53 am

okikoulpa wrote:Thank you for your quick answer.
It's quite hard to tell/ show how we've done. Probably too much unspecific rules as you said.
We're about to assign manually each material to each asset in each shot. Quite long unfortunally, but we don't have time to do more researches. But maybe there's a way to avoid this long work.
Is there a way to apply shading layer to a scene ? In other words, can we, with a shading layer, transfer all its materials to objects (with corresponding names) and then delete it ?


Shading layers can be nested. So a scene shading layer should be just a top parent "master" shading layer that has a list of children shading layers, each one representing some "group" of assets. Be that a group of geos making a character, or a library of assets making up a project you want to use to scatter street furniture.

This is just a suggested workflow but it works well for us. I've attached a template set of 2 projects.

1 project is the asset library, inside it has 3 contexts.
ASSETS
Raw assets, this would be an ABC or OBJ, it could be one part of 100 parts

LOOKDEV
Raw assets are INSTANTIATED, with their translations localized so I could place my obcects for doing look dev. This includes
assembling, in this case, 3 raw assets, into little "objects'. But what's important is that they are instanced into this context
that way if the original "raw" asset is updated, your look dev version is also updated since it's just an instance

This is where you make materials, and drag and drop them to your objects to attach materials. When your done and happy
You shift + select all the individual geos that make up a "character"...in my case here I have 3 "characters.
Edit>Create Shading Layer in this case I'm using the full path so there is little to know "evaluation". And the Shading Layers
are automatically created for me.

PUBLISH
This is where I take the objects I've look dev'd.....put them in combiners, and put them here. These assets are ready for use by
anyone on my team. And since a combiner is just a list of objects...which themselves are instances of the raw assets, if the original
raw assets update, your combiner internal assets will also update. Also notice the combiners are then moved back into the center of
the world as they should be for scattering or any use case where the pivot is gonna matter to you.

I also put the shading layer that we created in the LOOKDEV context here as well.

That's it, all I need to use these characters in my scene is now in the PUBLISH context of my asset library project.

2 project is the SHOT file. Inside it has 2 contexts
Asset_Library
This is the file from above, with it's all important PUBLISH context

SHOT_001
This is my shot....in this shot I need to take my 3 characters and scatter them on a grid.

This is easy, just point the scatterer to the objects in the PUBLISH context of my Asset_Library

Now to shade my "SHOT" all I need to do is create a new shading layer, which I call MASTER_SL. And in it's Children Shading Layers attribute
I will put a group I'm calling SHADING_LAYER_GATHER. Why a group, well what if we add more objects and shading layers to my shot? I could
manually add each of the 3 shading layers here, that's fine. But instead I made a group, that is looking into the PUBLISH context of the asset
library, and with a very simple rule, list all the shading layers it finds. So as shading layers are added and removed from the PUBLISH context
they will be automaGICally added and/or removed from the SHADING_LAYER_GATHER group, which is what is driving the MASTER_SL which is
shading our ENTIRE scene.

So that's a good workflow to use with Shading Layers. It keeps a nice instance workflow in the look dev, and creates the Shading Layer
workflow that keeps your shading assignments super flexible with object specific shading assignments totally abstracted from the actual
shot your rendering itself.

Of course, because you can "export current context as project" you are free to localize the entire asset library project FROM your SHOT project
and tweak some shaders for your particular shot.

Of course, as the shot lighting artist, maybe you should make sure to have a PUBLISH context for your lighting setup, so if there is a look dev artist
working on your sequence, he could reference in and use your lights so you wouldn't have to tweak shaders?


Let me know if you have any questions and I hope this helps
Attachments
ShadingLayer_Template.zip
(10.44 KiB) Downloaded 38 times
User avatar
esmith
 
Posts: 184
Joined: Mon May 22, 2017 4:11 pm

Re: Material transfert between alembics

Unread postby okikoulpa » Thu Jul 23, 2020 6:41 pm

I wanted to answer earlier, but I unfortunatelly didn't find time to do it.
Tanks you really much for your answers and advices, very precise and detailled. This give us good basis for next projects, and we now understant how we should improve our workflow !
Tanks again
okikoulpa
 
Posts: 16
Joined: Tue Jan 28, 2020 9:50 am


Return to General Discussion