Search Unity

  1. Unity 6 Preview is now available. To find out what's new, have a look at our Unity 6 Preview blog post.
    Dismiss Notice
  2. Unity is excited to announce that we will be collaborating with TheXPlace for a summer game jam from June 13 - June 19. Learn more.
    Dismiss Notice

ADAM EP2/EP3 Character Pack discussion

Discussion in 'General Discussion' started by bac9-flcl, May 30, 2018.

  1. bac9-flcl

    bac9-flcl

    Joined:
    Dec 5, 2012
    Posts:
    829
    I've been looking for a place to discuss the release of that package, but I couldn't find any, so I'm creating this thread.

    https://assetstore.unity.com/packages/templates/packs/adam-ep2-ep3-character-pack-115793

    It's a very impressive set of assets, I'm having a lot of fun forking the shaders in it and moving our characters to new skin and eye materials. However, there are some things I'm a bit confused about, and I'd appreciate any input to figure them out.

    1. I think the UVs of the cult leader mesh included in the package are different from one used in the EP3 short - detail mapping is very uniform in the video, but is quite unevenly scaled in the package, with pore detail becoming huge towards the back of the head. This is likely caused by the short using a model with a secondary UV channel where islands were uniformly scaled and differently sliced to allow uniform application of detail. At least, that's how we solved the issue of huge pores popping up on the back of the head - I'd appreciate it if someone can let me know if I'm on the right track here.



    2. I'm not entirely sure about correct setup for the eye shader. I get why the shader takes on shadow rendering (to allow for precise specular and diffuse occlusion, which a standalone shadow mesh wouldn't do), but I'm not sure if the shadow application is correctly set up in the package. As far as I understand, the shadow is supposed to be moved based on some vectors passed to the material through the EyeLookVector component, which should allow it to maintain correct placement relative to the eye opening while the eyeball rotates.

    Problem is, that's not what's happening. What ends up happening is best illustrated with an animated image - eye shadow is moving, but seems to be moving in a wrong direction, possibly based on an incorrect bone (I'm still not sure why that component needs a head rotation bone - wouldn't an eye bone vector be sufficient?). Azure coloration you can see on the gif was probably added to the shader to visualize cases where parts of shadow that shouldn't be visible are caught by the camera - which makes the issue all the more easy to see:




    3. I think the skin detail texture used in the package might have been originally created for a different role. It is slotted into the detail normal sampler, but it's not anywhere near a valid normal - it's a collection of 4 different pore detail maps slotted into RGB channels. Such a map does not depict valid tangent space normals, which means that applying it through traditional detail normalmapping makes skin normal tilted and creates shading seams - this becomes really obvious when you crank up the detail intensity to 1 and look at any UV seams, like one above the forehead:



    Solving that is relatively simple - I just extracted nice pore detail from that RGBA map and generated normal maps from each variant. Applying these valid normal maps solves all shading discontinuities.



    I don't notice any issues like that in the Adam short, so I'm guessing the short used a more complex version of the shader where RGBA map called skin-details.tif was interpreted in a very different way, since the pore detail there looked a bit more sophisticated than a lerp to a single normal.

    I have more questions, but knowing more about these few things would already be a nice start. :D

    ____________________

    Edit: I think I managed to fix the eye shader to correctly shift the texcoords of the shadow. I simply inverted the X correction at line 428 in standard core .cginc used by the eye shader:

     
    Last edited: May 30, 2018
    marcoantap and ksam2 like this.
  2. ksam2

    ksam2

    Joined:
    Apr 28, 2012
    Posts:
    1,080
    Hi, this asset doesn't work anymore in Unity 2021! Have you happened to fix it for Unity 2021?
     
  3. Murgilod

    Murgilod

    Joined:
    Nov 12, 2013
    Posts:
    10,259
    Unity assets like this generally don't work outside of the very specific version they were released for, as in "If it was released for 2017.3.12, it probably won't work in 2017.3.13."
     
    zombiegorilla likes this.
  4. ksam2

    ksam2

    Joined:
    Apr 28, 2012
    Posts:
    1,080
    The last version that works is Unity 2020.1.17f, the best skin shader I've ever seen in Unity! Do you mean updating this shader to work with 2021 is a hard task?
     
  5. Ryiah

    Ryiah

    Joined:
    Oct 11, 2012
    Posts:
    21,488
    She means that this is a demo asset that is intended to showcase the engine and therefore Unity won't maintain it or may very well have built it on features that were dependent on a specific release of the engine. The latter is very common for showcases.
     
  6. finalgradecalculator

    finalgradecalculator

    Joined:
    Mar 20, 2024
    Posts:
    1
    When i install the exact version of unity as in the video. The drag and drop of the downloaded package is working, but not in unity 2022.