Is there a cleaner way to do this? (panning shot)

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.
Post Reply
Message
Author
bloobeary
Regular
Posts: 36
Joined: Fri Oct 04, 2019 3:02 pm
Deviantart: bloobeary
Soundcloud: user-212448702
Contact:

Is there a cleaner way to do this? (panning shot)

#1 Post by bloobeary »

My intent is to start off with an establishing shot.

So, open on camera shot of the sky, hold for a couple seconds, then ease into a pan down from the sky to the ground where a building is set against a distant treeline, and have the camera motion ease to a stop.

I put together an image twice the height of the project (building panshot), with all the relevant graphical bits, made a second image of just the top half of that (bigcloud), and then put this is the code sequence I put together to run the move:

Code: Select all

    
    scene bg bigcloud
    with Dissolve(2)

    pause 1

    show building panshot at pandown

    pause 6
As you can see, it starts off by using the bigcloud image as a scene background, then overlays the full double-height (building panshot) image overtop of it as a sprite object. The pandown code starts this larger image off with the very top of the image at the very top of the window so the moment that it appears onscreen is seamless.

This is what I'm using for the pandown:

Code: Select all

transform pandown:
    yanchor 0.0
    ypos 0.0
    easeout 2.5 ypos 0.5 yanchor 0.5
    easein 2.5 ypos 1.0 yanchor 1.0
This mostly works. The panning movement gets a bit skittery towards the end though - and this seems fairly klunky compared to how easy a move like this would be in After FX (I know, not really comparable, but...)

So my question is, is there a less klunky way to do this? Or is brute-forcing it like this the only way to get a thing like this to work?

jeffster
Veteran
Posts: 361
Joined: Wed Feb 03, 2021 9:55 pm
Contact:

Re: Is there a cleaner way to do this? (panning shot)

#2 Post by jeffster »

You can use just one large image, e.g.:

Code: Select all

label start:
    scene black
    window hide
    show building panshot:
        yalign 0.0
        alpha 0.0
        linear 3.0 alpha 1.0
        pause 1.0
        easeout 2.5 yalign 0.5
        easein 2.5 yalign 1.0
        pause 2.0
    pause(11.0)
    window show
    "OK"
Also transforms can contain things like on show, on hide, parallel, and you can use ComposeTransition etc.

Post Reply

Who is online

Users browsing this forum: No registered users