MV3D - 3D rendering for RMMV with Babylon.js

Ludo_gamer

Warper
Member
Joined
Jun 1, 2019
Messages
4
Reaction score
2
First Language
portuguese
Primarily Uses
RMMV
@Ludo_gamer this seems to be a characters image file problem...
No, the file is ok, it wasnt changed.
and, plus, i have made a export to android, when tested on a browser it get this same error, but correctly in a apk installed on android it plays perfectly. (sorry bad english)
 

Waterguy

Veteran
Veteran
Joined
Jun 6, 2014
Messages
1,363
Reaction score
306
First Language
Portuguese
Primarily Uses
RMMV
@Ludo_gamer ok, I feel like I'm taking over the creator's place here, but it is an important step to fix a problem: figuring out what causes it.
I saw the image, so I have an idea of what you are talking about, but... when exactly it happens? what did you do different for this to happen, events, notetags and plugin parameters? you said it happened when run into a browser but not as an apk, what about running it as a game itself or playtest? works fine? does using the latest version still cause this?
 

Ludo_gamer

Warper
Member
Joined
Jun 1, 2019
Messages
4
Reaction score
2
First Language
portuguese
Primarily Uses
RMMV
@Ludo_gamer ok, I feel like I'm taking over the creator's place here, but it is an important step to fix a problem: figuring out what causes it.
I saw the image, so I have an idea of what you are talking about, but... when exactly it happens? what did you do different for this to happen, events, notetags and plugin parameters? you said it happened when run into a browser but not as an apk, what about running it as a game itself or playtest? works fine? does using the latest version still cause this?
This error hapened with my friend, he just downloaded and play. I also thought it was a sprite problem, but other two people here in the group got the same.
Mine just worked with no error.
I checked the their rpg maker versions, and asked if they tried to change anything. they said no. (the only thing i can say for difference is that they all use windows 7, i use w10)

I saw this error when i exported and tried to play in a browser directly, but play test and android works with no error
 

Wavelength

Pre-Merge Boot
Global Mod
Joined
Jul 22, 2014
Messages
4,597
Reaction score
3,840
First Language
English
Primarily Uses
RMVXA
@seaotter Removing the content of your posts is not acceptable. I have reverted your posts to their previous forms. Do not clear your content again.

I don't know why you did it, but I hope it's not because you think there's no value in what you wrote. What you wrote, and you being around, have value. Don't give up on yourself like that!

