Jump to content

The Wingnut Chronicles


Wingnut
 Share

Recommended Posts

Hi kids.  It is time for an update on the landing gear physics joint progress.

For those not following, I am seeking a spring-loaded CannonJS hingeJoint... exactly like a standard door-knob joint.  Turn it either direction to an angle-limit, release it, and a spring returns it back to center.

There is a wonderful little demo of a spring joint... in the "Basic Physics Usage" docs.  

After staring-at it and thinking-about it for a few months, I realized that I NEEDED to determine... IF the springJoint was both an "extension" (expansion) device, AND a "compression" device.   With a slight modification of the mass and spring length of the original demo, I was able to prove that the springJoint is INDEED also a compression spring.

So, speaking fancy.... when a springJoint's "deflection" < length parameter, it is a compression spring.  Conversely, if the deflection > length, it is an extension spring.

And if CannonJS doesn't have a spring-loaded hingeJoint, then I need to create one.  How?  By using TWO joints on the same mesh/impostor.  One... a hingeJoint.  Two, a springJoint hooked to a static (non-moving) anchor on one end.

http://playground.babylonjs.com/#RLKVFF#56

There we go.  Basic spring-loaded hinged landing gear (not yet ready for the green box to be gravity-dropped, yet, though). 

Still, XYZ and shifted XYZ keys active... you can bounce the springs a bit (Y key).  There are no limits set, yet, other than some stiffness and damping setting in the line 266 and 336 areas.

The XYZ keypresses ONLY affect the two legs that have showBoundingBox = true.  So WHY are the two NON-bbox legs also moving?  Because there is a lockJoint (a somewhat-solid shaft) between uCyl1 & uCyl4, and another between uCyl2 & uCyl3.  The landing legs on each side of the green box... are "ganged-together" via lockJoints.  Cool, huh?  *nod*

This is why I only need TWO springs...  ONLY attached to the legs with the bounding boxes showing.  The other two legs... the BACK two legs... are moved via the two "ganging" lockJoints. 

SOOOOoooooo... uCyl1 and uCyl2... have THREE joints at the same time!!!  Wowzers, Penny!  Each has a hingeJoint, a lockJoint, and springJoint.  The back two legs have two joints each... a lockJoint and a hingeJoint.

Holy crapolas, eh?  Three (3) joints on a single impostor!  That is WAY more joints-per-impostor than Mr. Wingnut EVER dreamed-of using.  But... the system is STARTING to act like I need it to act, eh?  If a guy/gal knew what he/she was doing, he/she could actually get some landing gear work done here, eh? 

Multiple joints on a single impostor... seems to work just fine.  They cooperate and honor each others' positions and forces, and form a cohesive and workable "team", just like our forum, eh?  Not too bad at all.  I like it.  Party on!  

What's that you say?  You say you just GOTTA see a bad landing?  Fine.  :)  [link]  (some inconsistency seen across multiple RUNs.  Go fig.)   Press "L" for liftoff.

