MV3D - 3D rendering for RMMV with Babylon.js

@glaphen
It was a misnamed variable. Not sure why I wasn't getting the error on my end, but it should be fixed now.
@glaphen
It was a misnamed variable. Not sure why I wasn't getting the error on my end, but it should be fixed now.
It fixed it but I can't walk on below character events and also my star tiles on top of walls with only fringe(-2) are making my walls flat, if they are even there. Walls are there since the height changes when walking on them with ctrl. Oh and my above characters seem to be on the floor and can't be moved through and it has through on.
Oh yeah, i remembered something.
Before that the slopes were added, the sprites didin't have this problem, that i told before.

EDIT:

And i use the STEAM version.
@WesdrasLink
That's strange. I've seen other people with the same problem before slopes were added.

This was the first occurrence of the problem I think, back in November.
RyEZFZZ.jpg

Some os my friends is having this problem. (they have the most recent version of MV).

@glaphen
For walking on character events, there's a plugin parameter called Walk on Events. You can also turn on an event individually with platform(true). Then you need to walk onto them from a platform of equal height, or if Walk off Edges is turned on from a platform of greater height.
You can also test it by walking into the event with ctrl and then using $gamePlayer.z=2 in the console.

I never even considered testing negative fringe.
I think the problem is I made it so when you have a tile with a lower height than a tile it's on top of, the tile isn't rendered so that pits and stuff don't get covered up. This seems to be making the walls invisible in your case.

I'm going to work on fixing this. It might take a bit.
@WesdrasLink
That's strange. I've seen other people with the same problem before slopes were added.

This was the first occurrence of the problem I think, back in November.


@glaphen
For walking on character events, there's a plugin parameter called Walk on Events. You can also turn on an event individually with platform(true). Then you need to walk onto them from a platform of equal height, or if Walk off Edges is turned on from a platform of greater height.
You can also test it by walking into the event with ctrl and then using $gamePlayer.z=2 in the console.

I never even considered testing negative fringe.
I think the problem is I made it so when you have a tile with a lower height than a tile it's on top of, the tile isn't rendered so that pits and stuff don't get covered up. This seems to be making the walls invisible in your case.

I'm going to work on fixing this. It might take a bit.

That new plugin parameter is on and I tried retoggling it but still can't walk on them, and as I edited above, above events are also on the ground and can't be moved through even with through on, changing height in parameters doesn't do anything. I only used fringe since it seems to be the only thing that worked for putting below walls, but I could probably switch to using scaled events instead if needed. Tried turning off all plugins in previous order but still can't walk on them, I can in demo again. Wait I turned off the autorun at start of demo so it doesn't erase and I can't walk on it, with plugin parameter on or off.
rpyT08q.png

Author: Dread/Nyanak
Version 0.3.10

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.

Spoiler: Screenshots
4P1CUIT.png

Big 3D castle

uGE1b0X.png

A simple hedgemaze example.

RteKUuw.png

Dungeon crawling

N0I88Js.png

Orthographic camera

rICK6Rq.png

Flashlight

Download on Github

To install the plugin in a new or existing project, download plugin.zip and extract the files into your project directory.
The plugin comes with two script files, babylon.js and mv3d-babylon.js. Both need to be loaded in that order.
There is also a folder img/MV3D which just contains a few images.

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.
Amazing! Would love touch controls!
That new update is great! Thanks a lot.

I still am having some problem with setting up my water though. Here's some screenshots in case anyone can help (I can't fint the spoiler tag in the new forum design, sorry about that):
BiVJUtE.jpg

So as you can see, the "normal" grass water kinda works. I've managed to tweak it a bit even but I more or less stole the settings from the demo project. My problem here is that I'm trying to set up other types of water and the inside of everything looks like it's grass water! Why, I can't wrap my head around it.

The screenshots show the tags I use but since they are too long to fit inside one screenshot I'll copy paste them here in their entirety:

This is the settings for the water that works:
A1,0,0:top(A1,24,72,48,48),side(A1,1,1),inside(A1,31,54,31,12),depth(0.3),float(0.1),texture(glow:1)

This is the settings for the water doesn't work and looks like the above:
A1,2,0:top(A1,24,216,48,48),side(A1,1,1),inside(A1,31,198,31,12),depth(0.3),float(0.1)

