Jump to content

[WIP] Mass Driver Parts and Plugin, request for modeling help!


PeterDolan

Recommended Posts

Hey all,

Building a mass driver on the mun has been sitting in the back of my mind for a while. I want to launch large Kethane tanks into orbit with a massive kick and a tiny circularization, where they will be intercepted by an orbital refinery. Today, I got around to doing something about it.

Here's the repository in GitHub: https://github.com/pdwryst/KSPMassDriver

Here's a recent copy for directly downloading: https://drive.google.com/file/d/0B0a7PNLYAdzQYThma05fWnd3NnM/edit?usp=sharing

Allow me to paint a picture. Imagine a mass driver on the mun. It's a pair of long, thin, delicate rails attached to a massive capacitor and control system. Nearby sits a reactor and an electrical generator from interstellar, an attachment system cable snaking between them, providing megawatts of power. The driver itself sits on a rotating platform and a hinge from infernal robotics, so that it can be pointed in any direction. All of that is on a wide, stable base.

Next to the mass driver is a utility crane with the kerbal attachment system. I keep thinking of the dockyard cranes that pick up containers off the beds of trucks and drive them around the yard. This crane is tall, wide, and on wheels. It picks up a newly-filled Kethane tank with a docking port, some RCS, and a probe body on the bottom. Wheeling it over to the mass driver, which has been pointed vertically at the sky, it's delicately maneuvered into position over the base of the driver, at which point the docking ports pull themselves together and lock the payload into place.

The crane wheels away.

In the silence of space the platform rotates to point due east, and the rails begin tilting down toward the horizon, coming to rest at just three or four degrees, barely enough to miss the rim of the nearby crater.

3...

2...

1...

VVVvvvvp! AWAY THE TANK IS HURLED! A new orbit, Ap 143,236, Pe 5, on its way to circularization and orbital processing.

I think that sounds totally awesome.

You could also set up a very powerful one to fire retrograde along the mun's orbital trajectory, returning a package from the mun to the surface of kerbin without any propellants! Sweet.

Excited? Good.

Opinionated? Awesome! Let me know what you think!

Here's how I've been thinking about the mass driver parts:

* Large enough to be difficult to get to the mun, but not so large that they aren't built into the environment.

* Realistic power consumption and dynamics. Consumes the megajoules resource from the interstellar mod, and produces a decent amount of waste heat on firing.

* Reloadable. The point of contact with the payload should be a docking port, so that a payload can be loaded into the driver.

* Space-constrained. A mass driver is essentially two long conductive rods between which the payload rests. When activated, the mass driver arcs current through the entire assembly, creating acceleration with the magnetic field. It should be a challenge to fit a payload in between those rods.

* 1.5m, 2.75m, and 4m parts, to snugly fit 1.25m, 2.5m, and 3.75m vessels between the rails.

* More advanced parts unlocked through the tech tree, including graphene capacitors and plasma rails (animations for this would be kick-ass) for higher energy discharges.

So far, I have written the plugin code that will consume electric charge and kick an attached part with a large force based on some of the physical properties of the mass driver, specifically the length of and distance between the rails, the diameter of the rails, and the conductivity of the rails material. The conductivity of the rails is affected by the rails' temperature, so you would be advantaged by waiting for night time, and you would need to wait some time for the rails to cool down enough.

Give it a try, let me know what you think!

We need help with textures for the models that lo-fi has created!

Edited by PeterDolan
Link to comment
Share on other sites

I like this idea very much. interstellar integration is cool too.

I imagine that mass driver woudl me quite large, how about some on site construction? Delivering most important parts as a whole but construction frame, and joining all things into one structure woudl be done on site by construction crew.

I dont know if requiring building crane for loading cargo is too complicated.

Maybe allow player to attach cargo to mass driver in VAB-like enviroment?

Link to comment
Share on other sites

Good job so far! I tested it, and:

* It's not reloadable -- I can dock to the massdriver port, but not get shot out again.

* It's only one way -- I hyperedited this in space, and while it correctly shoots stuff out, there's no recoil.

* It may be easier to keep the docking port logic and have the "undock" use megajoules to increase the docking port's ejection force...

Link to comment
Share on other sites

Hey, nice idea! I'm the other way round - plenty of experience making models (though making textures is not really my thing), but I could do with a hand writing Unity scripts as I've got no experience there.

Got some conceptual sketches? I'll knock something up for you, won't take me long. Maybe you could give me a helping hand with some script writing? Exchange is no robbery, and all that!

Link to comment
Share on other sites

