Shading and texturing

From Fracture FX
Revision as of 21:11, 19 May 2016 by Craig (Talk | contribs)

Jump to: navigation, search

Contents


This is meant to be run after your simulation is done, and the number of meshes under the fragmentGroup is finalised. (There is no automatic update if the contents of the fragmentGroup changes.)

Overview

From the menu, choose Fracture -> Shading/texturing [options box]

Shading dialog.png

This gives the option to:

  • Propagate shaders from the unbroken input objects (including per-face attachments) to the fragments produced under the fragmentGroup
  • AutoUV the interior faces of fragments
  • Create a selection set per input object that holds the interior faces of all fragments derived from it

This operates on all meshes under the current selection. If nothing is selected, all fragments will be modified.

It is recommended to assign shaders before breaking and connection to the simulator, but it is still possible to change the unbroken object's shaders and re-propagate after baking.

You can run the shading/texturing process at any stage, after a live-sim, after baking to keys or disk, or after running replace-with-keys. However, if you have already run the shading/texturing process, then subsequently run replace-with-keys, you will have to re-run shading/texturing afterwards.

For scenes created with versions prior to 1.6.0, you will have to delete the fragmentGroup, disconnect and reconnect all input objects, and re-bake the simulation, before shading/texturing will work.

Interior shader

The shader to assign to interior faces is specified under the inputs tab.

Shading interior.png

The widget displays the connection to the fxInteriorShader attribute on the intermediate shape node of the input object. This is also editable from the attribute editor, under Extra Attributes. This allows you to change the interior shader after running replace-with-keys, when the world node will have been removed.

Changing shaders after baking

Assuming you've baked a simulation, and already propagated shaders, you now want to change the shader(s) on the input object.

Shading before.png

The graph for the cube is shown below. The cube has two shapes, a non-intermediate shape polySurfaceShape1 which displays the output of the breakGeo2 node (when you rewind to the start frame), and an intermediate shape pCubeShape1 which holds the original unbroken geometry. It is to that intermediate shape that the shaders were originally attached. You can see exterior faces are assigned the initialShadingGroup and interior faces get blinn1.

Shading graph.png

It is to pCubeShape1 NOT polySurfaceShape1 that you must attach new shaders.

  • Rewind to the start frame
  • Uncheck intermediateObject in the attribute editor for pCubeShape1
  • Assign a new shader (including per-face shaders)
  • Re-check intermediateObject for pCubeShape1

Shading intermediate.png

Now clear your selection and re-run shading/texturing from the menu. Assuming you assigned two phongs to pCubeShape1, they will propagate to the 4 fragment meshes, and in addition to the polySurfaceShape1, which is visible before the break occurs.

Shading after.png

There is a relevant thread about this on the tech support forum here: http://community.fracture-fx.com/viewtopic.php?f=13&t=1429

Alembic

As of version 1.6.1, shaders can be reattached to Alembic archives imported into the scene. Use File->Import, not the Pipeline Cache menu.

Face materials and color sets

This example assumes the meshes are not connected to a simulator.

Face material assignments and color sets on the unbroken objects:

Facemtl colorset.png

After breaking using Fracture -> Break selected, the shaders will not automatically appear on the broken mesh. They have to be propagated to it, including after each change to the break node settings, as the number of polygons in the output mesh will change. (Maya keeps track of per-face shader assignments using those face IDs which will be meaningless after changing any attribute on the break node.)

Select it and choose Fracture -> Shading/texturing (option box), then Apply.

Propagate shaders.png

The color sets are automatically propagated and just have to be displayed.

The same automatic process cannot be applied for shaders because Maya plug-in nodes cannot assign shaders to the faces of meshes they produce; shader attachments are represented in Maya using DG connections to the mesh shape node.

Colorset.png

Personal tools
Namespaces

Variants
Actions
Navigation
Toolbox