MV3D - 3D rendering for RMMV with Babylon.js

CoopNinjask

Veteran
Veteran
Joined
Jan 9, 2020
Messages
77
Reaction score
58
First Language
Portuguese
Primarily Uses
RMMV
I found a error!

I'm using SumRndmDde Window Upgrade to gererate Question Windows that works as a menu.
But, in first person maps, the MV3D controls overwrites the Question Window controls, so i can't input arrow keys to left or right to select the menu options.
There is a way to, when the Question Windows are active, the controls of Question Windows get priority over the MV3D one?
Obs: In not first person maps, there is no compatibility problems. I put a cameraLock = true plugin command to prevent camera to rotate, but it was happening too. These menus appear in GameMap scenes.

Can someone help me?
Thanks in advance!

 

gRaViJa

Veteran
Veteran
Joined
Mar 16, 2012
Messages
806
Reaction score
290
First Language
Dutch
Really, this is the ambient color that i use in my demo!
Because of this, it was working then...
That's curious!
What a strange bug!
Yup, I got it from your demo, and only with that, the light events work for me. Not sure if that's intentional or not.
 

gRaViJa

Veteran
Veteran
Joined
Mar 16, 2012
Messages
806
Reaction score
290
First Language
Dutch
Wish I could help Coopninjask, but alas :)

Have another small question myself: I'm testing to see if it's user friendly to have the camera follow the player he/she turns left/right/up/down like it does in 1st person mode, but then in normal 3rd person mode. This set-up works, but the camera turns really slow, almost 10 seconds. Somewhat okay at teh start but it slows down really fast.

Is there a way to make the camera move faster? Like it does in 1st person mode? I also added the plugin command "mv3d camera target @Player 1" afterwards, but that didn't change anything.

 

CattleDog

Warper
Member
Joined
Apr 12, 2019
Messages
3
Reaction score
0
First Language
English
Primarily Uses
RMMV
Seems odd, but during battle the plugin seems to stop the shake screen function from working. It will work on map but not battle scenes. I removed all plugs except for babylon/mv3d-babylon and can restore the battle screen shake by toggling the plugins off.
 

CoopNinjask

Veteran
Veteran
Joined
Jan 9, 2020
Messages
77
Reaction score
58
First Language
Portuguese
Primarily Uses
RMMV
Wish I could help Coopninjask, but alas :)

Have another small question myself: I'm testing to see if it's user friendly to have the camera follow the player he/she turns left/right/up/down like it does in 1st person mode, but then in normal 3rd person mode. This set-up works, but the camera turns really slow, almost 10 seconds. Somewhat okay at teh start but it slows down really fast.

Is there a way to make the camera move faster? Like it does in 1st person mode? I also added the plugin command "mv3d camera target @Player 1" afterwards, but that didn't change anything.

The plugin commands are right.
I believe the problem is in Parallel Process and the way you build the conditions.
This way, while the person is in a direction, It will be rotating the camera. This is like it is rotating the camera multiple times to the same direction.
You have to build the conditions in a way to execute this command only once when you change your direction.

There is a way that i can think:
Put a condition with a:

If (Player Direction)

If Variable "Previous Direction" is different of Variable "Direction" then:

Variable "Previous Direction" = Variable "Direction"

Plugin Commands to camera yaw

End

Variable "Direction" = (Player Direction)

End


Explaining:

Let's imagine that you facing down (Direction = 2)

When you start the game, the Variable "Direction" will store the direction of the player. (= 2)

So, when you get in a direction, the game will check If the Variable "Previous Direction" is different of Variable "Direction", and It will be true. (Previous Direction = 0)

So the Variable "Previous Direction" will get the value from Variable "Direction" and them will be equal. (Both = 2)

You will run the plugin command to refresh the camera yaw.

The Variable "Direction" will get (Player Direction). This has to stay out of Previous Direction != Direction condition, because the Variable Direction has to update this value always.

This way, the plugin command to camera yaw will not run while you keep in the same direction.
If you turn in a different Direction, the Variable "Direction" will get a new value and be different of the Variable "Previous Direction", that will get the new Variable "Direction" value and this will update the camera.

Try this and see If will solve the problem. Give me feedback If It works please!
 
Last edited:

gRaViJa

