Jump to content

  • Log In with Google      Sign In   
  • Create Account






Multi-texturing + Yoshi's Island

Posted by eppo, 05 July 2014 · 398 views

hallo,


Modo's 'shader tree':


Posted Image


It's a peculiar thing at first: instead of creating explicit materials, you add shading components (textures etc.) to a single hierarchy. Polygons are then assigned tags which correspond to masking-groups (a sort of polygon-'gateway') located in the tree. During shading a polygon walks the tree and grabs all elements its tags allow it access to. These are added to a flat list which is then evaluated bottom to top to construct a material specific to that polygon. It's great in that it allows you to create different material routes for polygons to follow, but ones that can still have traits in common.

When processing the tree: at the bottom you usually find these 'Material' items, which are just collections of a series of constants (like base diffuse and specular values). These fill out a material's properties' initial values. The remaining items in the tree are used to modulate these base values.

Modo has a whole bunch of different 'layers' you can use for this purpose. These layers are set to a specific 'effect', which is whatever it is you want them modulate (again: diffuse, specular etc.). For example, the image-map layer type reads its output from a texture while a gradient layer samples it from a curve. Any layer type can also be set to act as a mask for other layers, weighting their influence. All the various layer types share common settings like blend modes, a global opacity value, an invert toggle and levelling settings. Very Photoshop-ish. After traversing the tree the final values are used as input for lighting.

Point is: this layered approach seemed very well suitable as something to replicate in-shader, so I wrote an importer. Posted Image





It's basically a Modo-to-D3D converter. It looks for unique poly-tag -> material sets and turns them into various state objects, input layouts, vertex streams, block-compressed textures, samplers and shaders.

For anyone familiar with the application: it can also tessellate the newer Pixar-type SubD surfaces, create compositable animations based off Actor-Action sets, and bake those replicator thingies.




This stuff is pretty damn good man. Seriously!

I seriously enjoy seeing the stuff you create. Awesome!!

Links

Posted ImagePosted Image
PARTNERS