(I'll let the double-post slide this time, but in the future just use the + Quote button on each post and you can easily combine all four responses into one big post.)
 

Dread_Nyanak

Veteran
Veteran
Joined
Feb 24, 2019
Messages
107
Reaction score
143
First Language
English
Primarily Uses
RMMV
@Waterguy
Here's a list of some of the new function parameters. Most of the functions are unchanged from the old version.
The parameters are separated into groups. In the parameter lists, vertical bar marks an unnamed group and the bracketed text marks a named group.

top(), side(), inside(), and texture() parameters:
img,x,y,w,h|alpha|glow[anim]animx,animy
examples:
side(0,1)
top(A1,0,0|1)
texture(anim:0,1)

camera() parameters:
yaw,pitch|dist|height|mode
examples:
camera(0,60,dist:5,height:0.75)
camera(mode: perspective)

ceiling() paramters:
img,x,y,w,h|height|alpha|glow[anim]animx,animy
example:
ceiling(A1,0,0|3)

@Ludo_gamer
I'm not sure what would be causing your problem if it's working fine with the plugin turned off. I'm actually directly calling RPG Maker's own functions for determining character frames, so there shouldn't be any difference from vanilla behavior.

@seaotter
Yeah, it's an online school.
 

Chef

yeet
Veteran
Joined
Oct 13, 2017
Messages
283
Reaction score
127
First Language
Dutch
Primarily Uses
RMMV
Hey for non tile-based movement Altimit Movement works pretty fine I think. Only the first person controls need to be adjusted to work with seperate move- and camera controls. It has polygon based collisions on events btw, so no custom collision on tilemap based things.
 

Waterguy

Veteran
Veteran
Joined
Jun 6, 2014
Messages
1,363
Reaction score
306
First Language
Portuguese
Primarily Uses
RMMV
@Dread_Nyanak
thank you.
Just to be sure though, if I want (for example that happened and why I asked for the clarification, really), the side of a water to use a rect of a waterfall and animate 3 frames vertically instead of trying for 4 frames horizontally, I'd use "side(img,x,y,w,h|anim(0,1))"? Or I would have to do "side(img,x,y,w,h|1|0|anim(0,1))"?

Not having Ludo's problem either... I have no idea how to reproduce it so I can't help much with it...

Also testing seaotter's followers problem... I had a different one when I went to test for it.
You see, I made two events, one with a page activated when Lucius was on the team, so it would turn blank when it left, to, well, remove Lucius, and one with a page with an image and a second blank page for when Lucius is on the team, so it would turn blank when Lucius is back on the team, and the first page adds Lucius.
When I started the game with Lucius on the team, removing Lucius removed the follower, re-adding Lucus brought the follower back. BUT! The events did not change. The event for when Lucius is on the team stayed there, even if I changed the camera's rotation (it even changed direction). The event without Lucius was interactable as if activated, but was invisible.
When I started the game without Lucius, the event to add him was there, but... not only the event to remove Lucius did not appear, Lucius himself did not appear as a follower and the event to add, instead of disappearing like a page with no graphic should, became the first charset of the Actor2 sheet (the event to add is the seventh character in the sheet on the visible page).
I am assuming that means the problem is something with changing the images during updates. The Lucius follower was removed in the first case but was already cached so it was able to be re-added, but not on the second. The events are very likely the same deal, the images were not removed or shown on the first case because they were not refreshed, and in the second the cause of the image change was that while the index went to 0 the image it was got from was not updated so it just got the image from the sheet's index 0.


@seaotter
3- the lack of animations may be a big problem if your project uses them a lot on the field... but them being shown needs to be remade to work on this. This plugin adds a third dimension to the map - thus the 3d in the name - and thus the way animations are shown needs to be rewritten.
And she is already aware of this problem. It is on the to-do list on the first post.
However, this is something of a low priority. Sure, some projects may use it a lot, some will not, and either way the focus until now was in making the 3d part, you know, the focus of the plugin, work properly. Making animations work again is on the to-do list, but it is not the focus right now, right now the focus is making sure what is already there is working.
So, until she says "I'm adding animations again now", mentioning "animations still not working"... doesn't help anyone.

5- yeah, it won't cause an error message, it just won't work as it was supposed to. And that is more than expected.
This plugin adds a third dimension, so plugins that use x and y positioning will have problems. Because now positioning also deals with a depth (in most places a z, but the usual code already uses z to see what appear in front so not sure what she used for it right now). In other words, it is a plugin compatibility.
And an expected one, since that plugin was made to position the message box in the 2d map but this plugin turns it into a 3d one. Asking her to make such different plugins compatible out of the bat just because you want to use both is unreasonable. You need someone to make a compatibility fix later.

6- it may sound big for a plugin, but it is just double the size of the pixi file in the lib folder.
To be honest I think it was supposed to be on the lib folder too, but it would need people to edit the index.html file to load it, and... yeah, easier for everyone to just add it as a plugin.
 

Dread_Nyanak

Veteran
Veteran
Joined
Feb 24, 2019
Messages
107
Reaction score
143
First Language
English
Primarily Uses
RMMV
@Waterguy
For a rect with waterfall-like animation you would use the format side(img,x,y,w,h,anim:0,1)
side(img,x,y,w,h|anim:0,1) will work too. It doesn't matter whether you use commas or bars for named parameters.
side(img,x,y,w,h|||0,1) Should also work. A vertical bar says to move to the next group, so three bars says to move three groups ahead.

I updated the help file now, so it contains all the new functions and parameters and a bunch of examples.

@Chef
Thanks, I'll have to look into that one later.

Edit:
Fixed @Waterguy 's bug I think. Events with no image weren't getting updated properly. There was also a problem with the bush alpha texture accidentally getting disposed.
As for @seaotter 's follower issue, the only time I've found that a follower isn't added when adding a new party member is when you go above 4 members, which is normal behavior. If there's a bug with the followers, I haven't been able to reproduce it.
 
Last edited:

seaotter

Veteran
Veteran
Joined
Mar 2, 2019
Messages
80
Reaction score
17
First Language
Chinese
Primarily Uses
RMMV
1.png

2.png
 
Last edited:

Waterguy

Veteran
Veteran
Joined
Jun 6, 2014
Messages
1,363
Reaction score
306
First Language
Portuguese
Primarily Uses
RMMV
@seaotter did you ser the terrain tag for that statue in the tileset? unfortunately terrain tags/tilsets can only be set on flat, fence, cross or xcross, so it won't be as good as setting it as an event though...
Also, two-tiled-high B-E tiles like these should be put both tiles on the same tile to work properly. One will be put on top of the other.


@Dread_Nyanak if it only happening when going past 4 followers, since the default number of them is that and to have more you'd need a plugin... is it set as 4 in your plugin or are you using the max battle members value (I kinda can't check the real name of the variable right now...)? If the first, I'd suggest making the code use the later, since then you'd just need to get the value from the new plugin. Of course, plugins that allow you to change the max party battle members mid-game wouldn't work so well when doing so, but that is an understandable limitation I think. Think it would be the same cause as the event-creating plugins mentioned in the thread earlier.

