All Activity

This stream auto-updates     

  1. Past hour
  2. @Deltakosh As I have transfered the serialized scene to server and saved to file, I could not simulate this behavior in playground. But I am providing all the required details below. I am using angular 4 for serialization abd below are the babylon package versions used. "babylonjs": "^3.2.0-alpha4", "babylonjs-serializers": "^3.2.0-alpha4", Import Statement: import * as SERIALIZERS from 'babylonjs-serializers'; Scene Loading Method: createScene() : BABYLON.Scene { // create a basic BJS Scene object this._scene = new BABYLON.Scene(this._engine); //Adding a light //let light = new BABYLON.PointLight("omni", new BABYLON.Vector3(0, 50, 0), this._scene); let light1 = new BABYLON.HemisphericLight("hemiLight", new BABYLON.Vector3(0, 6.7849, -6.7849), this._scene); light1.setEnabled(true); light1.intensity=1; light1.diffuse = new BABYLON.Color3(1, 1, 1); light1.specular = new BABYLON.Color3(1, 1, 1); light1.groundColor = new BABYLON.Color3(0, 0, 0); let light2 = new BABYLON.PointLight("pointLight", new BABYLON.Vector3(0, 45.4121, -102.6933), this._scene); light2.setEnabled(true); light2.intensity=0.2; light2.diffuse = new BABYLON.Color3(1, 1, 1); light2.specular = new BABYLON.Color3(1, 1, 1); light2.direction = new BABYLON.Vector3(0, 0, 1); //Adding an Arc Rotate Camera let camera = new BABYLON.ArcRotateCamera("Camera", 0, 0.8, 100, BABYLON.Vector3.Zero(), this._scene); camera.attachControl(this._canvas, false); let skeleton; // The first parameter can be used to specify which mesh to import. Here we import all meshes BABYLON.SceneLoader.ImportMesh(null, "assets/box/", "Anim-Earth-Cube.babylon", this._scene, function (newMeshes, particleSystems, skeletons) { // Set the target of the camera to the first imported mesh //console.log("Meshesh: " + newMeshes); }); this._scene.executeWhenReady( () => { this.serializeScene(); }); return this._scene; } Scene Serialization Method: serializeScene() : void { console.log("Start Serializing scene... "); // Serailize to GLTF let returnData : SERIALIZERS._GLTFData; returnData = SERIALIZERS.GLTF2Export.GLTF(this._scene, "assets/box/cube_texture.png"); // Serialize Scene to server <Code will go here> console.log("End Serializing scene... "); } I have observed that reference to cube_texture.png is not coming inside .gltf file after serialization. However when I tried exporting same model from Blender, I can see images section generated in the .gltf file as mentioned below. "images" : [ { "uri" : "cube_texture.png" } ], Attachments: (Model used) (Files after serialization) Please share your views.
  3. Originally I used all mp3s around 180 kbps, but I often get feedback from users that some audio doesn't play, or gets cut off. For audio less than 1 second, I want to switch to an uncompressed file, but which one to use? Audacity has a giant list of stuff. For audio 1-3 seconds long, is mp3 the most efficient and quality format to use?
  4. Today
  5. Alphabet Training Game for 3-4 year olds

    There are plenty of apps that already do this.
  6. Spaceship game template

    New Spaceship game template available for download! Control your spaceship by clicking or touching the screen. Play: Download:
  7. [SOLVED] Morph targets with texture

    thanks my friend
  8. Hi Team, I am using arc rotate camera in the scene. There is delay/animation in panning when pressed control+drag. I want the panning to happen on the go without delay. I am trying to modify the native library code for arc rotate camera, but the snippet itself is loaded with delay. Is there a way to disable delay/animation in panning effect? if (this.inertialPanningX !== 0 || this.inertialPanningY !== 0) { console.log('Start Drag---------------') console.log(new Date()) if (!this._localDirection) { this._localDirection = BABYLON.Vector3.Zero(); this._transformedDirection = BABYLON.Vector3.Zero(); } this.inertialPanningX *= this.inertia; this.inertialPanningY *= this.inertia; if (Math.abs(this.inertialPanningX) < BABYLON.Epsilon) this.inertialPanningX = 0; if (Math.abs(this.inertialPanningY) < BABYLON.Epsilon) this.inertialPanningY = 0; this._localDirection.copyFromFloats(this.inertialPanningX, this.inertialPanningY, this.inertialPanningY); this._localDirection.multiplyInPlace(this.panningAxis); this._viewMatrix.invertToRef(this._cameraTransformMatrix); BABYLON.Vector3.TransformNormalToRef(this._localDirection, this._cameraTransformMatrix, this._transformedDirection); //Eliminate y if map panning is enabled (panningAxis == 1,0,1) if (!this.panningAxis.y) { this._transformedDirection.y = 0; } if (! {; } console.log(new Date()) console.log('End Drag---------------') } also tried setting various values to speed, panningSensibility, cameraAcceleration.
  9. [SOLVED] Morph targets with texture

    I did it! Shaders intimidate me, but when I remind myself that its just C code I'm ok There is pouting and blinking in this one. I added a "blink" text so its more obvious that its working. I know this exercise might not seem worthwhile in this case, but I might do things like only morph textures if there's a close-up of the face. Anyhow, this is a good experiment I need to optimise now by separating head into its own UV map and using texture atlas if I have a texture for each morph target. Anyway, the main problem I had is solved. Thank you @NasimiAsl !
  10. Yesterday
  11. [Steam] CasinoRPG - Casino MMORPG

    Thanks, we really appreciate it! Well, it wasn't easy to get it running on mobile as it is a fairly large and asset-heavy game, but after a lot of optimizations in our fork of the engine we were able to get it to 60fps on newer phones (think iPhone 6S and newer). It does run on something like a Galaxy S3, but it isn't great, so we are mostly targeting newer devices, which still represents a very large install base. Our core community are quite active with the mobile version, but it hasn't brought in a lot of new players. The Steam launch; however, has gone quite well so far and has so far brought in quite an influx of new players (largely due to being listed in the new & trending section for the first few days).
  12. Stretched decals (line 28)
  13. Stretched decals

    Thanks! Check this one This happens when particles are before the mesh with alpha. There were some forum talkings about the order of rendering, but I'm not so good yet at terminology to understand. What can I do here? Can particles be rendered without transparency (only as in source image)?
  14. [PIXI] Changing sprite textures

    Its ok to do it in constructor. Find the other cause
  15. new Phaser 3 game: Meatloaf Catch

    Hi, a simple phaser 3 game. It seems as I made it, Richard added stuff I needed to the build! It was funny because the timing was perfect! It's meant to be a really short play game Phaser 3 is really neat and I wanted to really use the web audio dynamic sound, but it didn't seem to work on some phones yet(the actual web audio api). I also noticed on my phone the scroll sprite for the front screen slows down after 4 minutes.maybe my phone
  16. How to draw gradient color

    This blows my mind. Is there really no actual native way with Pixi.js to draw a rectangle with a gradient?
  17. complex games with three.js?

    @willeastcott I gave this a try but it looks like this idea was abandoned. Right now, if I follow the above steps, PlayCanvas asks me to upgrade my account. I know it's been a while so this is not weird but I'm putting this here for future reference for others reaching here via google or something.
  18. I would say that if you want to do more OOP and especially bigger games that TypeScript is the best way to go, as the compiler will enforce your intentions as opposed to coding by convention. Lots of resources on that; even Babylon.js itself made the switch from JavaScript to TypeScript. Switching over to TypeScript has saved me the most time in the long run, but I also have a strong OO background. I think you have asked a very wide open question that depends a lot on what is being built and has many 'correct' answers, so there can't be a single recipe. There are so many examples on github and from Ludum Dare that are essentially free working recipes. I am relatively new with babylon.js and have only been working on a turn-based (VR) interactive puzzle game. I ended up using redux-saga to control my game loop using Test Driven Development (TDD). Most movements are controlled by Animations and I don't use ActionManager or any globals. Logic is encapsulated in all the in-game classes. I have a basic renderLoop with no logic: engine.runRenderLoop(() => { if (scene) { scene.render(); } }); Here is the article (not babylon.js related) that inspired my game loop and tries to answer the larger question (his emphasis) Where does my application logic belong in general?:
  19. From Blender imported cube's transparency

    You're right -- face normals are good in Blender. I would guess that it's something in the babylon exporter/importer. Should be somebody about tomorrow that can answer your question.
  20. Nintendo Switch game?

    Would Phaser ever be able to run on a Nintendo Switch as a native game, not a browser game?
  21. Draw Inside of Mesh Here is a little more advanced set up for that. RayMarching is fun huh!?
  22. Renderer is stretching to canvas dimensions

    Sorry for the vague info this threw me off because all along I had old code that was resizing a parent container thus resizing all the nested elements . Anyhow thanks for trying help means a lot
  23. Hi again. Ok, I've bailed on hope for any divine intervention (ideas for better GUI target tracking)... so... I'm back at the render loop method. No customized AdvancedDynamicTexture._checkUpdate() in-use. If anyone needs to know WHY the method used in my last post... failed... just holler. In brief, even though I was adjusting position variable, the projectedPosition variable derived in the next section... was still using mesh original position, not my adjusted position. Adjusting the projectedPosition would require too many mods for Mr. Wingnut. SO, here we go, back to renderLoop force-adjusting, without help from ADT._checkUpdate(). A reasonably tight renderLoop at line 2182... keeps my 5-of-7 "floating in space" label targets... accurate, thru extreme camera tilts and mousewheels. If you look at the target and line for label 7 (lines 2168 and 2177)... you'll see a little 2-element array. One could call it... a custom linkedMesh "pack". It contains a mesh and a vec3 offset value. And, the renderLoop processesssszzzzzzzz that array, and applies [thx to control.moveToVector3()] my custom linkedMesh+offsets. Lookin' good. You can click pulsars, click quasars, mousewheel violently, do severe camera tilts, pan-around rebelliously... ALL 5 of my not-pointing-at-a-mesh-origin targets and lines... stay tracking perfectly. Good ol' moveToVector3(). (line 2186). It's my friend. Phew. Ok, I guess I can FINALLY move-along... back to chasing the unwanted bouncing/rubbery joints (joint 1a and joint 1b). Sorry for letting the campfire burn down. Maybe there's still enough embers to re-kindle. :/ Maybe there was never a fire. Certainly not much "gathering around" happening. (Wingy re-checks the "How To Tell Campfire Stories" manual... to see where/how he's failing.) I'd bring beer to the campfire, but we would all fall asleep before the end of chapter 1.
  24. Stop rendering stuff outside of the game world

    hmm, I've stumbled across this problem again many years later. I'd love to find a way to simply stop rendering stuff outside the game world like a crop on a group or a crop on the world. So far the only workarounds I could come up with is cropping the individual sprites when they reach the edge of the world. I don't like @FenopiĆ¹'s solution because creating an entire new graphics object adds webgl draw calls and is therefore detrimental to performance.
  25. All face normals look the same, and "blender render" is a default in my case. My demo blend file attached scene2.blend
  26. Yes they work for me ! Try with these link: or it both uses an environment with a .dds texture.
  27. Renderer is stretching to canvas dimensions

    It should work. Please provide more information. Sometimes my telepathic abilities provide a possible answer with that kind of info, but this time it failed.
  28. Renderer is stretching to canvas dimensions

    Here's another screen shot. I set the green square.x to 300px and it's way off. I just the renderer to not scale everything and stay true to the size where 1px = 1px. Thanks again
  1. Load more activity