Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Expose CesiumSunSky date and time properties to Sequencer #761

Open
wants to merge 2 commits into
base: ue4-main
Choose a base branch
from

Conversation

argallegos
Copy link
Contributor

See #760 - Previously, you could not animate the date or time in Sequencer. This PR exposes CesiumSunSky's Solar Time, Day, Month, Year, and Time Zone parameters to Sequencer.

image

Note that currently, CesiumSunSky's UpdateSun function must be called every frame in order for the animation to reflect in the scene. The best way I could find around that was to add a Repeater Event Track on CesiumSunSky in the sequencer, then binding that event to UpdateSun. Steps to do that below, since I'm not sure where else to document them:

  1. Add CesiumSunSky to the Sequencer track
  2. Click the "+ Track" button and select Event>Repeater from the menu
  3. Double-click the new Event Track - it will create a new Sequence Director blueprint. Connect an Update Sun node to the event.
    image
  4. Keyframe your animation
  5. To make sure it's working, right click on the event track and select Properties>Call In Editor.

Of course, there's a lot that could be improved here - it would be great if people didn't have to add the event track. But I imagine that would involve refactoring the SunSky so this is probably enough for now.

@cesium-concierge
Copy link

Thanks for the pull request @argallegos!

  • ✔️ Signed CLA found.

Reviewers, don't forget to make sure that:

@xuelongmu
Copy link
Contributor

xuelongmu commented Feb 23, 2022

There's actually a way to trigger UFUNCTIONs when sequencer-exposed variables are animated on a sequencer track:
https://docs.unrealengine.com/4.26/en-US/AnimatingObjects/Sequencer/HowTo/GameplayAnimBlending/#2-animationandcharacterblueprintsetup
It would make the most sense to implement this in C++ (the principles are the same, you just have to name the setter function have a parameter interp). I can make the changes if that's convenient.

@argallegos
Copy link
Contributor Author

Thanks @xuelongmu, that would be great!

@cesium-concierge
Copy link

Thanks again for your contribution @argallegos!

No one has commented on this pull request in 30 days. Maintainers, can you review, merge or close to keep things tidy?

I'm going to re-bump this in 30 days. If you'd like me to stop, just comment with @cesium-concierge stop. If you want me to start again, just delete the comment.

@kring kring deleted the branch ue4-main April 1, 2022 02:48
@kring kring closed this Apr 1, 2022
@kring kring reopened this Apr 1, 2022
@kring kring changed the base branch from main to ue4-main April 1, 2022 03:07
@michalgryko
Copy link

Hi, I tried adding the interp specifiers to the CesiumSunSky script in UE5 to expose the properties but does not reveal them in the sequencer. Are there other changes required to make this work with UE5?

@kring
Copy link
Member

kring commented Sep 25, 2023

Adding Interp should work, but only if you recompile the plugin. Unreal won't automatically pick up code changes that you make to an Engine plugin. You can try copying the plugin to your project's Plugins directory instead.

@michalgryko
Copy link

Great thanks for advice!

@mylestec
Copy link

Hi... I'm a newb and so apologize for what is probably a stupid question: How does one find the CesiumSunSky script in UE5, find the interp code necessary to expose the parameter in the sequencer, add the interp code, and then recompile the plugin. Any help you can offer will be hugely appreciated!

@kring
Copy link
Member

kring commented Feb 15, 2024

If you've installed the plugin via the Epic Launcher, the code is usually found in C:\Program Files\Epic Games\UE_5.3\Engine\Plugins\Marketplace\CesiumForUnreal or similar for your UE version. The necessary change is this this PR; see the Files Changed tab. This is an old PR, though, so the files will have changed in the meantime, so you may have to adapt accordingly. The easiest way to recompile the plugin is to add it to your project's Plugins directory (copy the entire CesiumForUnreal directory there) and then Unreal will compile it on load, as long as your project is a C++ project. Convert a Blueprint-only to a C++ project by adding a C++ source file to it from the UE Editor. You'll need Visual Studio.

@visualsounds
Copy link

If you've installed the plugin via the Epic Launcher, the code is usually found in C:\Program Files\Epic Games\UE_5.3\Engine\Plugins\Marketplace\CesiumForUnreal or similar for your UE version. The necessary change is this this PR; see the Files Changed tab. This is an old PR, though, so the files will have changed in the meantime, so you may have to adapt accordingly. The easiest way to recompile the plugin is to add it to your project's Plugins directory (copy the entire CesiumForUnreal directory there) and then Unreal will compile it on load, as long as your project is a C++ project. Convert a Blueprint-only to a C++ project by adding a C++ source file to it from the UE Editor. You'll need Visual Studio.

This is beyond me, could you elaborate with a step-by-step instruction on how to make this work in UE5.3?
I'd very much appreciate your help with this.

@kring
Copy link
Member

kring commented Mar 17, 2024

No, we can't provide more detailed instructions than what I've already provided. If you have specific questions we may be able to answer them. Otherwise, you'll have to wait until this is incorporated into an official version of the plugin.

@visualsounds
Copy link

visualsounds commented Mar 18, 2024

Thanks for the answers. My specific question is: Is this supposed to also work in UE 5.3.2? On the instructions, the screenshots are for 4.26.
I have followed every step, copied the plugin folder, installed Visual Studio, created a project in C++, added the event repeater and connected the UpdateSun node, but nothing for time/date in the CesiumSunSky sequencer shows up.

@kring
Copy link
Member

kring commented Mar 18, 2024

As far as I know, the approach in this PR should work in 5.3.2 as well, but I haven't tried it. You will have to drag the CesiumSunSky Actor into the Sequencer, though, just like anything else you want to manipulate with the Sequencer. If that doesn't help, I'm afraid I don't know what the problem might be, sorry.

@visualsounds
Copy link

Maybe I missed something, but what is the way to implement this PR?

@kring
Copy link
Member

kring commented Mar 25, 2024

Maybe I missed something, but what is the way to implement this PR?

Sorry, I don't understand your question.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add Interp specifier to CesiumSunSky to change date and time in Sequencer
7 participants