Nuke Posted August 20, 2013 Share Posted August 20, 2013 i suppose you could do it that way. id probibly replace the bumpers with lateral wheel colliders to serve as bearings (and these could be invisible). but one collision detection glitch can derail you. also you might load your save to find that the train isnt on the track anymore. so those are things to think about. it would also be very easy to test if its viable. build a track segment out of primitives, slap on a 2 minute texture, set it up in unity for a test run. if you are going to have a train plugin, then you can do more like keep the train on the rail with code. you can handle animations of wheels. perhaps also have the capability to lock objects to terrain. speed up physics. plugin gives you a lot of advantages. Link to comment Share on other sites More sharing options...
Tw1 Posted August 20, 2013 Author Share Posted August 20, 2013 You make some good points there. Plus, having thought about it, most of the advantages that kind of track could be replicated with a plugin based system. but one collision detection glitch can derail you. also you might load your save to find that the train isn't on the track anymore. I wonder how likely that would be though, as long as I get the colliders right. Rails made of stock parts seem to run alright. The kerbtown maker said they might add node connections, like in the ship editors in future, which would make getting things lined up much simpler. But I like the advantages that could come from a plugin. If someone would like to team up to help bring railways to KSP, they'd be most welcome. Link to comment Share on other sites More sharing options...
TinyPirate Posted August 20, 2013 Share Posted August 20, 2013 At the bottom of my experiments album is a shot of a suspended cart for a roller coaster. It works really well, however, ANY seam in the track tends to cause the thing to clip. For interest and possible design assistance. Link to comment Share on other sites More sharing options...
Tw1 Posted August 20, 2013 Author Share Posted August 20, 2013 Those are some impressive creations!Clipping at high speed would be bad... Link to comment Share on other sites More sharing options...
Nuke Posted August 20, 2013 Share Posted August 20, 2013 trainwrecks would have the side effect of being very kerbal though. Link to comment Share on other sites More sharing options...
nothke Posted August 20, 2013 Share Posted August 20, 2013 (edited) You don't need convex colliders for static objects!! No need to mess up with separate colliders (unless your model is high poly). Just make your model and import it with a mesh collider WITHOUT ticking "convex".On the other hand, I tested my system in practice. I built a short test section with 2 straights and 2 curves and made a small depot with a ramp to put the train on tracks. I used modular multiwheels mod's wheels in this test.So this is what happened:As I suspected earlier, the biggest problem are the curves.Every poly that the wheels/train/bumper laterally collides with in a curve makes a side shock and in most cases this shock breaks the train apart (even with heavy struts."Bumper" or any contact of the vehicle via a non-wheel object slows the train down due to friction - drastically. So lateral wheels as one of you suggested is a must. I avoided this problem with making the wheels at an angle, and it worked perfectly, like here:except of course....the train tends to derail a lot due to not so low CoG, I imagine putting cargo on top would even make this problem worse.in the image above you can see small "puffs" of smoke on the curve, that is where the wheels hit the sides and you get the side shocks.How to solve the problems:Lateral wheels to prevent friction, this one I mentioned.hiigher poly curves, to smooth the side shocks as much as possible.Slow down signs on tight curves. This is a must to prevent side shocks and derailments.Cambered track - I think this is necessary if we are intending to make high speed rail, and I am intending to.Other types of trains/tracks to consider:Monorail, as the one presented on the beginning is a good idea. Problem with monorails is that switches would be more complicated, and also with my "guided truck" system you can drive it on roads as well, monorails you can't. Solution to tilting/cog problem might be solved with the double lateral wheel system: if the rail is tall enough and there is a double set of lateral wheels, one near the top and other near the bottom, derails might be the thing of the past.Hanging trains - like the Schwebebahn might be a good solution for cog problem, the train would tilt itself under weigth in corners so no need to think about cambers, although this needs lots of testing.By the way, top speed on straights is about 70 m/s (but could be practically anything if you put more engines), and a non-destructive, non-derailable top speed in curves is around 45 m/s Edited August 20, 2013 by nothke Link to comment Share on other sites More sharing options...
Tw1 Posted August 20, 2013 Author Share Posted August 20, 2013 Now that is cool!- I think this is necessary if we are intending to make high speed rail, and I am intending to.As part of Kerbin City? That will be cool. And high speed should be the goal, no point setting up a long line from your base to a resource deposit if it takes forever to get there. I was going to try using a T shape rail thing, but didn't get around to it.. Maybe that would hold stuff down better. This was just the one model? Link to comment Share on other sites More sharing options...
TinyPirate Posted August 20, 2013 Share Posted August 20, 2013 My coaster/suspended cart thing has real issues with any piece of raised track - instant clipping issues. I can't work out how to get the thing to turn a corner cleanly. Link to comment Share on other sites More sharing options...
NGTOne Posted August 20, 2013 Share Posted August 20, 2013 (edited) You don't need convex colliders for static objects!! No need to mess up with separate colliders (unless your model is high poly). Just make your model and import it with a mesh collider WITHOUT ticking "convex".On the other hand, I tested my system in practice. I built a short test section with 2 straights and 2 curves and made a small depot with a ramp to put the train on tracks. I used modular multiwheels mod's wheels in this test.-IMGSNIP-So this is what happened:As I suspected earlier, the biggest problem are the curves.Every poly that the wheels/train/bumper laterally collides with in a curve makes a side shock and in most cases this shock breaks the train apart (even with heavy struts."Bumper" or any contact of the vehicle via a non-wheel object slows the train down due to friction - drastically. So lateral wheels as one of you suggested is a must. I avoided this problem with making the wheels at an angle, and it worked perfectly, like here:-IMGSNIP-except of course....the train tends to derail a lot due to not so low CoG, I imagine putting cargo on top would even make this problem worse.in the image above you can see small "puffs" of smoke on the curve, that is where the wheels hit the sides and you get the side shocks.How to solve the problems:Lateral wheels to prevent friction, this one I mentioned.hiigher poly curves, to smooth the side shocks as much as possible.Slow down signs on tight curves. This is a must to prevent side shocks and derailments.Cambered track - I think this is necessary if we are intending to make high speed rail, and I am intending to.Other types of trains/tracks to consider:Monorail, as the one presented on the beginning is a good idea. Problem with monorails is that switches would be more complicated, and also with my "guided truck" system you can drive it on roads as well, monorails you can't. Solution to tilting/cog problem might be solved with the double lateral wheel system: if the rail is tall enough and there is a double set of lateral wheels, one near the top and other near the bottom, derails might be the thing of the past.Hanging trains - like the Schwebebahn might be a good solution for cog problem, the train would tilt itself under weigth in corners so no need to think about cambers, although this needs lots of testing.By the way, top speed on straights is about 70 m/s (but could be practically anything if you put more engines), and a non-destructive, non-derailable top speed in curves is around 45 m/sI think it should be noted that that looks like a VERY tight curve, as far as high-speed trains go. Real life high-speed track curves are often banked (to prevent derailment at high speed), and have radii on the order of hundreds of meters or even kilometers. This problem might be resolved by making the curves of sufficient radius and banked, to prevent high-speed derailment (assuming the plugin option is still off the table). The fact that you were able to take that flat turn at 165 km/h without derailing or blowing up is, honestly, rather surprising. Edited August 20, 2013 by NGTOne Link to comment Share on other sites More sharing options...
Tw1 Posted August 20, 2013 Author Share Posted August 20, 2013 (edited) According to the Encyclopedia of Railways I've got: (these are raidi) 4,000m = 256km/h1,000m = 128 km/h500m = 80km/h200m = 30 km/h100m = 15 km/h It doesn't give info on banking angles, (apart from giving 150mm as max for stationary trains) and this is for Earth gravity and real life physics.. Coping with the various gravity wells of the Kerbol system may give problems if it just relies on banking. Edited August 20, 2013 by Tw1 Link to comment Share on other sites More sharing options...
nothke Posted August 20, 2013 Share Posted August 20, 2013 According to the Encyclopedia of Railways I've got: (these are raidi) The radius of my curve is around 300m and I've got 40m/s = 144 km/h That means it's waaay better than it should be xD Link to comment Share on other sites More sharing options...
NGTOne Posted August 20, 2013 Share Posted August 20, 2013 (edited) It doesn't give info on banking angles, (apart from giving 150mm as max for stationary trains) and this is for Earth gravity and real life physics.. Coping with the various gravity wells of the Kerbol system may give problems if it just relies on banking.The beautiful bit is that banking works the same anywhere, because it's not a function of gravity, it's a function of speed. The faster you're moving, the more effectively the bank has you glued to the track.However, I will grant that, the higher the gravity of the body, the more speed you need to stay on the track and not just tip over sideways. Given that the only (at present) landable body that has higher gravity than Kerbin is Eve, I don't think that's too much of a problem, though.The radius of my curve is around 300m and I've got 40m/s = 144 km/h That means it's waaay better than it should be xDI'll grant that's true - however, I should think that, for cross-planetary railways, top speed should be closer to 200 m/s (or even higher), to make trucking your stuff across the body bearable. That means very wide curves, likely with a fairly significant bank to them.That being said, I think the big limiting factor in terms of speed won't be curves, I think it'll be inter-track clipping. Hit a clipping point at 200 m/s, and your train is gonna go somersaulting off the track. Edited August 20, 2013 by NGTOne Link to comment Share on other sites More sharing options...
Nuke Posted August 20, 2013 Share Posted August 20, 2013 (edited) It doesn't give info on banking angles, (apart from giving 150mm as max for stationary trains) and this is for Earth gravity and real life physics.. Coping with the various gravity wells of the Kerbol system may give problems if it just relies on banking.i guess you can calculate the lateral acceleration of the turn at a particular speed as a function of the radius and tangential velocity, which is the same as the train speed (use a centrifuge calculator, like this one http://www.artificial-gravity.com/sw/SpinCalc/) and call it x. then call acceleration from gravity y. then do atan2(x,y) to figure out the optimal track bank angle.for a train going around a 4km curve at 250kph, you need about a 7 degree bank. sounds about right. Edited August 20, 2013 by Nuke Link to comment Share on other sites More sharing options...
Faark Posted August 20, 2013 Share Posted August 20, 2013 Does that train have to use the physics system at all? Why not just make it a cinematic for now? Sure, that would prevent us from flying into them and having realistic crashes, but should allows more creative freedom and might save some performance as well. Link to comment Share on other sites More sharing options...
Nuke Posted August 20, 2013 Share Posted August 20, 2013 this would be kinda cool to have along with extraplanetary launchpads so i can move ore around without burning up all the kethane around my base getting it. also going the plugin route you could make some concessions for mass driver launch systems. would certainly go with my usual colonize all the things way of playing. Link to comment Share on other sites More sharing options...
NGTOne Posted August 20, 2013 Share Posted August 20, 2013 this would be kinda cool to have along with extraplanetary launchpads so i can move ore around without burning up all the kethane around my base getting it. also going the plugin route you could make some concessions for mass driver launch systems. would certainly go with my usual colonize all the things way of playing.The mass driver thing's been done. Doesn't use train-like mechanics, though, as far as I understand - it just catapults your spaceship out the end. Link to comment Share on other sites More sharing options...
Nuke Posted August 20, 2013 Share Posted August 20, 2013 (edited) i didnt know somone went and made one. it was a thing i was thinking about doing eventually. even though this thing kinda looks like a launch loop and it probibly shouldnt be able to work on kerbin. i was thinking more something modular i could pack up and take to the mun with me. i think i might be saying too many stupid things, this usually means i need sleep. Edited August 20, 2013 by Nuke Link to comment Share on other sites More sharing options...
Tw1 Posted August 20, 2013 Author Share Posted August 20, 2013 (edited) this would be kinda cool to have along with extraplanetary launchpads so i can move ore around without burning up all the kethane around my base getting it.I may have a base in exactly the same situation. It secretly wants to rival KSC, but the closest ore was found 100 Km away. I should think that, for cross-planetary railways, top speed should be closer to 200 m/s (or even higher), to make trucking your stuff across the body bearable. Sounds about right, that'd be the max. Or maybe a little lower, so it doesn't wipe out the use of orbit hops completely. Does that train have to use the physics system at all?As far as I know, it has to to a certain extent, or there will be problems attaching the train bogie to other parts. I may be wrong. If someone who can write code decides to join, then it might be able to just follow a set path. I hope. Edited August 20, 2013 by Tw1 Link to comment Share on other sites More sharing options...
nothke Posted August 20, 2013 Share Posted August 20, 2013 the first tests. Now on video: Link to comment Share on other sites More sharing options...
NGTOne Posted August 20, 2013 Share Posted August 20, 2013 (edited) Sounds about right, that'd be the max. Or maybe a little lower, so it doesn't wipe out the use of orbit hops completely. I meant the DESIGN maximum - players can exceed, but it's at their own risk the first tests. Now on video:-VIDSNIP-I think coupling them AFTER rolling them onto the track would have worked better On a more serious note, I think that (barring a programmer joining up), you've basically hit the nail on the head - KAS for coupling, and self-propelled trains all around. Edited August 20, 2013 by NGTOne Link to comment Share on other sites More sharing options...
Tw1 Posted August 20, 2013 Author Share Posted August 20, 2013 the first tests. Now on video:-snip-That seems to be working well. I wonder how well they'll stand up at speed. I like the way the puffs from multiwheels look like steam from a steam engine...Leaving space for kerbals to walk about to connect the cables seems like a good idea.Also, I have been thinking that by making the train bogie part ridiculously strong, that could overcome some of the problem of bumps in the track somewhat. Assuming the rest of the train doesn't fall to bits from shaking when it crosses from one segment to another. Link to comment Share on other sites More sharing options...
NGTOne Posted August 20, 2013 Share Posted August 20, 2013 That seems to be working well. I wonder how well they'll stand up at speed. I like the way the puffs from multiwheels look like steam from a steam engine...Leaving space for kerbals to walk about to connect the cables seems like a good idea.Also, I have been thinking that by making the train bogie part ridiculously strong, that could overcome some of the problem of bumps in the track somewhat. Assuming the rest of the train doesn't fall to bits from shaking when it crosses from one segment to another.I seem to recall that TouhouTorpedo's Modular Multiwheels had a part that was basically a free-floating hinge, based on Damned Robotics - you could use those, with docking ports on the ends, as couplers. Link to comment Share on other sites More sharing options...
nothke Posted August 20, 2013 Share Posted August 20, 2013 (edited) Ok, I've ran rocket-train tests now on an improved, longer track with a 700m radius curve, and I must say I'm astonished!I reached a top speed of 230 m/s (828km/h!!) on a straight section and it goes pretty good. I even tried to derail myself intentionally by turning, and it's very very stable even at 200m/s. It looks like these angled wheels are sort of, self-correcting cause when they collide with the wall they tend to go down, when they are sitting on the surface they tend to go inside.In the curve, a safe speed is 75 m/s, and a top speed without breaking the train or derailing it is 80 m/s.I have to say that you can really reach big speeds, and this is just a start of the experiment, I am sure I could improve on it and build an even more stable version.Oh, and I've solved the roll-on thingy with a V ending, now it's easy to get inside, if you do the same with the outside walls, it will be very safe.Also, I have been thinking that by making the train bogie part ridiculously strong, that could overcome some of the problem of bumps in the track somewhat. Assuming the rest of the train doesn't fall to bits from shaking when it crosses from one segment to another.One goal the train is to keep the cargo in, preferably one piece. The wheels are strong enough to withstand the shocks, but the cargo I'm afraid won't be, so we need to keep the rides as smooth as possible rather than as impact/breaking resistant as possible Edited August 20, 2013 by nothke Link to comment Share on other sites More sharing options...
NGTOne Posted August 20, 2013 Share Posted August 20, 2013 Ok, I've ran rocket-train tests now on an improved, longer track with a 700m radius curve, and I must say I'm astonished!I reached a top speed of 230 m/s (828km/h!!) on a straight section and it goes pretty good. I even tried to derail myself intentionally by turning, and it's very very stable even at 200m/s. It looks like these angled wheels are sort of, self-correcting cause when they collide with the wall they tend to go down, when they are sitting on the surface they tend to go inside.In the curve, a safe speed is 75 m/s, and a top speed without breaking the train or derailing it is 80 m/s.I have to say that you can really reach big speeds, and this is just a start of the experiment, I am sure I could improve on it and build an even more stable version.Oh, and I've solved the roll-on thingy with a V ending, now it's easy to get inside, if you do the same with the outside walls, it will be very safe.-IMGSNIP-One goal the train is to keep the cargo in, preferably one piece. The wheels are strong enough to withstand the shocks, but the cargo I'm afraid won't be, so we need to keep the rides as smooth as possible rather than as impact/breaking resistant as possibleYou'd need either some sort of suspension system, or track smoothing around curves and (ESPECIALLY) grade changes. If someone tries to build a track that goes from 0% (flat) to 10% (very freakin' steep for a train) instantly, they're gonna have a problem when their high-speed train hits it. Link to comment Share on other sites More sharing options...
nothke Posted August 20, 2013 Share Posted August 20, 2013 *cough* *cough*, new speed recordhttp://i.imgur.com/sUlrHLQ.png..just before the track runs out xDI guess that colliders are good enough for the "top speed" to be almost unlimited.. The real problem are curves and elevation changes now, we gotta focus on them. For the steep slopes, I think a bigger problem is going from 10% to 0% xD train's gonna fly out. I guess it is possible to make transitions really smooth. But anyway, there MUST be a system of signs that warn the driver like "80 m/s limit in 2 km" "..in 1km" "BRAKE NOW" "..80 m/s limit in 500m", "80 m/s limit!!!" of course you make 100 giant signs in between cause everything will swoop by you really freaking fast.I am making a bigger multitrack test track now with elevation changes and I'll try camber this time. Link to comment Share on other sites More sharing options...
Recommended Posts