JCPalmer Posted November 23, 2016 Share Posted November 23, 2016 Was try to using locked target to keep my subject "in frame' rather than a corresponding animation to rotate camera (QI calls camera._getViewMatrix() for meshes that are locked on to cameras as they are moved). It is much more accurate. Problem is I want to discontinue at one point. When I do, camera jumps back to before. Want it to stay where I left off. Tried this, but not what I want: // unplug hero from sceneCamera var tmpScale = BABYLON.Vector3.Zero(); var tmpTrans = BABYLON.Vector3.Zero(); var tmpRotQ = new BABYLON.Quaternion(); sceneCamera._viewMatrix.decompose(tmpScale, tmpRotQ, tmpTrans); sceneCamera.rotation = tmpRotQ.toEulerAngles(); sceneCamera.lockedTarget = null; Quote Link to comment Share on other sites More sharing options...
Wingnut Posted November 23, 2016 Share Posted November 23, 2016 Hi JC. Happy turkeyness, pilgrim! Hey, what happens if you set camera.target = camera.lockedTarget.position... just before nulling the lockedTarget? Just a thought. *shrug* Update: http://playground.babylonjs.com/#MUVYP#0 My idea doesn't work, sorry. Oh well, I'll keep thinking. JCPalmer 1 Quote Link to comment Share on other sites More sharing options...
Klaas Posted November 26, 2016 Share Posted November 26, 2016 Hi, how about that ... http://playground.babylonjs.com/#MUVYP#1 ... the position of the dummy is a reference to the spheres position. As long you dont assign a new position object it will work. When you want to revert from the sphere as target you just make a copy of the position to the dummy position. Wingnut and JCPalmer 2 Quote Link to comment Share on other sites More sharing options...
JCPalmer Posted November 27, 2016 Author Share Posted November 27, 2016 @Klaas, this almost works indirectly by assigning a stand in when you no longer wish to track. Does not give you the ability to (re-)start animating via rotation though. I also am placing a sign then a dialog in front of the camera based on its rotation / direction (scene). They are now placed at the off screen place the lockedTarget was initiated. Too bad, locked target gives very professional results. Even the snap to the target looks good, because the fire grand entrance makes it look like all those cut-to's of film & tv. Wingnut 1 Quote Link to comment Share on other sites More sharing options...
Wingnut Posted November 27, 2016 Share Posted November 27, 2016 hahah... what a marvelous scene, JC! You are such a mega-talent! It's... friggin' perfect. Are you using the timeControl event thingy? (I guess I could go sniff code). (I could go for a zip-up, too, if you feel so inclined.) That's a sweet sweet intro! Well done. Quote Link to comment Share on other sites More sharing options...
JCPalmer Posted November 27, 2016 Author Share Posted November 27, 2016 Yes this is the demo scene I made for QI. Just updated it so the dialog at the end works. Turns out only 1 camera can be a picker. I dispose of the bottom form at end. You could always just click on the Whoopstopia button to reload the scene. Not as fast as restart, but no way to get around this BJS limitation. Need to get a couple of the scenes up there, which are missing (Human Emotions & Rig Developer) Quote Link to comment Share on other sites More sharing options...
JCPalmer Posted November 27, 2016 Author Share Posted November 27, 2016 BTW, you have access to the entire Github repo. I have not added all the .blends. The way Blender does rename games when you update makes it messy to put in repo. Will straighten some of them out soon. Wingnut 1 Quote Link to comment Share on other sites More sharing options...
Wingnut Posted November 27, 2016 Share Posted November 27, 2016 I don't need the blender files. I want a demo of the QI stuff... so I can stare at the code while eating xmas cookies... and see how ya did it... and steal all your code for my own "sequence" project. Sequencing is excellent fun. It's story telling, baby. Of course, I could always use the "click to continue" to turn the pages of the story... but... timing is so crucial to story telling. So is audio. The sound effects have to be just right. And... oh... we can do lip sync on face bones, too. Coooool. Ok, I got the repo... I got the goods. A couple hundred hours... I'll make something as cool as your thing, JC. (maybe). For some reason, though, my mind is on cartoons of Donny Trump fornicating with farm animals. I wonder what THAT is all about. Thanks Jeff... for the cool demo and system. I know you say it's Blender-only, etc etc... but... nah. I'll program that time controller from the playground... you watch. I got a soldering iron and these here xmas cookies... I can jury-rig something together. I don't need bones, either. I just want to make simple robots talk and fart and kick things. Rock'em Sock'em, BJS-style. I need clocked (actionManager-aimed) events, with pre-fetched media files... so I can get "mbone"-grade sync. (what did he say?) Remember Mbone? That was really something, huh? *scratch scratch* Pretty close-to "start your own internet TV station". Gotta put-on a good show. BJS knows how to do that. JC showed us how. Just for fun, I tried to match Trumpelstiltskin's hair color... to a color3 rgb value on a BJS plane. Couldn't do it! His hair is some color that is impossible to match with a BABYLON.Color3. Weird. Might need a "urine-colored radiance" post-process/shader. Quote Link to comment Share on other sites More sharing options...
JCPalmer Posted November 27, 2016 Author Share Posted November 27, 2016 You can assign a POV processor on a mesh & after QI is initialized (no shapekeys or skeleton unless Blender) QI.TimelineControl.initialize(scene); var doorSnd = new BABYLON.Sound("tomb", "tomb.mp3", scene); var leftDoorQueue = new QI.PovProcessor(myMesh); // or camera / Light var moveLeft = new QI.MotionEvent(doorMillis, new BABYLON.Vector3(4.4, 0, 0), null, {sound: doorSnd}); leftDoorQueue.queueEventSeries(new QI.EventSeries([moveLeft]); The Door meshes were exported as QI.Meshes, but did not have to be. Not sure I should help you with your toon, but it did pop into my head that a Hillary face would look good on a goat or donkey. I cannot un-see that. When the sound is pre-defined first, like the doorSnd, all you do is set the doorMillis for your corresponding MotionEvent to the same length. I viewed the car crash sound with Audcity. Saw how long the brake screech was. Set my first event to that, and it hit EXACTLY at the right time. Wingnut 1 Quote Link to comment Share on other sites More sharing options...
Klaas Posted November 27, 2016 Share Posted November 27, 2016 Hi JCPalmer, have a look here. I used the code from the abstractMesh lookAt function and it works nicely. http://playground.babylonjs.com/#MUVYP#2 Is this what you where looking for? Wingnut and JCPalmer 2 Quote Link to comment Share on other sites More sharing options...
JCPalmer Posted November 28, 2016 Author Share Posted November 28, 2016 Have not pushed this code yet, but am switching to it. It does not set rotation.z, so my sign drags a little below the ground. I was setting the vertical position of the sign anyway, so will just change the amount. The sign mesh origin is placed above it, and in the center in Blender for a simple rotation animation to work. Sounds like lookAt will not work when things get vertical. Quote Link to comment Share on other sites More sharing options...
Klaas Posted November 28, 2016 Share Posted November 28, 2016 Hi, its rotation, not position anymore. Camera Z rotation is roll ... a loookAt has no roll component. 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.