So I had a play. Untextured, obviously, and I won't be upset if that's not what you had in mind! I assume you were thinking of having the rest modular, so separate base, stackable modules to mount batteries, heat sinks and reactors etc? Taken some liberties with your idea, but there you go. I have a few ideas buzzing around my head for all the other bits, but I'll wait until you get in touch :)

https://www.dropbox.com/s/mnzeyb4ctdtar38/MassDriver.zip

I've over-written the stock .mu you'd bundled and adjusted the attachment nodes in the .cfg. rescaleFactor is set up for the 3.75m tanks, btw!

Link to comment
Share on other sites

Great idea, glad someone is making this!

* It's only one way -- I hyperedited this in space, and while it correctly shoots stuff out, there's no recoil.

I get the feeling that the forces involved would destroy the mass driver if recoil was simulated (especially if it was sitting on some terrain). But maybe I'm wrong and it's possible - would be very cool/

Link to comment
Share on other sites

Hey, nice idea! I'm the other way round - plenty of experience making models (though making textures is not really my thing), but I could do with a hand writing Unity scripts as I've got no experience there.

Got some conceptual sketches? I'll knock something up for you, won't take me long. Maybe you could give me a helping hand with some script writing? Exchange is no robbery, and all that!

Yeah! I'd be happy to take a crack at whatever you're thinking about. Would you like to work with lo-fi on modeling and texturing? I think lo-fi has made a good start with the first model.

I've uploaded all of this to github, so if you're comfortable working in that system then collaboration may be a bit easier. Dropping files in this thread is fine too, of course :)

Link to comment
Share on other sites

Good job so far! I tested it, and:

* It's not reloadable -- I can dock to the massdriver port, but not get shot out again.

* It's only one way -- I hyperedited this in space, and while it correctly shoots stuff out, there's no recoil.

* It may be easier to keep the docking port logic and have the "undock" use megajoules to increase the docking port's ejection force...

Thanks for the thoughts!

* Thanks for the note about reloading. I'll look into what's going on with that. I have a suspicion.

* I was thinking about recoil force, yeah, but I didn't want to require people to go to extreme lengths to tether the driver to the surface of a planet. Thinking about it more, though, I think it makes sense to add recoil force whenever the ship it's attached to is not landed. What do you think? I've updated it to do that now, and it's cool to have recoil in space -- this means you can use it as a propulsion system, which is a totally legitimate use for them :)

* I tried making it into a mega-docking port, but the programming is a bit tricky. In particular, I wouldn't be able to change the menu button's label -- "decouple" just isn't quite as exciting as "Activate Driver."

Link to comment
Share on other sites

So I had a play. Untextured, obviously, and I won't be upset if that's not what you had in mind! I assume you were thinking of having the rest modular, so separate base, stackable modules to mount batteries, heat sinks and reactors etc? Taken some liberties with your idea, but there you go. I have a few ideas buzzing around my head for all the other bits, but I'll wait until you get in touch :)

https://www.dropbox.com/s/mnzeyb4ctdtar38/MassDriver.zip

I've over-written the stock .mu you'd bundled and adjusted the attachment nodes in the .cfg. rescaleFactor is set up for the 3.75m tanks, btw!

That looks Awesome! Yeah, I was definitely thinking of building only the rails part. You would set up whatever else you need to generate megajoules separately, whether that's a reactor and generator or a remote power array, I think it makes sense for this project to just supply the kapow.

I set up a github repository for this (now linked in my original post), so if you're comfortable with using that then just let me know your github account and I'll add you to the project. If not, dropping zip files in the thread is totally fine.

It looks like the collision mesh for your draft part is only around the base -- is that a limitation of the modeling? Would it be possible to make the rails themselves also collide-able, so that it would be a challenge to reload it?

Looking at pictures of mass drivers, it's important that the rails be stabilized against each-other. Basically, there's a huge force driving forward down the rails, but there's also some force pushing the rails apart. Some mass drivers have the rails inside a full enclosure -- basically a cannon's barrel. Others have rings providing structure along the rails. Can we add some structural elements stabilizing the rods?

I really dig the awesome jagged bits, they make me think that they're there to stabilize the payload as it is shot out. Can we remove one of them, so that it gives the part an interesting asymmetry? Then it would make sense to angle it above the horizon with the jagged stabilizing bits "down" toward the surface, and it would make it easier to reload the driver if you had one open side.

Thanks! We're off to the races!

Link to comment
Share on other sites

Great idea, glad someone is making this!

I get the feeling that the forces involved would destroy the mass driver if recoil was simulated (especially if it was sitting on some terrain). But maybe I'm wrong and it's possible - would be very cool/