PS:  I think a spring-loaded "doorknob joint" can be made... with a "smart" motor on the hinge.  The motor "algorithm" would need to monitor hinge angle and nearness-to-limits, and adjust motor run-direction, run-speed, and max-force... based-upon "stuff".  :)  A fun challenge for those with interpolation skills... and a highly-appreciated product for Wingnut and future physics users.  (you'd be a hero if you accomplished one).  Keep in mind... that enabled (rotating) motors CAN spin backwards IF their max-force is exceeded.  (back-slide)  (I'm sort-of sure that's a true statement)  :)

Link to comment
Share on other sites

Hi again.  I'm doing a little experimenting this weekend... with circular gauges/meters... using Babylon GUI. 

Here's an odd circular "starter kit" if anyone would like to try some things and experiment for themselves. 

https://www.babylonjs-playground.com/#11JINV#14

Need a 6-pack?  https://www.babylonjs-playground.com/#11JINV#15

Camera-parented 6-pack?  Try v16.  Mesh-tracking?  v17  (no HUD values being set, yet).

Later, the center spheres won't be textblocks... but instead... crosshairs/reticles, artificial horizons, indicator needles, etc.  Still imagining.  :)  C'mon along.

I simply made each inner-sphere.... slightly smaller.  But ADT's are textures, mapped into the emissiveTexture channel of standardMaterials.  Thus... vOffset works to slide the texture higher/lower upon each sphere.  Using vOffset, I could use the same sphere-size for all 6 spheres, and the font size would be the same for ALL rings... but I would get less text space on each smaller ring.  With the current method, I can get the same text-amount on each ring, but the fonts APPEAR as if each inner ring has decreasing font-size.

Link to comment
Share on other sites

As the story continues... https://www.babylonjs-playground.com/#11JINV#20

Here, lots of stuff has happened.  I'm using my trusty showEllipsoids and setEllipsoidPerBoundingBox funcs (from another project)... to help visualize the six spheres that the ADT's are mapped-onto.  One is used for each "ring" of the gauge/meter.

I have detached from camera, and detached from torus-tracking, and this version is headed for a basic makeMeter() function.  I want all the rings to "lay" as flat as possible... so they can lay nicely upon that rectangle panel.  If all goes well, there will be three meters/gauges on the panel, and the panel will be decorated in rivets... ie. "steampunk". 

The meters will be simpler, with covered lower-third of meter face... and with eerie flickering meter lights and violently-swinging meter-needles.  FUN! 

It's starting to look like a cyborg eyeball, eh?  heh

I haven't figured-out HOW to do the fast needles and flickering lights, yet... or how to add rivets around the outside of my punky panel.  But... it will get there.  Meantime, I'm trying to streamline (steamline?) and slenderize... see if I can make meter/gauge-making... easier.  Pretty darned fun!  Join-in, as wanted.  Party on!

Link to comment
Share on other sites

Uh oh, my trusty train wheel physics demo suddenly "went broken" in "latest".  https://www.babylonjs-playground.com/#1ND6TH#13

If anyone has ideas as to WHY, I'd sure listen to them.  (thx).  @RaananW, if you have any info on this, I would certainly welcome it with a good karma-hug, and perhaps a delicious karma apple:)

"Stable" version of train wheel still works fine, although the playground's version selector... didn't change to "stable" when I selected the stable list-Item.  :)

https://www.babylonjs-playground.com/indexstable#1ND6TH#13

Now we're rockin'  ;)

Link to comment
Share on other sites

Hey @Wingnut,

here is your demo working with latest - https://www.babylonjs-playground.com/#1ND6TH#15 . The problem is the newly introduced changes in the parenting system. I need to see what went wrong there.

Line 82 (adding a rotationQuaternion to the child-mesh) was the fix, if you are interested :) 

Link to comment
Share on other sites

Thanks R!  I hope your search is short and fruitful.  I think we have/had your cool basketball thing... in a playground too, somewhere.  That thing is sweet!

No wait... it was some other thing... a shooter/goalie hockey thing?  Maybe that was Temechon.  Anyway, whenever I see "almost a full game" inside a playground... I get excited over those.  :)

All in all, Raanan... we need to make sure we have all of YOUR physics demos/art corralled-together and find-able.  The golf thing... remember that?  That was cool.  First major use of... heightmapImpostor, I believe.  We all got physics woodies for a couple weeks, there. 

That was a blast.  We were dreaming-of all the things that physics heightMaps could be used for.

I think you have lots of "artsy" little physics demos running around, and they need to be bookmarked and made sure they keep working.

I always said I was going to go thru all the playgrounds and fix all the setPhysicsState errors... and I still haven't done that.  Getting that done... I'd probably find some of those "Oldie-but-Goody" physics demos.  *shrug*.  Why am I so LAZY!?  *sigh*  Is Earth gravity increasing?  :)

