Layering problem (1 Viewer)

SyntaxTerror

Content Creator
Joined
Jul 24, 2014
Hello

I am trying to add rgb sliders to konashion's SD Chan dynamic hair, and I am encountering problems with layers.

I do not understand well how kona manages the layers in the base game.
SD Chan hair has 3 static layers and 2 dynamic ones (I coloured the static ones for a better view):
fILOavb.jpg
So it seems that the blue one is on the hairTop layer, the yellow and green ones are on hairUnder, the left strand on dynamicHairBack and the right one on dynamicHairUnder.

Ingame, it looks like this:
Z6IaB93.jpg
The right strand is between the yellow and green parts.

My problem is I cannot get the same thing...
I think I've tried everything:
  • registering the layers in the green, strand, yellow order.
  • putting the green part on another dynamicHairUnder layer.
  • set all overwrite fonctions to false.
Nothing seems to be working...
Does anybody have an idea?

Here is the FLA if someone wants to try: Dynamic Hair - SD Chan RGB.fla
 
Last edited:

stuntcock

Content Creator
Joined
Jun 5, 2012
So it seems that the blue one is on the hairTop layer, the yellow and green ones are on hairUnder, the left strand on dynamicHairBack and the right one on dynamicHairUnder.
The yellow should be on HAIR_UNDER; the green should be on HAIR_BACK HAIR_BOTTOM.

registering the layers in the green, strand, yellow order.
This technique is useful only when you're registering several items on the same layer. Order of operations then becomes significant; items loaded early will be pushed into the background while later items will be raised to the foreground.

If the items are on separate layers then order of registration is unimportant.

putting the green part on another dynamicHairUnder layer.
This technique is useful and I've occasionally relied upon it while creating dynamic hair mods with complex layering. The trick is that it's not completely feasible in vanilla. Even with perfect damping, the "static" hair (which you've registered as a dynamic strand) will move around slightly due to gravity.

It's possible to do it with Loader physics extensions, but it's rarely necessary. It isn't needed in this case.

set all overwrite fonctions to false.
Doesn't really influence layering. Overwrite is a very "predictable" feature; it doesn't have weird side-effects. If parts of your hairstyle are missing then you can tinker with Overwrite, but normally you shouldn't need to bother with it.

Here's the revised FLA.
Dynamic Hair - SD Chan RGB (edit).fla
 
Last edited:

SyntaxTerror

Content Creator
Joined
Jul 24, 2014
Thank you is is working this time.

This mistake is entirely my fault...
I took the ready made templates in the Library (something made by @dantethedarkprince I believe, because there are only three Konashion's basic hair templates: static, dynamic and costume, and at this time I was really lazy to understand how AS works) and there was no Hair Bottom template.
I never knew until now that this HAIR_BOTTOM thingy existed, because I made nearly only PNG hairs and I never read the comments let by kona:
/**
* Target layer. Options are:
* Elements.HAIR_TOP (Above all.)
* Elements.HAIR_UNDER (Under ear and body, above dynamic hair "under" layer.)
* Elements.HAIR_BOTTOM (Under ear and body, below dynamic hair "under" layer.)
* Elements.HAIR_BACK (Under all.)
*/

I learnt something new today...:smile:
 

SyntaxTerror

Content Creator
Joined
Jul 24, 2014
By the way, what is the difference between ModTypes.HEADWEAR (in the Headwear template) and ModTypes.HAIR_COSTUME (in the Hair Costume template)?
Also, the first one doesn't doesn't have o
ptions like Elements.HAIR_COSTUME_OVER, UNDEROVER, UNDER and BACK.
 

SyntaxTerror

Content Creator
Joined
Jul 24, 2014
HEADWEAR is a more straightforward concept. It's intended to things such as hats which always occult the hair. It isn't supposed to interact with the hair or weave through the hair; it's just supposed to be a cool-looking hat. It works best for opaque objects with simple geometry. Because there's no interaction, it's expected that HEADWEAR mods won't always fit perfectly.
Actually, Kona wrote in his Headwear Tutorial that:
Konashion said:
Headwear is fairly simple, with only a front and back section to draw. The only optional extra is the invisible "landing point" in the front section. Just delete this if you don't want to bother with it, but if you include it, the game will attempt to reposition your headwear mod vertically so that the landing point touches her hair.
I already asked about this "landing point" but no-one had an answer.
Maybe this concerns the HAIR COSTUME and not the HEADWEAR in fact?

[EDIT] Here is SD Chan RGB Adjustable Dynamic Hair:
The code is quite long because of the numerous layers and symbols, but it is basically duplicating some lines.
 
Last edited:

stuntcock

Content Creator
Joined
Jun 5, 2012
Actually, Kona wrote in his Headwear Tutorial that:
I apologize. My previous post was based on some mis-remembered details (and some aspects of how I've used HAIR_COSTUME stuff in Loader mods, which isn't relevant to this topic). Most of what I wrote was misleading or simply inaccurate.

HEADWEAR is for hats and large accessories (hairbands, headphones, etc). They're technically separate from the hairstyle and theoretically interchangeable, even though many of them (e.g. Zelda Circlet) don't really fit anyone else.

HAIR_COSTUME is a second set of static hair layers which don't respond to the HSL sliders. It's useful for drawing non-organic stuff in the middle of the hair such as clips, barettes, scrunchies, jeweled ornaments, etc. HAIR_COSTUME elements are inseperable from the character and are not intended for mix-and-matching with other hairstyles, but they'll retain their original color even if the hair is switched from red to blonde. So SDT players still retain some flexibility and customization :)
 

SyntaxTerror

Content Creator
Joined
Jul 24, 2014
Oh I get it.
I was actually looking for layers like this, that are not modified by the hair tint and where cum can stick (for my dynamic headwears for example).
I could replace HEADWEAR layers by HAIR_COSTUME_UNDER (where cum sticks), and with ModGuy's code to affect costume RGB sliders to hair layers, I can achieve the same result.

I believe that there are still various aspects of Vanilla that are still underused, like these headwear and hair costume things, or the trick to make 16/9 backgrounds I've discovered some time ago.
 

Users who are viewing this thread

Top


Are you 18 or older?

This website requires you to be 18 years of age or older. Please verify your age to view the content, or click Exit to leave.