MV3D - 3D rendering for RMMV with Babylon.js

Dread_Nyanak

Veteran
Veteran
Joined
Feb 24, 2019
Messages
106
Reaction score
141
First Language
English
Primarily Uses
RMMV
@Grilled Mormons
Yeah that's a problem at the moment. The current work around is to give it star passability but in the tileset config set fringe(0). I think I did that with the mushroom and flower tiles in the demo project.
I'm planning on making it so tiles with a special shape and O passability can be walked through.
 

UknightedDev

The person that doesn't know what they're doing.
Member
Joined
Apr 16, 2019
Messages
10
Reaction score
8
First Language
English
Primarily Uses
RMMV
Cool Plugin! I think I could make an FPS with it.
 

Hyouryuu-Na

Currently Inactive
Veteran
Joined
Jun 15, 2017
Messages
419
Reaction score
844
First Language
Bangla/Bengali
Primarily Uses
RMMV
OH MY GOD! I'M SO EXCITEDDD FOR THIS! THANKSSSS! Sorry for all caps. Too happy lmao. I know there's a mode7 plugin but this one definitely seems a lot more flexible. Thank you so much for taking the time to work on this wonderful plugin! And I really love that To do list. If you manage to do all of that, it'll be a revolutionary step for MV.
 

Hyouryuu-Na

Currently Inactive
Veteran
Joined
Jun 15, 2017
Messages
419
Reaction score
844
First Language
Bangla/Bengali
Primarily Uses
RMMV
@Dread_Nyanak I don't understand how to use plugin commands. The help file wasn't clear enough. What is the plugin command for changing the camera Yaw angle?

Edit: Nmv. Checked the events and found it.
 
Last edited:

Waterguy

Veteran
Veteran
Joined
Jun 6, 2014
Messages
1,359
Reaction score
304
First Language
Portuguese
Primarily Uses
RMMV
@Hyouryuu-Na the current file's help is cutting off the plugin commands on the help window, but you can see them by opening the plugin on a text editor.

@Dread_Nyanak I don't know if you saw it, me and some friends were having a conversation about your plugin's slowdown, I copied it and sent you as a direct message. we didn't check yet if it'd help, but maybe it does? if you'd rather just change to babylon like you said though, do you mind if one of us give it a try still with three.js later?
 

mlogan

Global Moderators
Global Mod
Joined
Mar 18, 2012
Messages
14,059
Reaction score
7,754
First Language
English
Primarily Uses
RMMV

@Hyouryuu-Na , please avoid double posting, as it is against the forum rules. You can review our forum rules here. Thank you.

 

Hyouryuu-Na

Currently Inactive
Veteran
Joined
Jun 15, 2017
Messages
419
Reaction score
844
First Language
Bangla/Bengali
Primarily Uses
RMMV
@mlogan Sorry. I thought making a seperate post for my question would notify them about it. Can mentioning someone in an editted post notify someone too?

@Dread_Nyanak If it's not too much work, I have a few suggestions...
1. How about a vector based movement system? (Player can move at any angle) Like Altimit movement or Qmovement... I know the 3D system in itself is a great step to making fps games but I thought that it could make the 90° movement system a lot more flexible.
2. It'd be nice if we could change the angle based on mouse movement. Like if I move my mouse, the camera targets that point and the player moves towards that point?
Anyways, these are just suggestions. No need to think about them if it's too much work.
 

Waterguy

Veteran
Veteran
Joined
Jun 6, 2014
Messages
1,359
Reaction score
304
First Language
Portuguese
Primarily Uses
RMMV
@Hyouryuu-Na while it is not a bad idea per se, since we already have diagonal camera and even first person...

1- I personally think the whole slowdown on bigger maps issue should be focused on first for now, unless any bugs are found

