MV3D - 3D rendering for RMMV with Babylon.js

I am trying to create a sphere that is on the map and affected by all the light sources. I've got it to react to ambient light. Any thoughts? And maybe I am just missing something easy here.



JavaScript:
mv3d.createSphere = function() {
    // Create sphere
    var sphere = BABYLON.MeshBuilder.CreateSphere("sphere", { diameter: 4, segments: 32 }, mv3d.scene);
    sphere.x = 18;
    sphere.y = 15;
    sphere.z = 1.1;
    sphere.isEvent = true;
    var sphereMat = new BABYLON.StandardMaterial("sphereMat", mv3d.scene);
    sphereMat.diffuseColor = new BABYLON.Color3(1, 1, 1);
    sphereMat.diffuseTexture = new BABYLON.Texture("img/MV3D/errorTexture.png", mv3d.scene);

    sphere.material = sphereMat;

    // Access lights from the map
    var mapLights = mv3d.scene.lights;

    // Check if there are lights on the map
    if (mapLights && mapLights.length > 0) {
        // Use the first light as the ambient light source (you may need to adjust based on your specific use case)
        sphereMat.ambientColor = mapLights[0].diffuse; // Assuming the ambient color is the same as the diffuse color of the light
    }
};
Is there a way to have the trigger() function affect the Event Touch trigger height as well?

It's one little bug/inconsistency that I've been able to work around thus far but it'd be great if I could change it so, for example, roaming enemies at different elevations from the player won't trigger a battle.

In my experience, the Player Touch is affected, but Event Touch allows the event to trigger from any height.
i'm trying to make a fps game with this plugin but i cant make the animation of the gunshot show in screen, it appears without mv3d, someone help?
i'm trying to make a fps game with this plugin but i cant make the animation of the gunshot show in screen, it appears without mv3d, someone help?
Animation is an event with character graphic? Post the event page and how did you configured it for 3D.
Animation is an event with character graphic? Post the event page and how did you configured it for 3D.
it is in a common event for when the player is equipped with a gun, but i made it work using several show picture and wait commands
Is it possible to dynamically change the height of a map's ceiling (e.g., interact with an event and it raises)? I'm using the ceiling to create a "water-level rising" event.

I'm not sure if the map configs can even be changed or if they're set on map load, but in any case, I haven't been able to find where to put a script/plugin command that sets new ceiling settings.

Edit: What I ended up doing is using a sprite with the Flat shape, scaling it x50 in the x and y direction, then setting its z height to whatever is needed with a separate event and using plugin commands in scripts (to allow for change based on a variable)
Happy holidays everyone! Just wanted to post a link to the game I made for the 2023 Christmas Game Jam, constructed with MZ3D. Feedback appreciated and future updates to come.

Does anyone else consistently get this warning upon starting up their game?

1706110700231.png

I'm having some issues with lag and crashing upon loading the first map with my game's deployment and I wasn't sure if this might be part of why. Below is the error I get (I've sometimes randomly gotten it when I start a playtest, but was never able to reproduce it. In the deployment, it consistently happens when I load the first map that has MV3D activated.):

1706110768787.png


Edit: My understanding of the warning is that it's having some issues accessing the attribute storage location in the set attribute command. Perhaps because the location doesn't exist for some reason. So maybe in the playtest it's able to ignore it and find some other way to work but in the deployment it actually really needs that location. I'm not sure.
i have chest that i made a sprite sheet for, it is always front facing in first person though, please help.

also, cannot access documentation website.
i have chest that i made a sprite sheet for, it is always front facing in first person though, please help.
You can use shape(sprite) to make it show all sides while circulating it.
also, cannot access documentation website.
Try this link: https://web.archive.org/web/20230601195627/mv3d.cutievirus.com/documentation
You can use shape(sprite) to make it show all sides while circulating it.

Try this link: https://web.archive.org/web/20230601195627/mv3d.cutievirus.com/documentation
i did use <mv3d:shape(sprite)> sprite is also the default in the plugin params, still every event with or without the note tag is always facing the camera, its frustrating. even when the sprites are moving randomly, they still front face.
!$ Sealed Chest.png


