Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

Creative World Space Transitions - looking for feedback

Discussion in 'Tools In Progress' started by tomekkie2, Aug 7, 2017.

  1. tomekkie2

    tomekkie2

    Joined:
    Jul 6, 2012
    Posts:
    949
    I think a simpler solution is to put a second material on the existing mesh, rather than making a mesh duplicate. But obviously that can work only when your mesh has just one material at start, or its submesh count equals to one.
     
  2. Deleted User

    Deleted User

    Guest

    Yes UMA is using more Submeshes, another option was to render the renderer twice with the shadow material using a special code which I did not really figure out now how this work exactly but I think that's new in SRP, so because it was only the shadows which are buggy I just made a copy of the renderer and assign all the values and only enabled it in the First Person Mode...

    As always thanks for your help :)
     
    tomekkie2 likes this.
  3. Triggerzz

    Triggerzz

    Joined:
    Dec 18, 2018
    Posts:
    22
    Hello! Wonderful asset!
    However, I'm unable to make these shaders work with LWRP. I noticed that under the package release notes, LWRP was replaced by URP. Is there a way to make URP shaders still work with LWRP? Or to download the older version of the package that worked with LWRP? Thanks!
     
  4. tomekkie2

    tomekkie2

    Joined:
    Jul 6, 2012
    Posts:
    949
    Try to use the older version with LWRP or update your project to URP.
     
  5. Triggerzz

    Triggerzz

    Joined:
    Dec 18, 2018
    Posts:
    22
    I think I downloaded the original file from the "Releases" section here: file.PNG

    But all of the objects still appear pink. After trying both current and original versions, there doesn't seem to be any difference between them. It says that all the files are the same if I try to replace one with the other. But that could just be correct with how this stuff works, since I'm not sure.

    Just seeing if I can get this to work before upgrading my unity version to work with URP.
     
  6. tomekkie2

    tomekkie2

    Joined:
    Jul 6, 2012
    Posts:
    949
    The previous package uses LWRP, which was uploaded using unity 2019.2.0 on
    Aug 15, 2019, 16:24|79.5 MB (83368414 bytes)
    The package version is being automatically selected depending on unity version used to download it. I don't know if there is a way to force Unity to download a selected version.
    This is an image I get when importing with 2019.2.0f:
    import (136).png
    You can see LWRP here.
    When importing from 2019.3.x - it would be URP
     
    Last edited: Apr 2, 2020
  7. Triggerzz

    Triggerzz

    Joined:
    Dec 18, 2018
    Posts:
    22
    Interesting! I'm using unity version 2019.1.3f1 and the LWRP folder isn't there:
    upload_2020-4-3_22-37-57.png
    I'm guessing maybe I would have to have the 2019.2.0 version to make it download the original version? But I'm also not sure if Unity lets you download the original version. Thanks for the help anyways!
     
  8. tomekkie2

    tomekkie2

    Joined:
    Jul 6, 2012
    Posts:
    949
    I guess:
    if the package was uploaded with unity 2019.2.0 and the next version was uploaded with unity 2019.3.0 - you need to use some unity version which is in-between.
    When using 2019.1.3f1 - you are downloading even earlier package version with standard render pipeline only.
     
  9. ryansizemore

    ryansizemore

    Joined:
    Jan 25, 2014
    Posts:
    8
    Thank you so much for making this and providing it for free, tomekkie2. This is exactly what I needed for my project that I'm working on. Only thing is that I'm working in HDRP, so I'm going through and trying to transition it with only the parts I need but there is a lot to sift through. Basically, I need to transition between a wireframe shader that I made and the HDRP/Lit shader. I can try and modify the shaders with the code or just make something similar to those with the code needed to do the fading.
     
  10. tomekkie2

    tomekkie2

    Joined:
    Jul 6, 2012
    Posts:
    949
    You could use the same shader graphs for both URP and HDRP, like I did in case of other asset, the crossSection asset, https://assetstore.unity.com/packages/vfx/shaders/crosssection-93478 .
    However some update will be necessary, because HDRP uses camera relative rendering.
     
  11. ryansizemore

    ryansizemore

    Joined:
    Jan 25, 2014
    Posts:
    8
    I'm new to shaders so I'm not sure how tricky that will be. Also, I could use bits of the shader graph, though I have not figured out a way to do a wireframe shader in shader graph so I will either have to do everything with shader script or do a combination of the two.
     
  12. JohnnyFactor

    JohnnyFactor

    Joined:
    May 18, 2018
    Posts:
    343
    That's how Amplify Shader Editor does it for samples and it works well. Just extract whichever one you need.
     
  13. tomekkie2

    tomekkie2

    Joined:
    Jul 6, 2012
    Posts:
    949
    I have recently updated for more recent version of Unity.
    I have also added some new shaders and example scenes, including this water ripple aka water rings shader:

    This is available for the standard (builtin) render pipeline.
     
    hopeful likes this.
  14. buster42b

    buster42b

    Joined:
    May 25, 2020
    Posts:
    2
    Hello! i just started using your asset but can't make it work correctly, could you please give a little quickstart guide? The bare minimum to make object fade when the camera's approaching it
     
  15. tomekkie2

    tomekkie2

    Joined:
    Jul 6, 2012
    Posts:
    949
    The bare minim is:
    • apply transition materials to the object
    • make camera the transition centre (if planar transition align plane normal with camera forward direction)
    Like in these demo scenes: https://virtualplayground.d2.pl/transitions/ (included inside asset)
     
  16. pslz

    pslz

    Joined:
    Sep 23, 2015
    Posts:
    16
    Can someone explain to me how to use the ripple effect in a URP project?
    There are problems with the shaders that I don't know how to solve.
    Thanks
     
  17. kzielke

    kzielke

    Joined:
    Oct 29, 2019
    Posts:
    2
    Hi there! Is there a way to have multiple worldspace transistions active at the same time? The GizmoFollow script is a singleton, but I guess I need to go into the shader code?
    I found a comment in the include file where you stated you couldn't get arrays to work. Would that be the function i'm looking for?

    The transistions look awesome! Thank you for making it free. I'm using it in my bachelor thesis :)
     
  18. tomekkie2

    tomekkie2

    Joined:
    Jul 6, 2012
    Posts:
    949
    I think the comment about arrays is no longer relevant now, so you can reach for arrays.

    Yest the GizmoFollow is a singleton - so you can either remove the singleton pattern from it and use multiple gizmos to manipulate the effect positions/rotations as array elements or find your own ways to do it.

    A scene with multiple sphere transitions is already included into the asset:
    https://forum.unity.com/threads/world-space-transitions-looking-for-feedback.487060/#post-5303547
    This is the dissolveGlow_individual scene.

    In this case the transitions are set on local material level, so using arrays is not needed, because each of the materials uses its own single transition data. If you wanted to use the Gizmo and GizmoFollow scripts for each of these materials - you would have to - after removing the singleton pattern from GizmoFollow - change the code to make it work on material level.
    Instead of global shader variables:

    Shader.SetGlobalVector("_SectionPoint", transform.position);
    Shader.SetGlobalVector("_SectionPlane", transform.forward);
    Shader.SetGlobalVector("_SectionPlane2", transform.right);


    local material variables should be used:

    material.SetVector("_SectionPoint", transform.position);
    material.SetVector("_SectionPlane", transform.forward);
    material.SetVector("_SectionPlane2", transform.right);


    If you wanted to have multiple transitions for each object/material - then you would need arrays.
    Then instead of
    float3 _SectionPoint;

    you will have to define array
    float4 _SectionPoints[64]

    (assuming 64 is enough; maximum vector array size is 256)
    - and so on for _SectionPlane and _SectionPlane2
    - in the section_clipping_CS.cginc file.


    In case of multiple gizmos - each gizmo should have an array index assigned and you should setup static Vector4 arrays for SectionPoints, SectionPlanes, SectionPlanes2 in GizmoFollow.
    Then the GizmoFollow script should update these arrays and then update them in shaders:

    SectionPoints[index] = transform.position;
    Shader.SetGlobalVectorArray("_SectionPoints", SectionPoints);


    and so on.

    Then regarding multiple transition planes - the space gets divided into a greater number of regions and you should decide which regions to crop and which to keep.
    In case of a single plane there will be two regions one above and the the second below the plane.
    If two planes - there will be three regions if the planes are paralell or four regions.
    Generally the number of spaces equals to

    according to https://mathworld.wolfram.com/SpaceDivisionbyPlanes.html .
    Analogically in case of multiple transition spheres.
     
    Last edited: Sep 11, 2022
  19. kzielke

    kzielke

    Joined:
    Oct 29, 2019
    Posts:
    2
    Yes I already removed the singleton pattern, but it only works for one GizmoFollow at a time. The one that got updated the last. I can't have the effect at the same time in two different positions.
    I only did really basic stuff with shaders so far and I dont really know how advanced this change would be. Maybe I'm in way over my head and need to come back when I'm more experienced. Right now I dont know where I need to start to get this functionality. Do I need to implement the array in the FadingDissolveGlow.shader or the section_clipping_CS.cginc file?
    I guess it must be in the shader, but the only thing the GizmoFollow script does is setting the _SectionPoint variable, which I can't find in the shader, but in the CG include file.
     
  20. tomekkie2

    tomekkie2

    Joined:
    Jul 6, 2012
    Posts:
    949
    I have edited the previous post, I hope you will find some answers there.
     
  21. cgraider

    cgraider

    Joined:
    Dec 13, 2016
    Posts:
    1
    There is problem with overlapping transparency of fading shader. which can be fixed with Zwrite on ( which doesnt exist in shader graph) how can we fix it?
     
  22. tomekkie2

    tomekkie2

    Joined:
    Jul 6, 2012
    Posts:
    949
    You can use RenderObjects to add depth write/test overrides.
     
  23. Creiz

    Creiz

    Joined:
    Jun 6, 2017
    Posts:
    125
    This is actually pretty damn amazing.

    I can't believe I didn't find this before.

    How hard would it be for a complete shader noob to implement this on Unity's Toon Shader?

    UTS is great and has everything I need except... Dissolve. And there's no solution out there that can help me.

    I wonder if I could somehow add this to the UTS without too much trouble. It would be such a godsent.
     
  24. tomekkie2

    tomekkie2

    Joined:
    Jul 6, 2012
    Posts:
    949
  25. Creiz

    Creiz

    Joined:
    Jun 6, 2017
    Posts:
    125
  26. tomekkie2

    tomekkie2

    Joined:
    Jul 6, 2012
    Posts:
    949
    selectiveBloom.gif

    I have just upgraded the asset for Unity 2022.1 and URP 14.0.4. The URP upgrade applies to the selective bloom effect.

    I have added the selective bloom effect to this asset to boost the dissolve glow effect.
    It uses two ScriptableRenderFeatures, one named Bloom Feature and the second Bloom Mask Feature. Both of these are now updated to recent URP, which now uses RTHandle.
     
  27. slava2681995

    slava2681995

    Joined:
    Jul 29, 2020
    Posts:
    1
    If I change the scale, the effect won't work for some reason. Have I missed something?