More Holograms in Unity Shader Graph

แชร์
ฝัง
  • เผยแพร่เมื่อ 28 ก.ย. 2024

ความคิดเห็น • 14

  • @bykyou
    @bykyou 2 ปีที่แล้ว +3

    Thank you~~~ I'm always watching your videos, and thanks to you, my project has gotten a little easier! If possible, could you also produce an image of how to apply the hologram and the resolve effect at the same time? I've been thinking about it for 3 days😂😂😂

  • @bakuman61
    @bakuman61 3 ปีที่แล้ว +3

    the noise doesnt seem to be moving? there is no animation just like in the preview shown? how do you get it to actually glitch?

    • @bakuman61
      @bakuman61 3 ปีที่แล้ว

      bro you didnt say you had to add a script for the actual glitch effect to work...

    • @ndnd1915
      @ndnd1915 3 ปีที่แล้ว

      @@bakuman61 Where do you add the script?

    • @bakuman61
      @bakuman61 3 ปีที่แล้ว

      @@ndnd1915 not sure. i dont work with scripts but he also doesnt show how

    • @danielilett
      @danielilett  3 ปีที่แล้ว +4

      I skipped over that for the sake of time, but yes, I use a script to animate the glitching. There's a few ways you can do the animation.
      You can control the amount of glitching inside scripts by attaching the script to the same GameObject with the hologram material, then using
      [ material = GetComponent().material ]
      to get a reference to the material, then calling
      [ material.SetFloat("_GlitchStrength", amount) ]
      to tweak the amount of glitching (where "amount" is a float variable).
      Or, you can use Unity's animator. If you create a new animation on the GameObject, in the Animation window, you can go to Add Property and select Mesh Renderer, and it'll list all the material properties. Pick the one called Material._GlitchStrength, and you can tweak values right here in the Unity Editor. If you want the glitching to look snappy rather than smooth, like in the tutorial, I'd place down your keyframes, then right-click them, and set Both Tangents to Constant.

    • @minitruffle
      @minitruffle 3 ปีที่แล้ว +3

      I had the same problem, here's a simple script that can do it. Just attach it to the object that has the shader on it.
      using System.Collections;
      using System.Collections.Generic;
      using UnityEngine;
      public class Hologram : MonoBehaviour
      {
      public float maxGlitch;
      public float minGlitch;
      public float glitchLength;
      public float timeBetweenGlitches;
      private void Start()
      {
      StartCoroutine(Glitch());
      }
      IEnumerator Glitch()
      {
      Renderer renderer = GetComponent();
      Material mainMaterial = renderer.material;
      yield return new WaitForSeconds(timeBetweenGlitches);
      mainMaterial.SetFloat("_GlitchStrength", Random.Range(minGlitch, maxGlitch));
      yield return new WaitForSeconds(glitchLength);
      mainMaterial.SetFloat("_GlitchStrength", 0f);
      StartCoroutine(Glitch());
      }
      }

  • @lesoup-mxd
    @lesoup-mxd 4 ปีที่แล้ว +2

    Thank you very much! Right what i needed!

  • @Ghost-sama
    @Ghost-sama 3 ปีที่แล้ว

    my mat are all purple

    • @MonkiiMousii
      @MonkiiMousii 8 หลายเดือนก่อน

      u dont have URP

  • @lawees27
    @lawees27 2 ปีที่แล้ว +1

    When I add the glitch strength final transform node into the master Vertex Position input, my objects where the shader is applied move in world space (I did the transform nodes as you said, object>view, view>object)
    Do you know why this might be??

    • @djmedina50
      @djmedina50 ปีที่แล้ว

      I've had the same problem. Change the position node space as object

  • @GameMakerGuy
    @GameMakerGuy 7 หลายเดือนก่อน

    my model just disappears

  • @cutedagger
    @cutedagger 4 ปีที่แล้ว

    meow