MV3D - 3D rendering for RMMV with Babylon.js

BreakerZero

Veteran
Veteran
Joined
Jul 8, 2018
Messages
734
Reaction score
298
First Language
English (USA)
Primarily Uses
RMMV
I just noticed on my project that - with a large, max-size map and a large number of event definitions that are intended to prevent backward access to certain building types (when they don't make sense e.g. with the front door for the default temple sprite copied to a character sheet to work properly with the plugin thereby reappearing after walking in from behind) - there's a nasty slowdown that affects basically everything. Not sure if it's the plugin or not with that big a map (a smaller one that doesn't yet have all its events and locations decided on is't doing this, and that's maybe just a quarter percent of completion) but I'd look into investigating this.

EDIT: Forgot to mention that I'm working off my notebook system and not the main development rig as I'm basically snowed in to a certain sense of the definition while visiting with family. (Actually it's sub-zero wind chills, but the idea's the same without regard for that.)
 
Last edited:

glaphen

Veteran
Veteran
Joined
Jan 13, 2019
Messages
292
Reaction score
107
First Language
English
Primarily Uses
RMMV
I just noticed on my project that - with a large, max-size map and a large number of event definitions that are intended to prevent backward access to certain building types (when they don't make sense e.g. with the front door for the default temple sprite copied to a character sheet to work properly with the plugin thereby reappearing after walking in from behind) - there's a nasty slowdown that affects basically everything. Not sure if it's the plugin or not with that big a map (a smaller one that doesn't yet have all its events and locations decided on is't doing this, and that's maybe just a quarter percent of completion) but I'd look into investigating this.

EDIT: Forgot to mention that I'm working off my notebook system and not the main development rig as I'm basically snowed in to a certain sense of the definition while visiting with family. (Actually it's sub-zero wind chills, but the idea's the same without regard for that.)
Well the game is naturally going to take a lot more to run in 3D
No3D.png
Without that plugin on in the demo map 7 with around 90 events.
35.png
90 events on 7 with current update
352.png
Defaultish map 7 in demo with 35 events

So if you had more events it would keep going, and they update at the same time so it would be even worse. Solution is to cut map smaller into more pieces or expect people to have a better computer than you tested with, I mean you shouldn't lag at all really, maybe I'll try spamming events until I lag and see how much it takes now.

Ok I made a blank map 255x255 with only a floor and the chicken from demo with skip if cannot move turned on.
200.png
With 200 lag is better than 90 with weird tileset config.
But with 400 I actually did start to lag slightly jittering between 56~60 FPS.
400.png
With 500 the lag was honestly the same, jittering between around the same numbers.
500.png
With 600 the lag was again the same but it took like a minute to enter the map so I thought it crashed.
600.png
Not gonna test higher than that or I feel my computer would crash, already scripting nearly 24/7 at that point and definitely going to lag past that 0 idle. This is with a i5-2500k overclocked to 4ghz, probably lower end of CPUs nowadays.
Couldn't stop myself from trying 700, lag was worse and it still took a minute to open, was jittering around 45~56 FPS and it felt like it was skipping frames.
700.png
But this is nearly the same, but I don't know how it works anyways really, probably was skipping frames.

800 it took even longer to open and I had 25~ FPS that gradually went up to ~40 when idle, moving it was around 30~, recording this video even less.
800.png
this is still the same so I know nothing about it.

No more.

Oh and I feel I should mention with 800 events on a 255x255 even the editor was laggy on that map or switching to it.
 
Last edited:

BreakerZero

Veteran
Veteran
Joined
Jul 8, 2018
Messages
734
Reaction score
298
First Language
English (USA)
Primarily Uses
RMMV
As a tech-head myself I get that it can be taken into some rather extreme loads of that magnitude. But it wasn't the event load so much that as it is about the events themselves which I think could be rectified with a conditional load update (read: the game only processes the nearest set of events based on the directional radius of the player's location).
 

Blacrow

Dead Inside Studio
Member
Joined
Mar 3, 2018
Messages
6
Reaction score
2
First Language
Portuguese
Primarily Uses
RMMV
Can you make it compatible with Galv's spritesheet plugins (Character Frames/Character Animations)?
 

CoopNinjask

Veteran
Veteran
Joined
Jan 9, 2020
Messages
78
Reaction score
58
First Language
Portuguese
Primarily Uses
RMMV
Hi guys!

I bring you another video, showing the updates that have occurred since the last video shown here regarding the Environment System.
It's the Smoothness and Battle update! As a result, the system gained more natural transitions between the phases of the day and also began to affect battles.

Now I can say that the system is really ready, i just need to do the documentation to be able to release the demo here for you.

Hope you like it!

 

gRaViJa

