Jump to content


Photo

Shader Thread


  • Please log in to reply
6 replies to this topic

#1 Birdie

Birdie

    Advanced Member

  • Members
  • PipPipPip
  • 456 posts

Posted 25 September 2020 - 11:48 PM

I start a new thread where we can showcase and share interesting shaders.

I recently found some nice free ones and as well some payware which were generally not labelled as Unity 5.2.3 compatible. Some were part of vertex painting or splatmapping packages and most of these included painters indeed don't work in our Unity version or at least i couldn't get them to work. But some shaders of these packages still work in Unity 5.2.3 by making some tiny edits in the shader scripts.

I can go into detail later what lines you have to change if you want to try these. It's basically always the same few error messages because from Unty 5.3 and up they changed some words in the scripting.

Just an example, in more recent shaders you find the spelling 'unity_ObjectToWorld' and then you will get an error message and the shader will not work in our Unity. If you replace this line with '_Object2World' it will probably work because this was the old spelling up to Unity 5.2 or so. This doesn't mean every new shader will work because you will face so many different error messages when trying to apply an up to date shader. But some of the stuff i tested can still be used and is easy to workaround. And these are mainly just a bit newer than 5.2.3, mainly labelled as 5.5 or 2017. 

 

Here is one asset where, again, i couldn't get all this paint and brush tools to work but the included shaders work.

https://assetstore.u...ertpaint-100282

As a side note there generally seems to be nearly no useful vertex painter for our Unity version available. I got one from the asset store but i don't know if it's maybe better to paint vertex colors in Blender. The painter somehow works and i probably have to get a bit more familiar with this painting and splatmapping stuff.

I show two screens of the probably most advanced of the included shaders of this asset, a height-based 4-way blending shader. Seems to work even without painting vertex colors but to paint a detail like some dirt here or there on a cartpath for example it makes sense to paint.

Here i added a simple plane and blended some Megascans surfaces.  

cFavXZ6.jpg

You can see the menu in the inspector looks really old fashioned and not like in the videos on the asset stor page but who cares.

And here just for showcasing i applied this material to my cartpath and made some dots with the painter in the foreground. So it's easy to add some dirt here or there to kill repetition artifacts and make the scene a bit more interesting.

dxRLaHD.jpg

 

 

More to follow...


  • JoeF, Keith, bortimus and 5 others like this

#2 Buck

Buck

    Advanced Member

  • Members
  • PipPipPip
  • 7,553 posts

Posted 26 September 2020 - 12:17 AM

Wow!!

 

That rock pathway is **awesome**



#3 Keith

Keith

    Advanced Member

  • Members
  • PipPipPip
  • 414 posts
  • LocationGeorgia, USA

Posted 26 September 2020 - 12:37 AM

what Buck said..you never cease to amaze Birdie.  Great stuff.



#4 DPRoberts

DPRoberts

    Advanced Member

  • Members
  • PipPipPip
  • 1,610 posts

Posted 26 September 2020 - 01:13 AM

Birdie, that's really the icing on the cake for all the magic you have shown us.

I have used this Vertex painter in the past. I'm guessing you could sub in your shaders to use with it.

https://assetstore.u...x-painter-36688

#5 Birdie

Birdie

    Advanced Member

  • Members
  • PipPipPip
  • 456 posts

Posted 26 September 2020 - 08:10 AM

Yes, the TOZ painter is one of the two painters I have in my arsenal. The other I think is called Mend Vertex Painter. While they both seem to work a little laggy they still have the benefit of working at runtime. But if nothing helps, an export from Blender only takes seconds and there for sure are much more options given. That's generally still the big advantage of JNPG, you have all the options to use any tool you like...
  • SReesor likes this

#6 Birdie

Birdie

    Advanced Member

  • Members
  • PipPipPip
  • 456 posts

Posted 26 September 2020 - 11:52 PM

Here is another really nice splatmapping shader pack. It's an earlier creation from the developer of the well known Megasplat and Microsplat assets. It's still available for free on github. 

https://github.com/s...216/VertexPaint

Again the included painter and other stuff doesn't work in our version of Unity. I just cecked, for now i only have the

SplatMapShaderGUI.cs in its Editor folder, the SplatBlend_Shared.cginc and the SplatBlend_5Layer.shader as well as the specular version copied to my assets. These shaders now work on vertex painted meshes. There are some nice options like UV distance scaling which blends the UVs to make the tiling less obvious at least. There is even an flow option to overlay some animated water but i haven't tested this a lot.

This could be a nice shader for an outer mesh or so. It does parallax height mapping and can look a little odd when close up on heavily "raised" parts. There is also the question, as this is only one material where you can mix completely different surfaces, how to apply different physics to the different surfaces? No clue if there is an option to apply physics by vertex color or so.

Anyway, really fun stuff to just fool around with.

As with the other shader in the first post you also have to prepare some texture maps a bit and for example put the height map in the alpha channel of the albedo map or even apply different maps to the rgb channels of one texture. This would probably a bit of a pain to do manually in Gimp or Photoshop but for example in Quixel Mixer you can simply assign these in a dropdown on any map which makes it really simple. There are probably other tools available to help.

Some shots of this shader on a mesh placed somewhere in the air...

LVOksJH.jpg

B4KoiXR.jpg

rIsgwSw.jpg

 



#7 Birdie

Birdie

    Advanced Member

  • Members
  • PipPipPip
  • 456 posts

Posted 27 September 2020 - 10:18 AM

Another one of this kind which, iirc, worked without any modification.

https://github.com/j...hader-for-Unity

Also check out the link in the description.




4 user(s) are reading this topic

0 members, 4 guests, 0 anonymous users