Did we all see that EnergyJS has no hinge joint listed in its Sammy-typed features list?  oooh.  Use a constrained ball joint instead?  I suppose.  kbye

Link to comment
Share on other sites

:)

Didn't take too long to find, as this was the only change with quaternions, and the error stated that "w" was undefined. So, 1+1 = a bug I created. I submitted a PR (https://github.com/BabylonJS/Babylon.js/pull/2891) to fix it, will be merged later.

Yeah, one of the issues on github that is still on my todo list is the full documentation of the physics engine. Part of it would be to create new demos and find the old ones that are good enough to include. Once I am done with more urgent tasks (aren't they all?) I can clear my schedule to extend the current physics doc page. AND, we have Energy.js coming up, which will probably require a whole new section in the tutorials. So, lot's to do!

 

Link to comment
Share on other sites

Congrats on the quick-find!  Well done, thx.

Yeah, the 2nd layer of physics docs... is going to involve joints.  That is a "hard-to-wrangle" subject.  Slight differences, engine-to-engine.  Some MAJOR differences (in joint behaviors).

And then... how to teach "joint combining"... omg.  Joint combining is super important, and not at all easy to teach.  *sigh*

Speaking of compounding/combining... compound-by-parenting still has some logjams, especially to newbies understanding them, yes?  The impostor-children-before-parent issue will always be there, probably.  Tough area... almost needs finalization prior to joint tutorials.  *shrug*

https://www.babylonjs-playground.com/#4QFVHB#3

@Raggar is going to hate me for showing that to the public... but I think it's cool.  (rack and pinion - 101)

Lots of native code in there.  He has taken a bunch of rectangle gear teeth, overlapped those with cylinder hubs... so he surely has impostors in continuous collision with other impostors.  Or has he?  He just flopped these pieces into massive overlapping... without a care in the world about impostor fighting (one impostor "spitting-out" another impostor that is overlapping).  How the hell does he do that?  I always thought... that when impostors overlap, there's trouble... unwanted spasms.  :)

Raanan, you once said something about... when children are gathered around a parent, their impostor areas are summed into one big "box", yes? 

SO if we were to use standard BJS parent-child to compound the gear teeth to the hub... would we get a big box impostor?  The gear teeth could no longer "push" anything, because they are no longer individual impostors?

Sorry, I have SO many questions about compounding stuff together.  It seems an important part of the physics engine future.

One interesting question I need to learn... when two boxImpostors/boxes are pulled tightly together side-by-side (collision true) by a short-length stiff springJoint or lockJoint... are they in constant collision and thus CPU-heavy?  Its ALMOST the same as parenting the two boxes together, but each box keeps its own impostor.  (similar-to pulling each gear tooth rectangle tightly to the hub with a joint).  hmm.  When-to parent, and when-to fasten-together with a tight joint?  (a physi-sophical question) :) 

I suspect that auto-sleep and allow-sleep are super-important for stopping continuous micro-friction calcs.  And joints attached to sleeping bodies... are likely at-rest, so no problems there.  "Data... sleeeeeeep"  :)   I hope auto-sleep has auto-bedtime-story.

Link to comment
Share on other sites

Wouldn't it be sweet to have a "physics information" overlay made with Babylon GUI? 

Turn it on, and it "tries" to put icons/labels on all the joints and impostors in a scene... tells of their types... tries to position the icons/info in appropriate places (impostor/joint tracking).  Fancy things like... showMainAxis, showConnectedAxis, showPivotA, showPivotB, etc etc.  Nice joint-teaching tools.

Link to comment
Share on other sites

