brianzinn

Members
  • Content count

    157
  • Joined

  • Last visited

  • Days Won

    1

brianzinn last won the day on August 20

brianzinn had the most liked content!

About brianzinn

  • Rank
    Advanced Member

Recent Profile Visitors

440 profile views
  1. BABYLON.Augmented Reality ... in AR.JS

    The thumb up at the end of the video is a nice touch!! Great work
  2. Check the network logs for 404s. For your .NET project make sure your wwwroot has the files - you may need a postbuild event to copy. Like DK said - you can enable specific mime types in your config, but try this to start and then lock it down more after (in startup.cs): app.UseStaticFiles( new StaticFileOptions { /* unknown mime types (ie: .fx) files will not be served, otherwise! */ ServeUnknownFileTypes = true } ); edit: Serving unknown file types is not recommended security-wise, so once you get it working switch over to FileExtensionContentTypeProvider https://docs.microsoft.com/en-us/aspnet/core/fundamentals/static-files
  3. Shadow Blur Problem

    Looks really clean. Totally random, but what is babylonjs.ps.colorAlive-3.0.min.js? Can't seem to find anything about it, code looks like Particle System, so I figured out the ps...
  4. Shadow quality and resolution

    I spent a fair amount of time in blender getting my vertices count way down, but you have millions! I don't know what the impact would be of making your scene 1/2 as big, but it is a lot of effort if it doesn't make a difference. I think DK's suggestion to merge meshes would help a lot, if that is possible - ie: are your building walls with the same material one mesh? I have a GTX1050 and with certain shadow/light settings my computer struggles to get 30FPS on much smaller levels, so it was a lot of tweaking, but i am made visual sacrifices for useBlurExponentialShadowMap = true. Obviously my levels look nowhere as realistic as yours hopefully somebody with more experience on big levels can give you some pointers...
  5. npm update

    Got it - that was a lot of effort to get to this point, so really appreciated!
  6. Shadow quality and resolution

    That's a big map. Did you look at softening the shadow? shadowGenerator.useBlurExponentialShadowMap = true; shadowGenerator.useKernelBlur = true; shadowGenerator.blurKernel = 64; Another thing is increasing the size of the shadowMap - you have 8192. What have you tried? I spent a lot of time getting shadows right - lights, intensities, positions, shadowMinZ, shadowMaxZ, self shadowing...
  7. npm update

    Thanks @RaananW for this great contribution - I will have more questions probably once your docs are ready. To start I noticed for example you are doing namespace import (import *). Are you not having any side effects (ie: import 'babylonjs')? Right now I am using named exports (import * as BABYLON would work just as well...): import { SceneLoader, Scene } from 'babylonjs' In same file I am manually calling to register my loader: import { OBJFileLoader } from '../../babylonJS/babylon.objFileLoader' SceneLoader.RegisterPlugin(new OBJFileLoader()) // how are these managed? SceneLoader.ImportMesh("", "folder/", "File.obj", scene, loadedMeshes => { ... }) I have copied .ts files from babylon source into my project to get loaders, procedural textures, GUI, etc. All done manually of course, so this will be a huge improvement for me. I am curious how you have registered imported plugins. I will be checking the "side-effects" and namespace import effect on tree-shaking. Happy to test it out and provide any comments.
  8. npm update

    Just noticing that there was a big changeset for the NPM modules for gui!! (https://github.com/BabylonJS/Babylon.js/pull/2840) This is really a big move and I want to try it out and hopefully get GUI working with my setup. I'm wondering how long that takes to get to npm (3.1.0-alpha3?) Otherwise is it recommended to build my own from source to try it out or copying from github/dist/preview release/ to node_modules? Thanks.
  9. How to properly dispose PolygonMeshBuilder

    You can clear the reference to an instance of a PolygonMeshBuilder by assigning something small like undefined or null. Then it will get GCd by javascript. You can look at the source - there is no dispose() like on Mesh objects: https://github.com/BabylonJS/Babylon.js/blob/master/src/Mesh/babylon.polygonMesh.ts If the PolygonMeshBuilder leaves scope it is also collected. If you just have one then I wouldn't worry about it, but if they are created dynamically and stay in memory then you probably should as the holes and points stay in memory.
  10. Various Questions

    One thing I noticed was that there is a continuous rotation after a jump. I think if the rotation is minimal you could try to zero it out: impostor.setAngularVelocity(Vector3.Zero()) Same with linear velocity, if no keys are pressed in a while or it is really slow? impostor.setLinearVelocity(Vector3.Zero())
  11. Wow, that's so great. Can you elaborate on the 80%? The work you did you getting GearVR working is fantastic. I'm wondering about the GearVR controllers and other VR experiences like Cardboard. Thanks again. I'm going to get the alpha-2 update and do some experimenting this week...
  12. I've had success with the range property on light. (http://doc.babylonjs.com/classes/3.0/light#range-number) Defaults to Number.MAX_VALUE in the source (https://github.com/BabylonJS/Babylon.js/blob/master/src/Lights/babylon.light.ts#L125)
  13. Animation Interpolation And BlendingSpeed

    Specifying all 3 separately just matches the use case that I saw before when working with rotation as a Vector3 directly - plus what JohnK said. I am assuming the rotationQuaternion is null on your meshes, otherwise the .rotation property would be ignored. In my game I have numerous meshes rotating based on other meshes (location + rotation) in essentially a state machine and to link meshes I use code to sync rotations similar to the new Mesh.setParent(...) that I think was added in 3.0. I have buttons to pause/unpause animations, which is useful for inspecting meshes and seeing what is happening with rotations/positions at different stages. I wrote my version of rotation synchronizing across meshes with BJS 2.5 from a PG made by adam that I can't find right now. Here is the setParent code for getting two meshes to match rotational differences in world space when parenting/unparenting: https://github.com/BabylonJS/Babylon.js/blob/master/src/Mesh/babylon.abstractMesh.ts#L1973 Hopefully something like that can setup your next frame rotation correctly - I can't see why your rotations are not additive/reset without more specifics. Maybe you can make a PG with same behaviour? Cheers.
  14. Animation Interpolation And BlendingSpeed

    Looks like your rotation keeps going back to original position, but you are slowly veering right position-wise. You have another post (http://www.html5gamedevs.com/topic/32728-delta-position-and-rotation/). I just wanted to refer you to another post from JohnK as it helped me understand rotations better: http://www.html5gamedevs.com/topic/32410-draggable-mesh-with-constraint/?tab=comments#comment-188275 Hope I'm not throwing you off track and this code is totally untested - looks like a tough problem for me to see without issue isolated in a PG. So, my comment to get the last rotation set for next frame is to add delta rotation something like: private updateDeltaRotation():void { if (this.owned.metadata != null && this.owned.metadata.state != null && this.owned.metadata.state.deltaRotation != null && this.owned.metadata.state.lastRotation != null && this.owned.metadata.state.rootRotation != null) { this.owned.metadata.state.rootRotation.subtractToRef(this.owned.metadata.state.lastRotation, this.owned.metadata.state.deltaRotation); this.owned.metadata.state.lastRotation.addRotation(this.owned.metadata.state.deltaRotation.x, 0, 0); this.owned.metadata.state.lastRotation.addRotation(0, this.owned.metadata.state.deltaRotation.y, 0); this.owned.metadata.state.lastRotation.addRotation(0, 0, this.owned.metadata.state.deltaRotation.z); } }
  15. Issue in loading image

    var toLoad = [ {name : "bgnd_color", src : "./textures/bgnd_color.png" }, {name : "color_picker", src : "./textures/color_picker.png" }, ... ]; let loadedImageCount = 0 toLoad.forEach(function(obj) { var img = loader.addTextureTask(obj.name, obj.src); img.onSuccess = function(t) { assets[t.name] = t.texture; loadedImageCount++ if (loadedImageCount === toLoad.length) { loadScene(...) } }; }); This is a bit hacky, but so is adding dummy textures! This would only work if all the textures loaded successfully (could always add a onTaskError otherwise)... there must be something else going on, though. I was looking at the code from http://www.babylonjs.com/scenes/assets/ and has what you have followed by assetsManager.load(); Anyway, I've never used the assets manager, but will add it at some point to my game.