Veteran
Veteran
Joined
Mar 16, 2012
Messages
806
Reaction score
290
First Language
Dutch
@CoopNinjask Yup, that makes sense! Shouldn't be a problem from here on. Thanks for the help! (Will try this tonight and post the working event code here)
 
Last edited:

Dread_Nyanak

Veteran
Veteran
Joined
Feb 24, 2019
Messages
152
Reaction score
218
First Language
English
Primarily Uses
RMMV
@CoopNinjask
This is because in 1st person mode the left and right buttons are mapped to rotating the camera instead of moving. Using the strafe keys should act as left and right though.
The way I'm mapping input sometimes causes problems like this. I'm considering changing the way I handle input to avoid these problems.

As for fixing problem, I think the only way in the current version would be to get rid of the dynamic controls. This would make the first person controls be the same as the 3rd person controls.
Unfortunately I don't have an option to do this yet, but you can do it by adding this code in a plugin after mv3d.
JavaScript:
mv3d.setupInput=function(){};


@CattleDog
That's a bug. I'll add a check to make it so the new shake screen behavior is only used in the map scene.
 
Last edited:

gRaViJa

Veteran
Veteran
Joined
Mar 16, 2012
Messages
806
Reaction score
290
First Language
Dutch
Try this and see If will solve the problem. Give me feedback If It works please!
This is my code now, and while it works as it should mechanic-wise, the slow moving of the camera is still in effect, exactly like it was with the shorter code:

 

glaphen

Veteran
Veteran
Joined
Jan 13, 2019
Messages
286
Reaction score
104
First Language
English
Primarily Uses
RMMV
This is my code now, and while it works as it should mechanic-wise, the slow moving of the camera is still in effect, exactly like it was with the shorter code:

It's because you have 1 on the end, that means 1 second for it to complete movement, change it to a lower time.
 

gRaViJa

Veteran
Veteran
Joined
Mar 16, 2012
Messages
806
Reaction score
290
First Language
Dutch
@glaphen, that actually did it. So 1 second is actually 10 seconds and 0.3 feels like it should be: +- 1 second.
 

Dread_Nyanak

Veteran
Veteran
Joined
Feb 24, 2019
Messages
152
Reaction score
218
First Language
English
Primarily Uses
RMMV
@gRaViJa
1 second should be 1 second.
The reason it's not working is because at the beginning you're setting previous direction to 1, so the previous and current direction are always different.
You want to do something like this:
Code:
current direction = direction of player
if current direction != previous direction
    if player facing up
        plugin command mv3d yaw 0 1
    if player facing left
        plugin command mv3d yaw 90 1
    if player facing down
        plugin command mv3d yaw 180 1
    if player facing right
        plugin command mv3d yaw 270 1
    previous direction = current direction
 

KotoYama

Veteran
Veteran
Joined
Apr 20, 2019
Messages
72
Reaction score
9
First Language
Spanish
Primarily Uses
RMMV
Really interested in purchasing this plugin, but right now I'm having this issue:

1.png

P.S. My game supports full HD resolution, so I configured CoreEngine accordingly. Could that be a problem?

Also I would add some F.A.Q. document\section cause navigating this thread is just a nightmare :D
 

gRaViJa

Veteran
Veteran
Joined
Mar 16, 2012
Messages
806
Reaction score
290
First Language
Dutch
@gRaViJa
1 second should be 1 second.
The reason it's not working is because at the beginning you're setting previous direction to 1, so the previous and current direction are always different.
You want to do something like this:
Code:
current direction = direction of player
if current direction != previous direction
    if player facing up
        plugin command mv3d yaw 0 1
    if player facing left
        plugin command mv3d yaw 90 1
    if player facing down
        plugin command mv3d yaw 180 1
    if player facing right
        plugin command mv3d yaw 270 1
    previous direction = current direction
Works now! Code as following:

 
Last edited:

CoopNinjask

Veteran
Veteran
Joined
Jan 9, 2020
Messages
77
Reaction score
58
First Language
Portuguese
Primarily Uses
RMMV
Works now! Code as following:

As Dread said, you don't should to define "Camera Previous Direction = 1", but i'm glad she already helped you and it works. ^^

A big hug! o/


@KotoYama
Resolution is not a problem, i did to scale it in 1440p.
The FAQ/documentation is included in the plugin.
Read the description that appears in Plugin's Manager.
 

Dread_Nyanak

