Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Question Animate Space Emission Texture

Discussion in 'High Definition Render Pipeline' started by Liz199708, Nov 9, 2022.

  1. Liz199708

    Liz199708

    Joined:
    Jan 22, 2020
    Posts:
    8
    Hi everyone,

    I am currently working on a cinematic VR Experience using the HDRP.
    I'm using a Physically Based Sky, so I have a day to night transition. My goal is to animate the Space Rotation of my Space Emisison Texture over time and I've tried to do that with the Timeline but the Timeline only animates the default Transform Values.

    So how can I access these values and animate them? I'm also not really good in scripting. I would appreciate every little help and detail to understand how to do this :')
     

    Attached Files:

  2. ElevenGame

    ElevenGame

    Joined:
    Jun 13, 2016
    Posts:
    146
    You can script that, it is not too difficult. If you have a reference to the Volume Component, you can do something like the following:
    Code (CSharp):
    1. using UnityEngine.Rendering;
    2. using UnityEngine.Rendering.HighDefinition;
    3.  
    4. public Volume skyVolume;
    5. public Vector3 spaceAngles;
    6.  
    7. private PhysicallyBasedSky pbrSky;
    8.  
    9. void Start()
    10. {
    11. skyVolume.sharedProfile.TryGet<PhysicallyBasedSky>(out pbrSky);
    12. }
    13.  
    14. void Update()
    15. {
    16. pbrSky.spaceRotation.value = spaceAngles;
    17. }
    Note: this is not a complete script, just all the bits and pieces needed to animate a Volume Component.. hope this is helpful.