Alloy Physical Shader Framework Version 3 For Unity 5

@Licarell IES Light types do tend to have a spherical representation. They’re rarely implemented any differently in a real-time context. Instead one needs to generate a panorama/6-sided cookie representation of the IES profile, and use that as a cookie for the point light. I’ve seen it done a bunch on arch-viz projects in Unity. Do note that this cookie will not be passed into Enlighten (which just reads it as a regular point light).

Regarding tube/plane area lights: While these are theoretically possible, they wouldn’t be ideal for both the reasons @ mentioned, and that there isn’t anything approaching an efficient way to handle shadow-casting from them. We made a decision early on in the development of Alloy 3 that we didn’t want to make any lighting modifications that would actively break functionality, or create special cases (such as having a light type that couldn’t case shadows/be occluded).

A tutorial video centered around the lighting changes with Alloy 3 is #2 on my list (behind a general usage overview), so you can expect that sometime very soon after GDC is over!

1 Like

Thank you sir.

Juts two things i see in the package are not so good :

  • The hair looks really bad like a simple object with normal map
  • The skin shader effect is no very noticeable.
    But the others are really good.

With the hair and skin, I suspect you are running into the packed maps not reimporting problem. Did you see our quickstart video for solving this problem:

https://www.youtube.com/watch?v=2T664B_iRTs

EDIT: Things are a little haphazard right now, but documentation and tutorials will be our number one priority post-GDC.

I’m not a buyer of the product.
Just seeing that image , i don’t see any hair using planes and alpha textures , it’s just some horrible mesh.
The skin effect using some lights around should be more noticeable, it looks more like some strange effect.

@zenGarden
That character example was made before the hair shader was done, so it doesn’t use it. Also, the skin is not configured as well as it could be as our lead artist is predominantly an environment artist.

If you want better examples of our character shaders in action, take a look at Republique Remastered:
http://alloy.rustltd.com/showcase/republique-remastered

I just say it really don’t make good advert for your skin and hair shaders.

Hey, @KRGraphics , wanna drop a gorgeous shot or two of Aikos face on here using the skin shader for @zenGarden to see?

Neptune here is the dude in the community here that’s been doing crazy high fidelity character work, and helping us figure out what features the character shader set.

Sure, @xenius , these should be very impressive. These are in progress shots that have improved over time with the Unity 5 Beta. The hair is still being worked on.

2 Likes

I thought I should at least post

@
Thanks buddy for the help!
Alloy 3 works like a charm. Recommended +1

3 Likes

Gorgeous stuff @KC1302 !!!

Question: for the glass in that lamp, are you a translucent core shader, or one of the glass shaders?

Also, that ground texture is just… incredible. Did you make it, or acquire it somewhere?

Hey Anton. It’s me Kimman.

Answer : I used Alloy/Glass (high quality) for the glass. Simple light-grayish bitmap with some tile-able grunge.
The shader did most of the heavy lifting in this case.

Answer : The ground texture is a tileable texture that I took from www.cgtextures.com. I extracted the Height/Albedo/Normal with Substance Bitmap2Material.
For the terrain I used Relief Terrain Shader. The nice bumpy waves come from the heightmap powered by P.O.M.

Currently adding more assets to the scene but will take a while. Majority of the normals were extracted from high-poly models.

@KC1302 Hi Kimman! Totally didn’t connect your Unity forum name to you. Shows how tired I am after GDC…
Gorgeous stuff again!

1 Like

been really interested in this pack for a while. i have some questions however.

do your shaders cull unused code similar to the standard shader? not a fan of shader combination blank spots.

how good are your hair shaders? sorting problems?

cloth shading? most cloth has a lower diffuse brightness when looked at dead on.(has to do with a mix of ambient occlusion and shadowing being less visible at grazing angles due to the overlap of strands) even a basic fresnel darken/brighten would work fine here. though allowing the control of how much is applied as ambient occlusion and diffuse dimming would be really valuable.

whats the glass shader like? is there a light direction aware one? glass is more reflective on the side thats brighter. eg: this is how you get a one way mirror.

reflection probe based refraction maybe? if not, you may look into it as it has some cool perks. if you make the object opaque you get order independence(since its not technically transparent) and you can blend it into normal refraction to get rough refraction effects(kinda). plus its super cheap. not great on moving objects though.

how well do these work with defferred rendering? what shaders drop to forward rendering?

how complicated is it to write new shaders? example maybe?

do you have a tool for packing the textures?

1 Like

