MBS - FPLE MV

@MORINGA the one problem I had when trying to make floor/ceiling/wall to different images was the way RPGMaker seems to be handling tiles- it doesn't like providing data about the individual tiles on the three layers, basically, from what I saw. At the very least, things like tile type, passability, and terrain tags are reduced to just the top layer's data, or the highest priority one.

Good to know. But I'm trying to avoid using terrain tags, passability, damage, etc as much as possible.

What I'm currently trying to do is: make the script read other images from a tileset (preferrably objects: B to E, since apparently - and correct me if I'm wrong here - MV lets us stack up to 1 terrain and 2 visible objects in the same tile). If I can do this, I can replicate the method used by Masked and apply it to cubes that form the ceiling and floor, independently.
I think this approach is somewhat safe, since one can stack an event on top of all that, and treat it as a visible object (maybe a sphere? A table? Or any custom Blender 3D object that can be called by Babylon, but let's not get too carried away yet, hehe....) - plugin commands should be the best shortcut for this, IMHO.
Spoiler: Nothing here, just my thoughts
Textures to be applied:
Terrain -> tag (floor or wall) [to either]
Object 1 -> ceiling [to ceiling]
Object 2 -> ground for wall, if it has transparencies [to ground only | place Obj1 if block needs a ceiling texture]

3D objects:
event (calls)
(via) plugin commands
(a Babylon function) which spawn 3D object
(that, according to args) may be sphere, column, cylinder, cube, etc, or custom
(dis gunna b heavy...)

Just came to my mind that there may be a specific tileset format for this kind of implementation. Masked may just have standardized FPLE's own tileset format (hence files such as "img/textures/1_0-1.png" and so: they do not necessarily correspond [visually] to anything near any tiles in "img/tilesets/FPLE.png").

Spoiler: (Edit: extracting map layers from data)
With some code from Masked (which I blatantly copied and edited to make map data fit)
Code:
mapdata = [];
var width = $dataMap.width;
var height = $dataMap.height;
var data = $dataMap.data;

for (var z = 0; z < 6; z++) {
    mapdata[z] = []
    for (var x = 0; x < width; x++) {
            mapdata[z][x] = [];
           for (var y = 0; y < height; y++) {
           mapdata[z][x][y] = data[y * width + x + (z*width*height)];
               }
    }
}

I tested some things and here's what I got:
Code:
-wood under flag:
mapdata[2][0]
[0, 0, 92, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]
mapdata[3][0]
[0, 291, 299, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]

-wood over flag:
mapdata[2][0]
[0, 0, 299, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]
mapdata[3][0]
[0, 291, 92, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]
layer 0 = terrain
layer 1 = (terrain overlay?)
layer 2 = mid
layer 3 = top
layer 4 = Shadows (nobody uses them? lol)
layer 5 = Regions
Update: it works. More or less
Spoiler: Screenshots
2017-10-05 (1).png 2017-10-05 (2).png


Issue: sometimes it messes up transparencies.
I had to change filename pattern to accomodate object tabs. Surprisingly, "duplicating" a loop (for ground and ceiling only) did not impact too much on performance, because (0,0) advances a step on it without doing sh8t.
Next steps:
-add a plugin command for custom sprite sizes (this will turn all maps into a spiral funnel from infinite to void, possibly obliterating all universe in RMMV games, lol);
-add a plugin command for 3D object spawning (yeah...one single event should be able to spawn all 3D objects of a map);
-make it work along with YEP_CoreEngine;
-@Doktor_Q, I think it would be possible to use shadows (layer 4) instead of map regions, for custom ceil height. Two main reasons I can think of, for this: (1) there shouldn't be too many ceil height changes in one map...I think; (2) map regions have a wide variety of uses, the potential for conflict in this case is huge, IMO.
this is pretty cool.. to bad it doesnt render event sprites
okay .. so .. what is the actual progress here ?
Can we already use sprites/charsets to decorate the halls?
okay .. so .. what is the actual progress here ?
Can we already use sprites/charsets to decorate the halls?

Working on something like that right now. Been asked by team, so it should use objects to "paint walls".
(But I guess what you want are animated sprites decorating walls?)
This plugin looks interesting and special...
I wonder if something like this is actually possible to build:
https://forums.rpgmakerweb.com/inde...ie-shooter-inspired-by-resident-evil-4.55265/
Working on something like that right now. Been asked by team, so it should use objects to "paint walls".
(But I guess what you want are animated sprites decorating walls?)
No i mean like, having characters or stuff running arround the map. or having static characters as barrels or flares or something. for decoration purposes.
No i mean like, having characters or stuff running arround the map. or having static characters as barrels or flares or something. for decoration purposes.
I see. Using events to decorate halls with animated or static things. I guess I did it, for "fake" 3D; and "painting" walls with other textures, using objects from tileset tabs B to E.
Spoiler: Warning: images shown here may not be what you expect
Remember those images from previous tests? I placed an unpassable wall, then an object with the exact same texture as previous wall. Transparency still working, last object placed on top of everything else.
2017-10-18 (1).png
2017-10-18.png


As for animated/walking events:
2017-10-18 (2).png
2017-10-18 (4).png
2017-10-18 (5).png
2017-10-18 (3).png

That's actually a battle event, which in fact teleports the player to a 5x5 empty map and starts the battle, teleporting back when battle is over.
No i mean like, having characters or stuff running arround the map. or having static characters as barrels or flares or something. for decoration purposes.

I'm pretty sure that was already something the plugin did? Even Masked's first version could render the sprites on Events, even if you had to think about how you arranged the directions on the sprite sheets a bit more.
I'm pretty sure that was already something the plugin did? Even Masked's first version could render the sprites on Events, even if you had to think about how you arranged the directions on the sprite sheets a bit more.
Yep. I did not change anything on events; just came up with some things related to the map itself.
Now, for the bad news....I've been looking for a way to optimize map rendering, but apparently babylon does not have a [simple¹] function or method to paint different sides of a cube with different textures.
In order to do so, guess what: one has to add every texture file to be used, and make a spritemap out of it. I remember someone in this forum pointing that it would make such spritemaps ridiculously big...

¹there is, however, an unpleasant solution to this: multi-material, submeshes, divide the cube into 2, paint it and pray...
@MORINGA
But wouldn’t that decrease performance significantly? Even Unity or Unreal take hits when using multiple materials and so is not recommended... And we are using quite primitive render 🙂
Yep. I did not change anything on events; just came up with some things related to the map itself.
Now, for the bad news....I've been looking for a way to optimize map rendering, but apparently babylon does not have a [simple¹] function or method to paint different sides of a cube with different textures.
In order to do so, guess what: one has to add every texture file to be used, and make a spritemap out of it. I remember someone in this forum pointing that it would make such spritemaps ridiculously big...

¹there is, however, an unpleasant solution to this: multi-material, submeshes, divide the cube into 2, paint it and pray...

What you can do is make a single image with all of the six faces on it in a fixed arrangement (arbitrarily set by you, the plugin developer), and then configure the geometry to display them correctly- not the most fun, but it's the standard for 3D cubes last I looked at anyone's actual code.

Since the texture making to geometry works by fractions of the whole, you could use whatever size of texture file- assuming memory serves. I never got that working because I'm a bit bad with geometry, honestly.
@MORINGA
But wouldn’t that decrease performance significantly? Even Unity or Unreal take hits when using multiple materials and so is not recommended... And we are using quite primitive render 🙂

Idk. I have to test it. What I learned is that not all kinds of implementations will have an impact on performance (i.e procedural texturing).

What you can do is make a single image with all of the six faces on it in a fixed arrangement (arbitrarily set by you, the plugin developer), and then configure the geometry to display them correctly- not the most fun, but it's the standard for 3D cubes last I looked at anyone's actual code.

Since the texture making to geometry works by fractions of the whole, you could use whatever size of texture file- assuming memory serves. I never got that working because I'm a bit bad with geometry, honestly.

Yeah, something like a "spritemap", but for textures. Thing is: if someone wants a specific texture combo, it'll take yet another image, which may be eventually redundant.
I've discussed this topic with the team, we calculated a maximum of a 3.5~4MB file size (of 3840 x 15360 px) for all 256 possible textures of a single tab of a tileset (A(5), specifically; team wants it also no B to E, but that'd defeat the purpose of having a specific tab for floor and ceiling mainly). Not huge, but also not exactly what we want. I may have to change some things (filenames) to test it.
You keep mentioning a team.. what have i been missing since i been gone?
I loved the FPLE that Ace had, it came with it's own tool where you built the maps and painted the texture you wanted on the side of the square you wanted, and then it would hold information for the maps a specific way, and load the map into your project and from there you could add events and such.
It was awesome.
You keep mentioning a team.. what have i been missing since i been gone?
I loved the FPLE that Ace had, it came with it's own tool where you built the maps and painted the texture you wanted on the side of the square you wanted, and then it would hold information for the maps a specific way, and load the map into your project and from there you could add events and such.
It was awesome.

