BitOfGold

Members
  • Content count

    205
  • Joined

  • Last visited

  • Days Won

    2

BitOfGold last won the day on November 7 2016

BitOfGold had the most liked content!

1 Follower

About BitOfGold

  • Rank
    Advanced Member
  • Birthday 11/27/1980

Contact Methods

  • Website URL
    http://www.bitofgold.com
  • Twitter
    BitOfGold

Profile Information

  • Gender
    Male
  • Location
    Budapest

Recent Profile Visitors

1,496 profile views
  1. Motion Blur available on Particles?

    @Luaacro I have seen some animation about speed buffer based motion blur: https://otakhi.tumblr.com/post/166606704295/per-pixel-and-velocity-buffer-based-motion-blur (This extremly unusable oTakhi page with very valuable videos and techniques... Lot to learn from)
  2. I think the issue is, when x and z is over the edge of the ground. getHeightAtCoordinates does not give you 0 result or something but an error. Does it give an error on the console?
  3. Calculating elliptical planet orbits

    No I didn't, it looks rad! It has even the famous moons. I even learnt some things about the solar system, like I never imagined the enormous Jupiter turns every 10 hours. Never imagined it so fast.
  4. Calculating elliptical planet orbits

    @Wingnut Hey An alpha version is more or less working now: https://www.bitofgold.com/solarsystem/ Saturn has no rings (yet), and it's hard to position the sky to the correct rotation. (the earth axis is near the north star, but other stars are not perfectly in the right direction...) I used only CC or free texture maps. I always wanted to do a planetarium or solar system model. It took less than a day. BABYLON is awesome!
  5. Calculating elliptical planet orbits

    @Wingnut: I'm doing my version of solar system right now. But I don't think I can get Neil Degrasse Tyson to narrate it from a silver spaceship... But who knows, the weekend is long and prosper(ous).
  6. Calculating elliptical planet orbits

    There is a cool lib for this: https://github.com/mgvez/planet-positions it returns Three.Vector3, but you can .copyFrom that to BABYLON.
  7. The most intreresting part of it is where they render the UV-light direction map: https://github.com/playcanvas/engine/blob/master/src/graphics/program-lib/chunks/fullscreenQuad.vert They just need to know at each lightmap texel, where it is in the direction of the light? So, it renders XYZ position in UV space. I've got now an itch do start again...
  8. I understand some part of it (not all) the recipe is: - for each light, from the light's viewpoint (with a camera!) render theese maps: - UV and normal direction map - depth map and combine theese into a RGBM (rgb with magnitude) maps. and then some processing of theese maps into textures.
  9. If you do it with babylon vectors and ray tracing in javascript, it is intensive. Lightmap and AO map, I think it involves ray tracing, distance fields and multiple light bounces. But, maybe not. I did not say it is not possible in webgl... Just that I gave up. But even playcanvas has lightmap baking, if someone understands it, it is surely possible in Babylon: https://github.com/playcanvas/engine/blob/master/src/scene/lightmapper.js
  10. One other thing comes to my mind but it is the same problem as the cascading shadows. If there would be more shadow generators per light(one for static objects, updated only when light changes (baked!), one smaller high detail map for dynamic objects, updated every frame) and, there would be an adding or a smooth transition between maps... that would solve shadowing without lightmaps. Maybe in the future
  11. In short: It's not easy and maybe not practical. You can bake lightmaps in Blender or other 3d editor. I tried and experimented with lightmaps, even contributed some lightmap function to combine baked lightmaps and dynamic lights/shadows. https://www.bitofgold.com/lightmaptest/ But after researching a while I realized that I cannot make lightmap baking fast enough in browser. I tried to render depth maps from every light source and calculating every lightmap texel for every light in 3d - but I can only do this on CPU. It would take several hours on a fast machine. (for just a plane!) And there is a mapping problem, easy to do on a plane but if you have a complex scene with many static objects, just optimally placing lightmap UV -s can be a really intensive probem. So someone has to invent something to do this with shaders. It's too much for me so I decided to abadon it.
  12. I like riddles... So I made a little logging here: https://playground.babylonjs.com/#9T2J6Z#7 There are many differences between box and box2. So if you want the box to land at the same spot, maybe dispose the physics body and make a new one with the same parameters.
  13. This is how I set up Cannon (low restitution and more solver iterations lower the vibrations that you mentioned): Theese are kind of optimal settings for Cannon.js (copied from here and there) Maybe this helps someone. this.world = new CANNON.World(); this.world.defaultContactMaterial.contactEquationStiffness = 1e6; this.world.defaultContactMaterial.contactEquationRegularizationTime = 3; this.world.solver.iterations = 20; this.world.gravity.set(this.gravity.x, this.gravity.y, this.gravity.z); this.world.allowSleep = true; this.world.broadphase = new CANNON.SAPBroadphase(this.world); On bodies, I set: body.allowSleep = true; body.sleepSpeedLimit = 0.01; body.sleepTimeLimit = 1.0; On the material: mass: 100 (or about the mass of the object in kilograms) friction: 0.1 restitution: 0.3
  14. @Samuel Girardin Hi! Yes, I need to have a collision callback when a body collides with another body. Cannon has this event registration like this: physicsBody.addEventListener("collide", function (ev) { var otherBody = ev.body; ... } And i also need objects that register this collision event, but do not modify any physics parameter. (I think they call it trigger objects in other game engines) Cannon has the .collisionResponse = 0; for this. I said "It maybe will miss important elements" because I do not know yet, I'm looking forward and excited to see it! I'm waiting to use Energy js, and if it has everything I need, and it is more performant than cannon (I'm sure it will be more faster!) I will try re-working my engine. I searched ODE documentation for callback, but only found this: void dBodySetMovedCallback (dBodyID, void (*callback)(dBodyID));