MV3D - 3D rendering for RMMV with Babylon.js

What an impressive Plugin, congratulation.
I spent some time testing some stuff and here are some observations:

*When exporting your demo on an FTP to try it on iPhone’s Safari browser, all GFX in events glitch (even the MC), we see more than one sprite/frame at once.

*The “destination cursor” is missing.

*The 3D is turned ON by default on every maps of a game, I think many user would prefer to turn it ON only on selected maps, like if you only have a 3D worldmap in the entire game for example, wouldn’t be convenient to turn the plugin OFF on hundreds of regular maps.

The other way around might be better: OFF by default and having to turn it ON with a map-note.
(Or maybe a plugin “main parameter” to select the default OFF/ON.)

So far so good when it comes to performances, this is a nice surprise. Keep up the good work and Happy New Year!
@Waterguy
The number in slope(1) is the slope height. Higher than 1 makes it steeper, smaller than 1 makes it shallower.
For animations, the number is the spacing for each frame. Using 2 will make each frame 2 tiles apart instead of 1. The default animated tiles have an animx of 2 for regular water tiles and animy of 1 for waterfall tiles.

@k333
More control over slope direction coming in next update.

@KaYsEr
Having an option for disabled by default would make it easier to add to existing projects. I think I might add that as an option.
Is there a way to make the alpha ignore the parallax? On maps without it, it works on walls perfectly and stuff without anything behind it is rendered without alpha, but on maps with a parallax every single wall is hollow.
I... see...
well, not yet, but with some testing I may get it. Like, does putting 1 on the slope in a region means a slope from the water to the water would go up above the earth then? I plan for a map in a slightly flooded dungeon where you walk through some shallow water, that means I'd have to put the slope on the proper number as the region difference?

On, and @k333 she mentioned earlier she was thinking on using the shadow pen to set directions since the original use does nothing anymore.

@glaphen you mean that when you are on the side of the wall and the camera is inside it?
Amazing! I'll definitely make use of this once I become more familiar with RPG Maker.
@glaphen you mean that when you are on the side of the wall and the camera is inside it?

Ok maybe I wasn't paying attention enough, alpha is always on, just hard to tell with on certain tiles with certain back colors. Is there any way to turn off alpha for only bottom side of tiles, I tried setting everything individually in many ways but no matter what you can always see through the bottom tile.
@glaphen uh, I honestly have no idea...
did you set a bottom and/or inside to the tile? maybe that is what you need?
@glaphen uh, I honestly have no idea...
did you set a bottom and/or inside to the tile? maybe that is what you need?

Yeah I tried everything, but further testing seems like it makes everything alpha from the view of the side that is set to alpha, so if you set top, it will make everything viewed from top hollow even the parts not set as alpha. I sorta figured out how to make specific parts visible by making it only top, bottom doesn't matter and then making 2 separate roof tiles in B~D and setting it to star passibility, setting it to to fringe(0) or -2 for visible wall putting the tile on top of the original wall.

Also setting the alpha with region commands works with alpha(x) when I need a side part as well on a specific wall see through when already set in tiles, but I don't see how to turn it off with regions unfortunately. I suppose not using it in the tileset and only using regions seems to work if I don't need regions for other things in that map at those spots.

Ok I managed to solve all the problems I could see with that one map so here is how I did it if anyone else wants transparent walls, I'm using 45 pitch and no player controlled camera. Make a region in plugin settings with alpha(x). I use .92 since anything higher doesn't seem to work right and seems just turn it into bush vision or something. You need a tile in the tileset that is a copy of top of the wall top without autotile, or whatever you want the floor to be and make that tile a character as well if using near map edge. Use region on walls you want to see through and put the tile on top of it with C,2,0:fringe(-2) in tileset config for example on it so you don't see the parallax/fog, turn on star pass for it. Then use character event for any walls on the side that show a gap from map edge with notetag,
<mv3d:z(0),x(+0.49),scale(gap,size),rot(90),shape(fence),shadow(0)>, place event at edge wherever you want to fit it, might need to edit x or rot if on right side of map as that is for left. If you want to use it with player controlled camera you probably need to fence off the back view with same method.
oh, I think I get it, you want to be able to make the sides/top visible or transparent at will mid-game?
oh, I think I get it, you want to be able to make the sides/top visible or transparent at will mid-game?