Veteran
Veteran
Joined
Mar 16, 2012
Messages
806
Reaction score
290
First Language
Dutch
So I've been toying and trying a lot of things with the plugin and i think I know most of the ins and outs now. However, there are two thing I can't seem to get right:

Screenshot 2020-01-18 at 13.51.56.png

On the left, I try to make a house, and it almost works, except I have no idea how to copy the "roof edge", in game it looks like this (right) while it should be like the houses in the back. I'm pretty sure I used to same tiles:

Screenshot 2020-01-18 at 13.53.43.png

Secondly, the cliffs (see first screenshot again). This might be a more of a rmmv-thing than just the plugin. But I only used Tiled and parallax mapping in rmmv before, and whatever I try, I can't make the cliffs "layered" like in the demo. The pieces will always connect and become one cliff.

Anyone here that can help me on my way? :)
 

YoraeRasante

Veteran
Veteran
Joined
Jun 6, 2014
Messages
1,426
Reaction score
325
First Language
Portuguese
Primarily Uses
RMMV
@gRaViJa
The roofs, are actually an upper tile on the D tab. They are put over the original and have a short height and roof as sides, so you don't notice on the editor.

The hills, the appearence of the top is set through shift-mapping, it is not really hard, there are a few tutorials explaining around, and the height is set through regions, the R tab. Their settings are done through the plugin parameters.
 

tseyik

Villager
Member
Joined
Oct 22, 2015
Messages
18
Reaction score
18
First Language
English
Primarily Uses
So I've been toying and trying a lot of things with the plugin and i think I know most of the ins and outs now. However, there are two thing I can't seem to get right:

View attachment 131435

On the left, I try to make a house, and it almost works, except I have no idea how to copy the "roof edge", in game it looks like this (right) while it should be like the houses in the back. I'm pretty sure I used to same tiles:

View attachment 131436

Secondly, the cliffs (see first screenshot again). This might be a more of a rmmv-thing than just the plugin. But I only used Tiled and parallax mapping in rmmv before, and whatever I try, I can't make the cliffs "layered" like in the demo. The pieces will always connect and become one cliff.

Anyone here that can help me on my way? :)
 

Attachments

Last edited:

gRaViJa

Veteran
Veteran
Joined
Mar 16, 2012
Messages
806
Reaction score
290
First Language
Dutch
@gRaViJa
The roofs, are actually an upper tile on the D tab. They are put over the original and have a short height and roof as sides, so you don't notice on the editor.

The hills, the appearence of the top is set through shift-mapping, it is not really hard, there are a few tutorials explaining around, and the height is set through regions, the R tab. Their settings are done through the plugin parameters.
Thanks about the roofs, should work fine from now on. For the cliffs: I tried shift-clicking, but it still doesn't work for me. i'll look for a tutorial. I do know about the regions setting the height :)
 

Grunwave

Veteran
Veteran
Joined
Feb 4, 2017
Messages
512
Reaction score
135
First Language
English
When I initially load the demo it is 2d. I talk to the tutorial fairy, tried all 3 views, but no 3d.

I thought I might need to update my editor from 1.52 to 1.62, but a moderator indicated that should not affect this.

Is the demo setup to be 3d off the bat, or do I need to do something?

Thanks =)
 

Cormorant42

Villager
Member
Joined
Sep 17, 2019
Messages
25
Reaction score
13
First Language
English
Primarily Uses
RMMV
@CoopNinjask looks nice! The dynamic shadows sometime make the forest dungeon hard to see in the daytime, though. Can't wait to see what you're going to try to do with it!

@Dread_Nyanak I second the request for a parallax background skybox and some way to change it in-game...maybe defined through plugin parameters, and changed with a plugin command? Either way, keep up the good work!
 

YoraeRasante

Veteran
Veteran
Joined
Jun 6, 2014
Messages
1,426
Reaction score
325
First Language
Portuguese
Primarily Uses
RMMV
@Grunwave did you change any of the settings? Anything before testing it?
Just downloaded the latest demo, and without touching anything in it went to playtest... and perfect 3d...
 

Fyoha

Villager
Member
Joined
Sep 24, 2019
Messages
9
Reaction score
0
First Language
English
Primarily Uses
RMMV
A way to implement fall damage with the walk of edges options could be ideal. Maybe a way to set a threshold option where it begins to start taking damage from a fall from at least X blocks high and if you fall Y or more blocks, you die. Any distance between the two can be a percentage between the two values.
 

Grunwave

