MV3D - 3D rendering for RMMV with Babylon.js

Discussion in 'JS Plugins In Development' started by Dread_Nyanak, Nov 7, 2019.

  1. Dread_Nyanak

    Dread_Nyanak Veteran Veteran

    Messages:
    55
    Likes Received:
    58
    First Language:
    English
    Primarily Uses:
    RMMV
    [​IMG]
    Author: Dread/Nyanak
    Version 0.3.7

    A 3D rendering plugin for RPG Maker MV.

    Wall tiles (A3 and A4) are transformed into 3D walls, allowing you to easily create 3D maps.
    Regions and terrain tags can also be used to control the height of tiles.

    The airship will collide with walls if it isn't flying high enough. However you can change how high it flies using plugin commands.

    Plugin also supports 3D lighting as well as plugin commands to control the lighting and flashlights. Plugin does not support dynamic shadows, they don't work well with transparent textures in three.js.

    You can control the camera distance, pitch, and yaw, and change between perspective and orthographic modes.
    You can make 3D dungeon crawlers as well as isometric games if you want. You can even mix multiple styles into the same game, for example have the overworld be 3rd person or isometric, and the dungeons be 1st person dungeon crawlers.
    See the screenshots below to see how it looks.

    [​IMG]
    Big 3D castle

    [​IMG]
    A simple hedgemaze example.

    [​IMG]
    Dungeon crawling

    [​IMG]
    Orthographic camera

    [​IMG]
    Flashlight

    [​IMG]
    To improve the light quality you can change the "subdivision" parameter in the plugin settings. This option gives each tile more polygons, which helps the lights look smoother.

    Download on Github

    The plugin comes with two scripts, three.js and MV3D.js. Both need to be loaded, and in that order.
    There is also a folder called MV3D. This just holds a few image files right now, but I might use it for 3D model loading in the future. This folder also needs to be put in your project directory.

    Todo:
    • ✔️Pan camera with plugin commands
    • ✔️Demo project (available but not finished)
    • ✔️Switch rendering to Babylon.js
    • ✔️Improve performance
    • ✔️Dynamic shadows (patron only)
    • ✔️Slopes
    • Animations
    • Bug squishing
    • Support 3rd party plugins
    Possible future features:
    • Non-tile-based movement
    • Control camera with mouse / touch
    • load 3d models
    • VR mode
    Feel free to use this plugin in commercial projects if you want.
    If you use this plugin please credit me as Dread/Nyanak or Dread_Nyanak.
    If you want to share this plugin with others then please link them either to this thread or to my github repository.
     
    Last edited: Dec 11, 2019 at 4:19 AM
    #1
  2. Jonforum

    Jonforum Veteran Veteran

    Messages:
    1,594
    Likes Received:
    1,380
    Location:
    Canada / Québec
    First Language:
    French
    Primarily Uses:
    RMMV
    crazy thing here! congrat
     
    #2
    Dread_Nyanak likes this.
  3. peq42_

    peq42_ Yeet Veteran

    Messages:
    465
    Likes Received:
    276
    Location:
    Brazil
    First Language:
    Portuguese(BR)
    Primarily Uses:
    RMMV
    this looks impressive! Great work!
     
    #3
    Dread_Nyanak likes this.
  4. ledomaine

    ledomaine Villager Member

    Messages:
    19
    Likes Received:
    23
    Location:
    London/Israel/Los Angeles
    First Language:
    French
    Primarily Uses:
    RMMV
    Amazing! Imagine coupling that with my MMORPG Maker MV plugin! New possibilities!
     
    #4
  5. JtheDuelist

    JtheDuelist Just a dev who actually got a game finished Veteran

    Messages:
    1,163
    Likes Received:
    1,424
    Location:
    RMW Forums, Granvia, or Askr
    First Language:
    English
    Primarily Uses:
    RMMV
    I just tried to use this, and nothing happens. As in, still 2D. Really wish there was a better explanation on how this is supposed to be set up to used because it is clear this isn't plug and play, which the way you explain setting it up makes it seem like it is supposed to be plug and play.
     
    #5
    peq42_ likes this.
  6. Kaisyl

    Kaisyl Villager Member

    Messages:
    12
    Likes Received:
    0
    First Language:
    English
    Primarily Uses:
    RMMV
    Cool script, bugs I've noticed from simple plug and play is that it isn't currently compatible with graphical scripts (MogHunter emotion faces which uses pixiv and character creation type scripts.)

    This is possibly due to the fact that the script tries to render a 2D image as a 3D whereas the other scripts process it as 2D.

    Also, there are some weird stuff that happens when you try to add a ladder to a wall tile.

    Otherwise, this script is really good.
     
    #6
  7. bazrat

    bazrat Pixel Game Maker MV Veteran

    Messages:
    237
    Likes Received:
    162
    First Language:
    English
    Primarily Uses:
    Other
    That dungeon crawling image looks amazing. It seems like a super mode 7 xD
     
    #7
    Dread_Nyanak likes this.
  8. Dread_Nyanak

    Dread_Nyanak Veteran Veteran

    Messages:
    55
    Likes Received:
    58
    First Language:
    English
    Primarily Uses:
    RMMV
    Could you open up the console with F12 to see if there's any errors?
    You just need to put the MV3D folder in your project directory and load three.js and MV3D.js as plugins and it should work. (three.js needs to be loaded first)


    Yeah, it won't work with a lot of graphical plugins. The 2D map isn't rendered at all, so anything that changes how the map and characters are rendered won't work with this.
    Anything that changes the gui and menus should work fine though.
     
    #8
  9. JtheDuelist

    JtheDuelist Just a dev who actually got a game finished Veteran

    Messages:
    1,163
    Likes Received:
    1,424
    Location:
    RMW Forums, Granvia, or Askr
    First Language:
    English
    Primarily Uses:
    RMMV
    @Dread_Nyanak This is all the console gives. Completely blank project by the way.
    upload_2019-11-7_19-53-52.png upload_2019-11-7_19-56-38.png upload_2019-11-7_19-57-9.png
     
    #9
  10. Aloe Guvner

    Aloe Guvner Walrus Veteran

    Messages:
    1,626
    Likes Received:
    1,054
    Location:
    USA
    First Language:
    English
    Primarily Uses:
    RMMV
    @JtheDuelist the "=>" token is an arrow function, which was added in Javascript ES2015. If your MV doesn't recognize it, you must be using an old version of MV.
    When there's a syntax error, the script won't load at all which is why you don't see any difference.
     
    #10
  11. JtheDuelist

    JtheDuelist Just a dev who actually got a game finished Veteran

    Messages:
    1,163
    Likes Received:
    1,424
    Location:
    RMW Forums, Granvia, or Askr
    First Language:
    English
    Primarily Uses:
    RMMV
    @Aloe Guvner I've always stuck with 1.5.2 because all the stability issues 1.6.0 brought scared me off of ever updating beyond v1.5.2. Also, if I update, other older plugins I use may break as well... So it is a "darned if I do, darned if I don't" situation. If I do update, I have to go and update ALL of my WIP projects, which there is almost 12 or 13 of, which is going to be another pain in the rear to do.
     
    #11
  12. Aloe Guvner

    Aloe Guvner Walrus Veteran

    Messages:
    1,626
    Likes Received:
    1,054
    Location:
    USA
    First Language:
    English
    Primarily Uses:
    RMMV
    It's of course your choice whether to upgrade MV or not. If you're in the middle of a project, the general thinking would definitely be to *not* upgrade. However if you're installing a script like this, that is a massive change to how your game is structured so you're probably not in the middle of a project.

    1.6.1 fixed all of the editor issues that happened in 1.6.0. The change in the core code is very minimal. Every person who reported that their "plugins broke" after upgrading turned out that they didn't upgrade correctly. Not guaranteeing anything of course, but the fears are wildly overstated due to user error.

    You always have the option to transpile the modern Javascript into old Javascript if you don't want to upgrade, and if the author allows you to. Though that tutorial is over a year old and I've been meaning to update it!
     
    #12
  13. Sunjean

    Sunjean Veteran Veteran

    Messages:
    43
    Likes Received:
    11
    First Language:
    Norvegian
    Primarily Uses:
    RMMV
    Nifty! :)
     
    #13
  14. Dread_Nyanak

    Dread_Nyanak Veteran Veteran

    Messages:
    55
    Likes Received:
    58
    First Language:
    English
    Primarily Uses:
    RMMV
    Just added some plugin commands to pan the camera and also change the camera target.
     
    #14
    Zeriab likes this.
  15. pasunna

    pasunna Veteran Veteran

    Messages:
    135
    Likes Received:
    21
    First Language:
    thai
    Primarily Uses:
    RMMV
    I try it
    but my graphic is not look smooth as your
    what is your recommended setting for this plugin
    thank you
     
    #15
  16. Dread_Nyanak

    Dread_Nyanak Veteran Veteran

    Messages:
    55
    Likes Received:
    58
    First Language:
    English
    Primarily Uses:
    RMMV
    @pasunna
    Can you show me what issues you're experiencing? The default settings are pretty similar to what I used in the screenshots.

    There are a few graphical issues in the plugin still, like some weird gaps between meshes even though the faces share the same vertices.
    Also the textures look a bit rough when viewed at a sharp angle. This is mostly noticeable when the camera is in motion.
     
    #16
  17. Krystek_My

    Krystek_My Veteran Veteran

    Messages:
    190
    Likes Received:
    40
    First Language:
    Polish
    Primarily Uses:
    RMMV
    @Dread_Nyanak We need the demo to test it, bcs the help file isn't very easy to read, and recreate things.
     
    #17
  18. ledomaine

    ledomaine Villager Member

    Messages:
    19
    Likes Received:
    23
    Location:
    London/Israel/Los Angeles
    First Language:
    French
    Primarily Uses:
    RMMV
    Worked pretty well on my side. Just had some bugs with some events not being recreated on map change but it might come from a compatibility issue with another plugin (I have not tried it on a "clean project"). Amazing work!
     
    #18
  19. Calvynne

    Calvynne Veteran Veteran

    Messages:
    101
    Likes Received:
    62
    First Language:
    English
    This is amazing! Thanks for the hard work!
     
    #19
  20. Dread_Nyanak

    Dread_Nyanak Veteran Veteran

    Messages:
    55
    Likes Received:
    58
    First Language:
    English
    Primarily Uses:
    RMMV
    @Krystek_My
    Yeah, I'm still working on the demo project. I'll try to have it up within the next couple days, as soon as I get it in a presentable state.
     
    #20

Share This Page