2- while pixel movement is doable, we are talking here about adding it to this plugin, as one big one? while allowing the camera to move in increments instead of just 90 degrees when the player moves it is a good addition, I think, adding pixel movement in itself is a bit over-ambitious. While making it compatible with altimit or qmovement is ok, they have their own set of problems (altimit is still being worked on after all, and qmovement probably only isn't because the creator left). Let's leave this plugin to deal with the camera, and movement itself to be dealt with a separate one.

3- mouse movement means a different way of setting the pathfinding for it... afer all, the usual one is under the impression that the camera is the default top down 0 degrees angles one. just like the pixel movement, I think it'd be better as a future expansion...
 

Dread_Nyanak

Veteran
Veteran
Joined
Feb 24, 2019
Messages
106
Reaction score
141
First Language
English
Primarily Uses
RMMV
@Hyouryuu-Na
Free movement and mouse camera controls are some features I'd like to add in the future, but they're still pretty far down my list of priorities.

The Babylon.js version of the script is almost ready. I'm going to try and have it up for download tomorrow. I mainly need to work on rewriting the lighting system to work with Babylon now.
I've also fixed the problem with cross tiles not being passable in the new version.
 

Grilled Mormons

Villager
Member
Joined
Feb 15, 2016
Messages
10
Reaction score
0
First Language
English
Primarily Uses
N/A
Found two bugs,


1. The fence only works on default elevation, all other heights only render the posts but not the links
2. Hard to describe but if you look in the first screenshot I used different positive heights to make stairs, if you try to do the same for negative height it treats it as a series of pits and makes walls around them.

I've also found a sort of compatibility issue, not sure if there's an easy fix or not but any event that's created after the map is initially loaded doesn't have its sprite load unless the player forces a map refresh by bringing up the menu or some other way,
here's some example of scripts that do this for reference:
https://forums.rpgmakerweb.com/index.php?threads/orange-custom-events.46527/
http://www.yanfly.moe/wiki/Event_Spawner_(YEP)
 

Waterguy

Veteran
Veteran
Joined
Jun 6, 2014
Messages
1,359
Reaction score
304
First Language
Portuguese
Primarily Uses
RMMV
@Grilled Mormons while I'm not the plugin creator...

how does the fence look on the ground? It would be hard to tell what is wrong without a base for comparing.

while I'd usually say "that's because they aren't adding but replacing, you are digging a hole there", now I see that passage is actually a hole for a cave, and the problem isn't really it going down but there being a separate wall around each hole...

that would be a compatibility issue, yes. noy checking myself but speculating, because the events are generated mid-run instead of on map load, they do not go through the process that turns them into 3d.
does changing the event's page after it is created fix this?
either way, this really is a compatibility problem, not a problem of the plugin by itself... this plugin turns events into a new type of object class, "Character", to show them, and they are generated on map load (or reload). As these events were not there when the map was last loaded, their Character was not created yet.
Unfortunately the easiest way I can think of to do it is to, whenever the new event is generated, call a function to create the Character for that event. But since the plugins create the events in different ways they'd need t either be made for every different plugin like this, or called by hand by the game's developer on the event that creates the events.
 

Grilled Mormons

Villager
Member
Joined
Feb 15, 2016
Messages
10
Reaction score
0
First Language
English
Primarily Uses
N/A
@Waterguy
On normal ground it looks like this

I've tried a few ways to solve the missing event sprite thing but its always a bit too sloppy, trying to reload the map too early will sometimes mess with initial load and result in gaps in the map or whole unloaded sections, reloading after is just very noticeable for the player since they have full control long before the map is loaded in the first place.

I think a command/function for the dev to use at their own discretion would probably be the best solution since as you said this could pop up from a number of plugins that do this type of thing and patching for every one would be tedious.

But on the topic of loading, maybe there should be a way to have the maps fully loaded before the player is transferred in, like something as simple as having the screen not fade until loading is complete or the default loading screen that rarely sees any use.
 

Hyouryuu-Na

Currently Inactive
Veteran
Joined
Jun 15, 2017
Messages
419
Reaction score
844
First Language
Bangla/Bengali
Primarily Uses
RMMV
How to change the ceiling height? The wall height is 4 so now the ceiling stays under the top of the wall. Can someone help me?
 

Dread_Nyanak

Veteran
Veteran
Joined
Feb 24, 2019
Messages
106
Reaction score
141
First Language
English
Primarily Uses
RMMV
@Hyouryuu-Na
You should be able to pass a 4th value into the ceiling function to set the height.

@Grilled Mormons
The fence problem is already fixed in the babylon.js version, and I think the event spawining issue might be fixed too, but I'm not sure.
Right now I'm just trying to work through a bunch of bugs, and then I should be able to get the new version out.

EDIT:
Big update. I uploaded the new version I've been working on to github. I'm now using Babylon.js for rendering. There's still some bugs and some missing features (notably ceiling tiles are missing), but I'll work on fixing that in the next few days.

One notable change I've made is colors in the parameters, note tags, and plugin commands now need to be written with a hash sign. So instead of ffffff, you would write #ffffff. However, all css named colors are now supported, so you can write black, white, or rebeccapurple instead of the hex code.

For now I've left the old versions of the script on github. I will remove the old script eventually, but you can continue using the old version if the new version gives you problems. The new scripts are babylon.js and mv3d-babylon.js.

As far as performance is concerned, the biggest bottleneck right now is when loading chunks. Looping through each tile and building the geometry is very cpu intensive. Right now I'm dealing with this problem by loading the chunks asynchronously so the game can still be played while the map geometry loads in. I still need to find ways to make the chunks themselves load faster though.

I also started a 127.0.0.1/banned.url for those who are interested in contributing. The link is on the github page.
 
Last edited:

dragonx777

Veteran
Veteran
Joined
Jan 25, 2015
Messages
98
Reaction score
25
First Language
English
Primarily Uses
RMMV
@Dread_Nyanak I’m using character sets for better looking trees and was wondering if there was a way to make them look full (rounded tops) rather than just flat images standing up.

I also see your 127.0.0.1/banned.url is up. I’ll be taking a look at that and will see what I can do to support this massive undertaking.
 

Waterguy

Veteran
Veteran
Joined
Jun 6, 2014
Messages
1,359
Reaction score
304
First Language
Portuguese
Primarily Uses
RMMV
@dragonx777 if I recall right, there is a notetag you can put in either the event notebox or as a comment on the page to make it be read as xcross like the tileset trees.
 

seaotter

Veteran
Veteran
Joined
Mar 2, 2019
Messages
80
Reaction score
17
First Language
Chinese
Primarily Uses
RMMV
I hope the author can always fix BUG.... until this plugin is really available...
I feel that there is a big push for bugs and problems...
just
01. Mouse can't play the game, only the keyboard can move.
02. The target is not reached (the target is often blocked by the 3D map)
03. It is often impossible to trigger an event. It is also blocked by 3D rendering.
03.FPS very very low... game too slow done.
...

A lot of problems....
If the author can have a passion to change it... It's great!
 

Grilled Mormons

Villager
Member
Joined
Feb 15, 2016
Messages
10
Reaction score
0
First Language
English
Primarily Uses
N/A
@seaotter
Do you mean its difficult to use the mouse? mouse controls work for me but it just doesn't feel too great.

I also have no problems triggering any events, in fact, I forget to mention before, @Dread_Nyanak events can be activated from any elevation as long as the player is next to it, is it possible to get the z position of the player? maybe can use that for conditions and such.

As for babylon version everything from before is fixed and the seams on the ground are even cleaned up, I hope it's not too hard to fix the loading/lag problems.
 

MrNybbles

Veteran
Veteran
Joined
Nov 6, 2019
Messages
59
Reaction score
31
First Language
English
Primarily Uses
RMMV
Free movement and mouse camera controls are some features I'd like to add in the future, but they're still pretty far down my list of priorities.
I've looked into the Pointer Lock API and RPG Maker MV has it built-in. This is perfect for 3D.

https://developer.mozilla.org/en-US/docs/Web/API/Pointer_Lock_API

@Dread_Nyanak I’m using character sets for better looking trees and was wondering if there was a way to make them look full (rounded tops) rather than just flat images standing up.
I'm not sure exactly what you are looking for. One way would be if a billboard effect was used (where the tree always faces the camera) or a boxy look, like Minecraft blocks. Both of these should work well (if added to the engine).
 

Dread_Nyanak

Veteran
Veteran
Joined
Feb 24, 2019
Messages
106
Reaction score
141
First Language
English
Primarily Uses
RMMV
@dragonx777
Like @Waterguy said, I think the easiest approach would be to use the xcross shape. However, I think xcross doesn't work for events in the latest version. I'll be adding it in the next version though. To get the same effect, you can use this note tag: <mv3d:shape(cross),rot(45)>

If you need the trees to look a bit more dense still, you can try layering events on top of each other using the <mv3d: pos(+0,+0)> tag to change their positions. You could combine two cross events to make an 8-sided cross, or use a flat event as the canopy of the tree.

@seaotter
The mouse input seems to work fine for me in the latest version. I know the old version had a few problems with mouse input and performance like what you describe, but the new version works a lot better. Right now the biggest issue is load times. Are you sure you're updated?

@Grilled Mormons
I'm working on a plan right now to improve load times. I'm making it so you can "Finalize" the map, which exports the mesh to a file. Then on subsequent map loads, it will load the map mesh from file instead of building it from scratch every time. This way you'll only need to deal with the slow mesh building during development.
Another thing I can do is build the map synchonously when the map is first loaded, then switch to asynchronous loading. This would make the screen stay black until the cells near the player are loaded.
These two approaches combined should hopefully improve the perceived performance of the plugin.

Another feature I'm working on is to make the terrain tag and region configurations accept all the same configuration functions as tileset configuration. This will enable you to, for example, use regions to change the wall texture of a tile.
 
Last edited:

Users Who Are Viewing This Thread (Users: 6, Guests: 6)

Latest Threads

Latest Posts

Latest Profile Posts

Have you appreciated a Hedgehog today?

Storybook Hero demo has been well received so far. Yay! We are developing it steadily albeit slowly <_<. We will get there one day o_O.
TFW: You get a text from someone and a long conversation--but you have no idea who this person is and don't wanna be that guy that asks "Who is this by the way?" I have no clue who this person is... but they seem to know me quite well. :rswt
You know, after all these years of using RM I've never played To The Moon. With being busy with life and then after my mom died I was too emotionally fragile to play something that heavy. Has anyone played the Switch version? Is there any big differences between that and the RM version?
Today I finished my Lets Play. Gonna have the videos scheduled for daily uploads now. Woo I finished something ^^

Forum statistics

Threads
93,406
Messages
912,069
Members
122,914
Latest member
Arcannis
Top