I'm using the "mud edge water" that I'd say is on "A1 2,0". That settings should be fine. The "top" part (if I understand it correctly) is the actual water here. And the side I'm unsure what it's for. You can't really see the sides of this water, can you?

In any case, the inside settings are changed but even though the values are different I still get the grass tile. Somehow I even get the "glow" from the first water?

Maybe I'm not understanding something?
@Dread_Nyanak

Wow! Great work so far! I have been using the older version of the plugin so far and did not realise Z axis have been set up. 🙂

Just to ask if this few things are available in future.

1) Rotation sprite to undergo 8 directions sprite movements. (Eg. When screen rotates, sprite turn diagonal before facing the other direction.)

2) A minimap with NSEW rotation as well. Since it looks 3d-ish with rotation functions, was wondering if there is a possibility of implementing a mini map where if the screen rotates, the map rotates as well.

Of cuz I am hoping speech bubble will be add on as well.

This is just something i thought of while working on my game. Great work so far 🙂
@Parallax Panda the side is for when the water is on the side of a raised ground. For example, a waterfall. The inside is for the sides in the water depression.
I am not sure what could be the problem without looking at the image though. Didn't get to use glow yet, but when I was setting the waters some time ago they were changing...

Also didn't test this new update yet.
Now I can make it walk diagonally. Only you may have to set it. From the control event I have already asked in this post about rotating cameras.

@Dread_Nyanak

Wow! Great work so far! I have been using the older version of the plugin so far and did not realise Z axis have been set up. 🙂

Just to ask if this few things are available in future.

1) Rotation sprite to undergo 8 directions sprite movements. (Eg. When screen rotates, sprite turn diagonal before facing the other direction.)

2) A minimap with NSEW rotation as well. Since it looks 3d-ish with rotation functions, was wondering if there is a possibility of implementing a mini map where if the screen rotates, the map rotates as well.

Of cuz I am hoping speech bubble will be add on as well.

This is just something i thought of while working on my game. Great work so far 🙂
@Waterguy
yeah the glow isn't that complicated. It just adds a.. glow to the tiles. I added that as an experiment and it should have nothing to do with my problem.
01.
Preset seems to lock WSAD mobile protagonist
Can I set these keys myself?
Otherwise this easily conflicts with many of my other plugins

02. This type of PLUGIN does not work .Not only this one

rmv_event_text_1.jpg

@Parallax Panda if the glow is affecting both, and both are using the same inside, then A1,2,0 is probably for some reason getting the settings of A1,0,0...
could you show us the whole notetag block you are using? including the <mv3d></mv3d> part? As I said, it should not do that, and in an older version I tried setting separate waters too if did not, so something is wrong, either on the notetags or in some of the changes in the plugin since then...

@seaotter
I don't get the 1? are you using a control configuration plugin and is wanting to know how to set it up for making them compatible? a link to the plugin would help, if not that I have no idea what you tried to say.
2- As I said before, these plugins use the event's x and y position to set where to show the messages. Since this plugin changes how things are shown, x and y are different (because when you turn the camera the x and y - and the new z for height - on the screen are the position on the 3d place, not on the screen), besides using a self-made character class instead of the default Sprite_Character, so plugins using that for getting the position will not work.
Basically, if it is graphics for the map and not just a hud chances are it will not work the same as before without being changed for it.
Can anyone tell me if this is an error on my part? During cutscenes (with movement route) I will make someone walk, however instead of waiting, it will allow you to move around during the cutscene. I have the (Wait) set on the event too...
Can anyone tell me if this is an error on my part? During cutscenes (with movement route) I will make someone walk, however instead of waiting, it will allow you to move around during the cutscene. I have the (Wait) set on the event too...
does turning off this plugin stops this?
because, last I checked, this plugin doesn't mess with things like how events run, only how they are shown, so whatever is causing this is probably something else...
does turning off this plugin stops this?
because, last I checked, this plugin doesn't mess with things like how events run, only how they are shown, so whatever is causing this is probably something else...
Turning it off shows that it's not the plugin...
Alright, that helps. Thanks!
(Actually, it seems like I already see what's wrong, so that's good!)
@glaphen
Yeah, it looks like I forgot to put above events in the air. That will be fixed soon.
I don't know why you can't walk through them though. I can walk through events with through just fine.
I don't know what you mean about turning off autorun at the start of the demo.
Maybe you can make a sample project that has the bug for me to play with?

