• Content count

  • Joined

  • Last visited

  • Days Won


Wingnut last won the day on June 15

Wingnut had the most liked content!

About Wingnut

Profile Information

  • Gender
  • Location
    Bessemer, MI, USA
  • Interests
    3D Web, CSS, HTML, Guitars, NORML, storytelling

Recent Profile Visitors

6,179 profile views
  1. Wingnut

    GUI 2d shapes

    Hi girls. Throughout this thread... I have been saying ._isDirty in lots of places. I really meant ._markAsDirty(). Sorry if I caused confusion. I already edited most of them.
  2. Wingnut

    How to use collision in OimoJS with BABYLONJS

    Hi A. Yep, you're going to be bending some lines. The elastic is not a straight line, so the linesMesh segments must bend, too. Invisible joint between those two anchors... no problems. Drawn line? More problem. Sorry. BJS multi-picking (ray-casting) could probably tell you WHICH mesh would be intersected... IF a straight line was drawn between the two anchors... but it could NOT tell the BJS LinesMesh system... how to automatically "go-around" those intersected mesh. Elastic-adding could become a complex task. I have no easy solutions. Let's hope others have some ideas.
  3. Wingnut

    How to use collision in OimoJS with BABYLONJS

    My pleasure. You haven't told me what you wish to "show" or "do" with the physics, yet. Are you going to fly the brackets thru an asteroid field in space, and you want the asteroids to bounce-off? Think about this. All boxImpostor brackets sit on a 0-mass (stays in place)... INVISIBLE physics-active ground. Each bracket has VERY HIGH mass (and perhaps friction, but ground friction might cause impostors to tip-over when pulled by distance/lock joint). Now put SOME joint in-between each bracket... probably a lock or distance joint. NOT a hinge of any type, for that will make your brackets act like a worm/snake...(like my chain-o-beads). We want a straight pull from the joint... just like the wire would do. On distance joints... you can simply decrease the distance value... as the technician (using some gui sliders, maybe) tightens the wire between two brackets. Increase distance... loosens the wire. The distance value of a distance joint... CAN make two very-heavy brackets... move a tiny bit closer/further-apart. In a way, it is a "torque" value, yes? SO, yes, with a simple box impostor on each bracket, and some distance joints, and an invisible ground, and high mass on the brackets (reluctance to move, just like teeth)... SOME things could be visualized here. What would be seen or learned... I dunno. I don't know what your "big hope" is... and you might not want to say in public... because it is secret. You can send me a personal message... I promise not to tell/steal secret. I am not that type of person. To be frank, I don't know WHAT adjustments can be done with braces. Can they y-rotation "twist" a tooth? Can they change a tooth's z-rotation "tilt". x-rotation tilt? We can MAYBE do the same... with THREE joints between each bracket. :x lockJoints are different from distanceJoints... and may not have a "distance". As you work-with joints more, you'll see that a joint CAN have a mainPivotPoint and a connectedPivotPoint. You can move those two values... to change the length of a lock joint. A springJoint... can do this, too... and some springJoints (down deep at native levels) have a restLength. And, they have damping. Set damping REAL HIGH... to make the springJoint VERY stiff... and then the amount of "torque" between two brackets... IS the springJoint.restLength. Phew, lots of info to learn, huh? Fancy physics work. I hope you don't get a brain tumor.
  4. Wingnut

    How to use collision in OimoJS with BABYLONJS

    Atallah... what will you use physics for? Will you be trying to measure the amount of (wire) pull... between each bracket? We might be able to do that by NOT putting impostors on the wire... but instead.... attach a physics "joint" between each bracket. Probably, a "spring joint" or lock joint. These joints have separation length settings. Let's find a playground with some physics joints (joints are invisible, but still apply physics forces). Hinge joints are applied between each chain bead. The bead-gap (joint length)... can be adjusted at line 130. Line 74 setPhysicsLinkWith is the thing that installs the hinge joints. It's a helper function. You can also get much more complex with joint-adding... experimenting with many types of joints, and using the "addJoint" command instead of setPhysicsLinkWith. There's lots of power... in joints... but our physics plugins try to make it all easier... with helper functions. Cannon often calls its joints "constraints". See the "distance constraint" in the list? THAT could be a good one... for pulling/pushing brackets towards/apart-from each other. hmm. Still thinkin. Maybe joints between each bracket... can somehow be useful. Not sure, yet. Thoughts? MeshImpostors or boxImpostors... might both work fine. The wire would be for looks-only. Fake. :) It doesn't really push/pull, it just LOOKS LIKE it does. The invisible joints actually do all the pushing/pulling.
  5. Wingnut

    How to use collision in OimoJS with BABYLONJS I temporarily published your .babylon file in my misc folder at github. I'll delete it on your command, Atallah. I didn't use the ImportMeshAsync method, but we can adjust anything, now. Grab a zip of that playground if you wish, A. These are parts of dental braces, aren't they? Cooooool. Sooo... 14 brackets... 24 invisble boxImpostors each... OUCH! hmm. Perhaps my "bumper impostors" idea is not so good. Thinkin'. The wire (not shown)... needs an impostor, too, eh? OUCH MORE! New version: I reduced the camera.minZ so we can mouseWheel real close. Remember control-drag feature... for "slewing" the camera target... handy for close-up bracket examination.
  6. Wingnut

    How to use collision in OimoJS with BABYLONJS

    haha. Yeah, the skull is a GRUESOME meshImpostor. Bumpier than a Sarah Huckabee Sanders press conference. (USA joke) Let's pretend we DO NOT use a meshImpostor on Atallah's shape. I guess... we could position (and parent) about 24 invisible boxes... onto Atallah's model... and put a box impostor on each one (but NO impostor on the shape itself). Then... it can collide with things, and its hole stays open. The hole will have 4 flat boxImpostors inside the hole, so other box impostors can slide thru the hole and get friction and guiding. It would then act similar to a meshImpostor... but not use a meshImpostor. So, no more limitations.... either physics engine. *shrug* It will help if we can get Atallah's model into playground. Then we can test the performance of 24 invisible "bumper impostors" surrounding the shape and lining the hole.
  7. Wingnut

    How to use collision in OimoJS with BABYLONJS

    Again, Oimo has no meshImpostor... and likely installs a "fallback" boxImpostor... whenever somebody tries to use a meshImpostor with Oimo. Expected behavior. Perhaps we should issue a console warning or error... if someone tries to use a meshImpostor with Oimo. @dbawel I think Atallah was ONLY using the skull as an example mesh. I think the mesh in the picture... is the actual project mesh. This is going to be a physics challenge, for sure. Atallah, can you publish the mesh in the picture... (.babylon file?)... to somewhere where we could load it into the playground? I use my free github account... to store small models. Then I can load them into a playground, and we can more easily do tests. In that folder, you can see my bjs_text.babylon file. Now look at this playground: See the odd url base? + bjs_text.babylon Can you, somehow, get YOUR model from the picture... to load into a playground like this? That would be great... and would let us try some more tests. Thx. Models used in playgrounds must load from a CORS-clear location. CORS is a security thing which you can read about... on the web.
  8. Wingnut

    How to use collision in OimoJS with BABYLONJS

    Hiya AS... welcome to the forum! I think this is expected. Only CannonJS, the default physics engine... allows meshImpostor, and yes, it only collides with spheres. Instead-of using meshImpostor, and sometimes WITH the use of meshImpostor, some folks "surround" the edges of a mesh... with invisible boxes or spheres... and put impostors on those. These are like invisible "physics bumpers". They might be put along the sides and on the bumpers of car models. These can be LONG boxes, so only one is needed for each side of the car, and only one is needed for each bumper on the car's front and rear. Give some thought to using invisible mesh... with impostors... to make edge-of-model bumpers or collided-object bumpers. Stay tuned... others might have more good comments.
  9. Wingnut

    New GUI control: The Grid

    Hmm... I just had another demented idea. GUI ViewportControl. We don't need the RTT to feed an ImageControl... when we can fill rects/grid-cells with viewports! (viewportControls) OMG! A GUI viewportControl would be SO COOL! SO handy for mini-maps. But... mini-maps often need "where upon the map did user click"... so we would need to ensure that the pick-position upon the viewportControl... is public/exposed. For ImageControls (and maybe ButtonControls), it might already be so/true. I have a funny feeling... that viewports are just an application of RTTs (render target textures)... and might suffer from the same problems. BUT... this time... we are not asking the DOM-ish ImageControl to display something non-DOM... like an RTT. We are creating a whole NEW control. The viewportControl does not need to be ANY BIT DOM-ish... for it never deals-with URLs. hmm. Hurry, somebody build one! I suspect that a viewportControl could also be used as an RTT control. Coooooool! BUT... context2d canvas IS DOM-ish, and that's what is used for Advanced Dynamic Textures (ADT's), the basis of the entire GUI system. hmm. RTT's and viewports might still need continuous "painting" onto a canvas... making them slow... at least as slow as sprite blitting. (ponder ponder) ----------------- Anyway, I'm going to use the grid control... to attempt to teach myself 4x4 matrices. I might be switching OFTEN between full-screen-based grids, and mesh-texture grids. Flat full-screen grids will be the "editable" grids/matrices. Mesh-based grids/matrics will be standing-by along the sides of the scene... ready to perform multiplications with other matrices. View matrices, projection matices... worldspace matrices, rotation, translation, scaling, we might be able to visually demonstrate ALL of it, and see it happen real-time. I was inspired by DK's real-time particleSystem editor. Why not a real-time matrix transformation editor, right? Power-learning, from your friends at BJS. A very very visual... beginner-level matrices tutorial. Matrices are a difficult-to-teach subject, and the new GUI GridControl opens some new doors to some new teaching attempts... including myself. See ya later in The Wingnut Chronicles... for more from The Great Matrices-For-Dummies Project. Help/starters/spear-headers welcome.
  10. Hiya zzzen. You might need to set the wireframe "overlay" mesh... .checkCollisions = false; Or, if physics-colliding, make sure it has no physics impostor. You might also want to set the wireframe mesh.parent = actual mesh.
  11. Hiya BP. Quick answer... a forum search for similar subject... found this: It doesn't look good. Possibly with "worker thread", but that's rough water. There's a system called Incremental Loading. I don't know much about it. With many separate (little?) .babylon /model files, you could space them out, somehow. hmm. scene.executeWhenReady() could get REALLY confused, though. JS is single threaded. If it wasn't, we could load a hidden BIG scene, while the user played-with a simple scene, and when the big scene finished, switch scenes. Stay tuned for more/better answers.
  12. Wingnut

    Text as polygon mesh Yay, finally got that chrome-like reflecto-shader fired-up on the text. Coooool. wheelPrecision and minZ set REAL LOW, so mousewheel-in and check out the hi-rez fractal-pic (refMap). Slide-around with control-drag, of course. Awfully danged pretty. The texture MIGHT need a 50% uOffset or something. More fractal patterns seen when text is viewed from ends... than when viewed head-on (after animation completes). Panorama version #55 definitely has a texture mapping issue. Still looks cool, though. Studying. #56 is nice, too... had to set the pivot point to boundingbox center. Note: sps.setParticles(); in line 142 area... is not-needed. The setTimeout is unnecessary, too. Only tmesh.material = shaderMaterial; is necessary. Internet Explorer highly-dislikes this... ()=> lines 170 &171. So, here's a version that works for IE. (I probably have some compatibility mode incorrectly set in my IE.)
  13. Hiya BG, welcome to the forum. Here ya go... I turned off a few things (temporarily) and adjusted a few things. Line 7 - just backed the camera out a bit, Lines 27/28 - slightly adjusted the way physics is enabled. It has evolved over the years. Line 56 - added a toFixed to shorten-up the numbers a bit. Line 59 - I think jointData is used ONLY to CREATE the joint, but it is not used to do "live updates". For live updating, I put the slider value into springJoing.physicsJoint.restLength which is a "live" value. This is sometimes called "going native"... making adjustments to the ACTUAL Cannon/Oimo physics objects/formulas, instead of communicating through the BJS physics "plugins" (helper wrappers). See (restLength) (a "native" parameter) Line 68 - made sure jointData had an INITIAL length (of 8, same as initial slider value). Seems to work. If you have questions, let's hear 'em. I am no expert, but I sometimes get lucky and land a good solution. As you can tell, this spring is an upward-aiming spring, and not a "dangler". But the lower sphere has mass, in a gravity-less world... so it DOES move when the spring pushes against it. Good physics fun! Reminder: JointData is used as a helper to CREATE a joint, but not a place to change values real-time, and expect the ACTUAL joint to "listen-for" those changes. Party on!
  14. Wingnut

    GUI 2d shapes

    Oh, yeah, you actually corrected me, BZ, thank you! I talked-of a renderLoop random value as a tester of the bar-graph position/setting. But yeah, that will cause a redraw every frame. Phew, good catch, BZ! Probably should change value on a setInterval tester... but... we might need an animateToNewValue.
  15. Wingnut

    GUI 2d shapes

    Hiya P8! Hiya BrianZ. The "let me" thing is related to "teaming"... and often to real-time team-ups. It's complicated... Freudian stuff... belongingness. Somewhat related to a phenomena called "Treehouse Teaming"... where folks climb aboard good causes, for free, become great team... no pay, no bosses, formed out of common cause, riding spirit and enthusiasm, usually provided by a hoopla-filled lunatic spearheader. Often these crazy-with-enthusiasm spearheaders have marching bands behind them, playing John Philip Sousa songs. heh. Ya can't help-but join the parade. That kind of spirited teaming has built MANY-a over-gaudy 3-story, working-bathroom, 12-room tree house... for the neighborhood kids to share. Dylan... go put more console.logs in that #88 playground... watch how ITS observers and setValues work... watch the observers do their stuff... try to get yours to do the same. You're doing fine on the progress-per-time-per-effort gauge... you are COOKIN' up a STEEP learning curve... chowin' some road surface.