User Tag List

Page 1 of 2 12 LastLast
Results 1 to 40 of 41

Thread: Matcaps for UE4

  1. #1
    0

    Matcaps for UE4

    not sure if anyones done this yet, I spent yesterday in a trance creating matcaps, I got to about 80.
    and I just took a quick stab at implementing them in unreal engine, and got it working rather swiftly.

    My question to you guys is; would any of you find an unreal matcap library useful? I'd be willing to compile a library, maybe with categorical folders and release it freely for you guys


  2. #2
    0


    with that intention in mind, I am creating a more robust master material, with parameters for brightness, detail normal texture, and will keep expanding.
    I went from unlit back to lit, and the brightness determines the scenes lighting influence on the mat (emissive influence), it's starting to look more useful already


  3. #3
    0
    I just learned what matcaps are, and barely understand how you'd want to use them in a game, but this seems really cool

  4. #4
    0
    just added parameters for the usual suspects metallic and roughness etc

    well this is a good example, really sexy cheap car paints, iridescence pearlecence etc without having a cluster f*** of material nodes
    also good for prototyping and previewing what materials work best on a given asset, without having to go through the tedium of setting one up and refining them. also it's a rather cheap method for doing some otherwise expensive or hard to nail surface effects


  5. #5
    0
    Luminary

    Join Date
    Mar 2014
    Posts
    1,570
    this could be useful, I often use blenders matcap to test the looks and the smoothing of my models, with this I could do the same in UE4, so +1

  6. #6
    0
    That is absolutely amazing!
    https://github.com/iniside/ActionRPGGame - Action RPG Starter kit. Work in Progress. You can use it in whatever way you wish.

  7. #7
    0
    Quote Originally Posted by Chronichol View Post
    just added parameters for the usual suspects metallic and roughness etc

    well this is a good example, really sexy cheap car paints, iridescence pearlecence etc without having a cluster f*** of material nodes
    also good for prototyping and previewing what materials work best on a given asset, without having to go through the tedium of setting one up and refining them. also it's a rather cheap method for doing some otherwise expensive or hard to nail surface effects
    Rad!

    Seems like it'd be useful for games with baked lighting, when you want a specific effect that isn't easily made with materials.

  8. #8
    0
    Thanks guys

    Quote Originally Posted by n00854180t View Post
    Rad!

    Seems like it'd be useful for games with baked lighting, when you want a specific effect that isn't easily made with materials.
    yep, the limitation you need to keep in mind of course is the matcaps are static, and look more or less the same from every angle, however you can blend them with scene lighting as i have started doing, and it works quite convincingly, and works with baked or dynamic lights of course. so yeah working with that in mind, totally.


    Also highlighting other benefits of matcaps, you can create shaders just by painting a 2D sphere i did the bulk of mine by painting, Gaussian blur and masking

    and you can rapidly create surface based shaders without messing around with dot products, special vector nodes, and the general extrapolation that involves, and just figuring out vector relationships and all that other technical wizardry..
    So it facilitates a lower point of entry for fancy materials, something non-technical-artists/non-artists (and generally those who don't want to spend a long time learning and refining materials) would appreciate I'm sure.

    You can also create highly stylized shaders with ease and even blend multiple matcaps like so:




    of course the surface detail needs to be there to support them.

    I will create a few master materials, one of which being a 2 matcap blender

    you can also create some rather convincing sub surface effects on the cheap

    Last edited by Chronichol; 06-26-2014 at 06:56 PM.

  9. #9
    0
    Luminary


    Join Date
    Mar 2014
    Posts
    1,652
    Looks awesome - can't wait to open it up and take a peek

  10. #10
    0
    Really nice, that's what I was hoping. Also, do love me some subsurface. Cheap subsurface is even better.

  11. #11
    0


    working on it some more, tightening up the material, found a great flatten normal node which I'm using to allow for a normal intensity parameter.

    I think these will be highly useful in a stylized pipeline, if anyone has any nice multi material character or other models to do some testing on let me know

    Ed// found a nice free model to do some testing on


    click for larger
    Last edited by Chronichol; 06-28-2014 at 10:13 AM.

  12. #12
    0

    Talking

    Pouring all my free time into this, and having fun!

    I was having some difficulties getting the mapping correct, but I found the transformVector node to cast the tangent vectors into view, thanks to finding a nice UDK article on SEMs

    so now i have 2 methods of mapping, view aligned reflection mapping VAR and spherical environment mapping SEM, and have been making robust VAR and SEM master matcap materials. I've added color tinting. And because color tinting is the baseColor and the matcaps themselves influence emission, you can effectively make it appear like light reactive subsurface, using the base color as the desired subsurface color, like this example


    that removes the ability to utilize "glow" maps you ask? Kind of, however you could get your standard glowing emissive effects via seperate materials OR I can make another master material that supports glow maps within the same material by using a mask based system that blends with the matcap, using masks and having a glowPower parameter. I could theoretically include this feature in the master mats, with null parameters by default. Although i have a feeling a series of case-specific materials would be far more efficient than one bloated multi-case one

    jumping into some explanatory rambling:
    Both methods can be used for distinct rendering styles unto themselves.
    -The VAR method is less static and really good for exotic materials like pearlescent paints metals and gloss materials, it has the distinct benefit of bending more to the view angle and reading more dynamically from different angles.
    -The SEM method can be exclusively beneficial for it's own list of applications, including cheap environmental lighting influence on dynamic actors, outlines, toon shaders and many other things.

    as you can see I have been having quite a bit of fun playing with the matcap based materials


    And these are justVAR so far! I'll be concentrating on the SEM mat next.
    there are so many exciting possibilities! Can't wait to let it loose and see what you guys do with it, it shouldn't be long before i have the first version ready. And... well.... I will stay quiet about some really exciting developments that may (or may not ) be happening!
    Last edited by Chronichol; 06-28-2014 at 10:24 AM.

  13. #13
    0
    Quote Originally Posted by Chronichol View Post

    This looks fabulous. Is it based on sobel edge detection or is it something completely different?

  14. #14
    0
    This looks amazing. Didn't even know this was possible in UE4. Keep it up!

  15. #15
    0
    Quote Originally Posted by doC View Post
    This looks fabulous. Is it based on sobel edge detection or is it something completely different?
    completely different, it's actually 100% matcaps

    here just did an example for illustration, using SEM/matcap mapping.


    it uses surface normals, so this gets mapped to this, regardless of the mesh shape


    thanks Gigantoad, i very much intend to!
    Last edited by Chronichol; 06-28-2014 at 11:38 AM.

  16. #16
    0
    I see. Interesting approach, I will have to have a look at these matcaps

  17. #17
    0
    That would be awesome! I need more materials. Forgive my noobness, but are these just for roughing out a scene? or could/should you use them in production?
    I use Rhino, blender, & zbrush for 3d modeling.
    To see my jewelry/3d art I make visit lupusk9.deviantart.com or some more pictures on my website below
    www.adam-richards.com for everything else such as any games I am working on and more.

  18. #18
    0
    Quote Originally Posted by abomb View Post
    That would be awesome! I need more materials. Forgive my noobness, but are these just for roughing out a scene? or could/should you use them in production?
    I am sure it will become very clear what they can be used for when it's released, as I am planning to create content examples with specific usage cases
    but very much capable of being used for production, in terms of roughing out they could be useful for look development too. but you could just use basic materials for that. it has use cases that defy what unreal can easily do, like magical effects, pearlescence, iridescence, and other uses I'll try highlighting in my project

    Here is a clear example of SEM compared to VAR




    you'll notice VAR wraps around once, as highlighted you can see the centre color on the backside when towards the screen's edge.


    here's a teaser, not organized yet

  19. #19
    0
    These look really great! I'd love to see them in action. Screenshots are fine, but you really need to see them from all angles to get a sense of what the different materials will actually look like.

  20. #20
    0
    Hope you can release it so we can start to add some cool effects in a general matcap library

  21. #21
    0
    Quote Originally Posted by Chronichol View Post
    completely different, it's actually 100% matcaps

    here just did an example for illustration, using SEM/matcap mapping.


    it uses surface normals, so this gets mapped to this, regardless of the mesh shape


    thanks Gigantoad, i very much intend to!
    This is so AWESOME. I could REALLY do with this :>
    KITATUS
    "Information shouldn't be behind a paywall, It should be free for all!"

  22. #22
    1
    I hope Chronichol doesn't mind if I post this here for those who would like to try to play with matcaps.
    Taken from this thread on Polycount -> http://www.polycount.com/forum/showthread.php?t=112129

    Here is the result mixed from the polycount thread as a conviniet function so it can be easily reused for all sorts of effects besides emissive on unlit material. This is only the VAR version.
    Name:  MatcapFn.jpg
Views: 5005
Size:  145.0 KB

  23. #23
    0
    Hey guys, sorry for the lack of thread activity over the past week, been quite busy. I am assuming the consensus is to release it for testing and collaborative contribution sooner rather than later?
    I'll try getting an early version up. i'll get it updated quickly before sharing it.

    Quote Originally Posted by doC View Post
    I hope Chronichol doesn't mind if I post this here for those who would like to try to play with matcaps.
    Taken from this thread on Polycount -> http://www.polycount.com/forum/showthread.php?t=112129

    Here is the result mixed from the polycount thread as a convenient* function so it can be easily reused for all sorts of effects besides emissive on unlit material. This is only the VAR version.
    Name:  MatcapFn.jpg
Views: 5005
Size:  145.0 KB
    Yeah no problem, and Cool! Wish I had been able to spot more material online on the subject before starting, but then again might not have been as motivated knowing it was already done more or less :P That function doesn't seem to be VAR btw, looks more akin to my SEM material function. That said the difference between the 2 is slight, but to be VAR that one is missing a reflection vector.
    I have encapsulated both VAR and SEM mapping methods into functions, a bit differently. there is an official ViewAlignedReflection coordinates node, but i made a lighter version.


    adding a world aligned one is actually a very good idea, i was playing with world aligned before, but looking at that thread and thinking about it I must definitely add it. if i can I'll try putting in a rotation vector, so you can for example put a gradient on, and rotate it to any angle




    and here's some rather unrelated self promotion, and signs of something else creative I have been doing this past week. I might need to remove the Lucy statuette from the final release for legal reasons, so I might use this amongst some other things for some of the use-case examples


  24. #24
    0
    Quote Originally Posted by Chronichol View Post
    That function doesn't seem to be VAR btw, looks more akin to my SEM material function.
    To be honest, didn't give it too much time, just needed something for quick testing, sorry for any confusion.

  25. #25
    0
    Well I won't have an upload ready for awhile. So hopefully this helps those like doC who are eager to jump in and test early.

    including both because the newer ones aren't quite finished yet.

    Here is the first versions of each material


    and here are the encapsulated and revised versions so far, they allow much more reuse and flexibility, it is easier to integrate these functions into another custom material than the first iteration.


    and HERE is a small sample of matcaps to play with too from the set, just press the "Download Album" for a nice zip

    also quick preview
    Last edited by Chronichol; 07-07-2014 at 06:42 AM.

  26. #26
    0
    Thanks for posting the shader nodes.

  27. #27
    0
    Unreal Engine Support
    Join Date
    Apr 2014
    Posts
    636
    Fantastic work with everything Chronichol! The materials that you shown so far in your screenshots look awesome!

  28. #28
    0
    Chronichol, I'm not exactly sure, but shouldn't you rotate/flip the vector in your sem shader? Right now if you make a simple matcap with some specific detail "on top of the sphere" and apply it to a spherical mesh in UE, you will see the detail from bellow (I think even left/right is flipped).

  29. #29
    0
    thanks Sean

    Quote Originally Posted by doC View Post
    Chronichol, I'm not exactly sure, but shouldn't you rotate/flip the vector in your sem shader? Right now if you make a simple matcap with some specific detail "on top of the sphere" and apply it to a spherical mesh in UE, you will see the detail from bellow (I think even left/right is flipped).
    I think i know exactly what you are experiencing, the artifact is fixable. I'll clarify how in a moment. On the other hand there is another apparent byproduct of the FOV on the display of the matcaps, which I'm not sure you are pertaining to as well, It's entirely logical if you think about the method, and how the surface normals in view space are what the matcap texture is being applied to, so if you see things at sheer left,right, top or down you'll see the correlating edge colors of the matcap. The bizarre thing is the magnitude of FOVs distortion, which makes some things an issue and feel a bit "weird" and unnatural. Is in essence a byproduct of the fact your screen is a 2D surface, and the fact you are projecting a curved world onto that with FOV, Because let's think about it for a second, we don't get barrel distortion in your own periphery do we? so you wouldn't be able to see surfaces perpendicularity change as significantly as it would on a 2D display. I am curious to see how proportional FOV distortion is on the oculus though worth noting regarding both the artifact and distortion I've tested matcaps in 3D software and it's prevalent there too, it's down to the fact the model is almost always centered on the screen during your workflow combined with a lower FOV that you fail to notice it.

    So yeah the only way to get 1:1 "perfect" display of matcaps would be with orthogonal projection or some level of corrective rotation could theoretically work I will see if it's worth pursuing, but not sure if it's justified. I'd speculate it would require taking the screenVectors and using those to determine the corrective rotation, I think it's possible. but might need to be a different project, to create a FOV correction node

    but I believe your issue is the wrap around artifact. which is an artifact caused by the textures tiling method, you need to swap it from wrap to mirror


    if you wanted to work with wrapping, you'd need to have uniform borders/rim colour, which is obviously a conflict with the very nature of most matcaps.

  30. #30
    0
    Quote Originally Posted by Chronichol View Post
    but I believe your issue is the wrap around artifact. which is an artifact caused by the textures tiling method, you need to swap it from wrap to mirror
    As I said, I didn't put too much time into it, so I'm not on the level to talk about the issue expertly , but I tried some flipping in my version of SEM and it seems to work ok (maybe a hack, maybe it's only working for most of the situations but not all) without the need to change the tiling method.

  31. #31
    0
    Quote Originally Posted by doC View Post
    As I said, I didn't put too much time into it, so I'm not on the level to talk about the issue expertly , but I tried some flipping in my version of SEM and it seems to work ok (maybe a hack, maybe it's only working for most of the situations but not all) without the need to change the tiling method.
    actually i know exactly what you mean now, the actual matcap keeps flipping upside down, it seems like there is a bug in the split components function, it has gotten frustrating it's flipped on it's own 3 times now and i have to keep manually changing the vector order. so i've gone back to a component mask and vec2 multiply like the version you posted, if there is no more arbitrary flipping it will confirm it.

    I can't see how though, the function itself seems fine, there is no way there is any reordering happening within the function

    also added masking support, both masking and normal maps are toggled on and off with a bool parameter.

    Last edited by Chronichol; 07-10-2014 at 02:14 AM.

  32. #32
    0
    Nice work mate!
    Game Developer @ LODZERO - My Twitter | tomlooman.com UE4 samples & tutorials | C++ Survival Game (Open-source template)

  33. #33
    0
    cheers
    Some more progress shots and testing, blending is quite powerful, considering doing a video soon, had a more comprehensive post the other day but a browser crash chewed it up. hoping to get it finalized by next week, making it a month since i started.


  34. #34
    0
    would be keen to check out some of them. are you still working on it?

  35. #35
    0
    I would definitely really be interested in seeing your node network. I was trying to figure out how you did this crazy madness :P
    Name:  sDfOsNPl.jpg
Views: 3088
Size:  85.0 KB

  36. #36
    0
    Infiltrator
    Join Date
    Feb 2015
    Posts
    21
    Quote Originally Posted by Jermaineatl View Post
    I would definitely really be interested in seeing your node network. I was trying to figure out how you did this crazy madness :P
    Name:  sDfOsNPl.jpg
Views: 3088
Size:  85.0 KB
    That looks so ********* fantastic.

  37. #37
    0
    Infiltrator
    Join Date
    Nov 2014
    Posts
    14
    Quote Originally Posted by Chronichol View Post
    completely different, it's actually 100% matcaps

    here just did an example for illustration, using SEM/matcap mapping.


    it uses surface normals, so this gets mapped to this, regardless of the mesh shape


    thanks Gigantoad, i very much intend to!
    Could you upload this material?

  38. #38
    0
    Looks Awesome!. keep work hard!!

    My question to you guys is; would any of you find an unreal matcap library useful? I'd be willing to compile a library, maybe with categorical folders and release it freely for you guys
    For my mind it will be very useful

    cheers.

  39. #39
    0
    Looks amazing

  40. #40
    0
    Supporter
    Join Date
    Mar 2015
    Posts
    2
    Did this dude die or something? Was looking forward to fooling around with this.

Page 1 of 2 12 LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •