playMaker

Author Topic: Animate a public Skybox variable made with Playmaker[SOLVED]  (Read 3647 times)

Caro

  • Playmaker Newbie
  • *
  • Posts: 22
Hi all

I want to animate the Procedural Skybox, but since it's not connected to a game object, I can't animate it how I normally would.

So I thought I could expose a float in the FSM component, that is connected to the skybox. I can make the float, and make it change in runtime with logic, but I can't make it animatable(is that even a word?)

When I change the public float in the Inspector, the animation window doesn't react.

Is there any way to fix that?
« Last Edit: May 02, 2020, 07:27:46 AM by Caro »

ch1ky3n

  • Full Member
  • ***
  • Posts: 208
Re: Animate a public variable made with Playmaker
« Reply #1 on: May 01, 2020, 09:18:04 AM »
if you just want to animate the variable, try using ease float command.

Caro

  • Playmaker Newbie
  • *
  • Posts: 22
Re: Animate a public variable made with Playmaker
« Reply #2 on: May 01, 2020, 09:42:09 AM »
Thanks - yeah it works with logic - but I want to use the animation window, because I want to preview the things in Timeline, because I want to scrub and time things precisely :)

ch1ky3n

  • Full Member
  • ***
  • Posts: 208
Re: Animate a public variable made with Playmaker
« Reply #3 on: May 01, 2020, 09:51:43 AM »
not sure what kind of animation you want with the skybox

1. to change the day and night cycle, you could manipulate the materials
2. to move its transform, or have its own logic, you could setup a new camera name it Skybox Camera and then change the depth to nothing and put the skybox in there. You also need to remove the skybox in your main camera.Then you could animate it with animator (Only for the transform though)

3,or you could make a script with public float on it and you can manipulate it variable if you put it as a child under the object that have animator controller in it
« Last Edit: May 01, 2020, 09:59:24 AM by ch1ky3n »

djaydino

  • Administrator
  • Hero Member
  • *****
  • Posts: 7618
    • jinxtergames
Re: Animate a public variable made with Playmaker
« Reply #4 on: May 01, 2020, 10:36:42 AM »
Hi.
maybe you can use the Tween Beta actions.
you can set a custom curve on it.

Caro

  • Playmaker Newbie
  • *
  • Posts: 22
Re: Animate a public variable made with Playmaker
« Reply #5 on: May 01, 2020, 12:42:59 PM »
Thank you for your replies.

I see where I didn't make myself clear: I want to animate the shader properties of the built in "Procedural Skybox". On a regular shader, you can animate the properties as you would animate anything else, but with the Procedural Skybox, it's not possible, since it's not attached to any object, but assigned in the lighting panel.

Some of the properties I want to animate is the Sky Tint(color) and Exposure(float).

I can ease the color and float using Playmaker actions, that works fine, but I don't want to ease float, I want to animate it using keyframes in the Animation Window. It's the same result visually, but I need the keyframes in order to preview in the Timeline. Timeline previews animation, but not logic.

I hope it's more clear now :D

ch1ky3n

  • Full Member
  • ***
  • Posts: 208
Re: Animate a public variable made with Playmaker
« Reply #6 on: May 01, 2020, 01:21:14 PM »
ok I get it, u want to "Preview" the changes without hitting the play button, cuz u want to tune it back and forth beforehand.

I don't think you can do it by default. Unless you know how to expose the parameter in the shader itself.

Caro

  • Playmaker Newbie
  • *
  • Posts: 22
Re: Animate a public variable made with Playmaker
« Reply #7 on: May 01, 2020, 03:59:46 PM »
Yes exactly :)

Alright that's too bad - I don't think building my own shader will work, because it seems like the skybox cannot be changed in runtime from the animations at least. But it's possible through scripting.

But would a variable exposed in the Inspector by Playmaker be possible to animate in the Animation window? Just like adjusting the transform?


Caro

  • Playmaker Newbie
  • *
  • Posts: 22
Re: Animate a public variable made with Playmaker
« Reply #8 on: May 02, 2020, 07:27:25 AM »
Okay I found a work around.

Attach the skybox material to a huge Sphere with flipped normals and voila. Animatable and previewable :)

Betweenwinters

  • Playmaker Newbie
  • *
  • Posts: 1
Re: Animate a public Skybox variable made with Playmaker[SOLVED]
« Reply #9 on: July 30, 2020, 11:24:59 PM »
Hey Caro,
Okay I found a work around.

Attach the skybox material to a huge Sphere with flipped normals and voila. Animatable and previewable :)

I hope you are doing well.

I have the same problem with animating skybox material as you did before, I followed your workaround solution, putting a skybox material on a big sphere(which I had flipped its normals in Maya), it looked okay in the working scene, however, when switched to game view, it seems like the sphere is not being rendered at all, it's always rendering the skybox in the lighting setting in the game view.

I am wondering what part did I do wrong, and if you could give me some of your insights that would be awesome, thank you so much Caro