Jump to content

The Wingnut Chronicles


Recommended Posts

Hi gang!  Newbie Wingnut here again, hope everyone is well.

Here begins a massive "chronicle" of "Stupid Stuff That Wingnut Talks About".  It will get big and stale, but what the heck.

I goof around in 3dMax a bit, and I've seen their massive 'library' of procedural primitives/shapes, and one would think that BJS is destined to have every one of those, plus a few hundred more.  :) Thoughts, anyone?  Thanks!

Link to comment
Share on other sites

Good Idea, Wingnut!


We could make it a community project, each person creates one or several shapes, and the default texture should be a default grid

then we put it all into one script with the commend you offered, perhaps the parameters should be in String as well?


In the future, maybe the script version will rise according to the amount of shapes inside of it ? who knows... it might be a cool thing to do, when I have time I would try make something interesting for this if you guys up for it ? =]

Link to comment
Share on other sites

Hi gang!  Thanks for the nice comments so far.  And thanks for pointing out createGround, deltaK. 


Yeah, Ariel... community project FOR SURE because... writing these little dynamic meshmakers is well over MY head at the moment... but looks like it could be fun, eventually.  I took a look at the 'enemy' camp... https://github.com/mrdoob/three.js/tree/master/src/extras/geometries and he's got a few... some of which he sort of borrowed from Away3D folk.  Maybe we could talk him into letting us borrow his... as a starter pack (if convertable).  I also sent my buddy on a mission to gather all the maxscript shape generators from 3D Studio Max and convert them to JS for us, but he was less than enthusiastic about such an endeavor.  :)


Some of the 'extended primitives' in 3D Max... have quite a pile of allowed parameters, too. This potential future createGeometry() will not be able to 'carry' ALL the 'adjustings' needed for some of the advanced shapes.  So, the parameters included in the command to CREATE them... might only be enough settings to get the shape created and seen (scene? ar ar ar).  Other parameters/args could be set after the object is created... sort of like our particles feature. 


But all in all, yes, I think the collecting, converting, tweaking... could be fun... for a math nut.  ;)  Thanks again for the comments (more needed)... lets keep the project alive, or at least in-mind.  I love procedural geometry-making tools.  When a person can spruce-up (clutter up) a scene with JS calls instead of more model importing... that makes scene development faster and sweeter, and advanced mathematically-made geometry is pretty and interesting.  I'm not sure about making all the parameters be strings, though, Ariel, but the thought is worth sniffing-at.  Its just that SO FEW of the parameters to make geometry... require strings.  Its mostly numbers... which might be unfortunate... but still fact.  And yes, Ariel, I suspect the version number of BABYLON.meshlib (when/if one exists someday) could indeed change as different/more geo-makers get added.  Deltakosh and the BJS team... will surely weigh-in on these ideas, as I'm just speculating... and doing a lot of talking.  :)


PS: Dk, did you see an email from me via the 'owner of this blog' route/address?  Not sure if that works or if anyone ever reads mail/posts from that address.  Its nothing important... mostly about the copyright and republishing policies/rules for the tutorials and for BJS posts from your MSDN blog.  PARTY ON!  :)

Link to comment
Share on other sites

dk, you're SO kind and fast-answering... and smart, too.  What a fun system BJS is!  Thanks for making it.  I hope I don't become annoying, because, I'm pretty excited.  I've been heavily re-working the docs/tutorials for offline use... some 32 hours worth of html editing so far.  I read the docs themselves as I edit the html. Wanna see a sneak preview of things?  I knew ya did.  First, a document I call... the superpage.  It should look familiar to you.




This is what started the whole thing.  Firefox has a limit of 8 webGL contexts per page, and 16 for the entire browser.  Since your powerful MSDN post has some 10-11 iframed-in webGL contexts, and since FF bumps the oldest contexts, the first 1-2 of your webGL demos... gave us blank white rectangles... even though we were webGL-ready and had 8 or 9 other webGL's running. 


