nerd opened this issue on Apr 03, 2022 · 17 posts
nerd posted Sun, 03 April 2022 at 5:47 PM Forum Moderator
You've probably wanted to add an effect to a material without re-doing the base material. Things like adding makeup or a tattoo. The problem was that saved MC6 materials always replace the existing base material. SuperFly supports layered materials but there's no way to just add a layer to a material from the library ... or there wasn't. With a minor hack of an MC6 that has a layer you can craft a material that will load a layer and leave the base material alone. You can add makeup, dirt, whatever you want to an existing material and it will just overlay the existing material. Just like layers in Photoshop ... well kind of anyway.
WHAT YOU NEED
* Poser 12, latest version
* An MC6 file saved with material layers in it (we'll make this)
* Something to edit Poser files. Poser File Editor or a Text Editor (Not Word!)
FIRST A LITTLE BIT ABOUT LAYERS
Material Layers in Poser are nothing new. They've been around since Poser 11. They were implemented for exactly this usage. What wasn't implemented was a way to save just a layer and add that layer to an existing base material. That's the object of this hack. To make an MC6 material that's just a layer so Poser can add it to an existing material.
Poser's material layers are always replace layers, like a "normal" layer in a paint program. They are also completely opaque by default. The first thing you'll need for your layer is a transparency map. We'll call this a “key map” from here on out because it works like a luminance key in video editing.
OK LET'S MAKE A MATERIAL LAYER
Use Poser's UI to create a material layer by clicking the [+] button next to the layers drop down list. Use the “key map” to setup the area of the material you want to be affected by the layer. Remember the key map is just like a transparency map but it only affects the layer instead of the whole material. An example would be for lipstick. You'll need a key map of the lips so only the lips are visible on the layer.
SAVE THE MC6
Choose only the material zone(s) affected by the material layer. Limiting the file to only the affected materials makes editing the file much easier and prevents the material from potentially messing up unrelated materials.
HACKING THE MC6
This is an easy hack you only need to delete some lines to make this in to a material layer MC6. Find the “Material” line in the MC6 file. Start right below the opening bracket for the material. Delete everything down to the materialLayer line.
You should end up with something like this ...
The “materialLayer” section starts just after the opening brackets of the “material” section. You will need to repeat this for each material included in the MC6 file. Save your new MC6 Layer Material with a new name.
USING MC6 LAYER MATERIALS
Select any part of the figure or prop this material is meant for. Double click the material in the library or drag it to the figure. When loaded the MC6 Layer Mat will add a layer to the affected material zones. Every time you add a MC6 a new layer will be created at the top of the stack. You do not need to manually add layers. They will be added automatically when the MC6 is loaded.
To remove a layer select it from the Drop down list on the material editor. Then click the [-] minus button to remove the layer from that material zone.
FAQ
Q: Why, when I add layers, why do my character's eyes bug out or the clothes vanish.
A: The preview of layered materials is very dependent on the graphics hardware and camera settings. This z-buffer issue only affects preview. The renders will not have z-buffer issues like the preview. You can improve preview quality by adjusting the Hither and Yon values in the the camera.
Q: Can I apply a different base after adding material layers?
A: No,
replacing the base material will remove the layers. You can however safely edit the base layer in the Material Edit tab. Material copied with the Assign tab will include all layers.
Q: Can I create effects layers like glowing tattoos or metallic patches.
A: Yes, use the “key map” like you would a transparency on the effects you want. Connect the key to the ambient value or metallic inputs of the shader so they only affect the part of the render your want.
Q: Can I rename the layers? Like “Lips” or “Scar”
A: Yes. This is part of the hack in the MC6 file. Edit the line “name Layer_1” to have the name you want. For example “name Scar”. That will become the display name for the layer inside Poser.
Q: Can I rearrange the layers in Poser
A: No the layers are fixed in the order they are created. Perhaps in a future version of Poser.
Edited because I can't spell.