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
shinwook
Newbie
Posts: 1
Joined: Wed Oct 21, 2015 8:12 pm
Contact:

Re: 3D camera motion and Transform Viewer

#16 Post by shinwook »

hi!!

good tool! thanks!

question!

can i save changes automatically after using this? or should i write the code, seeing the clipboard??

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

Re: 3D camera motion and Transform Viewer

#17 Post by akakyouryuu »

>>can i save changes automatically after using this?
No
>>should i write the code, seeing the clipboard??
Yes. note a clipboard function works only windows.

And I updated.
I improved image viewer, press shift+U and open it.
This is available in action editor.
Attachments
camera.zip
(22.38 KiB) Downloaded 250 times

User avatar
Darim
Regular
Posts: 67
Joined: Sun Jun 21, 2015 4:17 pm
Organization: Setsuna Ken
Github: SetsunaKen
Location: Germany
Contact:

Re: 3D camera motion, Action Editor, Transform and Image Vie

#18 Post by Darim »

I don't know if this is a bug, but after I use the 2D Camera a few of the standard transitions (move - movein/moveout - easeout/easein) don't work anymore in the whole game.

Code: Select all

p "Hello"
p "How are you?"

$ all_moves(camera_check_points={'x': [(0, 0, None), (1536, 2.0, 'linear'), (-1536, 3.0, 'linear'), (0, 4.0, 'linear')], 'z': [(0, 0, None), (360, 1.0, 'linear'), (372, 3.06, 'linear'), (0, 4.0, 'linear')]})

show sprite smile with dissolve
p "I'm moving on the right side now"

show sprite smile at right with move <-- Transition effect don't work anymore

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

Re: 3D camera motion, Action Editor, Transform and Image Vie

#19 Post by akakyouryuu »

Code: Select all

p "Hello"
p "How are you?"

$ all_moves(camera_check_points={'x': [(0, 0, None), (1536, 2.0, 'linear'), (-1536, 3.0, 'linear'), (0, 4.0, 'linear')], 'z': [(0, 0, None), (360, 1.0, 'linear'), (372, 3.06, 'linear'), (0, 4.0, 'linear')]})
######
with None #add "with None"
######

show sprite smile with dissolve
p "I'm moving on the right side now"

Varrok
Newbie
Posts: 6
Joined: Sun Jun 26, 2016 4:11 pm
Contact:

Re: 3D camera motion, Action Editor, Transform and Image Vie

#20 Post by Varrok »

Hi,

Thank you so very much for doing this! I really appreciate it :)

Could you tell me how to enable subpixels? The camera_move() is very jittery at slow moving speeds. Adding "subpixel True" to the transform definition usually helped me with it, but I can't make this work with the 3D camera commands

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

Re: 3D camera motion, Action Editor, Transform and Image Vie

#21 Post by akakyouryuu »

subpixel is True by default.

User avatar
trooper6
Lemma-Class Veteran
Posts: 3712
Joined: Sat Jul 09, 2011 10:33 pm
Projects: A Close Shave
Location: Medford, MA
Contact:

Re: 3D camera motion, Action Editor, Transform and Image Vie

#22 Post by trooper6 »

The master layer in my game is clipped to be smaller than the regular screen.width/height. When I use the camera is resets the size of that layer to the game's screen.width/height. Is there some way to stop that from happening so that the master layer remains smaller than the game screen?

Thanks!
A Close Shave:
*Last Thing Done (Aug 17): Finished coding emotions and camera for 4/10 main labels.
*Currently Doing: Coding of emotions and camera for the labels--On 5/10
*First Next thing to do: Code in all CG and special animation stuff
*Next Next thing to do: Set up film animation
*Other Thing to Do: Do SFX and Score (maybe think about eye blinks?)
Check out My Clock Cookbook Recipe: http://lemmasoft.renai.us/forums/viewto ... 51&t=21978

Varrok
Newbie
Posts: 6
Joined: Sun Jun 26, 2016 4:11 pm
Contact:

Re: 3D camera motion, Action Editor, Transform and Image Vie