It's the team I'm member of...nothing to do with Masked or Dr. Q. We have a tight schedule for a project (next December) and may have to cut off some things.😳
Yeah, I'd love to have FPLE with all cool stuff that'd allow me to make something like a "Shining the Holy Ark" with RMMV.
Unfortunately, not everything is free, and I feel like contributing in some way, if possible. 😀
Well, FPLE for Ace was not good enough to do Shining the Holy Ark.. but it was good for what it could do.
Put the exact texture you wanted on the surface you would want it on, line up events perfectly, make doors perfectly.
It was pretty good, but also low res and kinda slow.
Hey look! I got something else working! 😛😀
Spoiler: Not everything is flowers here. There might be some pizza, too =P
This is a sphere of size 1, inner texture only
2017-10-26.png

Now it's 1.5 diameter; still inner texture only, but now it's easier to notice.
2017-10-26 (1).png

Same 1.5, from closer. Strange that one gets to see some outer parts of it. Maybe lighting stuff?
2017-10-26 (2).png

This is what happens when camera and light source are too close: one sees nothing.
2017-10-26 (3).png

Now it's the same 1.5, but outer texture instead.
2017-10-26 (4).png

Kinda big, it got stuck.😀 Now seriously, it did not "invade" camera spot, since there are no visible holes right in front of it.
2017-10-26 (5).png
I'm convinced that what we achieved so far can be done with whatever shapes, including those exported via Blender.
Spoiler: Yep...that includes donuts
Did you say 'donut'? Yeah I lowered this one by 0.5, so I could see the ground.
2017-10-26 (6).png

"Surrounded by a donut"😛
2017-10-26 (7).png

It's not nearly as heavy as I expected. Time to focus on the next tasks (such as updating textures, applying/updating sprites via plugin commands, etc...)
Now, to turn these into plugin commands...
(edit: I tried both 'skybox' feature and a huge 'sky sphere' approaches, but, as expected, they'll never work unless view distance is set to too high...though a sky isn't supposed to be seen from underground dungeons anyway)
@MORINGA
That’s some seriously badass stuff you are experimenting with 😉
Skyboxes generally override the view distance calculations, since it's the thing that fills the space when there is nothing to see. Dunno if you can do something like that, like, this object must be seeable from whatever distance.

Also I noticed you're putting 3D models. Does it mean it could support rendering stuff? Is this becoming that good old legendary 3D RPG Maker we dreamed as children? Nice having texturing but I would love to have unlit colored polygons :^DDD.

Keep up the good work. Salut!
@MORINGA have you looked into the Skybox tutorials listed on Babylon's website? I would assume those should work with how the engine does view distance. I got stuck trying to make them do something very specific, but you might be able to get the as-given tutorial version to work.

Original thread: https://forums.rpgmakerweb.com/threads/mbs-fple-mv.57363/