You can use shape(sprite) to make it show all sides while circulating it.

Try this link: https://web.archive.org/web/20230601195627/mv3d.cutievirus.com/documentation
nice OG doc
Hello! Please somebody help? Is there a script call to enable/disable Mouse input? I found this:
inputCameraMouse in the code but i'm not sure how to change the value in game with script call. I know how to set it defaulty in the plugin menu, I need the option to toggle it on and off. Thank you!
the documentation for the project, unfortunately, is hosted on glitch, which means it can only be up for a limited amount of time per month. for documentation, this is incredibly annoying, as i've only been able to go on the current docs a few times.

thankfully, an incomplete and outdated version of the docs exist on the wayback machine

When the project hours get refreshed I'll put the new docs on there too, but would it be possible to put the docs on github ? Even if it's just a text file, having access to the docs at all times instead of the current situation would be really really good

here it is ! I also made a local archive on my pc, so if you ever want to see the docs but both the site and internet archive are down, just send me an email at [email hidden] and i'll send them to you.
I did a test update to the MV3D version 0.9.2.6 update and I get this glitch where tiles that are very close to the camera lose their textures.

1716175544058.png

1716175513319.png


I'm not sure what would cause this, I messed around with settings like mipmapping and the like and didn't see any change. For now, I'll stick to my older version (9.2.2) but I'm glad to help find a fix for this!

Edit: Here is what it looks like in ver 9.2.2

1716175936904.png

1716175974752.png
I've fiddled around with it somewhat but I can't get it to stop rubberbanding in 1st person, is there any recommended settings to help achive a feeling of older 1st person perspective dungeon crawlers?
I wanted to ask, are there ways to control the depth of field/blurring beyond just the setting to increase its intensity? Is it possible to blur far away things in addition to very close things, for example?
Can this plugin work together with the ARPG plugin?



In my tests, everything seemed to work OK, except for the weapon/attack animation not appearing and the enemies not displaying the HP bar above them. The damage info also does not appear.
But I think this can be adjusted, or not?
For the attack animations, you need to use a plugin command

mv3d @t animation id
where @t is the target animation, and id is the number id of the animation.

For the damage info, this could be done with animations as well, question mark ? Would work technically but would also mean you have hundreds of animations. As for the hp bar, same deal.
rpyT08q.png

Author: Cutievirus
Version 0.6.1

A 3D rendering plugin for RPG Maker MV.

Wall tiles (A3 and A4) are transformed into 3D walls, allowing you to easily create 3D maps.
Regions and terrain tags can also be used to control the height of tiles.

The airship will collide with walls if it isn't flying high enough. However you can change how high it flies using plugin commands.

Plugin also supports 3D lighting as well as plugin commands to control the lighting and flashlights. Plugin does not support dynamic shadows, they don't work well with transparent textures in three.js.

You can control the camera distance, pitch, and yaw, and change between perspective and orthographic modes.
You can make 3D dungeon crawlers as well as isometric games if you want. You can even mix multiple styles into the same game, for example have the overworld be 3rd person or isometric, and the dungeons be 1st person dungeon crawlers.
See the screenshots below to see how it looks.

Spoiler: Screenshots
4P1CUIT.png

Big 3D castle

uGE1b0X.png

A simple hedgemaze example.

RteKUuw.png

Dungeon crawling

N0I88Js.png

Orthographic camera

rICK6Rq.png

Flashlight

Download on Github

To install the plugin in a new or existing project, download plugin.zip and extract the files into your project directory.
Included in the zip folder are mv3d.js, and the required image files.
For the premium features, the premium plugin must also be installed.

Todo:
  • ✔ Load 3D models (premium)
  • Bug squishing
  • Improve performance
  • Control camera with mouse / touch
If you want to use this plugin commercially, I please either become a patron or purchase the plugin on itch.io.

In the past I've asked people to credit me using my forum username Dread_Nyanak, however going forward I would prefer if you credit me using the name of my website "Cutievirus".

The official website for mv3d will be located at mv3d.cutievirus.com, however it's still a work in progress.
How do you set side textures for walls?

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