Welcome to the Poser - OFFICIAL Forum

Forum Moderators: Digitell, CHMedia Forum Coordinators: RedPhantom

Poser - OFFICIAL F.A.Q (Last Updated: 2022 May 23 10:44 am)


Subject: Hack to Add Layers to Existing Materials


nerd ( ) posted Sun, 03 April 2022 at 5:47 PM · edited Sun, 22 May 2022 at 9:08 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 

TSTO6pMuonhjWdHGFwHxlYkOAZMRedxdNtZ4cb4W.png

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


34MVXoTNbfJVpLVDFNsLBgfw15Mz1Hsk6fKBOABO.png


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.


W3nWpHOmEZlseXEw6pbSnRe3VvN7HzPGZ9mpDk8N.png


You should end up with something like this ...


hq5cABmZQBrMaHNHmTXCkLRFZKIYCw6ilBb9uW6Z.png


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 you're new MC6 Layer Material with and 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.


WKo9Ctq5Vw2jLCzpTgfSTUBWlL0FYzhm8MY8dqul.png


odf ( ) posted Sun, 03 April 2022 at 6:34 PM

Many thanks, that should come in very handy.

-- I'm not mad at you, just Westphalian.


RedPhantom ( ) posted Sun, 03 April 2022 at 10:14 PM
Forum Moderator

I was just wondering about a way to do something like this. Thanks.


Available on Amazon for the Kindle E-Reader Monster of the North and The Shimmering Mage

Today I break my own personal record for the number of days for being alive.
Check out my store here or my free stuff here
I use Poser 12 and win 10


Y-Phil ( ) posted Mon, 04 April 2022 at 1:35 AM

Just to add my two cents: I've used this hack to add a controllable glossy effect on some of my Vic4 skins, till I wrote a Python script to do this, and that's the moment when I understood that using a Python script, you can add and name a layer the way you want
Example useable in the Material Room, with the current material:

mat = poser.Scene().CurrentMaterial()
second_layer = mat.CreateLayer('Gloss')

you may even copy and past these two lines in Poser' Python Shell.


Y-Phil.


Win10 on i7 8700K@4.3Ghz, 32Gb, GeForce RTX 2080 Ti, 2x 2Tb ssd + 1x 6Tb hd, Poser 11, Poser 12, Octane, HDR Light Studio


Boni ( ) posted Mon, 04 April 2022 at 8:40 AM

For users that are shy about using Python, will there be an update that will make this script a part of Poser's interface?  That would be awesome. 

Boni



"Be Hero to Yourself" -- Peter Tork


Rhia474 ( ) posted Mon, 04 April 2022 at 12:08 PM · edited Mon, 04 April 2022 at 12:09 PM
Online Now!

I second what Boni said. The majority of Poser users don't do Python scripting or editing files. This is a function that would be a major upgrade to many of us as adding layers for makeup, dirt, blood etc. Is built in for many other similar software.  I tried adding layers of such countless times and it requires major fiddling. Older pythons offered this functionality  and they are now obsolete, and will never be updated. I would be willing to pay for this, to be honest.


Y-Phil ( ) posted Mon, 04 April 2022 at 12:58 PM

Just to be sure: Boni and Rhia474: are you speaking of what nerd explains, on top? because you don't need python: a simple text editor.

Y-Phil.


Win10 on i7 8700K@4.3Ghz, 32Gb, GeForce RTX 2080 Ti, 2x 2Tb ssd + 1x 6Tb hd, Poser 11, Poser 12, Octane, HDR Light Studio


Rhia474 ( ) posted Mon, 04 April 2022 at 2:01 PM
Online Now!

Thank you fir the question, Phil, let me try to clarify on my end.


What am saying is: older pythons that did layer adds don't work any more; generic users don't update or edit pythons or any files by opening them in text editors or otherwise, this function should either be built in or an updated Python 3 script that we can buy. I should not need to faff with text editors for adding layers to multiple matzones if this function is described in the manual as existing in the program. 