Veteran
Veteran
Joined
Feb 24, 2019
Messages
152
Reaction score
218
First Language
English
Primarily Uses
RMMV
@KotoYama
It looks like you renamed the plugin? You can't do that. RPG Maker MV plugin files depend on the name of the file to get the parameters.
The file should be named "mv3d-babylon.js", whereas yours seems to be named "3D mv3d-babylon.js".
 

Karbonic

Off Brand OFF
Veteran
Joined
Dec 24, 2015
Messages
57
Reaction score
20
First Language
English
Primarily Uses
RMMV
Does anyone have some sort of visual guide to setting up tileset info like slopes and such? I'm having a hard time setting up the notes to make them work properly.

Also, just bought the full version, excellent work! Keep it up!
 

CoopNinjask

Veteran
Veteran
Joined
Jan 9, 2020
Messages
77
Reaction score
58
First Language
Portuguese
Primarily Uses
RMMV

Oh yeah, I also wanted to show what I've done with MV3D real quick. It's not much yet, but I've had a lot of fun constructing scenes with this!
Nice work, my bro! :ewink:
Do you know any good character busts generator?
 

Dread_Nyanak

Veteran
Veteran
Joined
Feb 24, 2019
Messages
152
Reaction score
218
First Language
English
Primarily Uses
RMMV
@Karbonic
It looks really good!
All I can recommend for learning tile configuration is to look at how it's done in the demo project and to read through the help file. I might make some video tutorials in the future though.

Update 0.5:
- renamed plugin to mv3d.js
- fix light per mesh limit
- Diagonal Movement
- Support QMovement
- Support Altimit Movement
- separated lamp height & offset from flashlight
- Increase priority for shadow pen on slope direction
- Made automatic slope direction more reliable
- Changed how wall textures are affected by adjacent slope
- Configure regions in map note
- Configure tileset in map note
- Configure individual actors
- shadow, error, and bushAlpha textures are set in parameters so they don't get excluded during deployment.
- Changed how input is handled.
- WASD controls now optional.
- Events without a graphic can be triggered from any height.
- Added option to make all events triggerable from any height.
- fixed shake screen not working outside map scene
- Added mv3d configure plugin command

Edit: v0.5.0.1 Fixed error caused by followers without an actor.


As you'll notice by the first change on this list, I've renamed the plugin from mv3d-babylon.js to mv3d.js. The three.js version has been gone for a while, so I didn't feel like keeping babylon in the name was necessary.
This does mean that you'll have to re-enter your plugin parameters, but if you don't want to do that I've made it so the plugin should still work if you rename it to mv3d-babylon.js.

I've made it so lightsources build inclusion lists so they only affect meshes that are close enough to be lit. This will allow you to have more light sources on the map, but the amount you can have per cell is still limited. Just make sure you don't have too many light sources clustered too close together and you shouldn't have a problem.

I've added built-in support for diagonal movement. This makes moving around with non-cardinal camera angles feel more natural. I might also add built-in support for 8-directional sprites in the future.

In combination with either QMovement or Altimit Movement, omnidirectional movement is now possible.

You can now configure actors in the actor note, and you can configure regions and tiles in the map note by using <mv3d-regions> and <mv3d-tiles>.

The new configure plugn command lets you change a character's configuration. For example:
mv3d @p configure scale(2)
 
Last edited:

gRaViJa

Veteran
Veteran
Joined
Mar 16, 2012
Messages
806
Reaction score
290
First Language
Dutch
Sounds awesome! Look like some of the updates might fix the compatibility issues I currently have (with MOG), so I'll dive into this as soon as I can!
 

Users Who Are Viewing This Thread (Users: 2, Guests: 6)

Latest Threads

Latest Posts

Latest Profile Posts

Ami
4 days im not using my laptop to waiting someone to reinstall (sigh)
Stream will be live shortly with some Donkey Kong 64! Feel free to drop by!
Working on a test Boss for the new No Travel Game Jam
- Name Plugin by Moghunter -
Free RPG Maker Ready Charging Up Animation

Enjoy -No Credit Needed But Appreciated -
Download it at https://lvgames.itch.io/free-charging-up-pixel-animation-fx-rpg-maker-ready
:/ .... so, thought I’d go to the park to sit in the cool breeze and get out of the house a little. Nope, guess that’s quarantined too. Ok...

Forum statistics

Threads
95,486
Messages
929,524
Members
125,733
Latest member
whypzk
Top