trevordev

Members
  • Content Count

    229
  • Joined

  • Last visited

  • Days Won

    2

Everything posted by trevordev

  1. @DrEight fyi the forum moved to https://forum.babylonjs.com/ . I believe this is due to how the model was authored, each meshes origin is the center which causes this issue. To workaround this you could iterate over all the child meshes find their bounding box center, offset them so it is their 0,0,0 and then bake their transforms.
  2. @jhadenfeldt the vr helper creates cameras internally which must be added to the post process see this playground: https://www.babylonjs-playground.com/#T49RDX#1
  3. @javalang When I've done controller work in the past, I've tested using http://html5gamepad.com/ . If it doesn't show up there, there's probably a connection issue. If it does show up there than it should work with Babylon's "how to use gamepads" api's, if it doesn't it's likely a button layout issue, if thats the case, I might fallback to using html5 gamepad api's directly .
  4. Hey, AmmoJS physics plugin has been added to Babylon preview. It should work well with composite meshes which we've had trouble with in the past with other engines. Let me know if you find any issues or have any feedback. Note: Support for motors, soft bodies, other ammo specific features are not yet supported so yell if you need anything specific for your project. vid.mp4 Examples: Basic impostors: https://playground.babylonjs.com/#7149G4#31 Loading mesh and colliders from file: https://playground.babylonjs.com/#66PS52 Loading and adding colliders manually in Babylon: https://playground.babylonjs.com/#FD65RR Loading and adding collider with joints and pointer interactions: https://playground.babylonjs.com/#DGEP8N WebVR grabbing and throwing: https://playground.babylonjs.com/#ZNX043#1 Docs: https://doc.babylonjs.com/how_to/using_the_physics_engine
  5. I havn't done this myself but you could take a look at this thread to get some ideas: https://stackoverflow.com/questions/18453302/how-do-you-pack-one-32bit-int-into-4-8bit-ints-in-glsl-webgl @Sebavan might know more if you get stuck.
  6. @jsauca here's a playground that might help get the triangles https://playground.babylonjs.com/#KWSAU4#1
  7. @jsauca do you require them to be placed on vertices? One option might be to find the triangles that make up the mesh and randomly place billboards within those triangles.
  8. Last time I checked on iPhone, I believe you are correct that its not supported. You can check this with ( scene.getEngine().getCaps().textureFloatRender ). One option might be to use multiple 16 bit float buffers and store pieces of your result across all of them in your shader.
  9. Babylon's standard materials only support cheaper lighting such as point or directional lights, achieving accurate area lighting is much more expensive to do in real time but using a pbr material with an environment map works well as long as you don't want to move the light source eg. https://www.babylonjs-playground.com/#8MGKWK#0, to do this in realtime you could try using a reflection probe but this would get expensive . Or you can use glow layer to simulate it aswell but if you put a light on it it will still behave as a pointlight, the glow only effects screen space.
  10. I think a custom shader would be best to get the same wrapping animation. Another options would be to use morph targets https://doc.babylonjs.com/how_to/how_to_use_morphtargets but I think with this method the vertex animation would look more linear unless you added many steps between non-sphere to sphere.
  11. @Bladetrick I believe that is a transformNode so it will only have position/rotation/scale and no geometry data. Are you seeing it unexpectedly?
  12. I believe this PR should fix it: https://github.com/BabylonJS/Babylon.js/pull/5582 once that is merged this updated playground should work https://playground.babylonjs.com/#Q7UR8V
  13. Does registerBeroreRender work as expected in a basic scene https://playground.babylonjs.com/#EHKNF7 ? It might be that somewhere it is getting overwritten. What is the difference between your own example and that playground?
  14. @VictorF Could you try using scene.onBeforeRenderObservable.add(your function) and scene.onAfterRenderObservable.add(your function) instead and see if that works?
  15. @MinZe Do you have a playground of your usage of this with the gizmos? I can take a look at fixing that.
  16. @wyattbiker We have a doc page on this: https://doc.babylonjs.com/features/npm_support . I have a github repo I use to get started with new projects quickly here https://github.com/TrevorDev/testProjectBabylon . Let me know if you run into any specific issues.
  17. Good find @JohnyCage, I forgot that extension was required.
  18. @nikita If you set sphere.isPickable = false does it work? If not, send me a repro on the playground and I can take a look.
  19. Glad its working now, the codepath for this was a bit tricky so let me know if you find any other issues.
  20. Yep, it looks like there is a bug with picking when using multicameras, im looking into it
  21. I don't believe import mesh imports lights as well. Can you try loading using an asset container https://playground.babylonjs.com/#17MXFZ#34 and print out console.log(scene.lights) to see how many are there.
  22. @keiz , @Arte Are you okay with no rotation when this is enabled? Is the main reason this is needed is to achieve non-uniform scale with the bounding box gizmo and why not use the rotation/scale/position gizmos instead of bounding box for this. You can see how to try and extend the boudinding box in this playground: https://playground.babylonjs.com/ts.html#IF8723#2 . I started it a bit to position and place the cubes, you can try to add drag events similar to how its done here: https://github.com/BabylonJS/Babylon.js/blob/85e4517202fed3893a0c0a2bbd430e454208afae/src/Gizmos/babylon.boundingBoxGizmo.ts
  23. Do you have a playground (https://playground.babylonjs.com/#7149G4#0) showing it not working that I can take a look at? If you attach a mesh as a child of the mesh with the impostor attached I would expect it to work.
  24. @SimonN Hey Simon, based on this thread http://www.html5gamedevs.com/topic/29006-depreciated-set-physics-state-missing/ it looks like those methods were deprecated and removed, replaced with new PhysicsImpostor, getPhysicsImpostor().getParam("mass"); . Likely any physics methods you were using that no longer work have been replaced. Hopefully the porting effort is minimal.
  25. Thanks for catching this, working on a fix with this PR: https://github.com/BabylonJS/Babylon.js/pull/5545, this will invert all ktx textures, one issue was that inverting via webgl's UNPACK_FLIP_Y_WEBGL is not supported for compressed textures for the vScale will be inverted instead to get the same effect