Yeah that was my original suspicion as well -- that recoil would make the whole thing just unmanageable -- but I just realized that I can disable the recoil for ships that are landed. Then, when your ship is in space, you could actually use this as a propulsion system, which is totally awesome!

Link to comment
Share on other sites

I made something that kinda sorta works, cfg file only:



PART
{

// --- general parameters ---
name = massdriver_distal
module = Part
author = spiritplumber

MODEL
{
model = Squad/Parts/Utility/dockingPort2/model
position = 0, 0, 0
scale = 1.0, 3.0, 1.0
rotation = 0, 0, 0
// parent = anotherModelTransform <---------Not necessary unless Second or subsequent part.
// texture = model000 , Squad/Parts/Command/probeCoreOcto/model000
// texture = model001 , Squad/Parts/FuelTank/fuelTank2-2/model001
}

rescaleFactor = 1

node_stack_top = 0.0, 0.2828832, 0.0, 0.0, 1.0, 0.0, 1
node_stack_bottom = 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 1
node_attach = 0.0, 0.0, 0.0, 0.0, -1.0, 0.0

// --- FX definitions ---

fx_gasBurst_white = 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, decouple
sound_decoupler_fire = decouple


// --- editor parameters ---
TechRequired = advConstruction
entryCost = 28000
cost = 440
category = Propulsion
subcategory = 0
title = Mass Driver Rod
manufacturer = Peter
description = Put this on a mass driver launchable container, and stack it with the base. Does it contain advanced linear motors, or just a big spring? Who knows.

// attachment rules: stack, srfAttach, allowStack, allowSrfAttach, allowCollision
attachRules = 1,0,1,0,0

// --- standard part parameters ---
mass = 0.025
dragModelType = default
maximum_drag = 0.2
minimum_drag = 0.2
angularDrag = 2
crashTolerance = 30 //10
maxTemp = 3400
fuelCrossFeed = False
breakingForce = 200
breakingTorque = 200

//stageOffset = 1
//childStageOffset = 1

MODULE
{
name = ModuleDockingNode
referenceAttachNode = top
nodeType = railgun
undockEjectionForce = 30000
}

}


PART
{

// --- general parameters ---
name = massdriver_trunk
module = Part
author = spiritplumber

MODEL
{
model = Squad/Parts/Utility/dockingPortLarge/model
position = 0, 0, 0
scale = 0.5, 3.0, 0.5
rotation = 0, 0, 0
// parent = anotherModelTransform <---------Not necessary unless Second or subsequent part.
// texture = model000 , Squad/Parts/Command/probeCoreOcto/model000
// texture = model001 , Squad/Parts/FuelTank/fuelTank2-2/model001
}

rescaleFactor = 1

node_stack_top = 0.0, 0.87, 0.0, 0.0, 1.0, 0.0, 1
node_stack_bottom = 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 1
node_attach = 0.0, 0.0, 0.0, 0.0, -1.0, 0.0

// --- FX definitions ---

fx_gasBurst_white = 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, decouple
sound_decoupler_fire = decouple


// --- editor parameters ---
TechRequired = advConstruction
entryCost = 28000
cost = 440
category = Propulsion
subcategory = 0
title = Mass Driver Base
manufacturer = Peter
description = Put this on a mass driver launcher system. Does it contain advanced linear motors, or just a big spring? Who knows.

// attachment rules: stack, srfAttach, allowStack, allowSrfAttach, allowCollision
attachRules = 1,0,1,1,0

// --- standard part parameters ---
mass = 1.0
dragModelType = default
maximum_drag = 0.2
minimum_drag = 0.2
angularDrag = 2
crashTolerance = 30 //10
maxTemp = 3400
fuelCrossFeed = False
breakingForce = 200
breakingTorque = 200

//stageOffset = 1
//childStageOffset = 1

MODULE
{
name = ModuleDockingNode
referenceAttachNode = top
nodeType = railgun
undockEjectionForce = 30000
}

}

Link to comment
Share on other sites

That looks Awesome! Yeah, I was definitely thinking of building only the rails part. You would set up whatever else you need to generate megajoules separately, whether that's a reactor and generator or a remote power array, I think it makes sense for this project to just supply the kapow.

I set up a github repository for this (now linked in my original post), so if you're comfortable with using that then just let me know your github account and I'll add you to the project. If not, dropping zip files in the thread is totally fine.

It looks like the collision mesh for your draft part is only around the base -- is that a limitation of the modeling? Would it be possible to make the rails themselves also collide-able, so that it would be a challenge to reload it?