SO... since it was a great post, I needed to take it home, clean out the unneeded ads and crap... and remake it... where each demo opened in a new window via buttons (eliminate the iframes).  That's the reason for 'superpage'.  Its a HOT HOT HOT introduction to BJS.  Get's ya goin' RIGHT NOW... just as it should.  (You're a hero of mine, ya know?  I am just honored to death to get to chat with you... and you're very kind to me and other posters... thanks.)


But, it didn't stop there.  The tutorials had some of that same 'tweaking' needed.  The code examples from my 'save entire webpage'-gotten MSDN posts and blatant raping of the github tutorial pages... were in PRE tags, and full of unnecessary colors and BS.  So I tried XMP tags for the code examples instead, but when ya pasted code from an XMP-wrapped code example, it lost its line breaks in wordpad and other text editors (I use Boxer text editor... it rocks).  The code would paste as one continuous line... no good for teaching/code-rape. 


So... textarea.  In fact, textareas inside of form elements so maybe my hacked html could HTML-validate someday.  It looks ok, I guess... both on FF21 and IE11.  (all the demos work beautifully in IE11 by the way.  That is just TOO TOO cool!!!)


So, all that crap aside, want a sneak peak at the all-in-one supertutorial?  I knew ya did.  Its only done thru chapter 12.  Users... don't take this yet.  Maybe soon, I and/or DK will hand it out to others... when its done.  Also, I took some liberties in some wordings and adjustments.  And, all the pics are unsized to natural and de-centered. MOST of the unnecessary HTML that came with my "save-entire-webpage" grabs of all these documents... got taken out for the time being.  Ok, here we go...




Rem, only done thru section 12... and things before that still being worked.  WHAT KIND OF IDIOT would put 23 sections of tutorial... all in one document?  What, are ya DRUNK, Wingy?  :)


Other readers... don't take copies of either of these documents yet, or ever.  Don't bookmark them, because they won't be staying there.  I MIGHT zip them up and offer them THAT way, but, they don't get refreshings by the BJS team when they are at your home on your hard drive.  BJS is evolving and growing, so stick with the OFFICIAL BJS docs for now... or forever.  The above docs are just... Wingy being an idiot... at least for now.  :)


Ok, should we keep going here?  Why not, huh?  So (I say that often, eh?), I'm firing up the particle demo (from chapter 12 zip) (too cool by the way.  Particles look like LOTS of fun... I can't wait to get to play more.)... and I think... why would anyone use a 'texture' on particles?  And why would anyone say that particles are not 'heavy' (resource-intensive)?  What I came-up-with for answers... is that BJS is not really spraying polygons... but more like un-animated sprites, eh?  The first thing I tried to hack on the demo... was to remove the texture, and use a color4 in its place... but no.  Then I read a bit further and see...


// Colors of all particles (split in 2 + specific color before dispose)
particleSystem.color1 = new BABYLON.Color4(0.7, 0.8, 1.0, 1.0);
particleSystem.color2 = new BABYLON.Color4(0.2, 0.5, 1.0, 1.0);
particleSystem.colorDead = new BABYLON.Color4(0, 0, 0.2, 0.0);


I said to myself "hunh"... there's a texture AND colors.  So are we shooting polygons or sprites or what?  CAN I shoot colored boxes (mesh)?  How about randomly-colored toruses?  Can they tumble instead of just rotate?  Could 'chaos' and fuzzy logic get involved?  How about particle collision?  What happens when I draw a blue square on a white background, save as .png, and alpha filter out the white... or make the white transparent via saving as a transparent .png?  Will it LOOK like I am shooting cubes?  If there IS no particle rotation set, will the particle always face me?  Could I ask any more questions?


I suspect that... IF we were allowed to spray mesh/polygons, especially textured ones... the scene could get heavy (resource intensive).  I have lots to learn and read yet, but if you're inclined and not reclined :) ... I'd sure welcome a bunch of talk about the particle system... and I'd be glad to include some of it in that master tutorial... which you can consider yours... and easily bust up into separate documents again because its demarkated in the raw html and very few styles are used.  But, particles is a powerful section, and although section 12 of the tutorials is well written by you, there's just SO many things that can be done... SO much experimentation allowed...  potentially DAYS of demented experiments and fun... and the system works GREAT.  Its fast... its pretty... it works every time as long as one doesn't get too demented.  :)


