Transitioning to an ATL-animated background with a dissolve?

Discuss how to use the Ren'Py engine to create visual novels and story-based games. New releases are announced in this section.
Forum rules
This is the right place for Ren'Py help. Please ask one question per thread, use a descriptive subject like 'NotFound error in option.rpy' , and include all the relevant information - especially any relevant code and traceback messages. Use the code tag to format scripts.
Message
Author
Nova Alamak
Regular
Posts: 71
Joined: Sun Jun 08, 2014 1:45 pm
Contact:

Transitioning to an ATL-animated background with a dissolve?

#1 Post by Nova Alamak »

I've got a working animated background made with ATL but when I "scene" or "show" it with a transition (just trying basic dissolve in this case) it doesn't work? It just shows without a transition. Is there any way around this?

User avatar
Imperf3kt
Lemma-Class Veteran
Posts: 3794
Joined: Mon Dec 14, 2015 5:05 am
itch: Imperf3kt
Location: Your monitor
Contact:

Re: Transitioning to an ATL-animated background with a disso

#2 Post by Imperf3kt »

Add the transition to the ATL itself.
If you have to, make a dupe - one with the transition, one without
Warning: May contain trace amounts of gratuitous plot.
pro·gram·mer (noun) An organism capable of converting caffeine into code.

Current project: GGD Mentor

Twitter

Nova Alamak
Regular
Posts: 71
Joined: Sun Jun 08, 2014 1:45 pm
Contact:

Re: Transitioning to an ATL-animated background with a disso

#3 Post by Nova Alamak »

How do I do that? I tried using "on show" but that didn't work. It makes the whole image vanish...

User avatar
Imperf3kt
Lemma-Class Veteran
Posts: 3794
Joined: Mon Dec 14, 2015 5:05 am
itch: Imperf3kt
Location: Your monitor
Contact:

Re: Transitioning to an ATL-animated background with a disso

#4 Post by Imperf3kt »

No, I meant add the dissolve into the ATL:

Code: Select all

image atl example:
     # Display logo_base.png
     "logo_base.png"

     # Pause for 1.0 seconds.
     1.0

     # Show logo_bw.png, with a dissolve.
     "logo_bw.png" with Dissolve(0.5, alpha=True)

     # Run the move_right tranform.
     move_right
https://www.renpy.org/doc/html/atl.html

There's also:

Code: Select all

show logo base:
    on show:
        alpha 0.0
        linear .5 alpha 1.0
    on hide:
        linear .5 alpha 0.0
Warning: May contain trace amounts of gratuitous plot.
pro·gram·mer (noun) An organism capable of converting caffeine into code.

Current project: GGD Mentor

Twitter

Nova Alamak
Regular
Posts: 71
Joined: Sun Jun 08, 2014 1:45 pm
Contact:

Re: Transitioning to an ATL-animated background with a disso

#5 Post by Nova Alamak »

Currently, the first example is something like what I have. The problem is that when it is shown, the opening transition does not show. The image is just shown instantly despite the code. If I use the second example, I just get a blank screen...

User avatar
Imperf3kt
Lemma-Class Veteran
Posts: 3794
Joined: Mon Dec 14, 2015 5:05 am
itch: Imperf3kt
Location: Your monitor
Contact:

Re: Transitioning to an ATL-animated background with a disso

#6 Post by Imperf3kt »

To help further, you'll have to share the code you're using.
Warning: May contain trace amounts of gratuitous plot.
pro·gram·mer (noun) An organism capable of converting caffeine into code.

Current project: GGD Mentor

Twitter

Nova Alamak
Regular
Posts: 71
Joined: Sun Jun 08, 2014 1:45 pm
Contact:

Re: Transitioning to an ATL-animated background with a disso

#7 Post by Nova Alamak »

in init:

Code: Select all

image bg westgate:
        on show:
            linear 1.0 alpha 1.0
        0.25
        "bg/WestGateDay1.png"
        0.25
        "bg/WestGateDay2.png"
        0.25
        "bg/WestGateDay3.png"
        repeat
in main script:

Code: Select all

scene bg westgate
If I take out on show section it works, but doesn't have a transition. If I leave it in, I get a blank transparent background. Also, I had alpha 0.0 in the code initially, but that just made it fade in FROM a blank background which jarringly replaces everything on screen for a split second. I have also tried putting a simple "with" clause on the end of the show statement to try to force a transition, but that just gets ignored by the code.

User avatar
Divona
Miko-Class Veteran
Posts: 678
Joined: Sun Jun 05, 2016 8:29 pm
Completed: The Falconers: Moonlight
Organization: Bionic Penguin
itch: bionicpenguin
Contact:

Re: Transitioning to an ATL-animated background with a disso

#8 Post by Divona »

Code: Select all

image bg westgate:
    "bg/WestGateDay1.png"
    parallel:
        alpha 0.0
        linear 1.0 alpha 1.0
    parallel:
        0.25
        "bg/WestGateDay2.png"
        0.25
        "bg/WestGateDay3.png"
        0.25
        "bg/WestGateDay1.png"
        repeat

label start:
    show westgate
    "This is Westgate."

    return
But simple ATL and transition should work just fine, though. :?

Code: Select all

