Page 1 of 7

3D camera motion, Action Editor, Transform and Image Viewer

Posted: Thu Jan 01, 2015 2:10 am
by akakyouryuu
I maked the GUI Viewer of 3D camera motion and Transform for Ren'Py.
Place the script in your game directory and read document.
You can download the latest version script from the last page in this thread or git




Tutorial playlist
https://www.youtube.com/playlist?list=P ... sNAeUZ92EG

latest download
https://github.com/kyouryuukunn/renpy-A ... 3/releases

3D stage is available in ActionEditor3 for Ren'Py v7.4.5 later.
https://github.com/kyouryuukunn/renpy-ActionEditor2

3D stage is not available, but the original camera simulation functions are available in ActionEditor for Ren'Py v7.4.0. later
expression and spline function, loading last move are available
https://github.com/kyouryuukunn/renpy-ActionEditor

Re: 3D camera motion and Transform Viewer

Posted: Thu Jan 01, 2015 10:51 am
by akakyouryuu
I fixed some bugs.
and renamed some functin
register_td_layer() -> register_3d_layer()
release_td_layer() -> release_3d_layer()

Re: 3D camera motion and Transform Viewer

Posted: Fri Jan 02, 2015 9:53 am
by akakyouryuu
Now, Transform Viewer "reset" button works correctly.
And I call viewers in new context.

Re: 3D camera motion and Transform Viewer

Posted: Sat Jan 03, 2015 10:37 pm
by Hazel-Bun
Very cool! Thanks for posting ^u^

Re: 3D camera motion and Transform Viewer

Posted: Sat Jan 03, 2015 11:53 pm
by akakyouryuu
Viewers can put date on clipboard.
Improved style

Re: 3D camera motion and Transform Viewer

Posted: Sat Jan 31, 2015 1:35 am
by akakyouryuu

This may be final version.
If you find bugs, please report me.

Note:
Clip board functions works in only Ren'Py v6.99 or later.

Re: 3D camera motion and Transform Viewer

Posted: Mon Mar 16, 2015 1:18 am
by akakyouryuu
I added "rule of thirds" screen.

Re: 3D camera motion and Transform Viewer

Posted: Sat Mar 21, 2015 9:31 am
by akakyouryuu
I fixed a problem that pressing "Shift+P" crashes a game when config.developer is False.

Re: 3D camera motion and Transform Viewer

Posted: Wed Apr 01, 2015 10:03 pm
by akakyouryuu
I added the Viewer keyframe functions.
I changed arguments of camera_moves and layer_moves, please read documents
This works in Ren'Py v6.99 or later.


!Note, layers don't participate in keyframe functions!

Re: 3D camera motion and Transform Viewer

Posted: Sat Apr 04, 2015 8:28 am
by akakyouryuu
New feature:
Allowed the z coordinate of camera to be changed by a mouse wheel.
Allowed the x, y coordinate of camera to be changed by dragging a camera icon.
Allowed 3d layers and camera to be moved at the same time.
Now, 3d layers could participate in keyframe functions.

And I fixed many bugs.

Re: 3D camera motion and Transform Viewer

Posted: Sat Apr 04, 2015 9:34 pm
by akakyouryuu
I added "camera.png".
I fixed document.
Now, If anything isn't registered as 3D layers, this script register "master" layer as 3D layers.

Re: 3D camera motion and Transform Viewer

Posted: Sun Apr 05, 2015 7:58 am
by akakyouryuu
I fixed some bugs

Re: 3D camera motion and Transform Viewer

Posted: Tue Apr 07, 2015 8:49 am
by akakyouryuu
I fixed some bugs.
I added loop buttons.
This may be stable version. If you found bugs, please tell me.

Note that you should call camera_reset() when game has started like below.
If this isn't called, the z coordinates of 3D layers aren't be saved.

Code: Select all

label start:
    $ camera_reset()

Re: 3D camera motion and Transform Viewer

Posted: Sat May 02, 2015 7:46 am
by akakyouryuu
I added functions expression arguments. These expression are callable, which is called with the shown timebase and the animation timebase, in seconds and return a number. The result of this is added to the each coordinate of the camera.

For example,

Code: Select all

init python:
    class Sin(object):
        def __init__(self, freq, amp):
            self.freq = freq
            self.amp = amp

        def __call__(self, st, at):
            from math import sin, pi
            return self.amp*sin(2*pi*self.freq*st)

label example:
    $ all_moves(y_express=Sin(freq=.5, amp=30))
For example, you can use a wiggle function like after effect. This may be used for camera shake.

Code: Select all

init python:
    class Wiggle(object):
        def __init__(self, freq, amp, octaves=1, ampMulti=.5, time=0):
            from random import random
            self.randoms = [(1+random(), 1+random()) for i in range(0, 100)]
            self.freq = freq
            self.amp = amp
            self.octaves = octaves
            self.ampMulti = ampMulti
            self.time = time

        def __call__(self, time, at):
            from math import sin, pi, ceil
            r1, r2 = self.randoms[int(ceil(time*self.freq)%100)]

            return r1*self.amp*sin(2*pi*self.freq*time) + r2*self.amp*self.ampMulti*sin(2*pi*self.freq*2*self.octaves*(time+self.time))


label example:
    $ all_moves(x_express=Wiggle(freq=.5, amp=10), y_express=Wiggle(freq=.6, amp=10), z_express=Wiggle(freq=.4, amp=1))
Please tell me If you make useful expression.

Re: 3D camera motion and Transform Viewer

Posted: Thu May 07, 2015 11:08 am
by KairuKyun
This all has been looking so promising!!! I am using this in my game No One But You.