So (there it is again), ANY comments on the particle system... are most welcome at this time when I work on that section... often changing some explanations.  I have a feeling that english is not your native language, DK... and that's ok.  (thanks for learning my native language... I'm honored). Your wordings are quite enjoyable to read, and I left plenty of them in my version of the tutorials.  No offense meant at all, DK.  You shouldn't even have to write the english tutorials, or ANY tutorials.  You wrote the friggin' engine (and nicely).  I think you could use an english idiot like me... hanging around.. if not just to think up maniacal things to torture BJS with.  :)  I hope to be of SOME use to the project, somehow... glad to do it, and again, I'm honored to be able to have the author...  a chap I consider a genius... this nearby/accessible.


I also took some liberties in a paragraph about collision, and did some labeling of a collision picture (section 10).  I made a paragraph that starts with 'aw heck'...  feel free to tell me if there's a mistake in that.  I suspect that an invisible sphere around a point collision... COULD have a mesh-mesh collision event set on it, yes?  I didn't test it... yet.  Opinions on that paragraph... and everything seen so far... definitely welcomed...  begged-for.  :)


Ok, I'm back at it.  Its my birthday, so I'm going to take the rest of the evening off-work (on the html), and make pretty particle sprayers.  :)  Thanks again, dk and team.  FUN!!!



Link to comment
Share on other sites

hehe you're surely not an idiot:) And you won the "Most Long Post Ever" prize :D


Your assumption is correct, English is not my native language but I make my best to try to learn it.


About particles: you can control particles if you want because there are represented by an array of BABYLON.Particle on the particles system. They are meshes (quad to be precise)


I appreciate a lot what you did and I encourage you to continue on this way!! The best thing for me to help you will be some kinds of bullets lists with all your questions :D

Link to comment
Share on other sites

Oh boy Wingnut~!!  :lol:


That sure is the longest post in the forum, taking lots of things off the chest hehe


Nice seeing some enthusiasm around, and about the String thing... I just suggested that in case some objects need more then just position and size,

lets say a "Tube" object... you need a position, azimuth, elevation, roll angles... inner caliber and diameter, that's just for starters...

then you would like to texture each part so you need to get some sort of an Array of meshs... and I didn't even talk about normals... if they are manual set or automatically set...


so String is a nice newbie feature to insert data, we could just use an Array for the same reason, I wish we could have intellsense it could be usefully in

explaining people the structure of these objects...


btw DeltaKosh, if we have your attention, how about some upgrade to animation ? :P

like some way to know on what frame we are and have the option to go back and forth in the animation sequence...

right now if I want to use the same mesh for animation I need to kill it and create it again with a different animation - yes I tried to kill the animations

in the animation Array and start the sequence with no success yet, perhaps I was sound it wrong, before...


btw about loops of animation, did you know that animations work EXTREMLY slow on IE11 ? even on win8.1 64bit

benchmarked it using the debugger in IE11 it complained alot about Babylon.js Animation Loop  :D

Link to comment
Share on other sites



could you give us a sample scene to check this performance issue ?


About new features, we are working on a new way to define customs functions for animations interpolation :)


If you want to control precisely animations right now, you have a an array for that on the scene: scene._activeAnimatables

Link to comment
Share on other sites

To be more complete about next version:

BABYLON.Animation will have a new property : currentFrame


You will also be able to set the interpolate function through:

  • BABYLOn.animation.floatInterpolateFunction
  • BABYLOn.animation.vector3InterpolateFunction
  • BABYLOn.animation.quaternionInterpolateFunction
Link to comment
Share on other sites

Hi kids... good to see this rolling conversation about anything... happening...  hope everyone is doooooon ok.


If anyone is bored, take a look at this still-pic of Flat 2009's kitchen...




There's some kind of animated ecrans coming out of the sink, and they don't look healthy at all.


What's an ecran, you ask?  Me too.  In section 14 of the tutorial...




