kgj Posted May 28, 2018 Share Posted May 28, 2018 Hi all, I have been playing with Babylon in an attempt to create some browser-living simulations, e.g. "interactive permanent magnet electricity generator to help in the visualization of flux". The syntactic feel, playground examples, and this community, everything has felt awesome. But, I have really struggled in (story to let you seniors have a sense of my level): 1. creating a 3D vector field (my grid-based euler-integral curve drawing algorithm was crashing the browser; got it partially working by copying starting points approach from here: https://github.com/matplotlib/matplotlib/blob/master/lib/matplotlib/streamplot.py 2. I am having trouble in creating a simple fixed viewplane and fixed camera 2D view. (This is noob, but confidence denting, if I may say that) So, my questions are: 1. Is Babylon the right tool to create educational content inspired physics simulations, and lightweight games (user interactions + scoring + webapp data bindings ) around it. Or, is it an overkill? Is something like p5.js more apt for my purpose? 2. Should I be using phaser for (strictly) 2D environments? If I should, would using Babylon and phaser hurt code (e.g. say having a single script file for air drag force )? 3. Is "Learning Babylon" book a right start (it's lagging in the version support)? I am kind of lost in the jungle; please bear with me not being to the point. And I hope this forum will be kind enough as usual to point me to the right resources. P.S. I am willing to pay for book/resources, if you have anything in mind. Also, I would prefer "getting in the run" asap, if that's possible. Thank you all! Quote Link to comment Share on other sites More sharing options...
JohnK Posted May 28, 2018 Share Posted May 28, 2018 Hi @kgj and welcome to the forum. Wow what a question. I am currently on mobile so my answer is limited. The first thing to consider is how important working in 3D to you? Question 2 suggests that 2D is the way you are generally thinking. If lots of your work is 3D with just some oppotunities to view in 3D then Babylonjs is the way to go. You could possibly use the orthographic camera without attaching it to the canvas for your fixed viewport. If you generally want 2D views, even if 3D scenes, the something like phaser. For a 3D vector field with unit vectors (a, b, c) through points (x, y, z) which are the centres of a 3D cibes of size L then one possible way to show this is to extrude a circle along a line through (x, y, z) in the direction of (a, b ,c) scaling the size of the circle to give an arrow type thing http://doc.babylonjs.com/how_to/parametric_shapes#extruded-shapes kgj 1 Quote Link to comment Share on other sites More sharing options...
Guest Posted May 29, 2018 Share Posted May 29, 2018 Generally speaking: 1. I think so as long as you want something in 3D We are here to help btw 2. Merging both can work but I think this is a bit overkill 3. It is a good read for a beginner and as we keep backward compatibility all code should still work kgj 1 Quote Link to comment Share on other sites More sharing options...
kgj Posted May 29, 2018 Author Share Posted May 29, 2018 @Deltakosh I know that you are the God Have so much admirations for your service, as well as community development. Thanks I hope to move to 3D mini-games and so I think Babylon should be it (until my ideas shoot themselves), and the journey would be much easier with you guys. @johnk Thanks a lot for such an elaborated and kind reply. I think since I have to generally allow 360 views, to facilitate imagery, I will go with 3D in Babylon. And I sure will be working with those inputs on orthographic camera, and extruded shape. Thanks P.S. I have started again with the introductory book "learning babylonjs", and it feels better. I hope my next questions would be more precise in the coming days! Quote Link to comment Share on other sites More sharing options...
Guest Posted May 29, 2018 Share Posted May 29, 2018 No worry! happy to have you with us! kgj 1 Quote Link to comment Share on other sites More sharing options...
JohnK Posted May 30, 2018 Share Posted May 30, 2018 A simple 3D vector field, very basic but gives you an idea of what can be achieved. Hope your learning is going well. https://www.babylonjs-playground.com/#536W7J#0 Quote Link to comment Share on other sites More sharing options...
kgj Posted May 30, 2018 Author Share Posted May 30, 2018 25 minutes ago, JohnK said: A simple 3D vector field, very basic but gives you an idea of what can be achieved. Hope your learning is going well. Hi John, Did you miss to include any link to some field demo? Quote Link to comment Share on other sites More sharing options...
JohnK Posted May 30, 2018 Share Posted May 30, 2018 8 minutes ago, kgj said: Did you miss to include any link to some field demo? Sorry, yes I did. Now added. 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.