adam got a reaction from zeus2198 in How can I make two physic objects ignore each other
OIMO does it like this:
You can edit shape.collidesWith and shape.belongsTo in an oimo rigidbody:
adam reacted to trevordev in AmmoJS support
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.
Support for motors, soft bodies, other ammo specific features are not yet supported so yell if you need anything specific for your project.
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
adam got a reaction from servusdei in Get size of mesh while taking its children into account
I think I figured it out:
There is a minimumWorld and maximumWorld in BoundingBox.
adam reacted to jerome in Dynamic Terrain
Please have a look at this better demo : http://jerome.bousquie.fr/BJS/test/terrainSP2.html
- map : 1000 x 1000 points map
- 66511 random particles fixed in the SPMap (well more than 66K)
- terrain : 100 x 100
- sps : 2000 boxes, 2000 spheres, 2000 tetra (it can works with 500 of each if we don't get in altitude to see in the distance), so 6K real particles maximum
So we can manage 66K objects from the map with only 6K (or less, if no LOD) real objects automatically recycled.
not sure the LOD is really accurate with the particles ... (edit : I'm sure it's wrong actually)
adam reacted to Tomm Huth in Is Babylon.js for me ?
@Deltakosh If there is concern around playgrounds not working, then that seems to be very much already the case. If I find a playground at least a couple of years old, there's a 50-50 chance they break, and it happens very frequently. The playground desperately needs:
- Defaulting to most recent stable version.
- The option to set any previous stable version
- Saving that chosen version along with the playground, so that in two years time it will still run, because its's not being auto upgraded.
adam reacted to dbawel in I Love This Forum
Hey Devs and All,
I'm just feeling a bit sentimental about how far this forum has come the past 4 years. @Deltakosh and @davrous ( + others) have given us a creative outlet that has turned into a new frontier. I just wanted to say how much I appreciate that I am able to come to a place that provides me not only technical advice, but I've made many new friends as well. Much love to you all.
adam reacted to jerome in SPS experiments
Let's go on now with the WASM SPS.
First remember the former tests on a 40 K solid particle SPS and the perfs I get in my Chrome :
Legacy SPS : http://jerome.bousquie.fr/BJS/test/spsReference.html (8 fps)
Lighter Buffer SPS : http://jerome.bousquie.fr/BJS/test/spsBuffer.html (7 fps)
Two worker SPS : http://jerome.bousquie.fr/BJS/test/SPSWorker/twoWorkers/spsProtoWorker.html (37-42 fps)
and now the WASM SPS : http://jerome.bousquie.fr/BJS/test/SPSWasm/spsWasm.html (31 fps)
This last version has done with AssemblyScript like explained here :
It's the Buffer SPS version ported to AssemblyScript, then compiled in WASM. It brings a gain of 4.4 more speed
You can get the AS source here : http://jerome.bousquie.fr/BJS/test/SPSWasm/index.ts
Please let me know how this behaves in your browser.
Note that WASM is compatible with workers and that a double-worker-wasm SPS could be implemented... not sure I'll do it because it's quite complex.
[EDIT] : a test with 20K particles runs at 60 fps here. So I guess that a two-worker implementation, each computing 20K in wasm, could also run at 60 fps for a total of 40K particles.
adam got a reaction from Deltakosh in Finding the real world position of a vertex that is driven by a joint
Here's an example:
adam reacted to Rodrix3 in Recording Babylon to Video; video animation is faster
Hi guys! The initial code posted and ccapture was from my thread.
@klaude have you used ccapture or the playground I posted? I wasn't able to fully port ccapture into Babylon and test to be able to specify the target fps and be in sync. Were you finally successful? and if so can you please share your PG?
@Deltakosh and @Sebavan does the solution in implementation allow recording to mp4/ webm/ or photo frames in a constant fps without lost frames?
I am interested in recording high quality video. With ThreeJs and ccapture library I was able to render at 4K at 60fps, if I wanted (script would render every frame in slow motion locked at the target fps)
Looking forward to the news
adam reacted to Sebavan in Video Capture of your BabylonJS app
It has been a while since I pushed a new cool feature so here it is: http://doc.babylonjs.com/how_to/render_scene_on_a_video
In the same way you could easily create screenshot of the canvas, you can now record a video of video in a couple of lines. If you even feel that it is too much, you can directly record from the inspector.
WARNING: This only works in compatible browsers and can only generate webm as it is the only supported format so far. So please, have fun with it and we ll look at increasing the support on demand.
adam reacted to The Leftover in Illuminated City
This is wobbling to market. Crime analysis tools: prototypes built on open data.
The "strive" was for great presentation fast, slicing a lot of data in many useful ways. I started with SVG - and still use it for conventional charts. A lot of the data is presented on a map. In January, I elected to dispense with Google Maps and put the whole thing on a Babylon Canvas. I already felt late so it has been an intense period. Images are below and you can use it at https://sanfrancisco.ca.illuminated.city, https://chicago.il.illuminated.city and https://boston.ma.illuminated.city. The 3d part is called "geo-location". (You may need to sit and the landing page for a few counts before trying to navigate.)
Thank you all for making Babylon. It has changed my life. Also, a shout out to JohnK for suggesting SPS, which have served me well.
Comments, suggestions, conversation all welcome.
~ I applied scene.pick to allow the user to enumerate details of crimes in a specific area.
~ Chicago is mammoth, with about 400K crime records and a bazillion hexagons, but it still works
Image 1: Assault and Battery in San Francisco for the past three years.
Image 2: Theft from motor vehicle. Color indicates increase/decrease; elevation indicates current level
adam reacted to xtreemze in Defend
One question I have is how the projectile rotationQuaternion is cloned. It seems to follow the lookAt() quaternion from the origin tower even after the quaternion is cloned. How can I ensure that the rotationQuaternion is not linked to the original quaternion it is taken from? This causes problems when a tower shoots a projectile and then rotates to target another enemy. The previously mentioned projectile rotates in midair still copying the rotation of the tower.
Here's the relevant code taken from line 53 of https://github.com/xtreemze/defend/blob/master/src/js/main/projectiles.ts
const clonedRotation = originMesh.rotationQuaternion.clone(); clonedRotation.normalize(); projectile.rotationQuaternion.copyFrom(clonedRotation);
Comments, questions are welcome!
The project is hosted here with open source: https://github.com/xtreemze/defend
View the project here: https://xtreemze.github.io/defend
adam reacted to brianzinn in TYPESCRIPT in Playground
I have been coding nearly 3 years almost entirely in TypeScript, so am biased. Once a project reaches a certain size, I feel that JS slows me down a lot.
I do agree that there is perhaps not a lot gained in TS playgrounds as they are essentially snippets and I feel that TS doesn't really shine until a project is medium sized. At the same time I feel this is a REALLY great addition, so thank-you @NasimiAsl - I would really like at some point to post my BabylonJS TypeScript code that does not compile without some trickery (ie: try converting http://www.babylonjs-playground.com/#1K0NSN#1) - and now we finally have a way to share!! This was not possible before in a PG, so there is something tangible gained by TS playgrounds.
Why not let people choose making playgrounds where they are comfortable and happy --- providing the opportunity for both seems like the right thing. I have a feeling anybody hanging out in the forum will learn TypeScript by osmosis, so that's a good thing too!!
Also, the TypeScript playground is missing examples, so maybe that's a good teaching tool as well to see the same examples side-by-side.
I hope not a disaster! You will find that it's really trivial to convert from TS to JS - just remove some syntactic sugar from variable/function/argument declarations. TS is just a superset of JS with optional typings