...in the 'video' subsection... there is this...

ecran.material.diffuseTexture = new BABYLON.VideoTexture("video", ["Scenes/Flat2009/babylonjs.mp4", "Scenes/Flat2009/babylonjs.webm"], 256, scene, true);

Does anyone know what that 'ecran' is referring-to?  Its sure to confuse 'noobs' because... I'm one, and I am confused.  I also saw no video on the flat screen... am I supposed to?  But it sure is a pretty scene, huh?  *nod*...  'cept for them unwanted ecrans flying out of the sink drains.  ;)


I think maybe my gramma used to wear an 'ecran' in place of a girdle sometimes and... no... maybe not.  :)  Any info would be cool... and lets get that demo fixed, girls.  :)  thx!  And not a single attaboy about the killer particle sprayer linked-to at the bottom of my megapost.  pffft.  That's a pretty sprayer, kids.... belongs on the 'third party demos' part of the babylon.js main page, I think.  Maybe.  Its just a slight modification to the particle sprayer that comes with the tutorials... so maybe not.  :)


One other thing I might have seen.  MAYBE... IE11 lets you mousewheel into the emitter area of my god-like particle demo, and maybe FF21 doesn't.  Someone can investigate that if they are so inclined.  We'll talk about the "jet thrusting" of up-cursors in FF scene walking... another day.  Whiplash, kids!  But it IS cool how we automatically step 'around' the furniture.  You agree?  I knew ya did.  :)  Gettin' sick of smilies?  Me too.  ;/


Update...  ahh yes, écran is the French word for screen, wallpaper, curtain.  Ok, so that IS what my gramma wore instead of a girdle.  hmm.  Thanks Google translate!

Link to comment
Share on other sites


Thanks dad72.  Le mans France, eh?  FAMOUS town!  I so wish I had the funds to travel.  I'd love to see France.  Sigh.  Anyhoooo, the .ogv version of the video seems to be missing from my download of the entire github repository (via the zip'n'suck feature of github).  Understandable, since its not in the github folder...




And since that's the case, I have a feeling that babylonjs.ogv is not referenced in the Flat 2009 BABYLON.VideoTexture args/params either.  Is that video file still around or was it EVER?  If so,  babylonjs.ogv should probably be put onto github next to the mp4 and webm versions, and Flat 2009's VideoTexture element should include it as the last fallback.  We want these demos to shine just as brightly as possible, yes?


Speaking of fallbacks...  I think the b.VideoTexture() command SHOULD allow animated gifs and pngs, and even still pictures... AS FALLBACKS.  In the case of the Flat 2009 demo...


b.VideoTexture("video", "blah.mp4", "blah.webm", "blah.ogv", "anim.png", "anim.gif", "stillpic.jpg", "any babylonJS material obj name")


See what I'm saying?  Here I'm using 4 fallbacks... IF no video can be played.


Maybe only ONE fallback. IF no video can be played, play SOME babylon material... sprite, stillpic, texture, color.  Search for it by name, and if name lookup fails, bjs engine builds a material to put there anyway (by default).  It might ALREADY do that, I don't know. 


Colorbars material?  TV test pattern?  :)


Safety nets.  video fallbacks.  Possible?  Do it this way?  Thoughts?


DK:  Yeah, I knew they were untextured particles.  Hope you got a laugh from my post.  Looks like you did.  I hereby proclaim... that the official english word... for untextured panels (error 404's) that sometimes are seen coming from particle emitters (accidentally, of course)... is to be...  'ecrans'.  Screens.  A particle emitter spraying blank panels... is officially called "ecranning". hehe.  Each blank panel... an ecran.  It will now be put in the history books.  The english word 'ecran' (based on the French word) was invented this day, by deltakosh (I don't want MY name on anything, so its all yours, David. haha).  Flat 2009 has an ecranning problem. haha!  I love it.  Its going to stick.  Well done inventing english words, dk!  You're a hero!


Le mans.  Coooooool. 


