RaananW Posted October 24, 2015 Share Posted October 24, 2015 Hi guys,coming soon to the babylon.js near you - height maps using cannon.js! The image attached shows a prototype of the heightmap integration. There are a few problems to be solved, but 2.3 will have an impostor for heightmap (for now for cannon.js only). jerome, Wingnut, Samuel Girardin and 2 others 5 Quote Link to comment Share on other sites More sharing options...
Dad72 Posted October 24, 2015 Share Posted October 24, 2015 impressive and this is great. Quote Link to comment Share on other sites More sharing options...
RaananW Posted October 24, 2015 Author Share Posted October 24, 2015 First version is finished! https://github.com/BabylonJS/Babylon.js/pull/778 For now only works with ground meshes created from heightmap images. Coming soon - any surface is a heightmap. Dad72, jerome, Wingnut and 1 other 4 Quote Link to comment Share on other sites More sharing options...
Wingnut Posted October 24, 2015 Share Posted October 24, 2015 Roller coaster time! Just one tiny applyImpulse, and the coaster goes for 3 weeks without re-impulse! WOW! How many shades of gray are there? That's how many steps the Slinky/sphere will need to traverse. Actually, I just want to put some marbles in a bowl, for now. Any surface is a (potentially physics-active) heightMap (soon), eh? Wow. That's a huge huge statement, Raanan! The insides of tubes, too? Too fun! Thanks for your work on this, R! Well done! Quote Link to comment Share on other sites More sharing options...
iiceman Posted October 25, 2015 Share Posted October 25, 2015 Is there documentation or a playground yet? I would like to see that in action! Quote Link to comment Share on other sites More sharing options...
RaananW Posted October 25, 2015 Author Share Posted October 25, 2015 Both are coming this evening. I'm waiting for the new version and the new cannon to be deployed.@wingnut - I'm already experimenting with other kinds of structures. But a height map impostor will only fit open objects (a bowl is a good example, or any open surface). The second limitation is that the physics will only be enabled for the upper part of the mesh. below the results are unexpected. I'm still working on making it as easy as possible for the developer and will then commit the changes. Wingnut 1 Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted October 25, 2015 Share Posted October 25, 2015 Both are deployed Quote Link to comment Share on other sites More sharing options...
RaananW Posted October 25, 2015 Author Share Posted October 25, 2015 Demo time!http://www.babylonjs-playground.com/#EXL6Ka mouse click will throw the balls in a random direction. I will create a better one once I fix the little bug (which is fixed with line 48). Once this is fixed (Shouldn't be long, I know exactly what the problem is) It is ready to be used :-) Dad72 and jerome 2 Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted October 25, 2015 Share Posted October 25, 2015 Lovely! Quote Link to comment Share on other sites More sharing options...
RaananW Posted October 25, 2015 Author Share Posted October 25, 2015 fixed, I will update the demo once the playground is updated :-) Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted October 25, 2015 Share Posted October 25, 2015 Updated Quote Link to comment Share on other sites More sharing options...
RaananW Posted October 25, 2015 Author Share Posted October 25, 2015 man, you are quick :-) http://www.babylonjs-playground.com/#EXL6K#1 Wingnut and iiceman 2 Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted October 25, 2015 Share Posted October 25, 2015 You too!! Quote Link to comment Share on other sites More sharing options...
Boz Posted October 25, 2015 Share Posted October 25, 2015 Waw ! The feature I wanted to see in Babylon! Good job ! I will do some tests but it already tastes good Quote Link to comment Share on other sites More sharing options...
RaananW Posted October 26, 2015 Author Share Posted October 26, 2015 Heightmap for ribbons Not yet integrated, still working on improving everything. Sorry for the low FPS, I am using an intel 4000 GPU (still waiting for my new laptop...) jerome, Dad72, iiceman and 2 others 5 Quote Link to comment Share on other sites More sharing options...
jerome Posted October 27, 2015 Share Posted October 27, 2015 you're the King ! Quote Link to comment Share on other sites More sharing options...
RaananW Posted October 27, 2015 Author Share Posted October 27, 2015 Yei! fun with heightmaps!http://www.babylonjs-playground.com/#D3LQDthe latest update allows you to use any flat and square surface as a height map. the ribbon in this PG is a wonderful example. A mouse click will release spheres and boxes for your viewing pleasure.if you have any questions, please let me know. As you can see, rotation etc' can be applied on the meshes, and update physics body position works as well. iiceman 1 Quote Link to comment Share on other sites More sharing options...
Dad72 Posted October 27, 2015 Share Posted October 27, 2015 I lag many on this demo Raanan. 8 to 10 FPS after 2, 3 click. Quote Link to comment Share on other sites More sharing options...
RaananW Posted October 27, 2015 Author Share Posted October 27, 2015 yeah, the meshes are very complex. Also 2 physics height maps are rather CPU-intensive.try this - http://www.babylonjs-playground.com/#D3LQD#1 i reduces the segments in the earth height map. Quote Link to comment Share on other sites More sharing options...
Dad72 Posted October 27, 2015 Share Posted October 27, 2015 It seems that when the spheres and box on the ribbon, the FPS is 30 FPS in average and it is on the map everything is 60 FPS. It's strange I should think otherwise, the forms of the card are more complex than the ribbon. Quote Link to comment Share on other sites More sharing options...
Dad72 Posted October 27, 2015 Share Posted October 27, 2015 There is a problem that did not exist before http://www.babylonjs-playground.com/#EXL6K Quote Link to comment Share on other sites More sharing options...
RaananW Posted October 28, 2015 Author Share Posted October 28, 2015 This bug was already fixed, http://www.babylonjs-playground.com/#EXL6K#1 Quote Link to comment Share on other sites More sharing options...
jerome Posted October 28, 2015 Share Posted October 28, 2015 Nice work although the spheres are never triggered on my old computer with Chrome, don't get why Quote Link to comment Share on other sites More sharing options...
RaananW Posted October 28, 2015 Author Share Posted October 28, 2015 The ribbon is a very complex object. Here is a simplified version of it:http://www.babylonjs-playground.com/#D3LQD#3Since the objects are gliding on it, their movement must be constantly calculated, this is the reason for the decrease in FPS Quote Link to comment Share on other sites More sharing options...
Dad72 Posted October 28, 2015 Share Posted October 28, 2015 Yes, it is perfect demo. between 50 and 60 FPS.Raanan thank you for this excellent feature. Do you reproduce the same for OimoJS? this engine was more efficient in comparison tests. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.