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

[转载发布] DAE's Lighting System with Optimised Real-Time Shadows and Animated Lig

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

    连续签到: 2 天

    [LV.7]常住居民III

    4594

    主题

    864

    回帖

    2万

    积分

    管理员

    Rank: 9Rank: 9Rank: 9

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

    灌水之王

    发表于 前天 14:05 | 显示全部楼层 |阅读模式









    What's been added since the plugin was first released:
      - Spritesheet animations for lighting
      - Custom animation settings for lighting (animated lights without using images)
      - Light culling and various optimisations
      - PNG-based lights + settings-based lights
      - Custom directional offsets (for flashlights and such)
      - Light rotations and angle wideness

    (The help file has more detailed instructions, make sure to check it out!)

    Spoiler: GIFs
    [/quote]

    Spoiler: Screenshots[quote]













    Spoiler: Setup demonstration
    Download DEMO (non-commercial)project: https://daedrakyne.itch.io/daes-lighting-system
    Buy PRO version (commercial-version):

    • If you want to support me, send me £10 ($13.85) via PayPal and send me a PM with a screenshot to confirm your payment, and once the payment is confirmed, I'll send you the plugin and add your forums account to the list of paying users (to send you future updates of the plugin): https://paypal.me/SModley?locale.x=en_GB
    • Otherwise, buy the £15 ($20.78) version on itch.io (you instantly get access to the plugin and future updates, but I only get 50~65% of your payment):  https://daedrakyne.itch.io/daes-lighting-system

    Hey there!

    I've been working for a while now on a new lighting plugin for both MV and MZ.
    My reason for starting down this road was due to this post from about a month ago:
    MV - Khas UltraLighting Remake for Commercial Purposes

    Hey everyone,  So a little introduction. Khas has left the rpg maker scene entirely and has stopped making and supporting his javascripts. There is no response on any of his available contact links. This makes it so that nobody can get a commercial license for some of his scripts that require...

                                            forums.rpgmakerweb.com                               




    I've researched the most efficient 2D-RTS lighting systems, and have decided to base mine on a pure-hardware (GPU) implementation.
    In its current state, without culling (meaning that for now every light in the scene is being rendered/updated, regardless of whether it's even on the screen or not), the game can handle ~650 lights (with shadows) in one scene without its fps dropping.

    If you could try it out, and leave your thoughts down in a reply below, I would really appreciate it! My goal is to make a plugin that is more diverse than khas' while still being as optimized as possible.

    Plugin commands (MV) (no need for MZ plugin command instructions):

    • dae_light setambientlight r g b

      • Sets the current ambient light to the specified color.
      • r, g and b are numbers from 0 to 255 that represent an rgb color.
      • Example: dae_light setambientlight 0 20 0

    • THE REST OF THE PLUGIN COMMANDS ARE THE SAME AS THE EVENT COMMENTS, BUT WITHOUT "[" AND "]"


    Event comments (run whenever event page changes):

    • [dae_light addlight uniqueID type]

      • Adds a new light and sets its position to that of the event. Light will follow the event wherever it goes
      • uniqueID can be either "null" or any word (letters, numbers and underscore). If set to null, the light will not be stored as a unique light (meaning that it won't be designable by other commands / comments)
      • type must be one of the light types from the plugin parameters. For example, "halogen". New light types can be created in the plugin parameters.
      • Example: [dae_light addlight halo2 halogen]

    • [dae_light setoffset uniqueID offsetX offsetY]

      • Sets a manual offset for the designed light, if it exists.
      • offsetX and offsetY are numbers.
      • Example: [dae_light setoffset halo2 0 24]

    • [dae_light setcolor uniqueID R G B]

      • Sets the color of the light
      • R, G and B are numbers between 0 and 255
      • Example: [dae_light setcolor uniqueID 255 0 255] (pink)

    • [dae_light setrotation uniqueID rotation]

      • Sets the rotation of the light
      • Rotation is an angle between 0 and 360

    • [dae_light setangle uniqueID angle]

      • Sets the angle wideness of the light.
      • Angle is between 0 (no light) and 360 (full light)
      • Example: an angle of 180 will create a semi-circle light

    • [dae_light setintensity uniqueID intensity]

      • Sets the intensity of the light.
      • Intensity is between 0 (no light) to 200 (bright light).
      • For some reason, the MZ plugin can't handle a single intense light, but works fine with multiple lights added together. Until this is fixed, you can overlap multiple lights together to create a bright light.

    • [dae_light setrotation/f uniqueID rotation]

      • Sets how much the light rotates every frame.
      • Rotation is any number, negative or positive, and with decimals allowed.

    Map notes:

    • <dae_light off>  -- Disables lighting for that map
    • <dae_light shadowpicture picture_name>  -- Uses the given picture as a shadow map for that map. The picture must be in the "img/shadows/" folder.

      • Example: <dae_light shadowpicture shopping_map_shadow>
      • Shadow maps can be easily created by saving a picture of a map (right-click on map -> save), going to a picture editor (I used piskelapp.com), and drawing black in a new layer wherever you want shadows to be.


    There is no current customization for RegionIDs (it is easily implementable, just wanted to get the demo out first), but you can currently use the regionID 17 to create a blue light, and regionIDs 4, 6 and 7 to create shadows. (4: full block shadow, 6: left wall shadow, 7: right wall shadow)


    Changelog:



    • v 1.5

      • Added support for light spritesheet animations.
      • Added support for light custom animations (settings-based)
      • Implemented customisability for Region Shadows and Region Lights.
      • Implemented various performance optimisations.
      • Implemented basic light-culling.

    • v1.3

      • Added support for custom images for lights! (like khas' plugin)
      • Added customisability support for custom-image lights (resizing, color tinting, + everything else)
      • Added direction-based custom offset option for lights, useful when making flashlights
      • Added plugin command for ambient light

    • v1.2

      • In-game light modifications (color, intensity, rotation, angle, rotation/f, offset)
      • Automatic offset change depending on the rotation of the light
      • Automatic light rotations (rotating lights!!), with customizable speeds
      • Light angle/wideness customization: you can now create flashlights, and beams!


    Current goals for the next version:
    - light / shadow heights
    - event shadows (you heard that right! events will be able to have shadows too)


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

    本帖子中包含更多资源

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

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

    使用道具 举报

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

    本版积分规则

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

    幸运抽奖

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

    立即查看

    聊天机器人
    Loading...

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

    GMT+8, 2026-7-16 14:25 , Processed in 0.111086 second(s), 53 queries .

    Powered by Discuz! X3.4

    Copyright © 2001-2020, Tencent Cloud.

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