DK... I have a huge post coming-up about relative positions/transforms and how that's related to 'grouping' and about adjusting pivot points OF groups, and gizmos (group handles/parents) and and and and...  WHO besides me is going to make the 'propeller demo' to demonstrate it all? 


In my opinion... there is not enough in the tutorials... about grouping (relative positioning).  Just get some flunky other than me... to build the propeller demo... a cylinder and 4 planes... and maybe a parent (gizmo) (if not the hub of the propeller) and then show how moving the gizmo/parent around... sets the propeller's center/pivot point... and spin the propeller every time we change the center point... to show the users just how badly a propeller group CAN spin... etc.  We need a cool grouping demo, and a propeller is the perfect theme, I think.  Hurry up.  :)  Let's spruce this place up! 


I once built a 3D Max demo of 10 particle sprayers side by side... grouped into a long 'bar-o-sprayers' and then I rotated the whole bar and moved it thru space.  It looked excellent.  I'll probably do a version of it in BJS, soon.  FUN!!!


Kids, if ya take the link to 'my' master tutorial again (now more finished)... from my megapost... its got a pretty new graphic at the top of it.  I like it.  ;)  Thanks for the replies!  Party on!


Link to comment
Share on other sites

Hi again, ladies!  I've been thinking more about the difference between parent and gizmo.  They have to be different... I think.  I was confused, earlier.  For example, if a gizmo (for an object) is rotated or translated, the slave object just matches it, one for one.  Yet a gizmo, if viewable... will often need to be offset translation-wise... away from the slave/target object.  A good example might be... a throttle controller on a basic lawn mower.  Rotate the throttle controller on the handlebars, and the valve on the carburetor (on the motor) also turns. The throttle controller is the gizmo for the carb valve.  But this has nothing to do with .parent... OTHER THAN... gizmo would allow a translational (and possibly rotational) offset.  The gizmo is a controller, and sometimes... it won't be in the same part of the scene... as its target/slave.  Weird.  This might be important for gui, too.  There is a 'knob' on the dashboard of the gui.  Pick an object out in the scene, then drag the knob/slider... and the object in the scene turns or translates as well.  *shrug*


PARENT, on the other hand... THAT term could indicate ALL SORTS of things... not just translations.  It could mean... the 'child' inherits the material of the parent, for one example.  So really, I don't think .parent is the right property name for a translation controller/proxy.  I think it should be .group property.  (This must be doubly difficult when English is crammed down one's throat and up one's a**, huh?  Sorry.)  And I'm sure not educated about JS inheritence whatsoever... speak nothing of what inheritence means in a 'scene graph' sense. 


HARD THINKIN'!  For maximum power... I think .group, .gizmo, and .parent all need honoring... but oh my God, what a mess.  For example, can a gizmo be grouped?  Can a groupmanager have a parent?  See, if a group(manager)... has a gizmo, then rotating the gizmo... rotates the group.  Yet an object IN a group, can have its own personal gizmo.


A TRUE group... will be bounding-boxed together... summed... and a new center/pivot is determined by re-calc.  If a parent or gizmo is a real piece of geometry, it could/not be physically (translationally) inside the group (within the new summed bounding box).  That would have to be known, before BJS could calc the new bounding box of the group.  Include parent in group?  Include gizmo in group?  And of course, what's easy to forget... is that one can write specialty custom routines to treat groups and gizmos in any way the author wants, because its just JS. Custom funcs are easy, especially considering BJS has lots of scene tools to help a person do custom funcs, too.  BJS can become unnecessarily overloaded with rarely-used features, I suppose. Such thing used to be called "creaping featurism".


Just rattling on, here, pondering.  :)  I should probably lay off the 420, eh?  ;)


Link to comment
Share on other sites


Thanks dad72.  Le mans France, eh?  FAMOUS town!  I so wish I had the funds to travel.  I'd love to see France. 


Yes, le Mans is the city of the 24h of motorcycle racing, car and truck. ;)

I wish you to visit France, which is a beautiful country. :)

Link to comment
Share on other sites

Hi gang!


  New document being worked-on...




