Hi all - here is the recent stable version of the shader, works as far back as 5.6.3 afaik
Albedo texture should have some sort of damage texture in the alpha (ideally positioned to fit within the mask textures below)
Damage masks allow the damage textures to create the actual alpha cutouts, separately from one another, including the surrounding bloodstains.
Ïf using forward rendering, and linear color space, make sure the sRGB option for the MASK texture is "un-checked". (took us a few hours to track that one down when sharing projects...)
Planning to post a web demo shortly...
- jake
Clamp Greyscale Texture Min / Max
-
sazberryftw
- Posts: 27
- Joined: Wed Aug 23, 2017 1:38 pm
Re: Clamp Greyscale Texture Min / Max
Hey! I had a look at your shader and looks cool.jake.carvey wrote:Hi all - here is the recent stable version of the shader, works as far back as 5.6.3 afaik
Is the harsh pixel edges something you're going for stylisticly? The way I was using it in my shader it didn't matter as all the edges were in the padding of my UVs, but I guess in your case it was unavoidable. I'm not sure if there's maybe a way to blur the generated mask so that you can add in some sort of anti-aliasing? I was trying to work this out but didn't find anything.
Oh and you should upload your example in a Unity Package instead of just zipping the files up, this will ensure that options like disable sRGB persist when you share it.
- Amplify_Borba
- Posts: 1239
- Joined: Mon Jul 24, 2017 9:50 am
Re: Clamp Greyscale Texture Min / Max
Thank you for sharing this cool effect, looking forward to the web demo!jake.carvey wrote:Hi all - here is the recent stable version of the shader, works as far back as 5.6.3 afaik
Albedo texture should have some sort of damage texture in the alpha (ideally positioned to fit within the mask textures below)
Damage masks allow the damage textures to create the actual alpha cutouts, separately from one another, including the surrounding bloodstains.
Ïf using forward rendering, and linear color space, make sure the sRGB option for the MASK texture is "un-checked". (took us a few hours to track that one down when sharing projects...)
Planning to post a web demo shortly...
- jake
Like sazberryftw said, it would be awesome if you could provide your sample in a unity package, keep up the good work!sazberryftw wrote:Oh and you should upload your example in a Unity Package instead of just zipping the files up, this will ensure that options like disable sRGB persist when you share it.
Customer Relations at Amplify Creations
Learn more about our offering: Amplify Creations Products
Amplify Shader Editor won the Asset Store Best Tool Award - Thank you for your support!
Learn more about our offering: Amplify Creations Products
Amplify Shader Editor won the Asset Store Best Tool Award - Thank you for your support!
-
jake.carvey
- Posts: 16
- Joined: Thu Feb 22, 2018 9:39 pm
Re: Clamp Greyscale Texture Min / Max
Thx! Was a lot of hours of troubleshooting and dev. Looks much cooler animating with full normal mapped textures, interior parallax "blood and guts" mesh, realtime shadows (!) etc. Just wanted to get something up in case anyone was still looking for options to do this.Hey! I had a look at your shader and looks cool.![]()
Yes - actually I mentioned this earlier in this thread (also disable mip-mapping). Also, it still needs some work in finding the ideal greyscale values to choose - will come up with an easier system for that.Did you know if you change your filter mode on your mask texture to "point" it will get rid of the nasty artifacts around your masks? I'm not sure of any performance implications of changing this option though.
The harsh edges (if I understand you properly) are because this MUST be a "Cutout" shader. The amount of NPCs the game will have on screen at one time completely prevents the use of Transparent shaders, at least that's the directive i received. Might be able to turn it into a multi-texturelayer instead for most of it, but that will have to be for another project.Is the harsh pixel edges something you're going for stylisticly? The way I was using it in my shader it didn't matter as all the edges were in the padding of my UVs, but I guess in your case it was unavoidable. I'm not sure if there's maybe a way to blur the generated mask so that you can add in some sort of anti-aliasing? I was trying to work this out but didn't find anything.
Good call - I did that with earlier versions, but didn't have the time to spare troubleshooting the package, as it was very very late night / morning already here in Thailand! Also, the team I was working with seems to have an aversion to packaging things up portably, so I was always having to test and troubleshoot the manual workflow. Will send as package next time, and hopefully with some cooler examples - this one i needed to ensure the textures weren't from the assets themselves.Oh and you should upload your example in a Unity Package instead of just zipping the files up, this will ensure that options like disable sRGB persist when you share it.
-
jake.carvey
- Posts: 16
- Joined: Thu Feb 22, 2018 9:39 pm
Re: Clamp Greyscale Texture Min / Max
Quick screenshot of the rough effect (always room for improvement, this is meant for medium sized crowds of NPCs). Damage colors and blood and guts are temp, not sure how the devs will proceed from here with that part. 
-
sazberryftw
- Posts: 27
- Joined: Wed Aug 23, 2017 1:38 pm
Re: Clamp Greyscale Texture Min / Max
Ahh I guess I wasn't aware you were using transparency specifically. I was talking more about if you wanted to layer the blood onto the albedo on an opaque shader you would need some kind of fake anti-aliasing (like you could get if you made the mask manually in Photoshop) if you wanted to remove the harsh pixel edges.jake.carvey wrote: The harsh edges (if I understand you properly) are because this MUST be a "Cutout" shader. The amount of NPCs the game will have on screen at one time completely prevents the use of Transparent shaders, at least that's the directive i received. Might be able to turn it into a multi-texturelayer instead for most of it, but that will have to be for another project.
But yeah seems like an awesome use for it!
-
jake.carvey
- Posts: 16
- Joined: Thu Feb 22, 2018 9:39 pm
Re: Clamp Greyscale Texture Min / Max
Yeah - the final damage "splats" actually *are* full grayscale, and "grow" as we increase the damage parameter per "quadrant" - which actuallys makes a pretty cool animated effect in action!if you wanted to layer the blood onto the albedo on an opaque shader you would need some kind of fake anti-aliasing (like you could get if you made the mask manually in Photoshop) if you wanted to remove the harsh pixel edges.