@Cynicat

  1. Yup, the shader is using a combination of static uniforms and multicompiles. Only the stuff you’re using is turned on at a given time.

  2. The hair shaders have two forms, a standard translucent, and a base one that has a cutoff between opaque and translucent regions to help you control the blending point. I haven’t used it extensively (as I’m an environment artist), but the folks at Camouflaj got great usage out of it, and it was tweaked several times during their production as issues came up.

  3. Don’t currently have a dedicated cloth shader (as such a form would probably be forward only). However we’re using Disney’s microfacet diffuse brdf which really shows its worth on surfaces at or near 100% roughness

  4. The glass shader is a two-pass translucent shader that uses a grab-pass for refraction, and then does multiplicative blending for the base-color. It is otherwise using the standard properties of the GGX brdf.

  5. Interesting idea. Do you have a reference for an example. Curious how that looks.
    .

  6. The set includes a deferred override shader. Everything fully opaque draws with it. So translucent, glass, skin, hair, transmission, and eye shaders draw forward only due to custom lighting/blending requirements.

  7. The framework has been setup in as organized a manner as possible to allow for modifications. It’s still something that requires intermediate-to-advanced shader knowledge to do, but you’re working on top of a meticulously organized and commented core. Additionally, we designed a mark-up language for the custom Shader UI (with inputs right in the shader file), so if you create a custom shader with the framework, you can get our fancy UI without editor scripting. We haven’t assembled the full API doc for that though, expect it by around the end of the month or so.

  8. Alloy comes with a custom material map packer. There’s old information on the Alloy blog about it (previous version), I’ll be doing an updated video this week.

cheers!

@xenius its an effect i’ve used before with tools like shaderforge. lack of specular convolution was a problem(not as much now that unity has reflection probes)
heres a picture i found of jove 2.0’s implementation. not a super good show of the rough refraction however.
http://forum.unity3d.com/attachments/joveglass-png.107415/

And speaking of the skin shader, I have been experimenting with the normal maps that the shader requires, especially since it is using the mipmaps that make the skin softer. But after some tests (and waiting for Alloy compile my changes), I have some ideas and inputs that will make the shaders much better, and especially artist friendly. So here it goes (and please bear with me).

Exhibit A (Unmodified normals): In this shot, I am using the original normal maps that came directly from Zbrush with no changes to original source. Though the slider reads .8 for Bump Blur, the skin still feels hard to me artistically and modifying my normals is an ardous process.


Exhibit B (Modified Normals):

You probably can’t tell in this shot, the change is so slight, but the results speak for themselves. The skin is starting to feel softer and closer to wax (not ideal for human skin but the lighting itself looks so much better now) and for translucent materials this is a very important step. And when you pull the camera back, the skin is definitely softer.

How I did it:

In the first graph, using the unchanged normals. No need to explain this one. But…

To modify the normals, here are the steps.

1). I extract a copy of the skin normal map with a Blend Node set to Copy and use a mask just for the skin parts of your mesh. (You can make this in Xnormal or paint it in photoshop)

2). The strength is increased with an Overlay node (Lowering the opacity to something like .4).

3.) I then split up the RGBA channels into their own channels (RGBA Split is used) so I can carefully modify them at will starting with 2 Contrast nodes for the Red and Green Channel which makes the channel stronger (will remove this later since it is not necessary anymore).

4.) At this point, it is too crisp so I can blur it a bith with a blend node. Use smaller values until you are happy with the results.

5.) Using the RGBA merge and plugging everything back into it, your new normals are ready for use. Drop 2 blend nodes (make sure the blending mode is set to copy) after the RGBA Merge exactly as you see it in the graph below. Lastly, normalise the changes with a Normal Normalize node.

This setup works great for things like candlewax and makes the skin look softer. And I am hoping in an update for the character based shaders, we can have the ability to blur the normal maps per channel (it will get TEDIOUS fast to keep doing this setup in Substance Designer) especially for artistic control.

It can be just like the bump blur, 0 is unchanged and 1 is completely blurry (it is up to the artist to get the look they way). And since red scatters the most, the red channel is the blurriest, the green channel is weaker than red, and blue is unchanged since it is the depth of the normals. Hope this makes sense.

2 Likes

I just added a video walkthru for my Unity 5/Alloy 3 Ready customizable Substance panel kit.

Asset Store link

Forum link

3 Likes

needs some noise in the roughness map dude. looking too perfect. =3

Yup, that was the clean look. There is a dirt and wear slider for user choice… I made up a couple more Alloy 3 samples below.

2012328--130028--SciFiVol1Screen1900army.jpg 2012328--130029--SciFiVol1Screen1900ss.jpg

2 Likes