dbawel Posted May 14, 2015 Share Posted May 14, 2015 Hi Wingnut, I'm sure I'll be posting issues soon. Thanks for the info. I have a plane that is created with a value of 10 BJS units, and aiming fixed cameras - except when you are simply viewing other users drawing in real time. My development collegue is handling the node server, and the multiuser event trapping. I doubt I'd have any chance at finishing this weekend if it were not for Joshcanvas's example (and some code) of passing pointer events through 2 HTML canvas' to a dynamic texture. I will thank him properly soon. This was simply to demo our server, but it has become quite fun- V1 draws on a plane, but for V2 I've already designed (not all built yet) a system where you can visualize a cubic volume using 3 interseting lines, and draw vector lines from point to point. I discovered long ago about drawing vertices' to create lines and faces, and recall that when I was doing this, from a perspective of the world -Z axis, clockwise drawing would create faces with UVs facing the camera, and counter-clockwise would reverse the UVs. But I'll have to experiment when I reach that point. For V2, I'll be happy to Merge lines based on vertex proximity. Thanks for the encouragement. I think I need it today. Quote Link to comment Share on other sites More sharing options...
Wingnut Posted May 17, 2015 Author Share Posted May 17, 2015 Hi gang! No new demos today... working on dragWithCollisions a bit. Have you guys seen the work done by RaananW and the gang... on the collision system? Excellent stuff. https://github.com/BabylonJS/Babylon.js/blob/master/Babylon/Collisions/babylon.collisionCoordinator.js Beautiful! Thanks R! Quote Link to comment Share on other sites More sharing options...
Wingnut Posted June 9, 2015 Author Share Posted June 9, 2015 Hi kids... Wingy is being a mad scientist and is trying our new PolygonMeshBuilder! Wow, that sounds important, huh? http://playground.babylonjs.com/#1BIQIC I stole the bird example from the BJS website, and went a-hackin'. 26 polygon-based bird-hole disks... stacked near each other... to try an interesting fake extrude. Oh, you say it's not that interesting? Okay, you're right. I have birdPlane... rocking back and forth on a cosine wobbler, and I am trying to parent the other 25 "disks"... to birdPlane (the master which produced the clones/instances/whatever.) But I cannot seem to do it. Lines 86/87 is where I make the clones, and when I activate line 87 and REM line 86, BOG FEST... and my FF browser says "Hey, cut it out! That's a SLOW script, buddy!" I'm probably causing some kind of demented recursion. It's what I do. heh. Try using only 5 disks instead of 25 (and then do some parenting). hmm, sort of works but rotation and scale is out of whack. Ok, so we go down to line 98 and activate THAT line... see if we can set clone.parent AFTER creation. Nope, same bog and "slow script!" warnings. Would you like to help ol' Wingy with this curiosity? You are certainly welcomed to do so. (thx) poly2tri.js Yuh yuh yuh. This is my first time taking the BABYLON.PolygonMeshBuilder out for a test-drive. Seems fun, thanks coders/importers! Interesting! I need something similar, but reversed. I need those "flat" (silhouette cardboard cut-out) hockey players from the parlor games of old. I need bird polygon where there is hole, and I need hole where there is bird-surrounding polygon. I need... (extrude-) mesh-from-clipart, but... not a displaceMap... cuz that's not the same. It's close, though. Meantime... I got this issue with my parents... I would like to see all 26 disks wobble together, as one. Today's motto: Wobble As One. Quote Link to comment Share on other sites More sharing options...
jerome Posted June 9, 2015 Share Posted June 9, 2015 Hey Wingy If I understand well, you would "extrude" the plane containing the hole (the bird shape defined by birddata).Am I right ?I don't know anything about PolygonMeshBuilder so far except we can build a plane mesh from Polygons objects, even holes (funny that you named your circle rectangle ).I supposed birdata defines a polygon (the bird shape) with a series of successive segments and those floats are just 2D coordinates of each segment vertex.If yes, this is a good new.Because if they are 2D coordinates, you can easily transform them in a series of successive Vector3 (say, with z = 0) you will put in an array.Let's call now this first array of Vector3 (z = 0) path1.Let's copy this array into another array path2 and change each z to, say, 10 (z = 10). You see where am going to ? ribbon of coursenow, let's create two similar polygonmeshes... the first at z = 0, the second at z =10and let's create a ribbon giving it only two paths [path1, path2] : it will creates the extrusion thickness in the hole between the two planes. Creating the last ribbon (or a simple tube) around the two external circles is then quite easy. I believe I could maybe implement this for everyone some next days Quote Link to comment Share on other sites More sharing options...
Wingnut Posted June 9, 2015 Author Share Posted June 9, 2015 That would be great! But, um, keep in mind... that I want to use clipart. Much like extruding splines in 3D Max... or sort of. Here is the issue. When some nasty "CorelPaint Magic Lasso" al gore rithm has to do edge-detecting on a black and white clipart, it needs a "resolution" to determine how often to plot a point as it encircles the silhouette. It almost needs fuzzy logic to try to determine if it is a zig-zaggy edge, or more straight line. Zig-zag edge needs lots of points (bird feet). Straight line needs few (bird beak). Edge detector stuff. erf. And points-per-distance-per-edge-complexity. Ow. So, yes, inverting the bird... is likely fairly simple. Getting birdData from an image-sniffing, edge-analyzing, 2d smart-sampler... phew... that might be a challenge. And maybe... it is a thing that is done outside-of the framework. But what fun is that? heightMap, displaceMap, polyMap getBirdDataFromImage(). errr... no... not that. um. PS: 'rectangle' was a leftover variable name... from the original BJS demo... and I forgot to change it when I moved to a circle. Quote Link to comment Share on other sites More sharing options...
Wingnut Posted June 27, 2015 Author Share Posted June 27, 2015 Hi gang! Ok, how 'bout a weird one? http://playground.babylonjs.com/#15ZW5X#1 *scratch scratch* jerome, dbawel and Samuel Girardin 3 Quote Link to comment Share on other sites More sharing options...
reddozen Posted June 27, 2015 Share Posted June 27, 2015 Slinky! Quote Link to comment Share on other sites More sharing options...
Wingnut Posted July 2, 2015 Author Share Posted July 2, 2015 Hi gang! This morn, I am playing with a displaceMap (the jack-o-lantern) to try to assist in a forum issue, and I ran into some troubles myself. http://playground.babylonjs.com/#P9UZG#5 Jack is in low-rez mode at the moment. You can see him better if you change the ground resolution (currently 10) in line 16... to be 100. (and hit RUN again) Now, for the animation. Set line #2 to true, and off we go. Sit and watch for a while. Sometimes (rarely), Jack will show his face. But why so intermittently? Why is the displaceMap reporting mesh not complete, when lines 46-51 are reporting all needed vertexdata is present? The objective is to keep disposing and recreating the ground mesh (with displaceMap), with a changed resolution (changed subdivs/tesselation) every other render loop. The effect/affect I was hoping to get... was that the displaceMap (Jack) would cycle between low rez and high rez... back and forth (ping pong mode). It's not doing so well. When I first built the animator, I thought "oh, the new ground mesh hasn't been rendered yet, so the displaceMap can't apply". That's when I coded the "every other loop" thing. First render loop, dispose old mesh and create/stock new mesh, then leave the render loop. Next frame... apply the displaceMap, then leave the render loop. The animator is alternating between the two actions, using the isNewPlane flag. That didn't work either, but I kept "the alternator" in place. Could it be that applying a displaceMap takes longer than one frame? hmm. That doesn't explain the displaceMap errors in the console. I have some kind of bug, or I am trying something too demented. I need more eyes and brains. Would anyone like to help me gun-down the bug? Thanks! EDIT: Hunh... it somehow started working (the animator)... but not very good. It's shaking like crazy. How about wireframe? These demos might be FireFox-only. I see no displacing happening in my IE. Quote Link to comment Share on other sites More sharing options...
Wingnut Posted July 2, 2015 Author Share Posted July 2, 2015 uh oh, http://www.html5gamedevs.com/topic/2571-the-wingnut-chronicles/page-20#entry62370 ...a couple of playground demos that once worked, now failing. Particles. I saw a c.isStarted fail. brrrt brrrrt - backwards compat warning! Run for your lives! But then again, the playground is running 2.2 alpha! WOW! The bytes still have dents from the programmer's fingertips! Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted July 3, 2015 Share Posted July 3, 2015 Both were doing hack on the internal parts so no guarantee to keep it compatible Quote Link to comment Share on other sites More sharing options...
Wingnut Posted July 5, 2015 Author Share Posted July 5, 2015 ohhh... true, true. I forgot about that part. yep, thx. (My super-thread is going stale on me, darnit. I hope my fans will understand.) Over in another thread, I said I was going to start torturing our Animation/Animatables system. So far, I'm just staring at http://playground.babylonjs.com/#HH1U5 (a home version of it) and trying to gather a torturing plan. I thought I'd better move my yapping back into The Chronicles where I wouldn't be contaminating anyone's thread. To be frank, when deltakosh said that animatABLES were to be used in a storyboard-like way, controlling multiple animaTIONS (from a single a-ABLE)... that screwed me up. If this is true, then why does creating an a-TION... return an a-able? Seems strange. I'll know more, after I do this "month-o-Animating" If you're playing along at home, https://github.com/BabylonJS/Babylon.js/tree/master/src/Animations I won't be going to babylonDocs for the API map, because the API docs for BJS 2.2a are not yet generated/available. And I can only assume that the github address above... is showing me src for 2.2a. The playground is running 2.2a, and when I get a zip from the playground, I also retrieve the BJS and hand.js that is currently used in the playground, and put them in a js/ folder near the retrieved index.html. Then I re-target the SCRIPT tags to point at the local js/stuff. (yawn) (tedious story, eh?) So, all in all, these tests will be started... using 2.2a. Hey, that was much easier to say. Oh, but what tests? Hmm. We all know how this works. We (I) must get to know Animation and Animatable classes, and it would be good if we (I) understood how Engine... services all of a scene's animations. AND... seeing we are (I am) already willing to crawl into a deep and dirty dungeon, we (I) should probably think about how SIMD and worker threads... could be used to supercharge our animation system(s). You HAVE TO admit... http://www.babylonjs.com/scenes/simd.html ... is just HOLY CRAP -levels of amazing. Wonderful! Ideally, SIMD and workers will be used whenever possible, behind the scenes. We, at framework-user levels... might not need to concern ourselves with it. In our starter animation demo, we can see that setting loop to false in line 28... has overridden our BABYLON.Animation.ANIMATIONLOOPMODE_CYCLE in line 23/24. Interesting. The scene.beginAnimation has authority over a static that is set in the BABYLON.Animation constructor. This is the first of many hmms, I suspect. I have tons to learn. If anyone would like to jump ahead and show us a PG demo of an a-ABLE... being used to control multiple animations (on multiple shapes?)... that would be great. Thanks! I'll be trying it soon, myself... but I might be a bit bloody by the time I get there. Stay tuned, we're going adventuring... with your less-than-mentally-optimized host... Wingnut! Addenda: Ok, I changed my mind. Maybe we can visit the BabylonDocs classdocs for animatABLE and animaTION. Even if outdated, it's still easier than learning from raw source. At first glance, it appears that aa (animatable) is not for multiple mesh objects. Only for multiple prop-targets on a single object. But we're just getting rolling. Oh yeah, the tutorial... I keep forgetting about the tutorial. THAT'S step #1, eh? Mesh-targets, prop-targets... the word 'target' is getting lost, eh? I once pondered the invention of "knob" objects. Each "knob" (knobject?) is for animating one object's single property (high control granularity? *shrug*). Knobs also work as switches, and it's also a place to attach easings and loopModes. Maybe a single AnimaXXXX can control many 'knobs' at the same time/framekeys. hehe KnobManager goofy. Oh yeah, ActionManager is a knobManager, isn't it? I'll catch up, I promise! Let's see... where is BABYLON.Animation.ANIMATIONLOOPMODE_PINGPONG ? hmm. (anim run forward, run backward, run forward, etc) Ahh, https://github.com/BabylonJS/Babylon.js/blob/master/src/babylon.scene.ts#L247 ... scene._activeAnimatables... an array of Animatable-class type. THAT'S our PTO shaft! (it's a tractor thing) That's how our animations get serviced. Yay! Quote Link to comment Share on other sites More sharing options...
Wingnut Posted July 6, 2015 Author Share Posted July 6, 2015 Hi gang! Well, I've started basic animation torture-testing. http://playground.babylonjs.com/#HH1U5#1 A 4-on-1... 4 animations running on 1 mesh... at the same time. Fun! What have I learned so far? Two primary things. Maybe three. #1. There are 6 ANIMATIONTYPE's... static ANIMATIONTYPE_FLOAT : numberstatic ANIMATIONTYPE_VECTOR3 : numberstatic ANIMATIONTYPE_VECTOR2 : numberstatic ANIMATIONTYPE_QUATERNION : numberstatic ANIMATIONTYPE_MATRIX : numberstatic ANIMATIONTYPE_COLOR3 : number Only 3 are in the tutorial. I might need to adjust that. If you knew how long I spent trying to change a color with a vector3... well... you'd be embarrassed to be near me. heh Onward... don't look back! update: Tutorial now lists all 6 types. ------------------------- #2. Starting animations at key frame 1000... DOES NOT give you a 1000 frame delay before the animation starts. (a guy needs to TRY it, ya know?) You can set a delay in the first parameter of Animation.animate() Speaking of which... is the mysterious 'animate' function... actually our 'startAnimation()' and/or 'beginAnimation()' command? I bet so! This is the way to start animations WITHOUT needing to use scene.beginAnimation() and it's domineering (CYCLEMODE-killing) 'loop' parameter. Oh, but the Animation.animate() function uses 'loop' as well. hmm. But still, since we now know how to start each individual animation, we can tell SOME to loop and SOME not. Yay granularity! (I love that word - it means lots of fun knobs to turn, if we choose to. heh.) You might notice a strange "wait for scene.isReady() before starting animation"-system in that demo. It is probably not necessary, because it's likely that the framework already does that. I was having some stutter problems at the beginning of my home version of the demo, but I later learned it was caused by Construction Simulator 2015 running in another window. Now WHO put THAT there? More experiments ahead. Report discoveries/tests, please. Thanks! PS: Do you hear Mister ActionManager calling, yet? I do. On the 60th frame... executeCodeAction. heh. I'm going to mix the two systems, somehow. I need to... it's part of my demented ways. Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted July 6, 2015 Share Posted July 6, 2015 AS usual I love your investigation Wingnut 1 Quote Link to comment Share on other sites More sharing options...
Wingnut Posted July 6, 2015 Author Share Posted July 6, 2015 Ok, so, I'm sniffin' around in the ActionManager source (it's an amazing system, btw)... and I'm thinking about inLERPotaters. Yep, little "ratio engines" that calculate the percentage of animation change across a period of 0-100% of a framecount or duration. What's that? Oh... sorry... it's 'interpolators', I hear. Our easing functions are interpolators, too. It's like putting a measuring tape (marked 0% to 100%) onto the gap between keyframe 0 and the LAST keyframe... of an animation. Interpolated data is math-derived "markers" on that tape measure... indicating the amount of change that SHOULD be happening to a mesh property at THAT point in the "frame line". Wow, huh? Another poor visualization by Wingnut... but that's how I picture an interpolator. It fills-in the gap between user-specified keyframes... with value-change-per-percentage-of-completion ratio "derived" keys. (erf) I went looking for the value-changing interpolators used for the actionManager. I said to my self... SELF... what you really want to do... is make an ActionManager interpolator... do head-to-head battle against a keyframe animation interpolator. Let's see which one is more powerful! One will push the box +x, the other will push -x. The ActionManager's duration needs to be precisely sync'd with the Animation's frame-count... so they finish at the same time/frame. What a battle it will be!!! And then I saw this... https://github.com/BabylonJS/Babylon.js/blob/master/src/Actions/babylon.interpolateValueAction.js Holy cowski! A super-integral part of the ActionManager... it's THE INTERPOLATOR! (run for your lives!) If that wasn't already enough to scare the pants off of you... check out lines 26-60! Omg! You see it just like I do! The ActionManager... is farming-out its LERPin'... to Animation! Pfft. All of a half of a sudden, ActionManager can't seem to pull his own weight, and is all co-dependent upon Animation to cover his butt. Well I never. This discovery sure ruins my "Battle of the Interpolators", eh? pft. I'm SO disappointed, but no, not at all. I find it all quite fascinating. I think it would behoove us to make sure Mister ActionManager is not abusing or mistreating his Animation slave, though. Yep, I said I wanted to mix Animation with ActionManager, and it looks like someone already has, eh? *nod* But... hmm... that's a low-level mixing. We still need upper level. I can create/start an animation from an onExecuteCodeAction... no problems. The real challenge... as mentioned earlier... an ActionManager onAnimationFrameTrigger! Wow. An ActionManager that you can put on Animation objects? Wow! Maybe not, though. Yeah, I know... in the renderLoop... if (animation.currentFrame == 60) { goCrazy(anyarg) } ...but where's the fun in THAT? Party on! Quote Link to comment Share on other sites More sharing options...
reddozen Posted July 7, 2015 Share Posted July 7, 2015 I can easily see where animation frames might need to call say a particle effect. You swing a sword, and it catches on fire when it hits a certain frame. The flames could be a particle effect. You wouldn't want a massive if/case list in your render loop statement for hundreds of skills and animation based effects. No one's really started a large enough game to need these kind of things yet though I assume. I know I haven't had the time to finish my scene optimizations let alone start on actual game details. lol Quote Link to comment Share on other sites More sharing options...
Wingnut Posted July 7, 2015 Author Share Posted July 7, 2015 Hi Red (and others)! Yeah, that makes sense... and that's a good application. I was thinking more... MouseTrap! Yay! (without physics engine). Or... hmm... Remember PeeWee's breakfast machine? Cascades. Animations, that start animations, that start animations, that... (cough) Crazy. Whelp, I am still having problems with my Firefox 38 getting some stuttering at the beginning of the animation. I need to close Firefox to fix it, and that loses all my Animations help-document windows. I needed to make an easy-to-load all-in-one super-helper doc. More about that in a moment. Here's my latest test. It's much the same as the last test, except here, I am starting the 4 animations... using two scene.beginDirectAnimation... lines 71 and 75. Working well. at = animaTION and aa = animatABLE (duh?) I'm starting three animations with the first direct call, and a single animation with the other. In lines 78-82, I tried to call the Animation.animate functions on all 4 animations, but that failed... no target errors. Still learning. Wanna try it? De-activate lines 71 and 75. Re-activate lines 79 thru 82. RUN! No workie. Thoust shalst not start Animations lest ye be with Animatable, it seem-eth. Hey, wanna see my cool super documentation for BJS animations? It's 5.25 documents... smooshed into ONE document! Wow! Ready? Are you sure? http://urbanproductions.com/wingy/babylon/misc/wingsBJSanimDoc.html What kind of idiot would assemble something like... Oh, it was Wingnut? *nod* Now we understand completely. gryff 1 Quote Link to comment Share on other sites More sharing options...
gryff Posted July 8, 2015 Share Posted July 8, 2015 Nice little demo Wingy cheers, gryff Wingnut 1 Quote Link to comment Share on other sites More sharing options...
Wingnut Posted July 9, 2015 Author Share Posted July 9, 2015 Hi gang! I took a minor break from animating, and tried some Oimo compound imposter animation instead. Remember the old electric football games that had a vibrating tin playing field, and used these things on the bottom of each player? https://i2.wp.com/www.itzbases.com/wp-content/uploads/2013/07/Standard-11.jpg Well, in theory, I should be able to create one of these... and then vibrate the ground, and it SHOULD move across the ground. Work in progress https://playground.babylonjs.com/#S8V1Z (broken/old) Do you notice the way that the legs are... umm... parallelogram'd by the quat-active rotate in line 60? Strange, eh? The bottom of each leg... remains flat after the rotate. How does THAT happen? This parallelism (bottom of the legs to the ground)... MIGHT be the reason why this structure doesn't move forward. That's my theory. There is also the issue of the legs sinking into the floor. If anyone would like to run with this, or troubleshoot it, or experiment with it, PLEASE DO, and please report discoveries. Thanks! Party on! Quote Link to comment Share on other sites More sharing options...
iiceman Posted July 10, 2015 Share Posted July 10, 2015 I remember I had a similar problem when trying to build a ramp by rotating a box. somehow the impostor didn't rotate as expected. If I remember right it seemed like it didn't rotate at all (how to show that? shoot little balls at it and see where they bounce off?). I think we somehow managed to do it in a playground (remember the ball that you could push up that ramp?). But I didn't manage to apply the rotation in my game so I eventually switched to moveWithCollisions. If you can figure this out I might give physics another try Quote Link to comment Share on other sites More sharing options...
Vousk-prod. Posted July 10, 2015 Share Posted July 10, 2015 Hi Wingnut, if you like those kind of PeeWee's breakfast machine (don't know that PeeWee guy, is it a US TV show ?), they are called "Pythagorean Devices" also known, as "Rube Goldberg machines". Nice machines : There was a japanese TV show who did marvelous ones, really, the best I've never seen (but that was 10 years ago, the video quality is not so good) :http://www.dailymotion.com/video/x2j7r2_pitagora-suichi_creation Another one, pretty cool : Wingnut and jerome 2 Quote Link to comment Share on other sites More sharing options...
Wingnut Posted July 10, 2015 Author Share Posted July 10, 2015 That... is just marvelous! What honor we would do this man... if we recreated that last one... with BJS and cannon/oimo! I bet it would take us the same amount of time to construct... but our "reset" would be much faster. And what a great torture test for our followCamera! Or maybe an 81,000 keyframe camera animation, eh? erf. Quote Link to comment Share on other sites More sharing options...
Wingnut Posted July 11, 2015 Author Share Posted July 11, 2015 Ok, hi again! Back to animations. http://playground.babylonjs.com/#HH1U5#3 Here I am using The Blax Maneuver. It's the act of making your own animatABLE without using Scene.beginAnimation(), Scene.beginDirectAnimation, or Animation.CreateAndStartAnimation(). I think THOSE three animation-starting methods... will create an Animatable FOR YOU, if needed. But Blax... just bravely created a new Animatable on his own... and even though it didn't work, it made some people go "hmmm". So, he got a 'maneuver' named after him. And, he spearheaded our new Animatable.reset() command! It calls each Animation.reset() found in its ._animations array. Yep, that's right. There is a reset() on animatABLE and on animaTION. No other animatable 'button' command [pause(), restart(), stop()] does that. Only reset() is on both AA's and AT's. There is another famous 'maneuver'... called The Gryff Maneuver... where parental "hinge gizmos" are used to offset mesh pivot points. It's used for things like opening a door, and other fun foolishness [wasd]. And, of course, The Jerome Maneuver... sucking an external script into a playground. Congrats to all who have maneuvers named after them! Oh, the animation demo... sorry, I drifted-off. In this animation demo, I am using ONLY the at4 animation, and I install it in the animatable constructor, last parameter (lines 66-67). Yep, that's right... two Blax Maneuvers... right there, before our very eyes! WOW! I could have added AT's (such as at4) to aa1 and aa2 AFTER they were created... with line 73... aa1.appendAnimations. I could use both. I could construct the AA with some animations in the last parameter... AND also later... append some more AT's . AA's are a handy "stub", aren't they? And it's interesting... that AT's have no target... without the help of an AA. It makes us think, eh? AA's can switch target mesh.... quickly. When they do, they bring their pile of ._animations WITH THEM. This allows us to easily "hopscotch" an AA from mesh to mesh, right? I'm not sure how to apply that power, yet, but it's a cool power. What's that called? A "layer of abstraction"? nod. Every time one of those is added to a stew, it becomes more delicious. Oh yeah, you still want to know how I started our two home-made Blax-Maneuver animatables? That is done in lines 76-77... using the simple aa._animate(delay) function. SO easy! And yep... you see it, folks. I start TWO animatables... and BOTH have the same animation (at4) in their ._animations array (last parameter). Two AA's, starting the same color animaTION. Wow! I figured it would pop a fuse or burn down the scene, but Deltakosh has some .isRunning checks in there. Those are preventing a scene explosion and fire... keeping us puppies safe. YAY! More soon! The BJS animation tutorial is updated with the new reset() info, and so is my Animation SuperDocs mess. A broken playground demo link at the bottom of our Advanced Texturing tutorial, was recently repaired, too. Party on! Three cheers to The Blax Maneuver and to our new reset() function! Yay! Interesting note (maybe): Notice aa1.appendAnimations(box, [at4]); (line 73) Deltakosh decided that appendAnimations() needed to send a TARGET mesh. Why? Could a single Animatable ... have multiple mesh targets? Is the rumor true, about ALL the animations in a scene... maybe hundreds of mesh... all running on a single animatable? A central place for the gods to turn on/off all scene animations (maybe used for SceneOptimization levels)? Does the Blax Maneuver... 'circumvent' (break) some SceneOptimizer operations? Hmm. Stay tuned... we'll find out next week... same bat-time, same bat-channel. Nah, just set scene.animationsEnabled = false to kill all scene anims. SceneOptimizer does not currently affect animations (it seems). Also, it's trending towards NO, AA's cannot have multiple mesh targets. Still learning. shhh. Quote Link to comment Share on other sites More sharing options...
Wingnut Posted July 14, 2015 Author Share Posted July 14, 2015 Hi gang. I've been doing a little evening experimenting with my latest animation demo. Yes, it's getting out-of-control, isn't it? heh. Let's quick-brief. First, the skybox is not animated with animation. It is a purple-fire-color fireProceduralTexture used as the reflectionTexture (line 14). It might be fun to use an animation on the 'time' parameter of the fire's shader, eh? But, that's pretty demented and not easy. There are easier ways to animate the fire texture's shader TIME variable. Moving on, notice the strange paneled look to the skybox? Sure ya do. That is caused by lines 23 and 24... existing. They can be ANY value, it doesn't matter. Remark them out, and the fireTexture will map to the skybox completely different. Interesting. Possibly a framework anomaly. Lines 21 and 22 also show signs of acting strange... but keep in mind that Texture.coordinatesMode = BABYLON.Texture.SKYBOX_MODE ...is not your average texture mode. There are clampings involved. All in all, a strange look for a skybox. The animations? Yeah, I added some more. Now the list is this... - Two Blax Maneuver animations started with _animate -- (aa1 and aa2)- Two animations (1 box and 1 cone) started with scene.beginAnimation -- (aa3 and aa5)- Two animations (1 box and 1 cone) started with scene.beginDirectAnimation (aa4 and aa6)- Two animations (animation7 & animation7b) put on cone shape7 with easings, both started with a single scene.beginAnimation Shape 8 is not animated. Animations at7 and at8 disabled. Other than that... just a whole lot of fun and movement. Lines 196 - 236 is a great area to play with easing functions on shape7 cone. Just change the ef numbers in lines 230 and 231, and then maybe play-with the appropriate variables in lines 196 - 206. I have no great new wisdom, other than to say that our animation easing functions are COOOOOOL. Also, BABYLON.Animation.createAndStartAnimation(name, mesh, targetProperty, framePerSecond, totalFrame, from, to, loopMode) ... seems to be used for creating 2-keyframe (start and stop) animations... FAST. Created fast. It automatically determines the value-mode FOR YOU (What animated value datatype? float? color3? vector3? quat? vector2? etc). Auto-valueModeSet... cool. I didn't create or start any animations with BABYLON.Animation.createAndStartAnimation(), because all my anims are more than 2-keyframes. Maybe someday I'll try it. Sorry that my code is getting difficult to follow. I have coded this in a "batch build" way, but you can tell that the two easing animations (7 and 7b) that are put onto shape 7... are a little different. They require special handling and setting some easing knobs... so they got separated-out in the code a bit... put in their own area. Ease On! pathogen 1 Quote Link to comment Share on other sites More sharing options...
gryff Posted July 14, 2015 Share Posted July 14, 2015 Nice Wingy - must start collecting your playgrounds again (Wonders if this should have a warning - all that animation and colour ) cheers, gryff Wingnut 1 Quote Link to comment Share on other sites More sharing options...
pathogen Posted July 14, 2015 Share Posted July 14, 2015 Hi gang. I've been doing a little evening experimenting with my latest animation demo. Love the skybox! And this is a great PG setup to try out lots of animations. I'm gonna dig into it later. Nice work Wingy! Wingnut 1 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.