Ok, cool.  A parented-together compound... becomes a SINGLE impostor... but not necessarily shaped like a basic box.  It could be very "bumpy"... lots of physics-active protrusions, and indentations.  (We can tell that Wingleberry doesn't make parent-child compounds very often).  :)  thx ragz!

 

Link to comment
Share on other sites

Another fun meter!  Talk about taking the long bus to school, eh?  (long road to get something accomplished) (30 minutes in Blender and the meter is modeled and imported).

But there's something "rad" and "scalable" about a dynamically-generated meter movement, right?  Yeah!

And this thing has TONS of Babylon GUI draped all over it... and that makes it even cooler!  (I think).  It's all SO demented... but still not very steampunky.  hmm. 

I need to put rivets around the edges of my panel.  I was sort-of hoping that some math genius would kindly code the addRivets(somePlane, howManyRows, distanceFromEdge, spacing) function...  maybe it parents a crap-load of little spheres to the plane... rivet heads.  :)  Cooool.

Uh oh, that link is failing.  I hope I didn't lose v22-28.  That would suck.  I noticed that the PG app quit bothering me about metadata during saves... a few versions ago.  Not good.  @Temechon, are you still around?  You said... once upon a time... if I ever lost playgrounds... you might be able to recover them for me.  Help!  :)

update: fixed broken link.

Link to comment
Share on other sites

The url fragment identifiers (ending numbers) were tallying with each new save, but no metadata-begging panel, and no "this PG has no metadata" top-line annoyance after-save.

It's 6 hours of work... quite a bit of mesh micro-aligning... and the longer I wait to see if it can be recovered, the LESS fresh-in-mind those 6 hours of work... are.  The longer I wait to re-code that work, the longer it will take (cuz I forget, and need to make same mistakes AGAIN).  heh

It's ok, though.  I'm more concerned-with WHAT HAPPENED... than about any lost work.  Working to keep this from happening again... is most important. I think something involved in metadata... trashed the JSON during save #23.  From versions 23-28... they were all trashed saves... possibly totally gone, or possibly ONLY with a problem in 1-2 fields of the record.

I don't know much about DB's... or anything else for that matter.

On other subjects, I've been thinking about text layers/labels again... like these cool things.  A few posts back...

On 10/3/2017 at 9:54 AM, Wingnut said:

Wouldn't it be sweet to have a "physics information" overlay made with Babylon GUI? 

Still thinkin' about creating a label on every physics entity (impostor/joint) found in any Cannon or Oimo (or Energy) "World".  First thoughts... ANY time we need to "query" an impostor or joint to get its position or rotation, it will cost us physics speed... I think.  And joints don't even have a position, but we could derive/calc approx position by averaging the position of the two connected impostors.

Anyway, the BabGui tracking label/line system... looks pretty good.  I guess, as a test, someone needs-to build a gather_info_from_physics_WORLD() function... to get a little database of "What's shakin' in this scene, physics-wise?"  :)  Who wants the job? 

Just build a nice robot that wanders into any physics "WORLD"... and brings us back a pile of goods that we could use for labeling.  Easy, right?  A robot with a bucket and a mission... gather data about every impostor and joint currently active in world.  Easy as pie.  Piece of cake.  :)  Party on!

Anyone got that physicsWorld-sniffin' robot built yet?  heh.  Does it collect joint type?  How about mainAxis and connectedAxis data?  PivotA and B?  Min/Max?  Spring?  Does it find all impostors and what type they are?  Collect mass/friction/resti? 

Ok, ok, I guess we don't need to put all that data on a pointy label.  Maybe just joint name and type, and names of shapes it connects-with.  Same for impostors... just name and type, perhaps.  Remember, we need a world-space vec3 to point the GUI line-to.  Easy! 

Limited usefulness, eh?  *nod*  Just another lame attempt at "visualizing the physics"... part of an un-winnable never-ending battle, I suppose.

Link to comment
Share on other sites

Cooooooool!  Thanks guys/gals/whatever!  WELL DONE!

This makes perfect sense, because... the text characters used in those text lines... were not standard text.  Check this out (maybe only with FF).

http://webpages.charter.net/wingthing/html/metamaker02.htm

