Jump to content

Sebavan

Members
  • Content Count

    1230
  • Joined

  • Last visited

  • Days Won

    36

Reputation Activity

  1. Like
    Sebavan got a reaction from JoeVN in Export animations from unity   
    Hello and Welcome,
    The forum has moved to a new home: https://forum.babylonjs.com
    Do you mind posting again there ?
  2. Like
    Sebavan got a reaction from Luaacro in Babylon editor   
    Fixed
  3. Like
    Sebavan reacted to Deltakosh in New forum   
    Rich will send me the DB backup:)
  4. Like
    Sebavan reacted to Deltakosh in New forum   
    I know that  But I'm convinced this is for a far better experience (just the mobile app could save my day :))
  5. Like
    Sebavan reacted to eps in BabylonJS and Android using Basic4Android   
    No worries, hopefully it will help others get started..
     
    It took me a few years to find Basic4Android when looking for a decent toolset to create Android Apps which offered enough flexibility to delve deeper if needed but not too much coding for codings sake.  I had an idea for a 3D game a few years (4 or 5!!) ago and then went looking for a 3D framework.  I came across BabylonJS and have just about achieved my goal for this now, thanks to you and David R + others along the way.   My game is very much a 0.1 version of where I want to get it to, but as always there are other time pressures.  0.1 is just about viable - hopefully if there is interest I am hoping to improve on it rapidly.
  6. Like
    Sebavan reacted to eldogg in "Offerlings" our Gamejam entry for Ludum Dare 43   
    Play "Offerlings" in your browser" 

    For the game jam Ludum Dare 43 we decided to try out BabylonJS. We knew we wanted to create 3D game and for it to run on the web and on mobile browsers. We'd previously created our own JS engines with THREE.js as the renderer, but the time constraints of the game jam (3 days) meant we wanted to an existing game engine. We looked at other game engines that had HTML5 exports (Unity, Godot, Unreal), but none of them really worked on mobile. We're really happy with using BabylonJS, the examples were great for learning how to add various features into our game. Looking forward to the AmmoJS plugin in version 4.0!

    Let us know what you think of the game, and if you spot any problems.
     



  7. Like
    Sebavan reacted to timetocode in Degrading sound   
    Now that I have this reproduced, I think I'm realizing that this idea was never going to work due to the number of sounds. I did a little bit more testing with a 500 KB wav file vs a 15 KB mp3, and the degradation seems more related to the number of sounds than their size.
    In my game each weapon has like 5-20 sounds, and a player can hold a few weapons. The walk/run cycle has like 16 sounds per material (concrete, wood, grass, etc). It can add up to about ~100 possible sounds per player, though 99% of them aren't playing at any given point. BJS seems totally fine with that many sounds, but it looks like attachToMesh is not designed for this. I read the source code, and it looks like it *might* be viable if it would check if the sound is playing before rebuilding the matrices. Currently it does some fairly expensive work, even for non-playing sounds (setPosition and computeWorldMatrix fill the profiler when stress tested with cloned sounds on moving meshes).
    I'm going to test positioning the sounds manually at the time that they are played, and not having them move along with the mesh. If that doesn't work I guess I'll pool them in addition.
     
    Edit: definitely need a pool
    Edit#2
    at 21 players firing the same automatic rifle, the pool brought the active number of sound instances from 210 down to 59
    Here's an ultra simple auto-expanding pool if anyone wants. Usage is just to use 'get' for short-lived sounds and it will handle allocation and releasing on its own. It never deallocs.
    class SoundPool { constructor() { this.scene = null this.sounds = {} } init(scene) { this.scene = scene } allocate(name) { const sound = BABYLON.Sound.FromAtlas(name, name, this.scene) sound.onEndedObservable.add(() => { this.release(sound) }) this.sounds[name].push(sound) } get(name) { if (!this.sounds[name]) { this.sounds[name] = [] } if (this.sounds[name].length === 0) { this.allocate(name) } return this.sounds[name].pop() } release(obj) { this.sounds[obj.name].push(obj) } } const singleton = new SoundPool() module.exports = singleton BABYLON.Sound.FromAtlas is a little wrapper that clones sounds without making additional xhrs (e.g. 'sounds/foo.mp3', clones it and applies new options)
  8. Like
    Sebavan got a reaction from Dieterich in [Violation] 'requestAnimationFrame' handler took <N>ms   
    Do you have any error message in the console ? are you relying on the same version of the inspector and babylon ?
     
  9. Like
    Sebavan reacted to Deltakosh in How to have normal alpha gradient?   
    You need to add a reference to the material library: https://github.com/BabylonJS/Babylon.js/tree/master/materialsLibrary
  10. Like
    Sebavan reacted to Wingnut in Please Help with this...   
    Hi @i_tejas19, welcome to the forum.  Congrats on successful BJS scene/animations!
    Pop-up mouse-over labels, eh?  Here, check this out...
    https://www.babylonjs-playground.com/#XCPP9Y#447
    That playground teaches BabylonJS GUI labels... AND BJS ActionManager onPointerOverTrigger.  Keep in mind that an entire PANEL of information... can pop-up, with clickable stuff on that panel.  WOW!
    I found that playground... using a playground search.  I happen to know that MOST GUI demos have the term "advancedTexture" in them... from experience.  I often re-name my GUI demo vars to 'adt' - short for advancedDynamicTexture.  AdvancedDynamicTexture is a basis for BabylonJS GUI "stuff"... sort of like a sheet of glass that can be put atop a mesh, or across entire screen.  Then we paint GUI "controls" onto that glass.
    That playground will get you started.  Both BJS GUI and BJS ActionManagers... are very powerful and versatile.  Take the time to read/experiment.  Look at the demos/playgrounds in the docs... they inspire more ideas.  Soon you will be expert.
    Ask more, if needed.  Make a playground to show us stuff, if you wish.  We'll be here. 
    If solved, mark this thread solved, please.
  11. Like
    Sebavan reacted to trevordev in How to randomly clone billboard instances onto a mesh ?   
    @jsauca here's a playground that might help get the triangles https://playground.babylonjs.com/#KWSAU4#1
  12. Like
    Sebavan reacted to Luaacro in Skymaterial and Elevation of Camera   
    Hey @luan_ngo,
    Pull request just created: https://github.com/BabylonJS/Babylon.js/pull/5597
    Updating the doc ASAP. Anyway, to keep your horizon at position 0 on Y, just setup the property .cameraOffset on the material which is a Vector3.
    Example:
    skyMaterial.cameraOffset.y = scene.activeCamera.globalPosition.y Don't hesitate if you encounter a bug!
  13. Like
    Sebavan reacted to Limes2018 in How to save & import project?   
    @Luaacro Thanks! I added another blog post about BJS editor.
    BJS itself is not so popular in Japan. I'll share the good points step by step. I'll waiting for your updated documentation!
    https://www.crossroad-tech.com/entry/Babylonjs_Editor_ParticleSystems
  14. Like
    Sebavan reacted to Zuzuk in Count LOD distance from camera target   
    Thanks a lot! Everything works perfect
  15. Like
    Sebavan reacted to yzthr in Camera rotate to the nearest destination   
    Hi, Wingnut! So nice of you!
    Your PG inspired me. You use animation to your box in PG. So i think it will be possible to use animation in my camera. I find a topic about ArcRotateCamera animation, it's very useful.
    As to the problem of smallest angle to rotate, we can determine whether the rotation angle larger that PI(L105-125). Then  i use the function in ExecuteCodeAction and it works.
    Here is my new Playground. may be it will help somebody.
    And I think that camera.lockedTarget act incorrectly. It acts like camera.setTarget but not "locked to" mesh.
  16. Thanks
    Sebavan got a reaction from Dad72 in Variable reassign when moving meshes, cameras, lights...   
    You need to clone if you record the info or record the individual components (x y z for instance): https://www.babylonjs-playground.com/#XCPP9Y#747
    Position and other containers are not recreated on every frame to save GC. That means everywhere in the framework, we are using the toRef functions.
     
  17. Like
    Sebavan reacted to OzRamos in Interactive facial expressions of my housemate   
    Hey @ozRocker thanks for putting this project together, I've been studying and learning quite a bit from it! I've been working on a library called Handsfree.js  (based on BRFv4) and one of the things I'm researching is "puppetteering":

    I'm still figuring everything out, but here's my work in progress:
    Code: https://glitch.com/~anniemorph
    Demo: https://anniemorph.glitch.me
    I don't have much documentation yet for this specific experiment, but you can see how I'm doing it in /starter.js. Basically I calculate the distance between the mouth corners and adjust the morph influences by that amount.
  18. Like
    Sebavan reacted to ozRocker in Interactive facial expressions of my housemate   
    and my patient housemate.  First time I scanned her for 2 hours but I forgot to put the dots on her face for reference points, so I had to make her do it again
  19. Like
    Sebavan reacted to NasimiAsl in Create sphere from height map?   
    if you change the canvas container look line 14
    https://www.babylonjs-playground.com/#1ZEABJ#196
    and set new size in line 35
     but after change you need save playground and load them again ( for clear html ) 
     
  20. Like
    Sebavan reacted to brianzinn in Load gltf from data file error   
    try like this
    https://www.babylonjs-playground.com/#1AbIIF#10
  21. Like
    Sebavan got a reaction from Wingnut in Anaglyph cameras and setTarget()   
    Thanks for the link change @Wingnut You did well by changing it I do not mind at all (that s the full power of the community 🙂 )
     
  22. Like
    Sebavan got a reaction from Wingnut in Anaglyph cameras and setTarget()   
    Just an optical illusion : https://playground.babylonjs.com/#TJTYGR#8
    You can see that looking further or closer on the same plane, it gives the feeling that things are moving around.
  23. Like
    Sebavan reacted to entropy in Anaglyph cameras and setTarget()   
    Thanks for all the replies. I've done some addition testing and come to the same conclusion as @Sebavan: setTarget() sets the plane of the screen. What was originally confusing to me is I'm using getTarget() of one camera as the input of setTarget() of another camera...something like:
    camera2.setTarget(camera1.getTarget()); The problem was that getTarget() always returns a vector that is one unit away from the camera position. This was resetting the screen plane of my anaglyph camera. Now what I scale the target vector like
    var v1 = camera1.getTarget(); var v2 = v1.subtract(camera1.position); v2 = v2.scale(20.0); before using it to set the target of the second camera. It all works as expected, now!
  24. Like
    Sebavan got a reaction from NasimiAsl in Create sphere from height map?   
    @NasimiAsl I was thinking to create the function without he dependency a little like the create ground :-)
    Would it be possible ?
  25. Thanks
    Sebavan got a reaction from entropy in Anaglyph cameras and setTarget()   
    Just an optical illusion : https://playground.babylonjs.com/#TJTYGR#8
    You can see that looking further or closer on the same plane, it gives the feeling that things are moving around.
×
×
  • Create New...