A Unity ID allows you to buy and/or subscribe to Unity products and services, shop in the Asset Store and participate
in the Unity community.
Calling all New Unity users! Join the Halloween Mods Showcase Challenge until October 31.
Discussion in 'Assets and Asset Store' started by kalagaan, Sep 16, 2016.
1st : vacation
Then update of the texture generator & shaders, windzones and design tools
@kalagaan hey bro, no rush - but I think I've found an issue - I'm getting some performance spikes when the hair is near the camera, hair has about 30 bones using the procedural V2 shader with 2 capsule colliders, only 900 verts
Thank you, I'll check that
I've done some tests, when the hair is rendered on a large part of the screen, it could impact performances.
To fix it you can set a smaller value for the 'hair density' in material tab, and a higher value for the 'Hair per pass'.
I think that you should use the Atlas shader, it's really faster, and I'll improve the texture generator with more options.
The cloth API is buggy on unity 2017, you have to decrease the Solver frequency to 20. The mesh is already animated by bones, so you won't noticed the difference, but the performances will be much better.
thanks bro I'll give that a try
@kalagaan the atlas shader looks fantastic bro, performance is great also
Any news ??
I'm working on the shader for a better lighting, with more parameters
I'll post some screenshots when it will be ready
Hello ... was about to buy this asset but see its only for Unity 2017. I have a game close to finishing in 5.6.1 and would rather not go through the headache of upgrading right now. It seems like whenever I change versions in the middle of a project several weird bugs pop up that give me days of headaches. Any way to get this working in 5.6.1? Thanks.
The cloth component is not stable on unity 5.5 and 5.6 (the editor crash), so I've decided to update only to 2017
I can send you the previous version for 5.4 +, but you should not use the cloth component option for the long hair.
Here some screens of the new lighting model
I'll add the aniso texture to the generator.
Here a new version, I think that it's really better
agree, please dont forget the base mesh system and mirror tool *-*
I'll work on the tools after the texture generator update
I need to generate the aniso texture for the specular settings.
Here the new lighting function with the long hair
looks much more realistic
I'm working on a new demo for HairDesigner, here a VR test
Not sure if this was mentioned, but will this work well in Webgl. Is there a way to make the hair static?
Yes, it works with the webGL export, here a demo
You can choose to enable or disable the hair motion.
There's some realtime settings for changing the hair rigidity.
Hi is it possible to change the Hair Designer Shader colors at run time?
I have got as far as:
public HairDesigner hair;
Yes, you can change all the shader parameters.
You have to cast it to the class of layer's shader.
HairDesignerShaderAtlas shader = hair.GetLayer(0).GetShaderParams() as HairDesignerShaderAtlas;
shader.m_tipColor = Color.white;
shader.m_rootColor = Color.white;
Wow that was fast! Brilliant, thanks very much! Was really struggling with that one.
Would I need to cast it back to assign to the layer?
You don't have to assign it to the layer, GetShaderParams returns the reference of the data structure
Hmm I'm still struggling with this, the line:
shader.m_tipColor = Color.white;
is producing a "NullReferenceException: Object reference not set to an instance of an object" error, I can't tell exactly why that's happening.
Do you use the AtlasShader?
You have to cast it to the shader used on the layer :
If you are using the procedural V2, you have to cast to 'HairDesignerShaderProcedural_v2'
All the shader classes are in the folder : HairDesigner/Scripts
I recommand to use the Atlas shader, it's faster than procedural and you can combine it with the textures generated by the texture generator tool.
Ahh ok I'm an idiot, I was using a different shader - thanks for the help!
I'll also give the atlas shader a shot
I'll add a section in the documentation
Hello again, I'm a bit confused about the "Save Layers" button. It creates a prefab successfully, but how do I reapply this to a duplicate mesh? Is there a way to take the hair from one mesh to another via prefab? I've looked all the way through the documentation but can't find anything. Thanks!
The "save layers" button, create references of the generated mesh in the project folder.
You have to do that because the mesh have to be shared between the intances of your character.
When you have saved the layers, you can duplicate the character.
You can use the generated mesh like any mesh in unity, but the motion data won't be applied without the hairDesigner script.
Thank you that makes a lot of sense. I guess when I add new hair layers to one mesh, it will have to be reduplicated throughout all the models, then re-saved. Your support is brilliant by the way I will definitely be giving a good review.
Yes, you have to re-save when you edit a layer or when you add a new one.
I know you are still working on the hair texture generator, but I found some good example if you can achieve this:
Spoiler: more example
I'm always on the look out to find good tightly curly example, this is the best I have ever found in term of silhouette, now the texture is kinda lost as per texture it's flat, we don't see individual hair strand (mostly because there is no normal/anisotropic map).
I really like how they distinguish tight curl with wavy hair:
So far you have been the best goto hair asset!
Thank you for the references
The current version generator support only waves (for the strand and for each separated hair),
I'll try to include somme additionnal parameters for the curls.
I don't know yet if it will be included in the next version.
Now the UI of the tool is more friendly, and it generates the specular/aniso texture for the new version of the atlas shader
Here a test with the wave settings
the textures have been generated by the tool :
Wow, I've worked for a year on HairDesigner
I've just added the length control to the atlas shader
The latest feature for the version 1.5 is done
Now the texture generator can create 3 different hair colors on each texture.
that looks good. Have you completed the mesh export yet (so we can import into UMA, create slots)?
The UMA export is not yet available , I wanted to optimize the hair quality first.
I will also work on the morph compatibility.
the version 1.5 has been submitted to the assetstore team.
It should be available soon
Hey, this looks really promising. Seriously considering picking it up, but having been bitten by a few assets before, so I thought I'd ask a few questions (sorry if they've been answered previously).
1. The alpha-blended stuff looks great, is this added in combination with cutout so that it receives shadows properly? (Really need proper shadowing, but cutout tips look awful, so some combination would be great).
2. What control is there for colouring the hair differently across the surface of the mesh? Can we sample hair colour from the mesh's diffuse texture? (For instance, if you were making a wolf, could the upper part of the head be a dark grey, the neck white, with some variation in other places etc?). Ideally we'd also like some very high frequency variation across that in places. Sampling from a high res texture with some masked noise overlays would be great.
3. Any plans to have a mode for root/tip colouring that's a ramp/gradient instead of two colours? This is useful for animals where there are more than two colours across the length of the fur. (I.e some grey wolf fur is dark at the root, white at the middle and then dark at the tip again).
4. Play nicely with blendshapes? (Probably not essential).
5. Sorry this is probably dumb, but I haven't found it entirely clear - does the tool only use the generated textures or can we plug in our own that have been authored elsewhere?
6. Do all these features play nicely with the new Post Stack V2, write properly to depth etc?
Our current project revolves around realistic wolves and other animals, so fur is obviously a very high priority. Currently we're struggling with solutions that shadow well, give us flexible colouring across the mesh and play nicely with physics. Your fur layer looks like it'll be well suited for the very short-haired layer that sits above the skin, and we'd then want to lay on the much longer alpha-blended hair for the fluffy stuff on top.
Sorry for so much text, thanks for taking the time to develop such a cool tool already!
The HairDesigner component can generate 3 types of layers:
- short hair: the polygons are painted on the surface, the vertices rely on the original mesh skinning.
- long hair: the polygons are defined by some curves, and the bones are generated.
- fur : the fur is defined by textures with the shell technic. It uses a specific fur shader.
1. Unity does not provide shadows support for the transparent pass, but I have worked in a way to simulate the shadow on the alpha pass. There's a parameter to control the shadow strength. You'll need to balance between cutout and alpha to adjust the shadows.
The Fur Shader does not use alpha blending, so you could use an AA filter on the camera.
2. You can paint the color across the surface on a layer of fur (shell technic) but not on the short hair layer (polygons). I should add this feature, I could use an extra UV and another texture location. I will do some tests
3. There is a strip setting for short hair (2 colors). And I should also add this feature to the fur shader. I have to do some tests for that.
4. The fur layer works with blendshapes, but not the short hair layer. The long hair root is locked on a bone of the original mesh skeleton. This is a feature that I want to develop.
5. You can use your own textures for each shader The specular / aniso uses the Scheurmann method, the 3 textures are combined into one
R: specular, G: tangent shift, B: tangent mask
The texture generator is really fast, and it applies the result in the appropriate texture slots, so you can easily do some tests.
6. the shaders work with Post Stack V1, I'll try the V2
You can also duplicate a shader and customize it with your own inputs. There is a way to create a script for including a custom shader in the HairDesigner user interface.
Here is the documentation.
Are you actually aware how good you are?
Your work is just outstandingly amazing.
This haircut has a totally changed when I've improved the long hair motion
The version 1.5.0 PRO is available!
I hope that the basic will be updated soon!
Here a fix for the standard shader used in the 1.5.0 demo.
Thanks a ton for such a detailed response! Those shadows look fine. Sounds like almost everything's covered, I think we'll look into picking it up thanks again and hope the tests go well!
I found a bug in the version 1.5
The fur Mask and color are not saved properly.
How to fix it :
- Select the texture in the project folder
- Set Alpha source : 'Input Texture Alpha'
- Set Alpha is Transparency : 'True'
I'll fix this in 1.5.1
HairDesigner Basic 1.5.0 is not yet available... I'm waiting for support from the asset store team.
There's some bugs on asset submissions.