Looking at pictures of mass drivers, it's important that the rails be stabilized against each-other. Basically, there's a huge force driving forward down the rails, but there's also some force pushing the rails apart. Some mass drivers have the rails inside a full enclosure -- basically a cannon's barrel. Others have rings providing structure along the rails. Can we add some structural elements stabilizing the rods?

I really dig the awesome jagged bits, they make me think that they're there to stabilize the payload as it is shot out. Can we remove one of them, so that it gives the part an interesting asymmetry? Then it would make sense to angle it above the horizon with the jagged stabilizing bits "down" toward the surface, and it would make it easier to reload the driver if you had one open side.

Thanks! We're off to the races!

Sweet, glad you like it! I have some ideas for a base, capacitors, batteries etc. I'll crack on and set a few up. If we can find someone who likes texturing, I'll get all the UVW-unwrapping ready too.

The collision mesh is set up like that deliberately, it's to do with the way KSP handles them. They have to be convex, so a U shape is a no-no. If you try to make the rails part of the collider, you end up with a massive cheese wedge shape with the space in between the rails part of the collider and wouldn't be able to dock. However, I can make separate colliders for the rails which will work in game, though we need to be careful the payloads don't hit them! I wonder if this might not be better handled by scripting a force pushing the payload into the center of the rails, though... would work much better, and actually more realistic.

Yup, can remove one of the guides and will join the other to the rails. Some rings might look very cool too, actually. I literally spent an hour or so playing with ideas, so it's more of a conceptual sketch than a complete model! An asymmetrical design actually makes sense because it gives room to dock stuff into the driver easily. I might add a loading area at the bottom before the rails start too.

I've never used Github, but I ought to. I'll set up an account.

I'm working on a wheel pack at the moment. I've pretty much solved the weird issues the stock wheels have, but I want to make the suspension spring rates adjustable in-game for different gravity. I know it's possible, as it's just a property of the WheelCollider, but I'm struggling getting my head around Unity scripting. I also have a cunning idea for a levitation platform! If I send you the models and a Unity scene with wheel rigged, could you have a look? Would be brilliant to have it as a tweakable, but a little menu gui or just assigning a couple of keys would be a great start.

Link to comment
Share on other sites

Hmmmm. Though I'd actually try using it. Have I missed something when installing this? Reverted back to your original files, but still does nothing when clicking activate. DLL appears to have loaded, I believe. Running 0.23.5

Unpacking Untitled Space Craft

(Filename: C:/BuildAgent/work/d3d49558e4d408f4/artifacts/StandalonePlayerGenerated/UnityEngineDebug.cpp Line: 53)

MassDriver activating!

(Filename: C:/BuildAgent/work/d3d49558e4d408f4/artifacts/StandalonePlayerGenerated/UnityEngineDebug.cpp Line: 53)

Resource System Error: Requested resource (id: -1960769700) does not exist

(Filename: C:/BuildAgent/work/d3d49558e4d408f4/artifacts/StandalonePlayerGenerated/UnityEngineDebug.cpp Line: 53)

Near zero megajoules consumed, aborting.

(Filename: C:/BuildAgent/work/d3d49558e4d408f4/artifacts/StandalonePlayerGenerated/UnityEngineDebug.cpp Line: 53)

Am I right in thinking you've created a resource called Megajoules? Surely that's just another way of expressing electricCharge?

Link to comment
Share on other sites

Ah, haven't tried Interstellar. The part.cfg does specify

Assume I need the mod in that case..

or you can just add

RESOURCE_DEFINITION

{

name = Megajoules

density = 0.0

flowMode = NO_FLOW

transfer = NONE

isTweakable = true

}

to a Resources.cfg

Link to comment
Share on other sites

Its been a while since anything has happened (6 months) but your free to use the models I did for the Mass Relay mod. I'm just putting the parts up for anyone to use with no license.

http://www./download/kh808t6fzt7ztv2/MassRelayNoPlugin.zip

http://forum.kerbalspaceprogram.com/threads/56289-0-22-Mass-Relay-%28no-release-yet%29-Warping-all-over-the-place

http://www.youtube.com/watch?feature=player_embedded&v=cYs5o0dKV3c

OEL97Ei.jpg

aE9wCjK.jpg

Link to comment
Share on other sites

can someone post screenshots of new model?

im curious

Please think of it as a conceptual sketch. I'm useless at actually sketching, so it's a lot easier to just throw it into KSP to see how it looks ;)

yF2wg57.png

Edited by lo-fi
Link to comment
Share on other sites

This thread is quite old. Please consider starting a new thread rather than reviving this one.

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...