Not really, just wanted to not see parallax or fog through the transparent walls.
...I don't think I get what you mean then...
images to help explain?
...I don't think I get what you mean then...
images to help explain?
Here is incomplete map with just alpha at .92.
Old.png
Here is incomplete map with changes I made above.
New.png
ah, I get it now. you want walls semi-transparent but not the parallax on the ground under it.
I remember the reason pits were not showing properly some time ago was because the ground it was put over was covering it, since the ground had height 0 and the pit had depth and thus negative height and was covered. maybe if you put a ground under the wall?
that *may* mean you need to make a tile B-E turn into the wall like the ceiling/tree tops on the demo's Inside D tiles though, in case it doesn't work with actual wall tiles...
ah, I get it now. you want walls semi-transparent but not the parallax on the ground under it.
I remember the reason pits were not showing properly some time ago was because the ground it was put over was covering it, since the ground had height 0 and the pit had depth and thus negative height and was covered. maybe if you put a ground under the wall?
that *may* mean you need to make a tile B-E turn into the wall like the ceiling/tree tops on the demo's Inside D tiles though, in case it doesn't work with actual wall tiles...

Yeah that's how I solved it. Without the extra tiles it looks like this.
NoTile.png
Using this character for side walls Wall.png
and single tile on tileset sheet to fix it.
...but now I am curious on what would happen if I turn it off...
The game would definitely take up more resources and probably lag. Mipmaps are used for performance optimization.
I'm thankful for all the help, but I have some problems setting up my water tiles (among other things, but let's focus on the water).

So here's something I copy-pasted from the demo project:

A1,4,0:top(A1,24,72,48,48),side(A1,5,0),inside(A1,31,54,31,14),depth(0.3),float(0.1)

I understand that "A1, 4, 0" refers to the tile that's positioned at x4, y0 on the A1 tilesheet. But after that it gets a bit confusing. The help file mentions using 5 parameters which in this case would be:

top(A1,24,72,48,48)

But I'm not sure exactly what these numbers refers to. "A1" is probably refering to the same tilesheet again. Okay. But what EXACTLY does the "24", "72" and "48" mean?

I understand that water tiles that are lowered half a tile into the ground is a more complex shape than say... what you'd do for walls. But it would be super nice if I could make this work somehow.

[EDIT; This is the only explanation I've found in the documentation: "With 5 parameters, you specify a region with pixel coordinates on the specified tileset image. For example, top(A1,24,72,48,48).". It's not enough to make me understand though. Pixel coordinates? ]
@Parallax Panda
when you use 3 parameters, you set the tile as it is in the editor. For example, A1,4,0 is the fifth tile on the first row on the editor for the file set as A1 - because it starts from 0, the first tile on the first row is 0,0, the second on first row is 0,1 and so on.
1577889787790.png


But when you use five parameters, you are not dealing with tile positions anymore, you are dealing with the pixels of the image. You open the image on photoshop, gimp or something and check the position you want to take it from. In your example, the tile would from then on take the image from the 25th pixel horizontal, 73rd vertical - because again, it starts from 0, but image editors already count the first each as 0 so just use the number they give you, and the other two parameters are the width and height of the image to get. In your example, they are a 48 by 48 pixels square with the top left position being the pixel 24,72.
The area not in red here:
1577889962491.png


As you can see, it may seem complicated now, but it is easier after you get the gist of it.
Kinda like using event variables.
Hm, i see.

It’s a bit different but I think I understand how it works. Have to get back home and try it to k of for sure though

Will it automatically know that it’s an animated water/waterfall?

Also, is there a way to tag a tile so it can be placed on a wall? Like with you’d want to do with windows, etc
Will it automatically know that it’s an animated water/waterfall?
Only if they already were. If not, you'll have to set it as them with the proper tag.
@Waterguy
Okay, so anything placed in the water/waterfall spots on the A1 tilesheet will be recognized automatically

What about plaching objects ”on” the wall (like a window)?

Also I readsomething earlierin this thread of how you’d need to place the top part of a B/C/D/E tile on top of the part that goes underneath but it sidn’t work well for me so I guess I must’ve made a mistake with the terrain tags?

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