MV3D - 3D rendering for RMMV with Babylon.js

Dread_Nyanak

Veteran
Veteran
Joined
Feb 24, 2019
Messages
165
Reaction score
275
First Language
English
Primarily Uses
RMMV
@Frastrud
There's a plugin command to change the camera's target. For example, to target event 11:
mv3d camera target @e11 0

The last parameter (0) is the time in seconds the camera will take to switch to the new target. 0 is instant.
 

YoraeRasante

Veteran
Veteran
Joined
Jun 6, 2014
Messages
1,599
Reaction score
391
First Language
Portuguese
Primarily Uses
RMMV
Ooh, disabling it for certain maps is a great addition for me, since I was planning on using first person mainly in dungeons... I mean, I could just fix the camera, but disabling the plugin for cutscenes is even easier
 

slimmmeiske2

Little Red Riding Hood
Global Mod
Joined
Sep 6, 2012
Messages
6,755
Reaction score
4,603
First Language
Dutch
Primarily Uses
RMXP

@Frastrud , please avoid double posting, as it is against the forum rules. You can use the "Edit" function on your posts to add additional information you've forgotten or respond to multiple people. You can review our forum rules here. Thank you.


If you want to add something after you posted, please use the 'Edit' button to do so next time.
 

YoraeRasante

Veteran
Veteran
Joined
Jun 6, 2014
Messages
1,599
Reaction score
391
First Language
Portuguese
Primarily Uses
RMMV
Oh, this reminded me...
@Frastrud that is already there. You can set the camera's position through map notetags or change it through plugin commands, and you can just disable rotation and pitch mode so the player can't move it (these ones I think it is only through plugin parameters and plugin commands though), and if you don't even want it to follow the player just target it on an event, but this one you can only set through plugin commands...
 

JosephSeraph

White Mage
Restaff
Joined
Mar 7, 2014
Messages
1,143
Reaction score
1,364
First Language
Portuguese
Big post with comments on the plugin so far. None of these are requests, just ideas and observations, sorry if it's too much lol.

I was wondering, is there a way to set a default Sprite Size for all sprites? I wanted it to be 2.0 (seen in the event) but it's 1.0 on all sprites by default. (especially the player sprites).
upload_2019-12-4_2-1-27.png

