chriscalef Posted November 30, 2015 Share Posted November 30, 2015 So hey, remember how I said you couldn't actually fly the airplanes yet? Well it's far from perfect, as will be obvious, but progress is definitely being made. I've been working on a chase cam system but am clearly dropping some positions or failing to interpolate or something, because the camera seems to stay in place for several frames of airplane movement and then catches up suddenly, resulting in very jerky/twitchy camera action. Also, though I've attempted to force the camera to use full transforms instead of removing the roll axis as per default, I have so far been unsuccessful, no doubt due to my own incompetence - I can get the roll working, but am messing up when it comes to applying the transform to the camera position, so the end result is awkward, to say the least.But for now, with a chase cam view rather than full cockpit, and with a gentle craft like the Dragonfly ultralight as opposed to a full fighter/aerobatics flier, this could actually be fairly fun to fly... Website note: any chance of supporting vimeo links here directly, someday?Oh yeah, also, in case anyone doesn't like ultralights, here is an illustrative subset of all available aircraft in FlightGear, any of which could flown in T3D now using the same system.http://www.flightgear.org/download/aircraft-v3-4/There are, of course, loads of issues involved in converting the aircraft models over from FlightGear's ac format into Collada (using Blender) and hence into dts inside Torque. If there happen to be any modelers and/or major airplane geeks out there with some free time on their hands, I could definitely use some help with this one! First issue: the nodes seem to be coming in almost but not quite all of the time with no parents, meaning all my ailerons/rotors/everything are parented to the world instead of the wing or wherever they belong. When this is fixed I'll be able to record anims on the planes and include aileron, rudder, landing gear etc movements.Second issue: the textures are almost all wrecked, I got lucky with the dragonfly but there is _much_ work to be done there. Third issue is not a bug, but the next feature (which will totally seal the deal): to read the flightgear xml setup files for each plane, and use them to place all of the cockpit instrument models and whatever else they define. And animate the instruments and controls - airspeed, altimeter, throttle lever, etc.I'm planning on calling up flightgear as a slave process at the time the player walks up to a vehicle and decides to use it, that way I can fire it up with the correct starting location and aircraft type, and turn it off when we're done flying. I have much work to do on the flightgear end to make it an efficient and invisible background program, but for now it's actually kind of fun to let it be itself in a very small window, even on my old machine the extra render doesn't really cost too much when it's 320x240. So anyway, that's the latest greatest. Stay tuned next week, for attack helicopters and people flying out of buildings! Quote Link to comment Share on other sites More sharing options...
chriscalef Posted December 1, 2015 Author Share Posted December 1, 2015 And... in case anyone cares, just a quick report back that the twitchy camera is now *fixed*. Although with a really nasty hack... I think a polite fix is going to require a new camera mode. Expect a better video soon, however. Quote Link to comment Share on other sites More sharing options...
chriscalef Posted December 2, 2015 Author Share Posted December 2, 2015 Fixed video: Still some choppiness vs. the terrain, but the major pack/unpackUpdate problem is gone. Quote Link to comment Share on other sites More sharing options...
JeffR Posted December 2, 2015 Share Posted December 2, 2015 That's really cool!I'm personally holding out for the attack choppers, but it's definitely cool to see it in action there. Can notice a bit of the chop as you mentioned, but overall it seems like a good baseline. Quote Link to comment Share on other sites More sharing options...
chriscalef Posted December 2, 2015 Author Share Posted December 2, 2015 Thanks Jeff! Would be interested in any advice you may have re: the camera solution. Right now I'm just stuffing my airplane transform values into globals and reading them back out on the client side of the camera to bypass the networking entirely, since my main problem was the internal lag of trying to tell the server where my plane was and waiting for it to tell the client a tick later, while the plane itself was meanwhile streaming values directly to the client object. I think I'm going to make a new camera mode that does this, and stop overriding flyMode, but it still seems like a very weird thing to be doing... Quote Link to comment Share on other sites More sharing options...
chriscalef Posted December 3, 2015 Author Share Posted December 3, 2015 Meanwhile, somebody say something about attack helicopters? Quote Link to comment Share on other sites More sharing options...
chriscalef Posted December 6, 2015 Author Share Posted December 6, 2015 Texture issues mostly resolved (although Torque Materials still confuse and befuddle me to no end):http://opensimearth.com/images/screenshots/ka50_textured.jpghttp://opensimearth.com/images/screenshots/ka50_rear.jpgNext, and much larger, step is to add the supporting models, ie rotors and weaponry, and cockpit... Quote Link to comment Share on other sites More sharing options...
chriscalef Posted December 16, 2015 Author Share Posted December 16, 2015 So, some progress here to report back on. First off, so far so good with the mountObjectEx branch from OTHGMars! I would heartily endorse inclusion of this branch in the main tree, barring some lurking problem that has not shown itself yet.I'm still working out my system and deciding what should actually mount where, but my first pass involves a new physicsShapeMount table in the database, which allows me to load up any given physicsShape with as many (currently TSStatic) models as necessary. I'm having some trouble mounting physicsShapes onto other physicsShapes at the moment, not sure why, but I don't expect it to be serious. Anyway, here's my helicopter with the first round of mounts:http://opensimearth.com/images/screenshots/ka50_propdisc.jpgThe blades still look stupid because they are made up of multiple overlapping meshes, and we're seeing all of them at once. However, the exciting news from yesterday is that I discovered the setMeshForceHidden() function in TSShapeInstance, and exposed it to TSStatic, as per this discussion, and now I can turn any meshes I want on or off at will! There are three levels of blades on my ka50 model. The general idea is that when they spin faster, they switch to the broader shaped blades, and it makes the blur look better, but when they slow down enough to be seen they need to switch back to the actual blade shape. The three levels are: the actual rotor blade, a larger "propblur" shape, and an even larger "propdisc" shape. The above image was the propdisc, and here's the propblur:http://opensimearth.com/images/screenshots/ka50_propblur.jpgAnd here's the end goal, the actual blades themselves. Also, I got the tube rockets installed, but I haven't gotten to all the other individual rockets. I'm still trying to figure out the xml files that define all these mount positions for flightgear, so much of the placement here is still manual trial and error.http://opensimearth.com/images/screenshots/ka50_blades.jpgAn attentive eye will note that the center of the blades is not exactly aligned with the rotor. This is because the rotor is tilted forward five degrees, and my next step is to get the blades aligned with that, but first I have to decide whether it makes more sense to attach them to the rotor first, and then get that tilt for free when I mount the rotor, at the cost of making my hierarchy that much more complicated, versus adding some nodes to the helicopter and adding everything separately to those nodes. I'm leaning toward the latter solution. 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.