[Daz] Moving the camera through a single frame?

shao0647

Newbie
Feb 18, 2020
28
23
So, to preface: I might be completely overthinking this. Entirely possible.

Wanting to have one of those shots that starts at either the top or bottom of a character, and basically follows them up or down, from head to toe. Like when you first introduce a character, and the camera (you) looks them over.

Is the only way to do that to use animation? Or is there a way to (forgive the awful wording here, because I don't know how better to describe it) scroll the camera through one long, single render?

I've Googled the shit outta this, and couldn't get a clear answer... Again, that's likely due to my poor choice of words and lack of technical understanding of what I'm trying to do.

I finally just decided to make a 5-second animation from head-to-toe... at 151 frames total, needless to say, it wasn't something I could exactly render quickly (8 hours in, and my PC had only rendered frames zero through four... ).

Am I going about this the wrong way? Is there a better way to accomplish this?
 

Rich

Old Fart
Modder
Donor
Respected User
Game Developer
Jun 25, 2017
2,490
7,035
So, to preface: I might be completely overthinking this. Entirely possible.

Wanting to have one of those shots that starts at either the top or bottom of a character, and basically follows them up or down, from head to toe. Like when you first introduce a character, and the camera (you) looks them over.

Is the only way to do that to use animation? Or is there a way to (forgive the awful wording here, because I don't know how better to describe it) scroll the camera through one long, single render?

I've Googled the shit outta this, and couldn't get a clear answer... Again, that's likely due to my poor choice of words and lack of technical understanding of what I'm trying to do.

I finally just decided to make a 5-second animation from head-to-toe... at 151 frames total, needless to say, it wasn't something I could exactly render quickly (8 hours in, and my PC had only rendered frames zero through four... ).

Am I going about this the wrong way? Is there a better way to accomplish this?
You didn't saw what program you were using for your game, but if it's Ren'py, this is pretty straightforward. What you do is to render a single image that's much bigger than your normal "frame." Same width, but then maybe 4 times as high. Then you create an animation out of it using ATL. Start off with the image's bottom aligned to the bottom of your screen, which means that the top of the image will be way off the top, then change the image alignment in a time-based fashion. Here's some code from one of my projects:

Code:
image ch4c_04a_panning:
    "ch4c/ch4c_04a.jpg"
    yalign 1.0
    ease 5.5 yalign 0.0
The "yalign 1.0" says "align the bottom of the image to the bottom of the screen". Then the "ease" line says "over 5.5 seconds, transition to aligning the top of the image to the top of the screen". The result is that the image slides downward, giving the impression that your view is sliding upwards.
 

shao0647

Newbie
Feb 18, 2020
28
23
You didn't saw what program you were using for your game, but if it's Ren'py, this is pretty straightforward. What you do is to render a single image that's much bigger than your normal "frame." Same width, but then maybe 4 times as high. Then you create an animation out of it using ATL. Start off with the image's bottom aligned to the bottom of your screen, which means that the top of the image will be way off the top, then change the image alignment in a time-based fashion. Here's some code from one of my projects:

Code:
image ch4c_04a_panning:
    "ch4c/ch4c_04a.jpg"
    yalign 1.0
    ease 5.5 yalign 0.0
The "yalign 1.0" says "align the bottom of the image to the bottom of the screen". Then the "ease" line says "over 5.5 seconds, transition to aligning the top of the image to the top of the screen". The result is that the image slides downward, giving the impression that your view is sliding upwards.
I didn't even consider for a moment if this was a function of Ren'py rather than of the render and camera software!

This is precisely what I was looking to do. Thanks a ton!
 

Rich

Old Fart
Modder
Donor
Respected User
Game Developer
Jun 25, 2017
2,490
7,035
I didn't even consider for a moment if this was a function of Ren'py rather than of the render and camera software!

This is precisely what I was looking to do. Thanks a ton!
You're welcome. Ren'py has quite a bit you can do in terms of animating images using ATL. It's a feature that (for whatever reason) not a lot of people know about.
 
  • Like
Reactions: shao0647

mickydoo

Fudged it again.
Game Developer
Jan 5, 2018
2,446
3,548
You didn't saw what program you were using for your game, but if it's Ren'py, this is pretty straightforward. What you do is to render a single image that's much bigger than your normal "frame." Same width, but then maybe 4 times as high. Then you create an animation out of it using ATL. Start off with the image's bottom aligned to the bottom of your screen, which means that the top of the image will be way off the top, then change the image alignment in a time-based fashion. Here's some code from one of my projects:

Code:
image ch4c_04a_panning:
    "ch4c/ch4c_04a.jpg"
    yalign 1.0
    ease 5.5 yalign 0.0
The "yalign 1.0" says "align the bottom of the image to the bottom of the screen". Then the "ease" line says "over 5.5 seconds, transition to aligning the top of the image to the top of the screen". The result is that the image slides downward, giving the impression that your view is sliding upwards.
I just tried this myself and got diddle squat to happen, literally, renpy just ignored it. I named an image "xtest", its 4 times higher than is wide

I first did this
Code:
image xtest_panning:
    "xtest.jpg"
    yalign 1.0
    ease 5.5 yalign 0.0
And nothing happened. I then copied and pasted your code and the same thing, no errors, just skips past it, what am I doing wrong?
 

Rich

Old Fart
Modder
Donor
Respected User
Game Developer
Jun 25, 2017
2,490
7,035
And nothing happened. I then copied and pasted your code and the same thing, no errors, just skips past it, what am I doing wrong?
The "image" statement above just defines the image, it doesn't display it. Once you have that definition somewhere in your code, you then have to display the image using either:
Code:
    scene xtest_panning
or
Code:
    show xtest_panning
"image" statements are run at "init time," not at "run time." As a result, there is a convention that you don't mix them in the middle of your script. Instead, one generally puts them either at the top of the file in which they're used, or in a separate file.
 
  • Like
Reactions: mickydoo

mickydoo

Fudged it again.
Game Developer
Jan 5, 2018
2,446
3,548
The "image" statement above just defines the image, it doesn't display it. Once you have that definition somewhere in your code, you then have to display the image using either:
Code:
    scene xtest_panning
or
Code:
    show xtest_panning
"image" statements are run at "init time," not at "run time." As a result, there is a convention that you don't mix them in the middle of your script. Instead, one generally puts them either at the top of the file in which they're used, or in a separate file.
Cheers mate got it now.
 
  • Like
Reactions: Rich