MV3D - 3D rendering for RMMV with Babylon.js

● ARCHIVED · READ-ONLY
Started by Cutievirus 1560 posts Page 48 of 78 View original ↗
  1. glaphen said:
    How are you changing it, it's just changing the number in the file.
    Code:
    mv3d.createFog = function () {
    
        var fountain = BABYLON.Mesh.CreateBox("foutain", .01, mv3d.scene);
        fountain.visibility = 0;
        fountain.x = $gamePlayer.x;
        fountain.y = $gamePlayer.y;
        fountain.z = $gamePlayer.z;
    
    
    
    
        if (BABYLON.GPUParticleSystem.IsSupported) {
        particleSystem = new BABYLON.GPUParticleSystem("particles", { capacity: 25000 }, mv3d.scene);
         } else {
         particleSystem = new BABYLON.ParticleSystem("particles", 2500 , mv3d.scene);
         }
    
        particleSystem.manualEmitCount = particleSystem.activeParticleCount;
        particleSystem.minEmitBox = new BABYLON.Vector3(-50, 0, -50); // Starting all from
        particleSystem.maxEmitBox = new BABYLON.Vector3(50, 1, 50); // To..
    
    
        particleSystem.particleTexture = new BABYLON.Texture("/img/MV3D/Fog.png", mv3d.scene);
        particleSystem.emitter = fountain;
    
        particleSystem.color1 = new BABYLON.Color4(0.8, 0.8, 0.8, 0.1);
        particleSystem.color2 = new BABYLON.Color4(.95, .95, .95, 0.15);
        particleSystem.colorDead = new BABYLON.Color4(0.9, 0.9, 0.9, 0.1);
        particleSystem.minSize = 3.5;
        particleSystem.maxSize = 5.0;
        particleSystem.minLifeTime = Number.MAX_SAFE_INTEGER;
        particleSystem.emitRate = 50000;
        particleSystem.blendMode = BABYLON.ParticleSystem.BLENDMODE_STANDARD;
        particleSystem.gravity = new BABYLON.Vector3(0, 0, 0);
        particleSystem.direction1 = new BABYLON.Vector3(0, 0, 0);
        particleSystem.direction2 = new BABYLON.Vector3(0, 0, 0);
        particleSystem.minAngularSpeed = -2;
        particleSystem.maxAngularSpeed = 2;
        particleSystem.minEmitPower = .5;
        particleSystem.maxEmitPower = 1;
        particleSystem.updateSpeed = 0.005;
    
        particleSystem.start();
    
        mv3d.fog = fountain;
        mv3d.fogParticle = particleSystem;
    };
    2 keyboard button presses now it's 25000 instead of 50000.
    great ^_^ , but...
    this code at 0.5.1.5 is ok, at 0.5.2 is not work.
    I don't know why ?
    >_<
  2. seaotter said:
    great ^_^ , but...
    this code at 0.5.1.5 is ok, at 0.5.2 is not work.
    I don't know why ?
    >_<
    You're right didn't even realize I was using 5.1.5 to test, I played with the options in compare and it seems to be this.
    Code:
            enumRenderGroups: {
                BACK: 0,
                MAIN: 1,
                FRONT: 2
            },
    If you search enumRenderGroups and change the numbers all to 0 it works but I have no idea if it breaks anything else. Seems to make some invisible barrier that makes it only show far from character in new version.
  3. I've done my game with this latest plug-in. I accidentally deleted my map and I didn't know how to get it back. It's nice that I didn't have to do it all over again.
  4. glaphen said:
    You're right didn't even realize I was using 5.1.5 to test, I played with the options in compare and it seems to be this.
    Code:
            enumRenderGroups: {
                BACK: 0,
                MAIN: 1,
                FRONT: 2
            },
    If you search enumRenderGroups and change the numbers all to 0 it works but I have no idea if it breaks anything else. Seems to make some invisible barrier that makes it only show far from character in new version.
    so, if at 0.5.2 version
    Can you get me a new code for 0.5.2 ?
  5. seaotter said:
    so, if at 0.5.2 version
    Can you get me a new code for 0.5.2 ?

    Just open mv3d up in whatever even notepad, use replace command Ctrl+H if notepad.
    Code:
    enumRenderGroups:{BACK:0,MAIN:1,FRONT:2}
    put that into top to be replaced.
    Code:
    enumRenderGroups:{BACK:0,MAIN:0,FRONT:0}
    that into bottom to replace with.
  6. glaphen said:
    Just open mv3d up in whatever even notepad, use replace command Ctrl+H if notepad.
    Code:
    enumRenderGroups:{BACK:0,MAIN:1,FRONT:2}
    put that into top to be replaced.
    Code:
    enumRenderGroups:{BACK:0,MAIN:0,FRONT:0}
    that into bottom to replace with.

    01. mv3d.js like is a pkzip done javascript files, he can't to modify

    02.if I push
    Code:
    enumRenderGroups:{BACK:0,MAIN:0,FRONT:0}
    at others create fog.js , he still error.
    1584609415045.png
  7. @seaotter don't modify mv3d.js
    create a new text file, save it with the extension .js instead of .txt, of rename it from .txt to .js
    put that code in the text file, move the text file to your plugin folder, then add it to your project as a plugin bellow mv3d.
    you just created an extension plugin to mv3d. that adds things to mv3d without modifying mv3d.js itself.
    and NOW that you have the extension plugin with the mv3d.createFog function you can call it.
  8. Waterguy said:
    @seaotter don't modify mv3d.js
    create a new text file, save it with the extension .js instead of .txt, of rename it from .txt to .js
    put that code in the text file, move the text file to your plugin folder, then add it to your project as a plugin bellow mv3d.
    you just created an extension plugin to mv3d. that adds things to mv3d without modifying mv3d.js itself.
    and NOW that you have the extension plugin with the mv3d.createFog function you can call it.
    thank for your note !
    I try that mv3d.createFog function can't run at 0.5.2 , but can run at 0.5.1.5
  9. seaotter said:
    thank for your note !
    I try that mv3d.createFog function can't run at 0.5.2 , but can run at 0.5.1.5

    Ok I tried to see if I could change it in new plugin and this seems to work.
    Code:
    mv3d.enumRenderGroups = {
                    BACK: 0,
                MAIN: 0,
                FRONT: 0
            };
    Just put it inside the fog plugin, below it, like.
    Code:
    mv3d.createFog = function () {
    
        var fountain = BABYLON.Mesh.CreateBox("foutain", .01, mv3d.scene);
        fountain.visibility = 0;
        fountain.x = $gamePlayer.x;
        fountain.y = $gamePlayer.y;
        fountain.z = $gamePlayer.z;
    
    
    
    
    
        var particleSystem = new BABYLON.GPUParticleSystem("particles", { capacity: 50000 }, mv3d.scene);
        particleSystem.manualEmitCount = particleSystem.activeParticleCount;
        particleSystem.minEmitBox = new BABYLON.Vector3(-50, 0, -50); // Starting all from
        particleSystem.maxEmitBox = new BABYLON.Vector3(50, 1, 50); // To..
       
    
        particleSystem.particleTexture = new BABYLON.Texture("/img/MV3D/Fog.png", mv3d.scene);
        particleSystem.emitter = fountain;
       
        particleSystem.color1 = new BABYLON.Color4(0.8, 0.8, 0.8, 0.1);
        particleSystem.color2 = new BABYLON.Color4(.95, .95, .95, 0.15);
        particleSystem.colorDead = new BABYLON.Color4(0.9, 0.9, 0.9, 0.1);
        particleSystem.minSize = 3.5;
        particleSystem.maxSize = 5.0;
        particleSystem.minLifeTime = Number.MAX_SAFE_INTEGER;
        particleSystem.emitRate = 50000;
        particleSystem.blendMode = BABYLON.ParticleSystem.BLENDMODE_STANDARD;
        particleSystem.gravity = new BABYLON.Vector3(0, 0, 0);
        particleSystem.direction1 = new BABYLON.Vector3(0, 0, 0);
        particleSystem.direction2 = new BABYLON.Vector3(0, 0, 0);
        particleSystem.minAngularSpeed = -2;
        particleSystem.maxAngularSpeed = 2;
        particleSystem.minEmitPower = .5;
        particleSystem.maxEmitPower = 1;
        particleSystem.updateSpeed = 0.005;
       
        particleSystem.start();
       
        mv3d.fog = fountain;
        mv3d.fogParticle = particleSystem;
    };
    
    mv3d.enumRenderGroups = {
                    BACK: 0,
                MAIN: 0,
                FRONT: 0
            };
  10. @palatkorn
    I'm planning on allowing different textures for north, south, east, and west in version 0.6.

    For those with the bush tiles showing on top of the fog effect, it's because those tiles have alpha(1). Remove that from the tileset configuration and it should look correct. Meshes with alpha blending are sorted in a special way, which can be buggy in some cases.

    @ZAKERY
    For the fences, use terrain tag 2. For trees, terrain tag 1. You can configure the terrain tags in the plugin parameters.
  11. glaphen said:
    Ok I tried to see if I could change it in new plugin and this seems to work.
    Code:
    mv3d.enumRenderGroups = {
                    BACK: 0,
                MAIN: 0,
                FRONT: 0
            };
    Just put it inside the fog plugin, below it, like.
    Code:
    mv3d.createFog = function () {
    
        var fountain = BABYLON.Mesh.CreateBox("foutain", .01, mv3d.scene);
        fountain.visibility = 0;
        fountain.x = $gamePlayer.x;
        fountain.y = $gamePlayer.y;
        fountain.z = $gamePlayer.z;
    
    
    
    
    
        var particleSystem = new BABYLON.GPUParticleSystem("particles", { capacity: 50000 }, mv3d.scene);
        particleSystem.manualEmitCount = particleSystem.activeParticleCount;
        particleSystem.minEmitBox = new BABYLON.Vector3(-50, 0, -50); // Starting all from
        particleSystem.maxEmitBox = new BABYLON.Vector3(50, 1, 50); // To..
      
    
        particleSystem.particleTexture = new BABYLON.Texture("/img/MV3D/Fog.png", mv3d.scene);
        particleSystem.emitter = fountain;
      
        particleSystem.color1 = new BABYLON.Color4(0.8, 0.8, 0.8, 0.1);
        particleSystem.color2 = new BABYLON.Color4(.95, .95, .95, 0.15);
        particleSystem.colorDead = new BABYLON.Color4(0.9, 0.9, 0.9, 0.1);
        particleSystem.minSize = 3.5;
        particleSystem.maxSize = 5.0;
        particleSystem.minLifeTime = Number.MAX_SAFE_INTEGER;
        particleSystem.emitRate = 50000;
        particleSystem.blendMode = BABYLON.ParticleSystem.BLENDMODE_STANDARD;
        particleSystem.gravity = new BABYLON.Vector3(0, 0, 0);
        particleSystem.direction1 = new BABYLON.Vector3(0, 0, 0);
        particleSystem.direction2 = new BABYLON.Vector3(0, 0, 0);
        particleSystem.minAngularSpeed = -2;
        particleSystem.maxAngularSpeed = 2;
        particleSystem.minEmitPower = .5;
        particleSystem.maxEmitPower = 1;
        particleSystem.updateSpeed = 0.005;
      
        particleSystem.start();
      
        mv3d.fog = fountain;
        mv3d.fogParticle = particleSystem;
    };
    
    mv3d.enumRenderGroups = {
                    BACK: 0,
                MAIN: 0,
                FRONT: 0
            };
    perfect ! right work at 0.5.2 now !
  12. CoopNinjask said:
    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!



    Honestly the easiest solution from a game development standpoint would be to disable the built in camera controls and write your own in a common event. Basic javascript keypress check, when activated shifting the pitch or yaw +/- 3 in 0.02s (that's what I've done, provides a nice smooth camera control system) through the mv3d camera plugin command. If you're using SumRndmDde's plugin evals, that provides another level of customization (players can select camera sensitivity from the options menu, invert camera controls, etc).
  13. Disabling the built-in camera controls should also eliminate the incompatibility with Window Upgrade.
  14. Cormorant42 said:
    Honestly the easiest solution from a game development standpoint would be to disable the built in camera controls and write your own in a common event. Basic javascript keypress check, when activated shifting the pitch or yaw +/- 3 in 0.02s (that's what I've done, provides a nice smooth camera control system) through the mv3d camera plugin command. If you're using SumRndmDde's plugin evals, that provides another level of customization (players can select camera sensitivity from the options menu, invert camera controls, etc).

    Dread already has fixed this issue, but thanks for your intention to help. ^^
  15. That's the best thing Where I can build a room with an empty back tile without using a second wall



    Dread_Nyanak said:
    @palatkorn
    I'm planning on allowing different textures for north, south, east, and west in version 0.6.

    For those with the bush tiles showing on top of the fog effect, it's because those tiles have alpha(1). Remove that from the tileset configuration and it should look correct. Meshes with alpha blending are sorted in a special way, which can be buggy in some cases.

    @ZAKERY
    For the fences, use terrain tag 2. For trees, terrain tag 1. You can configure the terrain tags in the plugin parameters.
  16. palatkorn said:
    That's the best thing Where I can build a room with an empty back tile without using a second wall


    that like magic !
    how to do that TV ?
  17. i have an idea!, just random idea but thought it would be nice... i know the models thing would be a bit later in the development, but had a really good idea to take on mind when doing it, what about thin walls?... i explain myself a bit better... well, what about, if theres a wall tile, yeah?, if you apply shadow over that tile ( kinda like the way the stairs direction are chose with the shadow pen) if you paint over a wall tile, it let you decide a shape for that wall, that way when people are drawing closed rooms, the walls would not be too thick and people who use the default graphics dont neet to resize everything to get the same resoult o.o!, would that be a good idea?

    Ilustración2.jpg
  18. @k333 would have been a good idea, if not for two reasons...

    1- if Dread didn't already have a better way to use the shadow pen.

    Because you see, she already uses them for setting the direction of the slopes...
    and, since there are plans to set the sides of the tiles separately, they are probably be used to set which direction they are facing too (I expect the default will be the pen set either the north or south side, whichever the part of the slope they already do).

    and
    2-
    ...that's just splitting one tile into four. Wouldn't it be better to just... zoom out and use four tiles for each base one?
    Like, the wall would look thinner if instead of one line of one with height of two it was one line of one with height of four and everything else scaled to 200% or something.
    It's not like it would make any different but visually if you are not using pixel movement like altimit or qmovement, it would just look weirder that you have a half tile thick wall but has an invisible barrier on the other half.

    @seaotter I think he just put a "wood" block on top of the desk, and put the screen on the front of it with an event.
  19. Waterguy said:
    2-
    ...that's just splitting one tile into four. Wouldn't it be better to just... zoom out and use four tiles for each base one?
    Like, the wall would look thinner if instead of one line of one with height of two it was one line of one with height of four and everything else scaled to 200% or something.
    It's not like it would make any different but visually if you are not using pixel movement like altimit or qmovement, it would just look weirder that you have a half tile thick wall but has an invisible barrier on the other half.



    oh well, i do know that, yush, but ( even if is not my case, cuase this thing wasnt exactly for my own project ) taking on mind some people like to use the default or similar to default rpg maker assets ( again, not my case, i dont use rpg maker graphics at all , my sprites are already a lot bigger than default, so yeah, thiner walls on my project already) or similar sizes things, on pixelart , like the case of @palatkorn (btw such a nice looking project) , to by default can build on a easy way thiner walls would be a lot less time consuming to get a better visual resoult, think about... well, they would be forced to resize all the assets, all the sprites, even some animations, just to can make a bit more thin walls... again this isnt my case, but was more about thinking on make things easier to people who are using pixel art assets in that way.....


    about the pen, well cause i seen the pen only chose the slope direction when the shadow is inside the slope`s square , i dont see a problem on making the walls also have a pen configuration before , cause they were a separate cell/square also , but indeed , to use the shadow pen to set the sides of the tiles its a lot..a looot better, oh well.... indeed thats a lot better use, but now i feel excited about that new tool, those are really good news !
  20. seaotter said:
    that like magic !
    how to do that TV ?

    You have to create the same flooring on all 4 sides and then use characters as the TV screen.
    Do the same with the door and yes, you can do different screens on a TV

    1584864860193.png