#23 Post by Varrok »

akakyouryuu wrote:subpixel is True by default.
Oh.

When I move the camera by small distances in a relatively long time, for example:

Code: Select all

$ camera_move(25, 0, -30, 0, 0)
to
$ camera_move(-25, 0, -30, 0, 10, 'easein')
It really lags. Am I doing something wrong? Can I do something about that? :(

Thanks for the response!

User avatar
trooper6
Lemma-Class Veteran
Posts: 3712
Joined: Sat Jul 09, 2011 10:33 pm
Projects: A Close Shave
Location: Medford, MA
Contact:

Re: 3D camera motion, Action Editor, Transform and Image Vie

#24 Post by trooper6 »

So I fixed my problem by getting rig of clipping and making a frame overlay.

So...here is my next question, is there a way to go from one camera move to the next with a dissolve?
A Close Shave:
*Last Thing Done (Aug 17): Finished coding emotions and camera for 4/10 main labels.
*Currently Doing: Coding of emotions and camera for the labels--On 5/10
*First Next thing to do: Code in all CG and special animation stuff
*Next Next thing to do: Set up film animation
*Other Thing to Do: Do SFX and Score (maybe think about eye blinks?)
Check out My Clock Cookbook Recipe: http://lemmasoft.renai.us/forums/viewto ... 51&t=21978

User avatar
nyaatrap
Crawling Chaos
Posts: 1824
Joined: Mon Feb 13, 2012 5:37 am
Location: Kimashi Tower, Japan
Contact:

Re: 3D camera motion, Action Editor, Transform and Image Vie

#25 Post by nyaatrap »

I also couldn't recognize visual difference between subpixel True/False. I couldn't fully understand the thing discussed on https://github.com/renpy/renpy/issues/935, but you can try absolute positions.

Varrok
Newbie
Posts: 6
Joined: Sun Jun 26, 2016 4:11 pm
Contact:

Re: 3D camera motion, Action Editor, Transform and Image Vie

#26 Post by Varrok »

Changing

Code: Select all

$ camera_move(-25, 0, -30, 0, 10)
to

Code: Select all

$ camera_move(absolute(-25), 0, -30, 0, 10)
Doesn't do anything, unfortunately.

I just noticed something. The character shown by the "show character_name" on a 3d layer does not jitter, though an image (animated or not) does jitter

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

Re: 3D camera motion, Action Editor, Transform and Image Vie

#27 Post by akakyouryuu »

>>trooper6

Code: Select all

    $ camera_move(0, 0, 1600, 0, 5)
    with None
    show t0 B onlayer forward
    with dissolve
>>Varrok
Give it up

Varrok
Newbie
Posts: 6
Joined: Sun Jun 26, 2016 4:11 pm
Contact:

Re: 3D camera motion, Action Editor, Transform and Image Vie

#28 Post by Varrok »

Okay, I guess I'll have to do it another way :P

Thanks anyway!

User avatar
Mooneon
Regular
Posts: 78
Joined: Sat Jul 04, 2015 4:05 pm
Contact:

Re: 3D camera motion, Action Editor, Transform and Image Vie

#29 Post by Mooneon »

Okay when I click Shift+P it gives me this error.

Code: Select all

I'm sorry, but an uncaught exception occurred.

While loading <'Image' 'camera.png'>:
  File "game/camera/camera.rpy", line 1480, in action_editor
    renpy.invoke_in_new_context(renpy.call_screen, "_action_editor")
  File "game/camera/camera.rpy", line 1191, in render
    child_render = renpy.render(self.child, width, height, st, at)
IOError: Couldn't find file 'camera.png'.

-- Full Traceback ------------------------------------------------------------

Full traceback:
  File "renpy/common/_layout/screen_main_menu.rpym", line 29, in script
    $ ui.interact()
  File "/Users/Maddie/Desktop/renpy-6.99.10-sdk/renpy/ast.py", line 806, in execute
    renpy.python.py_exec_bytecode(self.code.bytecode, self.hide, store=self.store)
  File "/Users/Maddie/Desktop/renpy-6.99.10-sdk/renpy/python.py", line 1577, in py_exec_bytecode
    exec bytecode in globals, locals
  File "renpy/common/_layout/screen_main_menu.rpym", line 29, in <module>
    $ ui.interact()
  File "/Users/Maddie/Desktop/renpy-6.99.10-sdk/renpy/ui.py", line 277, in interact
    rv = renpy.game.interface.interact(roll_forward=roll_forward, **kwargs)
  File "/Users/Maddie/Desktop/renpy-6.99.10-sdk/renpy/display/core.py", line 2425, in interact
    repeat, rv = self.interact_core(preloads=preloads, **kwargs)
  File "/Users/Maddie/Desktop/renpy-6.99.10-sdk/renpy/display/core.py", line 3101, in interact_core
    rv = root_widget.event(ev, x, y, 0)
  File "/Users/Maddie/Desktop/renpy-6.99.10-sdk/renpy/display/layout.py", line 905, in event
    rv = i.event(ev, x - xo, y - yo, cst)
  File "/Users/Maddie/Desktop/renpy-6.99.10-sdk/renpy/display/behavior.py", line 410, in event
    rv = run(action)
  File "/Users/Maddie/Desktop/renpy-6.99.10-sdk/renpy/display/behavior.py", line 302, in run
    return action(*args, **kwargs)
  File "game/camera/camera.rpy", line 1480, in action_editor
    renpy.invoke_in_new_context(renpy.call_screen, "_action_editor")
  File "/Users/Maddie/Desktop/renpy-6.99.10-sdk/renpy/game.py", line 265, in invoke_in_new_context
    return callable(*args, **kwargs)
  File "/Users/Maddie/Desktop/renpy-6.99.10-sdk/renpy/exports.py", line 2475, in call_screen
    rv = renpy.ui.interact(mouse="screen", type="screen", roll_forward=roll_forward)
  File "/Users/Maddie/Desktop/renpy-6.99.10-sdk/renpy/ui.py", line 277, in interact
    rv = renpy.game.interface.interact(roll_forward=roll_forward, **kwargs)
  File "/Users/Maddie/Desktop/renpy-6.99.10-sdk/renpy/display/core.py", line 2425, in interact
    repeat, rv = self.interact_core(preloads=preloads, **kwargs)
  File "/Users/Maddie/Desktop/renpy-6.99.10-sdk/renpy/display/core.py", line 2779, in interact_core
    self.draw_screen(root_widget, fullscreen_video, (not fullscreen_video) or video_frame_drawn)
  File "/Users/Maddie/Desktop/renpy-6.99.10-sdk/renpy/display/core.py", line 1848, in draw_screen
    renpy.config.screen_height,
  File "renpy/display/render.pyx", line 416, in renpy.display.render.render_screen (gen/renpy.display.render.c:6685)
    rv = render(root, width, height, 0, 0)
  File "renpy/display/render.pyx", line 185, in renpy.display.render.render (gen/renpy.display.render.c:2857)
    rv = d.render(widtho, heighto, st, at)
  File "/Users/Maddie/Desktop/renpy-6.99.10-sdk/renpy/display/layout.py", line 649, in render
    surf = render(child, width, height, cst, cat)
  File "renpy/display/render.pyx", line 103, in renpy.display.render.render (gen/renpy.display.render.c:3319)
    cpdef render(d, object widtho, object heighto, double st, double at):
  File "renpy/display/render.pyx", line 185, in renpy.display.render.render (gen/renpy.display.render.c:2857)
    rv = d.render(widtho, heighto, st, at)
  File "/Users/Maddie/Desktop/renpy-6.99.10-sdk/renpy/display/layout.py", line 649, in render
    surf = render(child, width, height, cst, cat)
  File "renpy/display/render.pyx", line 103, in renpy.display.render.render (gen/renpy.display.render.c:3319)
    cpdef render(d, object widtho, object heighto, double st, double at):
  File "renpy/display/render.pyx", line 185, in renpy.display.render.render (gen/renpy.display.render.c:2857)
    rv = d.render(widtho, heighto, st, at)
  File "/Users/Maddie/Desktop/renpy-6.99.10-sdk/renpy/display/layout.py", line 649, in render
    surf = render(child, width, height, cst, cat)
  File "renpy/display/render.pyx", line 103, in renpy.display.render.render (gen/renpy.display.render.c:3319)
    cpdef render(d, object widtho, object heighto, double st, double at):
  File "renpy/display/render.pyx", line 185, in renpy.display.render.render (gen/renpy.display.render.c:2857)
    rv = d.render(widtho, heighto, st, at)
  File "/Users/Maddie/Desktop/renpy-6.99.10-sdk/renpy/display/screen.py", line 610, in render
    child = renpy.display.render.render(self.child, w, h, st, at)
  File "renpy/display/render.pyx", line 103, in renpy.display.render.render (gen/renpy.display.render.c:3319)
    cpdef render(d, object widtho, object heighto, double st, double at):
  File "renpy/display/render.pyx", line 185, in renpy.display.render.render (gen/renpy.display.render.c:2857)
    rv = d.render(widtho, heighto, st, at)
  File "/Users/Maddie/Desktop/renpy-6.99.10-sdk/renpy/display/layout.py", line 649, in render
    surf = render(child, width, height, cst, cat)
  File "renpy/display/render.pyx", line 103, in renpy.display.render.render (gen/renpy.display.render.c:3319)
    cpdef render(d, object widtho, object heighto, double st, double at):
  File "renpy/display/render.pyx", line 185, in renpy.display.render.render (gen/renpy.display.render.c:2857)
    rv = d.render(widtho, heighto, st, at)
  File "game/camera/camera.rpy", line 1191, in render
    child_render = renpy.render(self.child, width, height, st, at)
  File "renpy/display/render.pyx", line 103, in renpy.display.render.render (gen/renpy.display.render.c:3319)
    cpdef render(d, object widtho, object heighto, double st, double at):
  File "renpy/display/render.pyx", line 185, in renpy.display.render.render (gen/renpy.display.render.c:2857)
    rv = d.render(widtho, heighto, st, at)
  File "/Users/Maddie/Desktop/renpy-6.99.10-sdk/renpy/display/im.py", line 478, in render
    im = cache.get(self)
  File "/Users/Maddie/Desktop/renpy-6.99.10-sdk/renpy/display/im.py", line 200, in get
    surf = image.load()
  File "/Users/Maddie/Desktop/renpy-6.99.10-sdk/renpy/display/im.py", line 529, in load
    surf = renpy.display.pgrender.load_image(renpy.loader.load(self.filename), self.filename)
  File "/Users/Maddie/Desktop/renpy-6.99.10-sdk/renpy/loader.py", line 533, in load
    raise IOError("Couldn't find file '%s'." % name)
IOError: Couldn't find file 'camera.png'.

Darwin-10.8.0-i386-64bit
Ren'Py 6.99.10.1227
Death's Sweet Embrace 0.1
I have everything in the folder. Camera.png is in the folder.

User avatar
trooper6
Lemma-Class Veteran
Posts: 3712
Joined: Sat Jul 09, 2011 10:33 pm
Projects: A Close Shave
Location: Medford, MA
Contact:

Re: 3D camera motion, Action Editor, Transform and Image Vie

#30 Post by trooper6 »

It looks like you are keeping the files in the camera folder, yes?
Take everything out of the camera folder, and just put it all in the game folder.
A Close Shave:
*Last Thing Done (Aug 17): Finished coding emotions and camera for 4/10 main labels.
*Currently Doing: Coding of emotions and camera for the labels--On 5/10
*First Next thing to do: Code in all CG and special animation stuff
*Next Next thing to do: Set up film animation
*Other Thing to Do: Do SFX and Score (maybe think about eye blinks?)
Check out My Clock Cookbook Recipe: http://lemmasoft.renai.us/forums/viewto ... 51&t=21978

Post Reply

Who is online

Users browsing this forum: Kocker, Starberries