@Parallax Panda
A1,1,0, A1,2,0, and A1,3,0 are special tiles. They're layered on top of regular water. In the RTP outdoor tileset A1,2,0 is lilypads. If you want to add a different type of water, A1,4,0, A1,6,0, A1,0,1, A1,2,1, A1,4,1, or A1,6,1 would be the slots to do that in.

@LeeRyuto
I do want to support 8-directional sprites through third party plugins eventually. @Waterguy made a plugin to make Qsprite work, I hope I didn't break that with the latest update.
The minimap is an interesting idea.
@Dread_Nyanak
Thanks. I realized that I was using the wrong spots on the tilesheet. Man did I confuse myself for a while there. Hehe...

@Waterguy
Sure, I've fixed "some" of my problems through trial-and-error. One of the problems I think were that I placed the water in a spot on the tile sheet that's reserved for "deep" water and "reed". That probably screwed it up because when i moved the tile to a proper "animated water" tile it worked. I got rid of the unwanted glow effect and the other tile's "dirt edges" showed up for the first time.

I still have some problems with the depth though as you can see below:
Ui1OxDT.png


The brighter (glow effect added) water to the right works just fine (it's the "original" (A1 0,0) water tile and I got that to work before as well. The darker water right in front of the player has no depth however. But as you can see from the tags I've set in the tileset, I did include the "depth(0.3)" tag so I have no idea why this don't work:

<MV3D>
//water
A1,0,0:top(A1,24,72,48,48),side(A1,1,1),inside(A1,31,54,31,12),depth(0.3),float(0.1),texture(glow:1)
A1,0,4:top(A1,24,216,48,48),side(A1,1,1),inside(A1,415,54,31,12),depth(0.3),float(0.1)
</MV3D>

[EDIT;
Also, do I need the "float(0.1)" tag on the water if there's no travelling by boat on it? Is it completely unnecessary?]
all the new tools are awesome , with all these is posible to create all kind of structures! is awesome thank you a lot ^^!

been doing some testings on the current vers and it seems to work just fine all together , at this point people could make almost everything on the structure visually side of things

on the sad side of things.... Qmovement dont work anymore with the plugin, the colliders for events just...the collider is still there, you cant walk trought his shape if you choice , but the player cant triger the event, thats a huge shame..... theres still the choice to use galv pixel movement and diagonal movement, not as good, but it works ( even if it also mess the directions when the camera moves , and cause lag with some plugins not related here ..for some... really weird reason )

the only huge downside of things with it...is the fact you cant put correct colliders on things, what i mean is, well, if you made a kinda 45 degrees wall with an event, does not make a lot of sense to have a square collider on it, or.... if you create a column, a thin one i mean, like..idk...a traffic sign... also doesnt looks really good to have a huge square collider on it cause you would be kinda anoyyed with a lot of invisible walls.... in the past i used to make polygon colliders created by coordinates with qmovement to compensate, but now taking on mind is messed, i believe the only really important thing missing on the plugin would be the choice to create polygon colliders by events comments or notetags, to can create the correct colliders with walls on diferent degrees.... in qmovement case was kinda like

<collider poly,(0,0),(0,48),(48,48)> (collider poly (x,y),(x,y),(x,y)> the resoult on this one is kinda like a triangle

or a thin column was kinda like <collider poly,(0,0),(0,15),(15,15),(15,0)> and the resoult was a smaller square

so yeah...even if pseudo pixel movement or diagonal movement from galvs cover some of the stuff, the option to create new colliders to work with the posible structures you could create inside the plugin is is still missing

theres still altimit plugin, but that one is tooo old and have quite important bugs there

i would like to say again, congrats, really , at this point with all the options on the plugin the limit on what can be done is defined just by creativity, really awesome update !
@k333
er... you are talking about colliders for pixel movement, in a plugin that does not add pixel movement. At least not yet, she has it planned but not yet.
so your request for colliders kinda makes no sense.

you said QMovement colliders stopped working, that is a QMovement issue though, not an mv3d one... did you try putting it bellow this one? QSprite needed to be above it with my compatibility patch (last I tested) but that is because they change how things are shown, not how they work during runtime.

Original thread: https://forums.rpgmakerweb.com/threads/mv3d-3d-rendering-for-rmmv-with-babylon-js.114971/