Can't check the new version myself right now, going to work, but will do so as soon as I can. :D

EDIT: Checked, it is working now just like you said :D
Didn't check for using a plugin for more party members, but yeah, starting a game with three people and adding one it is working fine now too

But for some reason the code "edge(false)" on the map block is not working... there are still walls outside the map.

Also, is there a way to do something like a bridge with B-E tiles? on the example project you used A tiles for those...
Closest I could do was set the tile to have height 0.3, since the water has depth 0.3. However, that limits the bridge to only those tiles, meaning in a tile with deeper depth or between places with different height it would not work anymore. Tried putting "B,2,2:height(0.3)" but that affects the height of the water too. Also, either way the water's bush effect was affecting the events even though I tried adding "bush(false)" although I know that is for events...).
 
Last edited:

Dread_Nyanak

Veteran
Veteran
Joined
Feb 24, 2019
Messages
107
Reaction score
143
First Language
English
Primarily Uses
RMMV
@Waterguy
You should be able to set the B tile's height equal to the water tile's depth, and then you should be able to walk on it.
For the followers, I reference the $gamePlayer.followers()._data array. My plugin works correctly when setting max battlers to a higher number. Not sure what would happen if it changed max battlers mid map though.

@seaotter
You'll need to change your mapping style a bit for this plugin to look right. You need to make the maps as though from a top down view.

Events are used to put things on the side walls. Here are the note tags I used.
banner top: <mv3d:shape(fence),shadow(0),y(0.51),z(1)>
banner bottom: <mv3d:shape(fence),shadow(0),y(-0.49),z(0)>
torch: <mv3d:y(0.51),z(1),shape(tree),shadow(0)>

For the statues, I put both the bottom and top of the statue in the same tile, removed the star passability, and gave them terrain tag 1. I also gave the pedestals region 1 to make them shorter.
You can also do the statues with events instead if you want.


Here's some updates:
Fixed edge
Fixed a bug where setting tile to use empty texture caused error.

New feature: Now you can configure a range of tiles at once, like this.
B,0-7,2: height(0.28),side(B,0,0)

Now tiles with very small height differences are passable. Threshold is configurable.
 
Last edited:

Sacrifyx

Veteran
Veteran
Joined
Oct 16, 2012
Messages
54
Reaction score
3
First Language
english
Primarily Uses
So I wanted to try this out and see how it goes. On a not-new project, I get "Error loading bushAlpha.png" when clicking new game. The MV3D folder is present (with the bushalpha.png) in project\img. This project is updated to current version and as I said it's not new so there's a bunch of other plugins and stuff but I can't imagine any of them would be preventing an image file from loading.Capture.PNG
 

ozubon

Villager
Member
Joined
Oct 16, 2018
Messages
22
Reaction score
12
First Language
English
Primarily Uses
RMMV
Just wanted to say this is superb, I am looking forward to playing more with this. It looks good, it runs well and it's just really NEAT. Hope you keep updating this and that we'll see animation support, slopes and dynamic shadows in the future :LZSyum:
 

The_switchify

I make games and things
Veteran
Joined
Jul 11, 2019
Messages
49
Reaction score
22
First Language
English
Primarily Uses
RMMV
Is this easy to set up? like you don't need any Java whatchamacallits? is it set up like a normal plugin?
 

Waterguy