Another interesting option would be to force it to render in low resolution! This way you could overlap a low resolution PSX-ish graphic with a high resolution UI for example. (Especially since low resolution UI doesn't really play nice on MV.)

BTW, if anyone wants to use this sprite for testing this script, feel free to.
upload_2019-12-4_2-3-56.png

(this is not free for commercial use or, in fact, for any use other than testing this engine. I might make some stuff in this style in the future. Anyway just message me if you wanna use this or idk)

Additionally, is it me or there's a limit to the maximum amount of lights a map can display? When I added the fourth light, the player's light stopped emitting.

I actually reduced Cell Size to 1 because I want that ps1 low poly look (i dont know if that's where you change that) so more lights should be, in theory, not very heavy. Especially since cast shadows are disabled.

edit: uhnm.... its... a feature request sorry
But!! One thing that would make this look really nice would be a simple dither pattern on top of everything, like a few ps1 games did, too.



(an example of that being emulated via Show Picture command, although the Multiply blend mode isn't the best for this):
upload_2019-12-4_2-20-8.png

edit2:
Sorry for bothering with so many things but... Another thing which may improve the script:
Gradient mapping to the fog, or at least an option to apply alpha fading to the geometry as it gets close to the render threshold (although that may bring its own slew of issues):upload_2019-12-4_3-24-19.png
Fog can look really nice to add some atmospheric effects such as this but then the render threshold just comes along and BAM. If there was some sort of way to fade to blue and then to black before hitting the threshold...
 
Last edited:

YoraeRasante

Veteran
Veteran
Joined
Jun 6, 2014
Messages
1,599
Reaction score
391
First Language
Portuguese
Primarily Uses
RMMV
@JosephSeraph
hmm... about setting the scale as 200% by default, I am already surprised she put scale changing as an option at all. You'd usually need an external plugin to do that in normal games, after all.
I don't think many people would use it like you do, making all events be stretched by default... most would rather resize the event, I think. At least I did when I wanted to use rm2k assets in my mv project to give it an Earthbound feel.

Lights being limited are new to me, but I didn't use them myself yet.

A dither effect... I can see how some would enjoy it, Irina has a few plugins with visual effects after all... but I think that is the kind of thing you should be looking for, someone doing visual effects, not an addition to this one.

I can see the good of the fog effect you are talking about... I actually didn't use fog before then because I hadn't seen (or at least noticed) the effect, so this is what it is for... avoid that white light on the border of my test map when it is too far from the camera... I actually thought it was something like Kaz' fog effects...
 

JosephSeraph

White Mage
Restaff
Joined
Mar 7, 2014
Messages
1,143
Reaction score
1,364
First Language
Portuguese
I don't think many people would use it like you do, making all events be stretched by default...
To be honest, it's kind of the other way around. If you see, the script assumes you're using an HD resolution, so the sprite will look 100%-sized on that resolution only. If you make the resolution smaller (and by that I mean the size of the tile the camera is focusing on, so that also applies if you're just making a game with a zoomed off camera) the sprite will be squished down when rendering. Which, I understand why it works, I just made an improvement suggestion because if there's a plugin command for changing the sprite size, implementing a default sprite size setting (instead of making it hard-coded) shouldn't be too hard.
not an addition to this one.
Difficult to say, by the nature of this plugin I don't think it'll be too compatible. (testing required on my end) I do understand your point though.

But yeah, these are all suggestions and observations only, not requests :)
 

YoraeRasante

Veteran
Veteran
Joined
Jun 6, 2014
Messages
1,599
Reaction score
391
First Language
Portuguese
Primarily Uses
RMMV
@JosephSeraph hmm, did you try changing the camera distance? although, that one does not have a default on the plugin parameters so it would probably be a good thing to add it...
 

JosephSeraph

White Mage
Restaff
Joined
Mar 7, 2014
Messages
1,143
Reaction score
1,364
First Language
Portuguese
Changing the camera distance does not change the relative size of the character to the tile they're standing on.
 

YoraeRasante

Veteran
Veteran
Joined
Jun 6, 2014
Messages
1,599
Reaction score
391
First Language
Portuguese
Primarily Uses
RMMV
uhm... I don't get what you mean then.
I'm testing this plugin on my project on a default-sized window, not widescreen, but the images are pretty much sized properly for me.
 

Dread_Nyanak

Veteran
Veteran
Joined
Feb 24, 2019
Messages
165
Reaction score
275
First Language
English
Primarily Uses
RMMV
Actually I have been planning to replace some of the existing default character parameters with one that takes configuration functions, similar to what I did with regions and terrain tags. This would let you change default for event size and any of the other event settings too.

Alpha fog will be a lot harder to implement, but that's something I've been wanting too. I think I can do it with a postprocessing effect where I render a depth map of the scene and use that to set the alpha. I think I could also use that depth map to add ambient occlusion. I've never messed with postprocessing before though, so I've got some learning to do before I can add that stuff.

Also plugins that add screen overlays should work fine with my plugin as long as there don't use the map layer. Like you said though, testing is required.

It looks like the 4 light limit is something imposed by Babylon, but it can be increased so in the next update I'll have to set a higher default and make it configurable.
 

JosephSeraph

White Mage
Restaff
Joined
Mar 7, 2014
Messages
1,143
Reaction score
1,364
First Language
Portuguese
I'm testing this plugin on my project on a default-sized window, not widescreen, but the images are pretty much sized properly for me.
I'm running the resolution at around 240p, which is much lower than the default sized window. That's why the sprites are being squished down, since it's expecting the default resolution but is getting something less than half of that, thus squishing the sprites to less than half of their original size as well to compensate.

Actually I have been planning to replace some of the existing default character parameters with one that takes configuration functions
Awesome! That's exactly what I meant / thought you'd do! It's consistent, flexible and powerful. :D

I can see the alpha fog being hard to implement. By the way, I do think gradient mapped fogs would be interesting too and potentially easier than alpha fog, but it still doesn't quite play nice with anything but a pure color background (such as the fade to white being pretty noticeable on the "world map".)

but it can be increased so in the next update I'll have to set a higher default and make it configurable.
Awesome! It's a nice thing to make configurable since different settings end up with different resource consumptions. By the way, what was the configuration that made the light effects "blockier" again? It was light subdivision, right?
(I meant this:)


I can't quite find it in the newer version. Blocky lights are reallly reminiscent of PS1 games too, lol.
Is it unavailable in the new library (?) (i really don't understand javascript very well...)


(PS1 blocky lighting at its peak)

Also yeah. I'm determined to make this look as PS1 as possible lmfao.
 

Dread_Nyanak

Veteran
Veteran
Joined
Feb 24, 2019
Messages
165
Reaction score
275
First Language
English
Primarily Uses
RMMV
Unfortunately the subdivision feature isn't available in the new versions. Lighting works differently in Babylon, so the lights look smooth even on low poly meshes. I think I'd have to load in some custom shaders if I wanted to bring back the old look. I don't think Babylon comes with regular lambert shaders. I'll probably mess with the shaders eventually, so I'll see about it then.

That reminds me though, I should probably edit the first post and put some fresh screenshots in there.
 

JosephSeraph

White Mage
Restaff
Joined
Mar 7, 2014
Messages
1,143
Reaction score
1,364
First Language
Portuguese
I see! On one hand it's a shame it's not available, on the other hand, it works so smooth right out of the box it's super duper impressive.
I'm looking forward to see what you do with shaders if/when you get to that stage, but shaders are probably very low in the priority list.

Anyway, I haven't been this hype about a new script in a very long while!
 

Edilsonsoares

Villager
Member
Joined
Mar 4, 2016
Messages
26
Reaction score
2
First Language
portugues
Primarily Uses
N/A
All chars are bugged like this

I do not know what is happening



 

YoraeRasante

Veteran
Veteran
Joined
Jun 6, 2014
Messages
1,599
Reaction score
391
First Language
Portuguese
Primarily Uses
RMMV
Hey, since you are doing presets now, I have a suggestion...

Adding 1st person as both a map setting and a plugin command. Settings like the camera height could be set as plugin parameters but changed on the map. Also, a function that we can check on a conditional branch's script box for seeing if we are on first person view or not.

Because as far as I can tell from the demo the way it is done right now is with the plugin commands on the common event to just move it, and unless I check on the code itself for how the buttons check for rotation mode "auto" I have no way right now of checking what the player is using.

@Edilsonsoares
the map itself, it looks weird because you are setting it a bit wrong.

the characters...
is your mv's (and project's) version 1.6.1 or upwards? Because the first page says it is only being tested for those.
If your mv/project IS of the newer versions, is your mv original?
If both are true... what exactly did you change in the parameters? Because I tested it in a brand new project on my pc and it worked fine.
But it is not the first time this error was reported here, @Ludo_gamer earlier had a similar problem when some people played his game in some deployment modes... but not everyone, and not all modes... maybe it is a requirement to play we are not aware of yet?
 

k333

Villager
Member
Joined
Dec 6, 2019
Messages
21
Reaction score
11
First Language
Español
Primarily Uses
RMMV
This is a greate plugin!, this is making a huge change on rpg maker games on development , thanks for your awesome work!

just as a random idea, looking at the rotation option on the events, it is horizontal yush? - rot(0) - , would be nice to add a rotation tool but vertical , what i mean is kinda like... a Yrot and a Xrot , that way we can make really nice figures like roofs and all that kind of stuff without needing the 3d object ^^!

also the choice to decide how thick a structure could be would be nice too ^^, what i mean is, by default the squares are 48x48 , but having the choice to make them a bit smaller would made nice columns or even better trees , kinda like..idk, in the tileset choice the center of the figure(so you can choice the position inside the 48x48 square), then the deepth and large ( kinda like how you choice the deepth and how tall are the figures right now ) that would create a huge world of choices on the structure creation side of things ^^

this were just random ideas , i hope you found something interesting between them , and again..really thanks for such amazing work
 

piksalh

Veteran
Veteran
Joined
Jun 14, 2014
Messages
103
Reaction score
9
First Language
Lithuanian
Primarily Uses
RMMV
Super awesome plugin, thank You!

I wonder it it's possible to change the default tileset tiles size to something larger than 48x48?
 

Dread_Nyanak

Veteran
Veteran
Joined
Feb 24, 2019
Messages
165
Reaction score
275
First Language
English
Primarily Uses
RMMV
We have slopes now.



The slope tiles automatically try to figure out which way they should be facing, but if you need to you can prevent them from facing a certain direction with directional collision.

@Waterguy
mv3d.is1stPerson() is to check if in 1st person. It's used a lot internally, but you can use it in conditional branches too.
To set 1st person in map settings you just need <mv3d>camera(dist:0)</mv3d>. To set yaw, pitch, and height too at the same time use <mv3d>camera(0,90,dist:0,height:0.75)</mv3d>

The 1st person common event in the demo project is what triggers the zoom in on the back of the player's head. It just sets the pitch to 90, sets yaw to player's facing direction, and sets dist to 0 over 1 second.

@k333
Adding a vertical rotation option for events should be easy enough. Of course for sloped roofs though the new slopes feature is ideal.

@Edilsonsoares
I don't know what's causing it, but if you send me the bugged project file maybe I can figure it out.

@piksalh
I haven't tested it yet with a plugin that changes tile sizes, but you're free to give it a try.

@glaphen
That's a nice suggestion. Currently you can only change a character's height/elevation when switching event pages, but it would be good to be able to do it with a plugin command or something. So you could make a bird that lands and takes off for example.
 

Users Who Are Viewing This Thread (Users: 3, Guests: 7)

Latest Threads

Latest Profile Posts

I need to remember that if i want to learn to map like a pro, I need to spend hours doing it like a noob again and again… also, a cool map sometimes has hours/even days of work behind. I need to remember that too.
Yo there how's it going rpg community.
It's raining non stop since yesterday. The sound of the rain is so soothing.
I really miss the old style disney animated movies. I guess the last one was The Princess and the Frog from 2009. Now I am trying to collect every single one I can get on BD or DVD.
What I've seen from the MZ tiles looks pretty inconsistent, bleh. Every plant seems to be drawn in a different style.

Forum statistics

Threads
99,293
Messages
963,932
Members
130,905
Latest member
GhostAcc
Top