A giant table of every screen-printable metachar from 0-4999.  (and some NOT screen printable)

Way long ago, I made that thing.  Nobody knows why.  See where the "Y" are... in the #28 playground?  They USED TO BE &#415; ... a straight-slot screw head... 5 of them, around the outside of the meter/gauge.  :)  I simply pasted the char... into the .text line.  Five of them, with spaces between.  There were also some &#149; "dots" used as graduation markers on the meter face, too.

In short, the #28 playground was a MESS of various non-standard characters/text.  WHOODA thunk that I would damage the DB and cause a bunch of work for others... by using them?

Sorry guys!!!  I should have thought of that myself... and done more testing.  You guys discovering this... well done!   Thank you!  Great troubleshooting!

Link to comment
Share on other sites

Hi gang.  @Jaskar and @Haylan  ... thanks for your work.  The "retro gui" project is moving along ok, again.  I'm working on a big dial.  (yawn) 

BUT... http://doc.babylonjs.com/playground?code=advancedTexture  ...is failing.  bad character in string literal at line 1 column 6284 of the JSON data.  The playground searcher thinks there is still some rotten data in the PG DB.

I didn't use any non-standard characters in PG's 29-35 in the retro-gui project.  They all SAVED and LOADED fine.

SO, there might be some residual bad characters in the 22-28 series.  They all load fine, but I think one of them is killing the PG search for advancedTexture.

Thx for thoughts/work, gang.

Link to comment
Share on other sites

On a different subject, I have noticed that the playground has suddenly gotten some advanced features.  I see light-colored theme, code-folding, and an "overview view" along the editor right edge.  AND, I cannot select dark theme.  Does anyone have link to a forum announcement about these changes?  Are we running a new Monaco?

I broke a thousand things with those non-standard chars, didn't I?  *sigh*

It was my dog's idea to use non-standard chars for meter faces.  It really was.  I told him that we shouldn't, but he insisted.  Really.  ;)

-------------------------------

Can we do ANOTHER subject?  Although @Mezzorio probably hates me for giving him a little razzing, recently, I want to work-on an issue that HIS project... illuminated.

https://www.babylonjs-playground.com/#XCPP9Y#290

Papapanel is a stack panel that is set .isVertical = false (@line 34).  Papapanel "holds" 2 other stack panels... panel (added @41) and panel_b (added @77).

panel = green button-stack.  panel_b = blue button-stack.

I was hoping that papapanel.isVertical = false... would place green button stack BESIDE blue button stack.  Does anyone know HOW to put panel and panel_b, side-by-side, instead-of stacked?

I don't want to force their positions.  I prefer to use a master container or master stack panel [such as papapanel] that has an option to stack things horizontally.

Perhaps .isVertical is intended-for controls, and stack panels are actually containers.  SO, putting two stack panels side-by-side inside a master "papa" stack panel... might not be intended-by-design, or possible.

Any ideas, fixes, thoughts... wholeheartedly welcomed.  thx.

Link to comment
Share on other sites

Dark theme working again, thx DK!

On another subject... let's talk about one of my foremost BJS super-heroes, @RaananW.  He seems like a great guy... smart as they come, kind, helpful... one of the best BJS superstars I have never met.  Over a couple years time period,  I've occasionally "sniffed his armpits"... looking for pictures/info about him.  A few months after he joined, I gave him a little ribbing about his "forlorn" and humility-instilling eyes-down expression-less forum picture

A handsome chap... with a kind look.  But I wanted to see his smile (just like I still want to see @ozRocker's smile).

Anyway, I think I finally found a picture of a smiling Raanan...  [link].  Woah, even handsomer and kinder-looking!

Then I found ANOTHER picture... of a really big Raanan smile:
raanan-weber-during-vans-action-sports-p

(Hide this one from his girlfriend, who is NOT the girl in the pic)  :)