Y-Phil ( ) posted Mon, 04 April 2022 at 2:08 PM

Rhia474 posted at 2:01 PM Mon, 4 April 2022 - #4436722

Thank you fir the question, Phil, let me try to clarify on my end.


What am saying is: older pythons that did layer adds don't work any more; generic users don't update or edit pythons or any files by opening them in text editors or otherwise, this function should either be built in or an updated Python 3 script that we can buy. I should not need to faff with text editors for adding layers to multiple matzones if this function is described in the manual as existing in the program. 

I understand.

I have a kind of toolbox that I've written for myself. It can add a new layer named 'Gloss' for each skin-related material of the currently selected figure. It recognizes Vic4, La Femme and Aiko3 charactes.
If this interests you, I'd be happy to prepare a standalone script for this.

Y-Phil.


Win10 on i7 8700K@4.3Ghz, 32Gb, GeForce RTX 2080 Ti, 2x 2Tb ssd + 1x 6Tb hd, Poser 11, Poser 12, Octane, HDR Light Studio


Rhia474 ( ) posted Mon, 04 April 2022 at 5:23 PM
Online Now!

I would love to give it a whirl, yes! Thank you!


JimTS ( ) posted Mon, 04 April 2022 at 6:47 PM

Content Advisory! This message contains profanity

I have added a lot of paid for scripts my work not really flow only to have them (the scripts) wrecked in a new paid for release only to see the "fix" offered as a NEW PRODUCT I'm tired of this shit break stuff again I'll reinstall Poser 7 or 8 and never buy anything from these sites again you are motivating boycotts. I would accept the warning whole systems cost less than one Graphics Card

A word is not the same with one writer as with another. One tears it from his guts. The other pulls it out of his overcoat pocket
Charles Péguy

 Heat and animosity, contest and conflict, may sharpen the wits, although they rarely do;they never strengthen the understanding, clear the perspicacity, guide the judgment, or improve the heart
Walter Savage Landor

So is that TTFN or TANSTAAFL?


nerd ( ) posted Mon, 04 April 2022 at 6:50 PM · edited Mon, 04 April 2022 at 7:16 PM
Forum Moderator

I don't know if or when the ability to rename layers will be part of the Poser UI. Nor if or when the ability to save a material file with just layers would be added. It's safe to say not tomorrow. If one of the Python gurus make a slick tool to achieve these functions that may be all we need. There are a bunch of layer functions already in Python however the ability to load a material onto just a layer isn't available. That's what motivated this hack.


nerd ( ) posted Mon, 04 April 2022 at 7:34 PM
Forum Moderator

@JimTS Python 2's official EOL was January 1 2020. After that point there will be no updates of any kind from Python Foundation.That makes it a security risk in two ways. First if an exploit is found it won't get fixed. Second if something like a OS update kills it nobody will fix it.


Y-Phil ( ) posted Tue, 05 April 2022 at 3:09 PM

Rhia474 posted at 5:23 PM Mon, 4 April 2022 - #4436729

I would love to give it a whirl, yes! Thank you!

You can download the Python script here.

How to use: 
1. open up Poser12's Material Room^
2. select your character (Vic4, Aiko3, LF/LH or one Erorgenesis' Evogirls)
3. be sure that one of the character's part is selected, or the body itself
4. run

the script will ask you the name of the layer, if you want to remove any supplemental layer, and if you want the Gloss setup I'm using


Y-Phil.


Win10 on i7 8700K@4.3Ghz, 32Gb, GeForce RTX 2080 Ti, 2x 2Tb ssd + 1x 6Tb hd, Poser 11, Poser 12, Octane, HDR Light Studio


Privacy Notice

This site uses cookies to deliver the best experience. Our own cookies make user accounts and other features possible. Third-party cookies are used to display relevant ads and to analyze how Renderosity is used. By using our site, you acknowledge that you have read and understood our Terms of Service, including our Cookie Policy and our Privacy Policy.