Lightning effect

3absh3absh Member Posts: 601

Hey guys
I have 4 images here
1 cloud only and 3 clouds with lightning at different places
I'm trying to animate this image in a way where lightning appears randomly with no sequence or order (including flashing at the same place more than once)
I need each animation to consist of 2 or 3 frames than restore to original frame the one with no lightning.
I tried using a timer but somehow timers and animations don't go too well.





Comments

  • The_Gamesalad_GuruThe_Gamesalad_Guru Member Posts: 9,922

    That's because you are doing ten frames a second with four frames and. 5 second timer. This will throw off what the last frame is. Go with 8 frames per second, this will assure you end on the last frame. You can always monitor the frame in 1.25 as it now has a frame playing variable for the animation behavior.

  • 3absh3absh Member Posts: 601

    @Lost_Oasis_Games said:
    That's because you are doing ten frames a second with four frames and. 5 second timer. This will throw off what the last frame is. Go with 8 frames per second, this will assure you end on the last frame. You can always monitor the frame in 1.25 as it now has a frame playing variable for the animation behavior.

    It doesn't matter how many frames per second it doesn't work. I did a different approach using and additional attribute

  • jonmulcahyjonmulcahy Member, Sous Chef Posts: 10,408

    try this to start:

    every 5 seconds
    display your 2-3 lighting images
    animate at 8 or 9 fps (depending on 2 or 3 images)

    make sure restore original actor image when done is selected

  • jonmulcahyjonmulcahy Member, Sous Chef Posts: 10,408
    edited March 2016

    did a quick test, this worked! I created a boolean, and every X seconds I change it to true. When true I run through the animation and chance it back to false.

    I claim trademark on my magnificent sky and lighting.

  • 3absh3absh Member Posts: 601

    Amazing work! But since I need different lightning effects each time I used a different approach
    This is how I did it.

  • jonmulcahyjonmulcahy Member, Sous Chef Posts: 10,408

    @abuabed84 said:
    Amazing work! But since I need different lightning effects each time I used a different approach
    This is how I did it.

    great!

    You can use changeImage to create your own animations too, and have only a single set of rules. Create another attribute called type, and use that in a few change attribute rules

  • SocksSocks London, UK.Member Posts: 12,822
    edited March 2016

    @jonmulcahy said:
    I claim trademark on my magnificent sky and lighting.

    Did you do that in a 3D application or is actual video footage of a real storm ?

  • SocksSocks London, UK.Member Posts: 12,822
    edited March 2016

    If there are only three lightening images, and you want their playback order randomised . . .

    With a range of three numbers you can arrange them in a 'circle' (using mod), randomly choose a starting number, and then proceed around the circle in a random direction - going through the remaining two values.

    This will give you all possible random combination of three numbers (6).

  • The_Gamesalad_GuruThe_Gamesalad_Guru Member Posts: 9,922

    @abuabed84 said:

    @Lost_Oasis_Games said:
    That's because you are doing ten frames a second with four frames and. 5 second timer. This will throw off what the last frame is. Go with 8 frames per second, this will assure you end on the last frame. You can always monitor the frame in 1.25 as it now has a frame playing variable for the animation behavior.

    It doesn't matter how many frames per second it doesn't work. I did a different approach using and additional attribute

    Okay I only saw one set of rules in the pic.

  • jonmulcahyjonmulcahy Member, Sous Chef Posts: 10,408

    @Socks said:

    @jonmulcahy said:
    I claim trademark on my magnificent sky and lighting.

    Did you do that in a 3D application or is actual video footage of a real storm ?

    I paid for a Unreal course and this was my final project. Got an A

  • SocksSocks London, UK.Member Posts: 12,822

    @jonmulcahy said:
    I paid for a Unreal course and this was my final project. Got an A

    :)

  • The_Gamesalad_GuruThe_Gamesalad_Guru Member Posts: 9,922

    All that picture needs is tony getting struck by the Lightning

  • SocksSocks London, UK.Member Posts: 12,822
    edited March 2016

    @Lost_Oasis_Games said:
    All that picture needs is tony getting struck by the Lightning

    Unfortunately Tony was done in very high-end propriety 3D VR software, to even try and composite him into jon's photorealistic storm scene would need a pretty high end machine linked to a 1400+ machine rendering farm.

  • PhilipCCPhilipCC Encounter Bay, South AustraliaMember Posts: 1,390

    @Socks , @jonmulcahy and @Lost_Oasis_Games Hey guys, I'm just curious... wouldn't it be better, more efficient, to separate the lightening strike from the background instead of animating such large images?

  • SocksSocks London, UK.Member Posts: 12,822

    @PhilipCC said:
    @Socks , @jonmulcahy and @Lost_Oasis_Games Hey guys, I'm just curious... wouldn't it be better, more efficient, to separate the lightening strike from the background instead of animating such large images?

    Yes, it would be much more efficient.

  • jonmulcahyjonmulcahy Member, Sous Chef Posts: 10,408

    @PhilipCC said:
    @Socks , @jonmulcahy and @Lost_Oasis_Games Hey guys, I'm just curious... wouldn't it be better, more efficient, to separate the lightening strike from the background instead of animating such large images?

    like @socks said, it would be more efficient. In my magnificent example I cut some corners :)

Sign In or Register to comment.