Veteran
Veteran
Joined
Jun 6, 2014
Messages
1,363
Reaction score
306
First Language
Portuguese
Primarily Uses
RMMV
@Dread_Nyanak so doing it in the tileset itself really is the only way, uh... I was hoping I was missing something and it was possible to set a tile through region (as in a tileset tile, not a map one). Oh well, this limitation is understandable. I just need to put an event to plugin command bush effects on/off the player when entering or exiting the bridge. (I could just turn it off the water tiles, but I'm guessing they are there for the boat and ship)
 

Dread_Nyanak

Veteran
Veteran
Joined
Feb 24, 2019
Messages
107
Reaction score
143
First Language
English
Primarily Uses
RMMV
@Sacrifyx
You're using the old version of the script. I rewrote it a little bit ago, but I left the old script in the repository because I wasn't sure of the stability of the new script. The new version is pretty stable now, so I should probably remove the old version to avoid confusion.
The plugins you should have loaded are babylon.js and mv3d-babylon.js

@The_switchify
To get set up, you need the img/MV3D folder, and the scripts named babylon.js and mv3d-babylon.js.
img/MV3D
js/plugins/babylon.js
js/plugins/mv3d-babylon.js
 

Waterguy

Veteran
Veteran
Joined
Jun 6, 2014
Messages
1,363
Reaction score
306
First Language
Portuguese
Primarily Uses
RMMV
@Dread_Nyanak this reminds me, what exactly are the files in that folder for? what can we change and what we should not touch? I can get an idea about the bushAlpha, errorTexture and shadow, but the rest...
 

safermike

Villager
Member
Joined
Nov 30, 2016
Messages
21
Reaction score
0
First Language
swedish
Primarily Uses
Hello!! I am testing this out and wondering how I can get a fix for this problem.

events like book shelf

For front view (south) I want the actual book case to show, but for the sides I want like another texture.
For config I use top.and side. but if I change sides texture, all 4 sides on the cube changes, and I want only 3 to change not all 4





// (shelf)

B,3,6:shape(flat),top(B,0,6),side(B,3,6),height(1)

B,3,7:shape(flat),Inside(B,0,6),side(B,3,7),height(1)

According to faq or help file you can only have top, inside or sides.
Inside doesnt do anything since its a cube and i im just adding textures to it on the outside. But right now choosing sides is changing all 4 sides of the cube, but how do I control that so I can choose wich part of the cube is changed, and so I can add a 3rd texture for the sides. Is this doable?
 

Waterguy

Veteran
Veteran
Joined
Jun 6, 2014
Messages
1,363
Reaction score
306
First Language
Portuguese
Primarily Uses
RMMV
@safermike for this kind of thing, I think the closest to a solution would be using an event. Make a wood block on the wall and put it in there like the doors on the example project.
Since, you know, changing only one side may seem ok when you are putting the bookcases in the front wall, but what about when you move to the side?
 

Dread_Nyanak

Veteran
Veteran
Joined
Feb 24, 2019
Messages
107
Reaction score
143
First Language
English
Primarily Uses
RMMV
@safermike
I think the easiest method at the moment would be to do like @Waterguy said, and use an event to act as the front face for the drawer or book case. The note tag for the event will probably look something like <mv3d:shape(fence),shadow(0),y(0.51),z(0),rot(0)>

Maybe I could add configurations for north south east and west textures, but I'll have to think about it some more.

@Waterguy
The three images are the only ones really in use at the moment. The other files are all experimental. mv3d_data.json might have a use in the future, and the finalizedMaps folder is from a scrapped feature, so I'm removing that one.

---

Also, I added a file called plugin.zip to make it easier for people to set up the plugin on other projects. The zip file contains just the files the plugin needs to run, you just need to extract it to your project directory.
 

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

Latest Threads

Latest Posts

Latest Profile Posts

Quon is watching you
Quon blessed your good efforts
I have tried, several times to understand how Markiplier is popular. You can't deny his popularity. I can only get through a few minutes of his vids, though. He's cringier than ANY cringe comp I've ever watched. When I was a kid, if you acted like that, 0 friends and 100% no dates for you. Times have changed XD
Sometimes you may feel helpless and defeated. But everyone loses from time to time. It's okay to be tired. Take a breather. Have a good cry if you need to. You gotta take breaks from your workout, or you'll collapse before you can get stronger.
So, my roommates wrote a news article in English, translated it into Bengali with google translate and now I'm helping them fix the monstrosity which was the result. Making English the medium of education is fine... but not to an extent that we forget how to write properly in our own language :")
Stream will be live shortly with some more Minecraft spriting! Feel free to drop by~

Forum statistics

Threads
93,544
Messages
913,354
Members
123,073
Latest member
stunner345
Top