MORINGA

Veteran
Veteran
Joined
Apr 23, 2017
Messages
30
Reaction score
11
First Language
English
Primarily Uses
RMMV
@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.
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").

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
 
Last edited:

MORINGA

Veteran
Veteran
Joined
Apr 23, 2017
Messages
30
Reaction score
11
First Language
English
Primarily Uses
RMMV
Update: it works. More or less
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.
 
Last edited:

blurymind

Veteran
Veteran
Joined
May 5, 2016
Messages
62
Reaction score
17
Primarily Uses
this is pretty cool.. to bad it doesnt render event sprites
 

Kanzlerino

Villager
Member
Joined
Apr 10, 2014
Messages
16
Reaction score
12
First Language
German
Primarily Uses
okay .. so .. what is the actual progress here ?
Can we already use sprites/charsets to decorate the halls?
 

MORINGA

Veteran
Veteran
Joined
Apr 23, 2017
Messages
30
Reaction score
11
First Language
English
Primarily Uses
RMMV
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?)
 
Last edited:

Kanzlerino

Villager
Member
Joined
Apr 10, 2014
Messages
16
Reaction score
12
First Language
German
Primarily Uses
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.
 

MORINGA

Veteran
Veteran
Joined
Apr 23, 2017
Messages
30
Reaction score
11
First Language
English
Primarily Uses
RMMV
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.
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.
 
Last edited:

Doktor_Q

I'm not a real doktor, but I am a real Q
Veteran
Joined
Aug 1, 2016
Messages
881
Reaction score
586
First Language
English
Primarily Uses
RMMV
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.
 

MORINGA

Veteran
Veteran
Joined
Apr 23, 2017
Messages
30
Reaction score
11
First Language
English
Primarily Uses
RMMV
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...
 

Alastor01

Veteran
Veteran
Joined
Nov 13, 2016
Messages
218
Reaction score
259
First Language
Russian
Primarily Uses
N/A
@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 :)
 

Doktor_Q

I'm not a real doktor, but I am a real Q
Veteran
Joined
Aug 1, 2016
Messages
881
Reaction score
586
First Language
English
Primarily Uses
RMMV
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

Veteran
Veteran
Joined
Apr 23, 2017
Messages
30
Reaction score
11
First Language
English
Primarily Uses
RMMV
@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.
 

MikePjr

Artist
Veteran
Joined
Nov 7, 2012
Messages
776
Reaction score
479
First Language
English
Primarily Uses
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.
 

MORINGA

Veteran
Veteran
Joined
Apr 23, 2017
Messages
30
Reaction score
11
First Language
English
Primarily Uses
RMMV
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.o_O
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. :biggrin:
 

MikePjr

Artist
Veteran
Joined
Nov 7, 2012
Messages
776
Reaction score
479
First Language
English
Primarily Uses
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.
 

MORINGA

Veteran
Veteran
Joined
Apr 23, 2017
Messages
30
Reaction score
11
First Language
English
Primarily Uses
RMMV
Hey look! I got something else working! :stickytongue::biggrin:
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.:biggrin: 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.
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":stickytongue:
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)
 
Last edited:

orochii

Abomination of life, or life itself.
Veteran
Joined
Apr 29, 2012
Messages
693
Reaction score
431
First Language
Spanish
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!
 

Doktor_Q

I'm not a real doktor, but I am a real Q
Veteran
Joined
Aug 1, 2016
Messages
881
Reaction score
586
First Language
English
Primarily Uses
RMMV
@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.
 

Latest Threads

Latest Posts

Latest Profile Posts

Why can't I insert picture in this profile post? Only insert image -> by URL. No option to upload from my pc?
Trying out a new Battle Ui.
BattleUI.png
And.... I couldn't help myself. I linked my card game Lore and Concepts back to my RPG Maker game and made them take place in the same universe. I think that means I need to get back to work on my RPG Maker Game. There's obviously a story here my brain wants to tell.
Been hard at work trying to make more tactical aspects of the game a reality, if all goes well the Player, depending on the faction they choose, will;
Suffer little to no penalty for escaping battle.
Be able to manually speed up resource gathering.
Steal Special projects from rival Factions.
Slowly but surely the game dev streams accomplish the goal.... actually finishing the game. :LZSexcite:



Going to start in about 15 minutes or so for anybody interested. And of course you know you are, well at least you know now because it's been stated that you are, and obviously anything randomly stated on the Internet must be true right? :LZSwink:

Forum statistics

Threads
129,754
Messages
1,204,846
Members
170,843
Latest member
ruddier
Top