MV3D - 3D rendering for RMMV with Babylon.js

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

  1. pasunna

    pasunna Veteran Veteran

    Messages:
    135
    Likes Received:
    21
    First Language:
    thai
    Primarily Uses:
    RMMV
    I think the problem more on my sprite
    other question
    the B tile are bug or something
    In your preview the cactus are not flat
    2.jpg 3.png
     
    #21
  2. Krystek_My

    Krystek_My Veteran Veteran

    Messages:
    188
    Likes Received:
    40
    First Language:
    Polish
    Primarily Uses:
    RMMV
    #22
  3. Dread_Nyanak

    Dread_Nyanak Veteran Veteran

    Messages:
    52
    Likes Received:
    52
    First Language:
    English
    Primarily Uses:
    RMMV
    @pasunna
    To get tiles to stand up like in the screenshots, you either need to give them terrain tag 1, or make them events with same layer as characters.
    To make fences stand up you need to give them terrain tag 2. You can configure what each terrain tag does in the plugin parameters.
    Also tiles with star passability will be rendered in the air.
    For two-tall props like that plant, you should turn star passability off, give both tiles terrain tag 1, and then stack them on top of each other on the same tile.

    @Krystek_My
    Unfortunately right now stairs aren't supported, they're a little complex to implement.
    However what you can do right now is make an event that will either cause the player to jump onto the higher level, or fade the screen and transfer the player up there.
     
    #23
  4. pasunna

    pasunna Veteran Veteran

    Messages:
    135
    Likes Received:
    21
    First Language:
    thai
    Primarily Uses:
    RMMV
    Hi
    I try to stack them
    does it suppose to look like this
    the plant are ok but the other look weird
    2.jpg
     
    #24
  5. Dread_Nyanak

    Dread_Nyanak Veteran Veteran

    Messages:
    52
    Likes Received:
    52
    First Language:
    English
    Primarily Uses:
    RMMV
    For things like that I would recommend moving them into character sheets.

    Here's a few other things you could try though:
    If you go into the plugin parameters you can set terrain tag 1 to use shape "CROSS" instead of "XCROSS", that way they won't be rotated at a 45 degree angle.
    Or you could put it into two events, and make the note tags look like this:
    top event note: <mv3d:shape(fence),z(1),pos(+0,+1)>
    bottom event note: <mv3d:shape(fence)>
    You can also use the "tree" shape instead of the "fence" shape if you want the event to rotate to face the camera.


    Also I've got the demo project uploading to github right now, so it should be up soon. It's about 90MB though so it will take a little bit.
    The project is still a little rough, but it should work as an example.
     
    #25
    Starbird_Resources and pasunna like this.
  6. Krystek_My

    Krystek_My Veteran Veteran

    Messages:
    188
    Likes Received:
    40
    First Language:
    Polish
    Primarily Uses:
    RMMV
    @Dread_Nyanak Is it possible to make a battle by this? I mean replace battlebacks with this 3D?
     
    #26
  7. Dread_Nyanak

    Dread_Nyanak Veteran Veteran

    Messages:
    52
    Likes Received:
    52
    First Language:
    English
    Primarily Uses:
    RMMV
    @Krystek_My
    It would probably require either an event-based battle system, or a bunch of scripting to make it load and render a map while in the battle scene.
     
    #27
  8. Jonforum

    Jonforum Veteran Veteran

    Messages:
    1,589
    Likes Received:
    1,374
    Location:
    Canada / Qu├ębec
    First Language:
    French
    Primarily Uses:
    RMMV
    hum i don't know if your engine is similar to pixi-projection, you should able to edit some propreties.
    For combat battleBack you can maybe just apply a kind of euler.x = math.pi*2 and euler.x = -math.pi*2 for asset.
    And leave hud without affines.
    I do this for my 3d battles engines. All thing are 2d but it just do a euler.x rotation
    [​IMG]
     
    #28
  9. Waterguy

    Waterguy Veteran Veteran

    Messages:
    1,231
    Likes Received:
    257
    Location:
    Brazil
    First Language:
    Portuguese
    Primarily Uses:
    RMMV
    Sorry if there is a reason, but if CROSS and XCROSS have different uses (as mentioned, XCROSS is good for trees... reminds me of Breath of Fire 3's, didn't check CROSS myself yet) why not put it on terrain tag 3 or something?
     
    #29
  10. JulianSK

    JulianSK Villager Member

    Messages:
    28
    Likes Received:
    4
    Location:
    Brazil
    First Language:
    Portuguese
    Primarily Uses:
    RMMV
    It would be interesting a function (if not already included) to turn 3D mode on/off.

    That is, off you would see the map as in standard 2D mode, and on it would be in 3D. Something that could be activated in-game itself.

    Of all the 3D plugins I've ever seen, this one is the most promising.
     
    #30
    Sunjean likes this.
  11. Sunjean

    Sunjean Veteran Veteran

    Messages:
    42
    Likes Received:
    10
    First Language:
    Norvegian
    Primarily Uses:
    RMMV
    THAT would be interesting... I can only imagine what it could be used for. :)
     
    #31
  12. Dread_Nyanak

    Dread_Nyanak Veteran Veteran

    Messages:
    52
    Likes Received:
    52
    First Language:
    English
    Primarily Uses:
    RMMV
    @Waterguy
    The only difference between CROSS and XCROSS is XCROSS is rotated 45 degrees. You can configure the terrain tags yourself if you want to use both of them, but I felt I only needed one of them for the default configuration.

    @JulianSK
    You can get pretty close by setting the camera to orthographic mode which looks like 2D.
    In the demo and screenshots I use the orthographic camera for an isometric effect, but you can set the yaw to a multiple of 90 for a more standard 2D look.
     
    #32
    JosephSeraph likes this.
  13. Waterguy

    Waterguy Veteran Veteran

    Messages:
    1,231
    Likes Received:
    257
    Location:
    Brazil
    First Language:
    Portuguese
    Primarily Uses:
    RMMV
    @Dread_Nyanak I see. While I can see how it would be better to use events in that case, I also see why you'd think most people just one of them would be enough.
    I'll be honest, I was planning on making a game using FPLE for the dungeons in first person and your plugin for the maps, but... now that I opened the demo, your plugin already does what it does (save it allows to use a texture of any size for a tile instead of just tiles and events) so...
    Only problem seems to be that in large maps like big island there is some slowdown, or at least on my computer.

    Ok, so a question... by default, it seems a ceiling will use the wall right under it as its wall. makes sense really. I can change it on the tileset's notetags though. fair enough too.
    But is there any chance of you letting us add a few, uhm... "region-based settings" on the map?
    I admit it may be a bit too complicated for maybe not much to gain. I mean, I was basically just wanting to make x region change the wall sprites (and height) for that specific map through notetags so I could do buildings with the same ceiling but different walls, for example, something that could be nice if used well but isn't exactly needed either.

    Also, while I can find the plugin commands through the demo, the help in the plugin manager isn't telling them... opening the file in a text editor, I can see it is there but the manager's help cuts it off right where the first "@" appears in there (for "@target"), so I guessed this was the cause and, looking through the code it is only used exactly 5 times outside the help file and plugin parameters so... while it would be annoying to change it in the demo, I'd suggest changing it in your code for the user's ease, something like "<t>" or "t:", something easy for the user (even if not as much as just "@") but that doesn't break anything... Maybe keep the @ as an option too, just not mentioned in the help file directly?
    Either way just a suggestion, hope I'm not sounding insulting or anything.
     
    #33
  14. Dread_Nyanak

    Dread_Nyanak Veteran Veteran

    Messages:
    52
    Likes Received:
    52
    First Language:
    English
    Primarily Uses:
    RMMV
    @Waterguy
    Yeah I'm definitely going to have to fix the help text. Right now I'm working on some major rewriting though, so fixing that will have to wait.
    Letting regions decide the wall texture isn't a bad idea. I think I'll implement that eventually.
    And of course the performance issues are something I'm working on fixing.

    Right now I'm actually working on switching the code over to use babylon.js for rendering instead of three.js, that way I can implement dynamic shadows without them looking horrible. While I'm at it I'm also reworking a lot of the code to make it more organized and maintainable.
     
    #34
  15. seaotter

    seaotter Veteran Veteran

    Messages:
    71
    Likes Received:
    17
    First Language:
    Chinese
    Primarily Uses:
    RMMV
    The results of the test were released:
    01. The mouse movement cannot be used, it will become a one-frame movement. But it will not move with the keyboard.
    02. Moving with the keyboard will become an untriggered event
    03. Running up, the CPU will be very high. The game becomes very slow.
    04. It is often stuck because the mouse can't hit the map.
     
    #35
  16. Krystek_My

    Krystek_My Veteran Veteran

    Messages:
    188
    Likes Received:
    40
    First Language:
    Polish
    Primarily Uses:
    RMMV
    @Dread_Nyanak I was thinking about it and that's the idea. If this can make a triangle, and do a testures (like in waterfall or house roofs).
    I will give a Picture of what I am thinking.
     

    Attached Files:

    #36
  17. dragonx777

    dragonx777 Veteran Veteran

    Messages:
    92
    Likes Received:
    24
    Location:
    SC
    First Language:
    English
    Primarily Uses:
    RMMV
    lovely plugin. i just tested it on my world map and sadly it lagged pretty bad; i averaged about 20 fps and i have a decent machine. i may try it for dungeons and towns though, but i was really hoping to add that new feel to the world map. possibly, my world map is too large and it just takes a long time to render in 3D. keep at it though. :)
     
    #37
  18. Grilled Mormons

    Grilled Mormons Villager Member

    Messages:
    8
    Likes Received:
    0
    First Language:
    English
    Primarily Uses:
    N/A
    This is crazy impressive so far if there's any way to support/fund you, please link.

    An above suggestion might be the same thing but just in case, some slopes for changing elevation without jumps would be a good addition.
    It's so solid already feels like that is the only thing missing.

    Looking forward to seeing what else you'll be adding.

    Edit: Any options for taller trees and stuff for tilesets? my characters are twice the size of RTP and me trees are about 3x as large and wide. I think the easiest way would maybe be having Cross shape available for events.
     
    Last edited: Nov 14, 2019
    #38
  19. Dread_Nyanak

    Dread_Nyanak Veteran Veteran

    Messages:
    52
    Likes Received:
    52
    First Language:
    English
    Primarily Uses:
    RMMV
    The lag is something I want to work on fixing. Slopes are also something I want to add.

    @Grilled Mormons
    To use the cross shape on events, put this in the note tag: <mv3d: shape(cross)>
    There's also a tree shape for events which will stand straight up and rotate horizontally to face the camera.

    Maybe I could make a patreon or something if people are interested.
     
    #39
  20. Grilled Mormons

    Grilled Mormons Villager Member

    Messages:
    8
    Likes Received:
    0
    First Language:
    English
    Primarily Uses:
    N/A
    @Dread_Nyanak
    Thanks, I had only seen cross under tile config so I didn't think to try that, one more thing, I made it so bush/grass tile has a half-height elevation and its a nice effect but they are no longer passable, if there's no existing way I think that would be another nice addition.

    And yea Patreon sounds good, go for it.
     
    #40

Share This Page