image bg westgate:
    "bg/WestGateDay1.png"
    0.25
    "bg/WestGateDay2.png"
    0.25
    "bg/WestGateDay3.png"
    0.25
    repeat

label start:
    show westgate with Dissolve(1.0)
    "This is Westgate."

    return
Last edited by Divona on Fri May 05, 2017 2:19 pm, edited 1 time in total.
Completed:
Image

Nova Alamak
Regular
Posts: 71
Joined: Sun Jun 08, 2014 1:45 pm
Contact:

Re: Transitioning to an ATL-animated background with a disso

#9 Post by Nova Alamak »

Oh! Parallels, of course! I'll go try that. Thank you very much for the help!

User avatar
Divona
Miko-Class Veteran
Posts: 678
Joined: Sun Jun 05, 2016 8:29 pm
Completed: The Falconers: Moonlight
Organization: Bionic Penguin
itch: bionicpenguin
Contact:

Re: Transitioning to an ATL-animated background with a disso

#10 Post by Divona »

Update the code, which allow show and hide properly:

Code: Select all

image bg westgate:
    "bg/WestGateDay1.png"
    parallel:
        on show:
            alpha 0.0
            linear 1.0 alpha 1.0
        on hide:
            alpha 1.0
            linear 1.0 alpha 0.0
    parallel:
        0.25
        "bg/WestGateDay2.png"
        0.25
        "bg/WestGateDay3.png"
        0.25
        "bg/WestGateDay1.png"
        repeat
Completed:
Image

Nova Alamak
Regular
Posts: 71
Joined: Sun Jun 08, 2014 1:45 pm
Contact:

Re: Transitioning to an ATL-animated background with a disso

#11 Post by Nova Alamak »

I tried that code just now, it produces the same problem. The background changes to a transparent default renpy checker-tile placeholder, then fades in to the animation from that. I tried removing the first instance of alpha 0.0 to fix that, and it DID remove the initial transparency, but then the other problem happened again: there's just no dissolve whatsoever. I've tried appending a dissolve on the ends of the images themselves in the ATL AND out of it, and it always ignores a transition if it's at the beginning of an ATL, either in the block or outside of it in the script. I'm running out of ideas.

EDIT: I think I forgot to mention, but I'm showing the background with "scene" instead of "show" because I need to clear the screen.

User avatar
Divona
Miko-Class Veteran
Posts: 678
Joined: Sun Jun 05, 2016 8:29 pm
Completed: The Falconers: Moonlight
Organization: Bionic Penguin
itch: bionicpenguin
Contact:

Re: Transitioning to an ATL-animated background with a disso

#12 Post by Divona »

I have no issue with dissolve transition at all in a new project with following:

Code: Select all

image bg westgate:
    "bg/WestGateDay1.png"
    0.25
    "bg/WestGateDay2.png"
    0.25
    "bg/WestGateDay3.png"
    0.25
    repeat

label start:
    scene bg westgate with Dissolve(1.0)
    "This is Westgate."

    return
Also, you don't have to fear the transparent checker. It only appears in developer mode. In build distributions, it will be black screen. If you so concern, you can just add black background to the ATL before the "alpha 0.0". You can't remove alpha 0.0 because it is the starting point of having the background image to be invisible before fading in from alpha 0.0 to alpha 1.0.

If both of these still doesn't work, it's time you show us the code you have an issue with. So we can start to pinpoint the problem at the source.
Completed:
Image

User avatar
Imperf3kt
Lemma-Class Veteran
Posts: 3794
Joined: Mon Dec 14, 2015 5:05 am
itch: Imperf3kt
Location: Your monitor
Contact:

Re: Transitioning to an ATL-animated background with a disso

#13 Post by Imperf3kt »

Are you sure about it only appearing in developer mode and not builds? Because I still get it in builds.
For example, this is a a build I put together for the artist/commissioner two days ago.
https://puu.sh/vHFr0/a66ae80fe0.png
Warning: May contain trace amounts of gratuitous plot.
pro·gram·mer (noun) An organism capable of converting caffeine into code.

Current project: GGD Mentor

Twitter

User avatar
Divona
Miko-Class Veteran
Posts: 678
Joined: Sun Jun 05, 2016 8:29 pm
Completed: The Falconers: Moonlight
Organization: Bionic Penguin
itch: bionicpenguin
Contact:

Re: Transitioning to an ATL-animated background with a disso

#14 Post by Divona »

Imperf3kt wrote:Are you sure about it only appearing in developer mode and not builds? Because I still get it in builds.
For example, this is a a build I put together for the artist/commissioner two days ago.
https://puu.sh/vHFr0/a66ae80fe0.png
No, I'm not sure about that. Just quote from the post I see recently. Actually, I remember seeing those checker background from back when in actual build, so yes, it may not actually going away. :roll:

Just put black over it before the background.
Completed:
Image

Nova Alamak
Regular
Posts: 71
Joined: Sun Jun 08, 2014 1:45 pm
Contact:

Re: Transitioning to an ATL-animated background with a disso

#15 Post by Nova Alamak »

Are you saying to add a black bg to the ATL or to show it in the script before the image? (That won't work in this example anyway since it's shown with a scene statement...)

Post Reply

Who is online

Users browsing this forum: Google [Bot]