NOW we know what makes Raanan smile, eh?  Getting some tension relief from a pretty girl.

What's going-on here, you ask?  Well, Raanan has just bet his daughter's tennis shoe... on a pair of tens.
   (yes, it IS the same "pair of tens" that are rubbing his shoulders)  :D

What happens in Las Vegas... STAYS in Las Vegas, right?  (unless Wingnut is out to dig-up some dirt and smiles)  heh

I think Raanan is a guitar player and singer, too (cool). I once found a picture of a hippy-like musician which I think was Raanan, but I could not verify that it was him.  I think he had girls hanging all over him in THAT picture, too.  ;)

We love you, Raanan!  (no, not in that way... in the other way)  Thanks for hanging-out with us, for being a great helper and problem solver, and for putting-up with my razzing.  Don't ever leave, okay?  Okay, good.

NEXT... we're going after @adam and @fenomas and @Raggar.  We need to see THEIR smiles, too.  Hide the data, guys. Wingnut Claus is coming... to town.  :)

----------------------------------------------

Back on subject... have we (got) a working PG search for 'advancedTexture', yet?  http://doc.babylonjs.com/playground?code=advancedTexture

Nope.  Darn.  I think I broke that.  Sorry, team. 

How are we going to find all of DK's cool Babylon GUI playgrounds... if we can't search for 'advancedTexture'?  :) 

@Jaskar and @Haylan and the team might already be working on it, though (IF indeed it IS some further problems... caused by my non-standard character usage in a playground, which I think it is so).

No hurry, guys... I'm just (overly?) worried about it (mostly because I caused it).  I don't like breaking things, esp when it involves a currently SUPER-HOT topic like Babylon GUI.  You can freely delete https://www.babylonjs-playground.com/#11JINV#22 THRU #35.  (delete all PG's in that series > 22).  I have home copy of #35, safe.  :)    In fact, you can delete entire #11JINV series... if needed.  (thx)

    Party on!

PS:  Raanan... if I've crossed a bad line, PM me, I'll edit things, no problems.  :)

Link to comment
Share on other sites

Well, I have to react to that, right? :)

@Wingnut - nice research! Don't worry, you didn't cross any line, it's all online anyhow!

Funny to find this picture, It is from 2004 I think. maybe 2005. Nice memories :) . It was a Vans-sponsored poker tournament (hence the shoe. I didn't have any kids back then :) ), and I sat right next to Mr Paul Van Doren himself, which was nice. Next to me were also a few baseball and football players, but I have no idea who they really were. 

And yes, I am also playing the guitar (trying not to sing thou), and have produced music until 2010 or so - Techno, Electro, Funk, Breakbeats, you name it. I had around 4 different artist-names, I let you do the research if you want to hear it ;) 

So, now you know that this post also made me smile! If I knew this picture bothers you so much I would have replaced it years ago! I tried using the poker picture as my thumbnail, but the image crop looks a bit odd...

Link to comment
Share on other sites

Actually, I like your current picture... no need to change it on my account.  I just ALSO wanted to see you with eyes-up.  :)  The current picture... needed a "partner" picture... a counter-weight picture.  *shrug*.  Thanks for the other info, too! 

Vegas is pretty fun, in general.  I don't gamble, but I loved the lights (esp after baking-up)... and I liked the drinking on the streets being a-ok.  Take the glass from ANY bar, return it to ANY bar.  And the ham steaks were cheap and big... which made me more thirsty... for more street drinking.  :) 

I've visited LV 3 times.  Once was for the NAB convention... I used to do some TV production crap... mostly a gopher.

Wow, a music producer!  That's... kind of hard work, I hear.  Ever use ADAT?  How annoying that was, eh?  erf.  Now we got hot-swappable hard-drives and flashcards that we can plug in/out of our workstations... smooth as silk (in theory).

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.

Guest
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.

Loading...
 Share

  • Recently Browsing   0 members

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