Veteran
Veteran
Joined
Feb 4, 2017
Messages
512
Reaction score
135
First Language
English
@Grunwave did you change any of the settings? Anything before testing it?
Just downloaded the latest demo, and without touching anything in it went to playtest... and perfect 3d...
Didnt change anything =(

I guess it is the editor being version 1.52 =(
 

YoraeRasante

Veteran
Veteran
Joined
Jun 6, 2014
Messages
1,426
Reaction score
325
First Language
Portuguese
Primarily Uses
RMMV
@Grunwave oh yes, probably.
1.6 is the one that allowed mv to use ES6, a newer version of javascript with new things available to be done. if Dread_Nyanak uses anything that was added only from then onwards you'd be out of luck. Not only that, babylon is an external plugin, not made with rpg maker mv in mind, so it probably uses it too.

@Fyoha while I can see the benefits of the idea, I can see many ways it can be done that a simple parameter would not be enough. Like, turning it on or off is the basic stuff, basing the damage on a status maybe, but at the point you change the damage or height to take it based on skills and equips things get more and more complicated...
Combine it with my earlier suggestions for gravity being changeable depending on the map, plugin commands and the event's gravity being able to be set as a function of the map's gravity instead of a set value (in case it is changed mid-map)...
I'd suggest instead adding a function to check if the player is falling, and another to get the height difference from the ground at the start of the fall. This way, the developer can make their own version of falling damage if they really want.
 

Dread_Nyanak

Veteran
Veteran
Joined
Feb 24, 2019
Messages
152
Reaction score
218
First Language
English
Primarily Uses
RMMV
@Fyoha
You could probably add fall damage through a parallel process common event that checks $gamePlayer.z and $gamePlayer.mv3d_sprite.falling.

If the player is falling, compare the current z with the previous z to find the distance fallen since the last frame, then add it into a fall distance variable. When the player stops falling, check if fall distance is big enough and if it is apply fall damage. Then clear fall distance. At the end of the common event store current z into a previous z variable for use in the next frame.
 

YoraeRasante

Veteran
Veteran
Joined
Jun 6, 2014
Messages
1,426
Reaction score
325
First Language
Portuguese
Primarily Uses
RMMV
@Dread_Nyanak good idea, but it would really help to actually have that "$gamePlayer.mv3d_sprite.falling" in the help file, if not a function itself for ease of use? now that I think of it just comparing heights would not be good enough because of platforms...

Also, this github issue points a small compatibility problem that... actually I think you should do a fix yourself next update, since while one of the functions was made just for that plugin my idea to fix it (I'm the YoraeRasante commenter) could also be useful for others, and the other two that I mentioned in my answer there are probably used in many others since they are a default mv function that doesn't work properly with the plugin because of the 3d.

And as mentioned before, if you are holding a direction other than up or down (that is, either left or right) when entering a first person map you are kinda stuck walking (or, well, strifing) in that direction any time you are not holding a direction key. Only seems to happen when going to a 3d map though.
That is a thing that kinda needs a fix as soon as possible.
 

CoopNinjask

Veteran
Veteran
Joined
Jan 9, 2020
Messages
78
Reaction score
58
First Language
Portuguese
Primarily Uses
RMMV
For the people who were waiting for me to release the demo of the Environment System, I just posted. It's in the RPG Maker MV Tutorials part.
Hope you enjoy! o/

 

YoraeRasante

Veteran
Veteran
Joined
Jun 6, 2014
Messages
1,426
Reaction score
325
First Language
Portuguese
Primarily Uses
RMMV
@CoopNinjask couldn't open the link, error message, but just to be sure, you did not put the patron plugin there, right? because if so you should take it out
 

CoopNinjask

Veteran
Veteran
Joined
Jan 9, 2020
Messages
78
Reaction score
58
First Language
Portuguese
Primarily Uses
RMMV
@CoopNinjask couldn't open the link, error message, but just to be sure, you did not put the patron plugin there, right? because if so you should take it out
Of course not!

Now that I understand, it looks like the post is waiting for moderation approval.
It will probably be released later.
 

Users Who Are Viewing This Thread (Users: 1, Guests: 5)

Latest Threads

Latest Posts

Latest Profile Posts

Yay! One of my Youtube videos got to 100 views (in 2 days)! This Youtube thing is great, it's like the profile posts except I get to annoy entertain more people at once! Now I just have to practice my "Leave a like and hit that Subscribe button" shilling technique. :LZSexcite:
Just found out there is an about me page. I updated it and happy the way its looking!
Ladies and Gentlemen, I can't act like things will be ok anymore. It needs to be said: We have a Pandemic...
Release version of Pillow Hero is out on windows now! --> https://bit.ly/2USHKLv
Stream will be live shortly! Feeling like doing some Minecraft instead of DK64 since it has been a bit! Feel free to drop by!

Forum statistics

Threads
95,556
Messages
930,065
Members
125,842
Latest member
VOGN1TE
Top