Ignore the JS... its just there to be eventually massaged-into showing the user-callable funcs (and args), and the user-settable and user-readable properties.  Maybe someday, a little info on each, too.  I sure wish someone made a tool to automatically glean thru a pile of JS and make something close to an API page, but I couldn't find one.  So this is a 'manual updated' file... and still far from done... if ever.  But it IS painful to make, and I love pain.  :)  Take care.

Link to comment
Share on other sites

Hi Gang!


I've been trying to steal the physics demo... so I can fiddle with it... and its booting fine, but my balls keep falling through the floor... and we all know how painful THAT can be.  :)




Its in a folder, 145 KB... all the pieces are there, I THINK.  physics.htm is the booter, of course.  That's babylon.js 1.8.0 included.  Its all from a github master directory download earlier today.  If anyone has a moment, might anyone want to try to figure out why my balls won't bounce?  THANKS!  I'm going to work on something else for awhile... as my brain hurts.  :)  Best regards!  Wingy


PS: It works correctly.. about... 5% of the reloadings.  strange.

Link to comment
Share on other sites

Yes, of course.  How would it work 5% of the reloads without it, pray tell?  To make it clearer... it works near-correctly... SOME of the time.  Even when it DOES work... the click-on-balls is still broken... but I haven't troubleshot that yet, as I need the balls to stay in the scene long enough to test the clicking.


I take it you didn't grab the zip?  ;/


Sorry if I seem grumpy.  DK can we PLEASE PLEASE PLEASE have each of the demos on the babylon js website... made into standalone, downloadable zips?


We really want to fire-up our own copies of these demos, and adjust things and watch what happens.  That's how MANY of us learn.  Over on the GameFX blog... a chap named Octave has been waiting over a friggin month to get a response to an XHR problem that is caused by trying to make his own Omega Crusher demo as a separate folder. 


I tried all my secret ways... failed.  Anything that is in a .babylon file... just fails to load... offline.  NOT GOOD.  REPUTATION KILLER.  Error log shows "error: 0" and "not well formed" problems in the manifest.  Scene hangs at "loading 100%".


PLEASE?  Package them up in stand-alones that we can get running at home?


Octave should have NEVER been left ignored for over a month on the GameFX blog.  That's just bad.  Are those people friends of yours?


Does anyone besides me... see the ecranning problem in Omega Crusher?  See the big white squares flying around, making this demo look like crap?  How long has THAT been like that?  FIX PLEASE.  You want me to spread the word about BabylonJS?  Well, don't make me look like an idiot when I tell everyone how cool it is... when 40% of the online demos have 404 errors on their particle emitters.  Do I dare try any of the other online demos? 


At least the train works right, and so does YOUR version of the physics demo.  My copy... not so good... but at least the public isn't seeing mine.  But even in YOUR online version of the physics demo, do you see the balls going THROUGH the walls sometimes?  I do.  And... if you run MY version of physics demo, or turn off the physics and let the spheres and boxes fall through the floor, you might see that there's a bug in the shadow generator, too.  There is sometimes shadows on the floor, even after all the spheres and boxes have fallen through the floor.  Sometimes.  Inconsistencies.  We need to take notice, I think.


Best regards... sorry about the xmas grumpy-ness. :/  Happy holidays everyone.

Link to comment
Share on other sites

We cannot create standalone version of the scenes because of security reasons

When we use XHR, we need a web server to serve the files. It CANNOT work locally ans this is not our fault :) THis is related to security restriction enforced by browsers


I'm really sorry for Octave, but I do not track the GameFX blog (This is handled by @davrous, you can reach him on twitter).


I'm aware of the fact that sometimes the balls go throught the wall. This is a known issue (I discussed that point on twitter :)) THe next version will fixed it. This is related to your computer performance that may be too slow causing long delays between frames.


For shadows, this is a "normal" behavior of variance shadow maps (VSM). If you want to remove this artifact, please use shadowGenerator.useVarianceShadowMap = false


FInally please do not forget this is a community open source project, you cannot expect the quality of a paid project :)


Happy new year and merry Christmas!

Link to comment
Share on other sites

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.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Create New...