instance geo with materials assigned

   2177   2   1
User Avatar
Member
85 posts
Joined: 8月 2010
Offline
greetings all,
I am instancing some geo which has shop_material_path primitive
attributes baked into it.

How do i get Mantra to read these from the
geo and ignore the fact that the instance points do not have this
attribute?

In other cases we have used ids to drive a switch in a massive
multi-shader but this is very laborious to manage

any ideas would be greatly appreciated!

please find attached an example hip

cheers

Attachments:
rnd_sam_shaderTest_v001_sam_forSESI.hip (1.6 MB)

Sam Swift-Glasman
Art Director
Five AI
User Avatar
Member
2624 posts
Joined: 8月 2006
Offline
Hi
When you write geometry to disk you don't get the shader bundled in aswell.
What you want to do is , use a mantra material archive and delayed load geometry procedural. To hold your asset and shader.

A better way to go is a simple attribute on the points which will act as an override on the shader ie control the baseColor parameter on the shader . That way there is no need to have 2 different shaders. See attached


Rob

Attachments:
rnd_sam_shadertest_v001_fixed.hip (1.8 MB)
teapot.jpeg (110.4 KB)

Gone fishing
User Avatar
Member
2624 posts
Joined: 8月 2006
Offline
Here is another version this time I have written the material to an iFD and the geometry using the mantra archive. As everything is baked into the IFD it seems like doing an override becomes impossible. But if you know what object is going to get material wise you could pre put everything into groups and write the lot out using this method

Rob

Attachments:
rnd_sam_shadertest_v002_fixed.hip (2.7 MB)

Gone fishing
  • Quick Links