设为首页收藏本站同能贴吧 切换语言 繁体中文
开启辅助访问 切换到窄版
扫描二维码关注官方公众号
返回列表
+ 发新帖
查看: 79|回复: 0

[转载发布] Animation Perspective Fix

[复制链接]
累计送礼:
0 个
累计收礼:
1 个
  • TA的每日心情
    开心
    4 天前
  • 签到天数: 209 天

    连续签到: 2 天

    [LV.7]常住居民III

    4593

    主题

    864

    回帖

    2万

    积分

    管理员

    Rank: 9Rank: 9Rank: 9

    VIP
    7
    卡币
    23193
    OK点
    16
    推广点
    0
    同能卷
    50
    积分
    28680

    灌水之王

    发表于 前天 14:46 | 显示全部楼层 |阅读模式
    [DUCK] Animation Perspective Fix v1.0
    GregorDuckman


    Introduction
    Adjusts the Projection Matrix and Camera Matrix used in Effekseer computations to eliminate the extreme Field of View (FOV) / fisheye effect, so that animations more closely match the top-down / diorama perspective used in stock RMMZ map view and side view battle scenes.

    ... I'm not sure if a similar fix has been published elsewhere yet, so I made my own!

    All screenshots captured on WIN10 PC platform, the plugin is as yet untested on the Android/iOS platforms.

    How to Use
    The script is a plug-and-play plugin script for RMMZ v1.3.3, though its simplicity could allow it to work with past and future versions and other scripts/plugins, provided they do not alter the Sprite_Animation class or Sprite class hierarchy much. Paste the script below into a file named "[DUCK]AnimationPerspectiveFix.js" and drop it into your project's "plugins" folder, then install and activate using RMMZ's plugin manager.

    To obtain the best results, you may need to rotate the stock animations by ~8 degrees in the positive X axis direction ([X:8, Y:0, Z:0] in the RMMZ animation editor). See the screenshots below.

    This script contains no parameters or plugin commands.

    Screenshots
    Consider this screen capture of the "0051 Power up 1" animation in stock RMMZ:




    [captured in-editor and stretched 2x]

    As the magic circles in the power-up animation rise from the ground, the distortion caused by the stock perspective causes the ring to flatten, and then be visible from below. This is what you'd observe if, for example, you picked a circular object off a table at arms length and raised it above your eye-line. However, the distance on-screen over which this transition takes place only makes sense if the scene is unfolding within an inch or so of your eyes, causing dissonance with the perspective and depth implied by the battleback graphics and enemy/actor placement.





    Immediately after installing the plugin, the same animation becomes axially aligned with the screen, so the magic circles only appear as thin lines in the horizontal direction.





    By rotating the X axis by about 8 degrees, the magic circles are now in good agreement with the top-down / diorama perspective suggested by the stock graphics. Notice the magic circles and Reid's drop shadow (both of which should be perfect circles when viewed from above) appear as ellipses with roughly the same same eccentricity, as we'd expect of these shapes viewed in the same scene without the prior dissonance.

    Terms and Credits
    This script is provided "as is" without warranty of any kind. It is free to be copied and used with or without credit to GregorDuckman. The openness of these terms do not extend to any future releases unless specified.

    Script
    Spoiler                JavaScript:       
    1. //=============================================================================
    2. // RPG Maker MZ - [DUCK]Animation Perspective Fix (v1.0)
    3. //=============================================================================
    4. /*:
    5. * @target MZ
    6. * @plugindesc Fixes the extreme FOV/fisheye effect on effekseer animations in
    7. * stock RMMZ.
    8. * @author GregorDuckman
    9. *
    10. * @help [DUCK]AnimationPerspectiveFix.js
    11. *
    12. * Fixes the extreme FOV/fisheye effect on effekseer animations by correcting
    13. * the camera and projection matrices.
    14. *
    15. * No plugin commands are necessary.
    16. */
    17. (() => {
    18.     Sprite_Animation.prototype.setProjectionMatrix = function (renderer) {
    19.         const x = this._mirror ? -1 : 1;
    20.         const y = -1;
    21.         // prettier-ignore
    22.         Graphics.effekseer.setProjectionMatrix([
    23.             x, 0, 0, 0,
    24.             0, -1, 0, 0,
    25.             0, 0, 1, -1,
    26.             0, 0, 0, 1,
    27.         ]);
    28.     };
    29.     Sprite_Animation.prototype.setCameraMatrix = function (/*renderer*/) {
    30.         // prettier-ignore
    31.         Graphics.effekseer.setCameraMatrix([
    32.             1, 0, 0, 0,
    33.             0, 1, 0, 0,
    34.             0, 0, 1, 0,
    35.             0, 0, -100, 1
    36.         ]);
    37.     };
    38. })();
    复制代码








    本贴来自国际rpgmaker官方论坛作者:GregorDuckman处,因国际论坛即将永久关站,为了存档多年珍贵资料,署名转载到本论坛存档,由于官方帖子为英文原帖,需要中文翻译请点击论坛顶部切换语言为中文就可以将帖子翻译成中文浏览,方便大家随时查看,原文地址:https://forums.rpgmakerweb.com/threads/animation-perspective-fix.141233/

    本帖子中包含更多资源

    您需要 登录 才可以下载或查看,没有账号?立即注册

    x
    天天去同能,天天有童年!
    回复 送礼论坛版权

    使用道具 举报

    文明发言,和谐互动
    文明发言,和谐互动
    高级模式
    您需要登录后才可以回帖 登录 | 立即注册

    本版积分规则

    简体中文
    繁體中文
    English(英语)
    日本語(日语)
    Deutsch(德语)
    Русский язык(俄语)
    بالعربية(阿拉伯语)
    Türkçe(土耳其语)
    Português(葡萄牙语)
    ภาษาไทย(泰国语)
    한어(朝鲜语/韩语)
    Français(法语)
    关闭

    幸运抽奖

    社区每日抽奖来袭,快来试试你是欧皇还是非酋~

    立即查看

    聊天机器人
    Loading...

    QQ|Archiver|手机版|小黑屋|同能RPG制作大师 ( 沪ICP备12027754号-3 )

    GMT+8, 2026-7-16 14:20 , Processed in 0.097524 second(s), 52 queries .

    Powered by Discuz! X3.4

    Copyright © 2001-2020, Tencent Cloud.

    快速回复 返回顶部 返回列表