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

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
User avatar
akakyouryuu
Regular
Posts: 102
Joined: Fri Nov 30, 2012 10:29 am
Contact:

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

#1 Post by akakyouryuu » Thu Jan 01, 2015 2:10 am





https://github.com/kyouryuukunn/renpy-ActionEditor
I maked 3D camera motion and Transform Viewer 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.
Last edited by akakyouryuu on Sat May 04, 2019 7:25 am, edited 2 times in total.

User avatar
akakyouryuu
Regular
Posts: 102
Joined: Fri Nov 30, 2012 10:29 am
Contact:

Re: 3D camera motion and Transform Viewer

#2 Post by akakyouryuu » Thu Jan 01, 2015 10:51 am

I fixed some bugs.
and renamed some functin
register_td_layer() -> register_3d_layer()
release_td_layer() -> release_3d_layer()
Attachments
camera.zip
(4.59 KiB) Downloaded 94 times

User avatar
akakyouryuu
Regular
Posts: 102
Joined: Fri Nov 30, 2012 10:29 am
Contact:

Re: 3D camera motion and Transform Viewer

#3 Post by akakyouryuu » Fri Jan 02, 2015 9:53 am

Now, Transform Viewer "reset" button works correctly.
And I call viewers in new context.
Attachments
camera.zip
(4.69 KiB) Downloaded 112 times

User avatar
Hazel-Bun
Eileen-Class Veteran
Posts: 1005
Joined: Sun Oct 28, 2012 6:03 pm
Completed: Sunrise: A Dieselpunk Fantasy & Ultramarine: A Seapunk Adventure
Organization: AURELIA LEO, LLC
Location: Louisville, Kentucky
Contact:

Re: 3D camera motion and Transform Viewer

#4 Post by Hazel-Bun » Sat Jan 03, 2015 10:37 pm

Very cool! Thanks for posting ^u^

User avatar
akakyouryuu
Regular
Posts: 102
Joined: Fri Nov 30, 2012 10:29 am
Contact:

Re: 3D camera motion and Transform Viewer

#5 Post by akakyouryuu » Sat Jan 03, 2015 11:53 pm

Viewers can put date on clipboard.
Improved style
Attachments
camera.zip
(4.99 KiB) Downloaded 80 times

User avatar
akakyouryuu
Regular
Posts: 102
Joined: Fri Nov 30, 2012 10:29 am
Contact:

Re: 3D camera motion and Transform Viewer

#6 Post by akakyouryuu » Sat Jan 31, 2015 1:35 am


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.
Attachments
camera.zip
(5.6 KiB) Downloaded 84 times

User avatar
akakyouryuu
Regular
Posts: 102
Joined: Fri Nov 30, 2012 10:29 am
Contact:

Re: 3D camera motion and Transform Viewer

#7 Post by akakyouryuu » Mon Mar 16, 2015 1:18 am

I added "rule of thirds" screen.
Attachments
screenshot0001.png
camera.zip
(5.73 KiB) Downloaded 56 times

User avatar
akakyouryuu
Regular
Posts: 102
Joined: Fri Nov 30, 2012 10:29 am
Contact:

Re: 3D camera motion and Transform Viewer

#8 Post by akakyouryuu » Sat Mar 21, 2015 9:31 am

I fixed a problem that pressing "Shift+P" crashes a game when config.developer is False.
Attachments
camera.zip
(5.73 KiB) Downloaded 59 times

User avatar
akakyouryuu
Regular
Posts: 102
Joined: Fri Nov 30, 2012 10:29 am
Contact:

Re: 3D camera motion and Transform Viewer

#9 Post by akakyouryuu » Wed Apr 01, 2015 10:03 pm

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!
Attachments
camera.zip
(9.3 KiB) Downloaded 74 times
Last edited by akakyouryuu on Sat Feb 24, 2018 6:26 am, edited 1 time in total.

User avatar
akakyouryuu
Regular
Posts: 102
Joined: Fri Nov 30, 2012 10:29 am
Contact:

Re: 3D camera motion and Transform Viewer

#10 Post by akakyouryuu » Sat Apr 04, 2015 8:28 am

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.
Attachments
camera.zip
(11.54 KiB) Downloaded 52 times
Last edited by akakyouryuu on Sat Feb 24, 2018 6:33 am, edited 1 time in total.

User avatar
akakyouryuu
Regular
Posts: 102
Joined: Fri Nov 30, 2012 10:29 am
Contact:

Re: 3D camera motion and Transform Viewer

#11 Post by akakyouryuu » Sat Apr 04, 2015 9:34 pm

I added "camera.png".
I fixed document.
Now, If anything isn't registered as 3D layers, this script register "master" layer as 3D layers.
Attachments
camera.zip
(15.64 KiB) Downloaded 53 times

User avatar
akakyouryuu
Regular
Posts: 102
Joined: Fri Nov 30, 2012 10:29 am
Contact:

Re: 3D camera motion and Transform Viewer

#12 Post by akakyouryuu » Sun Apr 05, 2015 7:58 am

I fixed some bugs
Attachments
camera.zip
(15.59 KiB) Downloaded 69 times

User avatar
akakyouryuu
Regular
Posts: 102
Joined: Fri Nov 30, 2012 10:29 am
Contact:

Re: 3D camera motion and Transform Viewer

#13 Post by akakyouryuu » Tue Apr 07, 2015 8:49 am

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()
Attachments
renpy-ActionEditor.zip
(17.14 KiB) Downloaded 108 times

User avatar
akakyouryuu
Regular
Posts: 102
Joined: Fri Nov 30, 2012 10:29 am
Contact:

Re: 3D camera motion and Transform Viewer

#14 Post by akakyouryuu » Sat May 02, 2015 7:46 am

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.
Attachments
camera.zip
(19.59 KiB) Downloaded 263 times

User avatar
KairuKyun
Veteran
Posts: 281
Joined: Thu Feb 12, 2015 4:10 pm
Completed: No One But You, Catch Canvas, Sickness, Written in the Sky, Wander no more
Projects: Warped Reality
Organization: Unwonted Studios
IRC Nick: Kairu_kyun
Tumblr: karamuchan
Contact:

Re: 3D camera motion and Transform Viewer

#15 Post by KairuKyun » Thu May 07, 2015 11:08 am

This all has been looking so promising!!! I am using this in my game No One But You.
Kyle Tyner
Creator of Unwonted Studios
ktyner@unwontedstudios.com
Visit Our Website
Projects: No One But You, Sickness, Written in the Sky, Wander no more, Catch Canvas, Warped Reality

Post Reply

Who is online

Users browsing this forum: duck-and-wolf, Google [Bot], Imperf3kt