Shading and texturing
(→Face materials and color sets) |
(→Face materials and color sets) |
||
Line 59: | Line 59: | ||
== Face materials and color sets == | == Face materials and color sets == | ||
− | Face material assignments and color sets | + | Face material assignments and color sets on the unbroken objects: |
[[File:facemtl_colorset.png]] | [[File:facemtl_colorset.png]] |
Revision as of 21:04, 19 May 2016
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]
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.
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.
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.
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
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.
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
Face material assignments and color sets on the unbroken objects:
Assuming the meshes are not connected to a simulator, and are just broken using Fracture -> Break selected, the shaders will have to be propagated to the broken mesh.
Select it and choose Fracture -> Shading/texturing (option box), then Apply.
The color sets are automatically propagated and just have to be displayed.