Jump to content

Kerbin Mini Shuttle


helldiver

Recommended Posts

mLa5tzv.jpg

The wheel well collider is hollow so the strut collider shouldn't puncture it. That means both the cockpit and the wheel well would need 5 colliders components. I suppose the wheel well could be made as one box, and the strut collider could be animated to slide out and not go inside (instead of putting a scale transform controller which tend to be goofy).

Oh and just a heads up to complicate maters more, all the landing gear assemblies are a little complex, they don't just rotate in and out.

Note that the olio strut slides into the strut casing in order to give enough room as well as extend the gear far enough out.

Another important question; in the VAB, parts snap to the vertices on what? The collision mesh or the visual mesh?

The shuttle has been designed assuming that the parts in the VAB would snap to the visual mesh. If they have to snap to the collision mesh, it's not a problem, just that it will take longer to get the collision meshes done.

Also, are we doing something that's not normally done in KSP mods? Feels like we're in frontier territory for some reason.

Edited by helldiver
Link to comment
Share on other sites

mLa5tzv.jpg

Another important question; in the VAB, parts snap to the vertices on what? The collision mesh or the visual mesh?

Parts snap to a point in space, the nodes. You can also define a point in space that a part will use to surface attach to other parts. There is literally no reason to go through the trouble of creating one or more colliders for the casing of your wheel. You have nothing to gain from it, especially since you aren't aiming to make the mod compatible with other peoples parts.

Link to comment
Share on other sites

Parts snap to a point in space, the nodes. You can also define a point in space that a part will use to surface attach to other parts. There is literally no reason to go through the trouble of creating one or more colliders for the casing of your wheel. You have nothing to gain from it, especially since you aren't aiming to make the mod compatible with other peoples parts.

Man I'm so confused now regarding how parts snap in the VAB.

What are nodes?

*beats head against table*. You mean to tell me they didn't program it so that parts snap to vertex?

Ok, so don't make colliders for the wheel well gotcha.

Link to comment
Share on other sites

The green spheres are nodes. They're defined by xyz values in the cfg: http://wiki.kerbalspaceprogram.com/wiki/CFG_File_Documentation#Node_Definitions

or by unity game objects: http://forum.kerbalspaceprogram.com/showthread.php/36455-Partially-Solved-New-Node-System-Unable-to-get-it-working

the node_attach is the point on your part that your cursor will attach to another part. You want a collider for all surfaces that you want to surface attach something to, and all surfaces you want to act as a physical collider.

Link to comment
Share on other sites

The green spheres are nodes. They're defined by xyz values in the cfg: http://wiki.kerbalspaceprogram.com/wiki/CFG_File_Documentation#Node_Definitions

or by unity game objects: http://forum.kerbalspaceprogram.com/showthread.php/36455-Partially-Solved-New-Node-System-Unable-to-get-it-working

the node_attach is the point on your part that your cursor will attach to another part. You want a collider for all surfaces that you want to surface attach something to, and all surfaces you want to act as a physical collider.

Alright I follow

Still, that doesn't answer my question. How do two parts align perfectly so that they are flush? The game automatically does that then? Or do those two parts must have collision meshes that line up perfectly?

(and yes I'm Helldiver2 now since I can't recover Helldiver account info for god knows what reason.)

Link to comment
Share on other sites

You haven't got to have complex colliders for both parts helldiver, just one or the other. If keeping the configuration of colliders in the cockpit how you first shown it, a solid collider for the wheel well is fine. Remember the issue is not animated colliders within a part overlapping. It is animating colliders of one part collidiing with the collliders of another - (ie the strut / olio colliders with the cockpit) since you're keeping the gap for the wheel well in between the cockpits colliders it seems, there wouldn't be a need to worry about colliders overlapping and causing problems.

Link to comment
Share on other sites

Have you considered moving the docking port to the nose of the shuttle so it doesn't take away cargo space? Also, it would make docking easier.

No, that isn't going to be done for now. In the future once we get all this mess squared away, we can make it so that the nosecone can open like a door, revealing a docking port. Would be a marvelous idea. But not in the first version. :D

You haven't got to have complex colliders for both parts helldiver, just one or the other. If keeping the configuration of colliders in the cockpit how you first shown it, a solid collider for the wheel well is fine. Remember the issue is not animated colliders within a part overlapping. It is animating colliders of one part collidiing with the collliders of another - (ie the strut / olio colliders with the cockpit) since you're keeping the gap for the wheel well in between the cockpits colliders it seems, there wouldn't be a need to worry about colliders overlapping and causing problems.

Ok so wait, the parts will snap in VAB correctly regardless of my collider mesh shape?

For example, notice how the Cargo bay segment is flush with the cockpit/command segment right?

So even if I make the cargo bay segment a bunch of boxes, and the cockpit/command segment a bunch of boxes as well, in the VAB they will snap together properly?

Or do I have to define specifically the vertex in which they will snap at?

Do to the complexity, the need of shaders, and plugin writing and integration, ZRM is going to be doing most of the importing. So my question is, @ZRM are you going to be able to determine where all the parts snap at so that the vehicle is flush? Do I need to do that before hand?

I tried finding the vertex coordinate tool but wasn't able. If someone can post it, I'd really appreciate it.

Right now my main concern is making sure the whole shuttle snaps together properly like legos.

[Edit] I downloaded some mods where I ended up fighting with the parts to get them to snap properly. I don't want that to happen with the KSO, that's all.

I once worked on a game that had a very intuitive vertex flagging system. You built your terrain tile as you wanted. You then went into the vertex paint tool and flagged all your vertices to be 0 value. The vertices on the edges that you wanted to snap to another tile, you'd flag 100 (the range was 0 to 100). Scenery vertices (so when you went into the editor scenery would snap to them) were flagged a value of 50. 0 meant nothing could snap to them. You then exported using their tool and it would generate a text file with addresses of all the vertices and their function. Really wish KSP worked like that :(

Edited by helldiver
Link to comment
Share on other sites

It seems that the ladder colliders have to have their axis a certain way.

Can you flag the ladder collider to not be visible? If we can't then I can texture it 100% transparent using our Glass_pane texture channel.

That way I don't have to reanimate the visual ladder and I can keep things much simpler.

Link to comment
Share on other sites

If you are using nodes instead of surface attaching, you can make them ignore collisions anyway. (Its the last number in a node) Then they will snap no matter what.

The problem there is, it could hide improperly overlapped colliders, which can cause phantom toque if they intersect wierdly. You won't know until you try though.

By the way, the wheel colliders in the stock landinggear have 2 unique properties; they are disabled when retracted, so having them folded up inside of the cockpit or wings would not have been an issue. They also ignore the parent of whatever part they are attached to when testing for collision with other parts, so when they fold up they'll pass into the parent with no issue. My gear, which are really an adaptation of C7s original gear, just have a small flat collider which surface attaches to the bottom of whatever you like. That and the wheel collider is all there is. The only time you'd see issues with the collider when folding up was when ti was trying to fold up through a part joint (say the wheel was trying to rest between the joint of the cockpit and whatever part is behind it (fuel tank, cargobay, whatever)

I am concerned your complex collider arrangement will cause you some stability issues. Since you know exactly where the wheels go you could have left the cockpit a solid piece of collider and just made sure your gear folds within it - the colliders should not trouble you then.

Edit: you should create the ladder and airlock collider within Unity if you can - you CAN use a convex mesh collider to make them, but its much easiser to use simple Box or Capsule colliders from Unity.

In any event, if you remove the Mesh Renderer Component from the Ladder and Airlock objects in your scene, they will be invisible. Make sure they have the proper tag and layer set, and "IS Trigger" is checked.

As for Axis: Green (Y) should be pointing up (where the Kerbal head will be pointing) and blue (Z) pointing where the Kerbal would be facing.

Edited by Tiberion
Link to comment
Share on other sites

.

Alright, I understand the whole thing now.

One last issue, it seems my get vector tool isn't the same as the one the KSP guys used.

Anyone have a link to the one they are using which spits out a KSP CFG format?

I don't have KSP Cfg format in mine. Or maybe it doesn't matter and it's just a matter of moving the decimal over.

REMqyvI.jpg

Link to comment
Share on other sites

Right so to recap (I've just caught up after reading about 20 posts), the best way to do the landing gear is to have a solid convex cockpit, solid wheel well and only a wheel collider, with no strut or olio colliders, right?

Helldiver: What I have done in the past is just set up an empty game object in Unity at the point where other parts should attach (e.g. the middle of the door), then just read off its coordinates and put them in the config file.

Link to comment
Share on other sites

Right so to recap (I've just caught up after reading about 20 posts), the best way to do the landing gear is to have a solid convex cockpit, solid wheel well and only a wheel collider, with no strut or olio colliders, right?

Helldiver: What I have done in the past is just set up an empty game object in Unity at the point where other parts should attach (e.g. the middle of the door), then just read off its coordinates and put them in the config file.

Alright, no problem. As long as the parts snap flush without gaps or visual errors.

Ok so the cockpit segment can be one solid box (or slightly molded box) with the landing gear another box, and it can be inside it right?

So for the wings to cargo bay, we can have a box eventhough when you assemble the vehicle those boxes might end up inside the cargo bay collider box?

Link to comment
Share on other sites

Alright, no problem. As long as the parts snap flush without gaps or visual errors.

Ok so the cockpit segment can be one solid box (or slightly molded box) with the landing gear another box, and it can be inside it right?

So for the wings to cargo bay, we can have a box eventhough when you assemble the vehicle those boxes might end up inside the cargo bay collider box?

I think at this point the best way to see what works would be to test it.

Link to comment
Share on other sites

Alright, so this should work in theory right?

(I forgot that the cargo bay had to be hollow inside so that you could load it with stuff.)

JZvBt0n.jpg

Note that in-game the wing's collider would intrude into the cargo bay collider.

I think at this point the best way to see what works would be to test it.

I'm trying my best to not have to double up on work, or keep errors to a minimum.

Link to comment
Share on other sites

Alright, so this should work in theory right?

(I forgot that the cargo bay had to be hollow inside so that you could load it with stuff.)

Note that in-game the wing's collider would intrude into the cargo bay collider.

I'm trying my best to not have to double up on work, or keep errors to a minimum.

Those colliders look too simple, and take up too much room. Remember that they are used for attaching surface attach parts as well. The wing collider, as well as over-simple, looks far too thick.

Edit: The cargo bay doors look alright, but everything else should be made to follow the surfaces a bit better.

Edited by ZRM
Link to comment
Share on other sites

Remember that they are used for attaching surface attach parts as well.

Ok now I'm lost. The problem at this point is I don't know what to model or how.

-I'm assuming by surface you mean the Rudder and anything players put inside the cargo hold, correct? By surface you don't mean the wings, fuselage segments, etcetera right?

-You said that the elevon doesn't need a collider. So I'm assuming it'll animate and properly control the aircraft in game correct?

Using red or a clear color, please draw an overlay of what the collision cage(mesh) should look like.

DYX9WgX.jpg

and the cargo bay

HqCrRQR.jpg

Project is on hold at the moment until I can get that information. We may have to move the project to Skype so I can put the mesh together in real time while one of you guys coaches me the collision meshes' edge flow. It would save a ton of time.

Link to comment
Share on other sites

Right so to recap (I've just caught up after reading about 20 posts), the best way to do the landing gear is to have a solid convex cockpit, solid wheel well and only a wheel collider, with no strut or olio colliders, right?

Close, though I'd recommend you have a representative collider for the Olio. this'll stop weird things happening if you drive over something taller than your landing gear wheels. It might also be an idea to split the cockpit or other objects into shapes that'll be better when convexed. I'll do a diag later when I'm not at work.
Alright, no problem. As long as the parts snap flush without gaps or visual errors.

Ok so the cockpit segment can be one solid box (or slightly molded box) with the landing gear another box, and it can be inside it right?

So for the wings to cargo bay, we can have a box eventhough when you assemble the vehicle those boxes might end up inside the cargo bay collider box?

On the Cockpit and Landing gear yes you can get away with that. On the Cargo bay no, no, no and more no. It'd be fine if the cargo bay had nothing animating inside, and if the cargo is a pernament fixture in the vessel. But I somehow doubt that'll ever be the case. If the cargo is undocked it'll suddenly be in collision with whole cargo bay, since the payload is now its own vessel. This is something you definately don't want to happen.

Also don't get too hung up on the idea of simple colliders. They end up being terrible to use ingame. Use Mesh colliders where you can, and go down to Box Colliders only on things you won't generally attach to, or for triggers like Ladder Collision boxes. You also won't need to make a mesh for those box colliders as thats done in Unity later.

Use one or even two convex mesh colliders for the wings. I say possible two, because splitting that in the right place would allow you to get the concave section's collsion behavior.

for the Cargo bay doors you want really thin Box colliders OR split the door rendered mesh into two or more sections, which will each become the convex mesh colliders.

As far as nodes go, I've always done it in the CFG. your simplest way is get the location in your 3d modelling program of where you want to join, swap the Y and Z co-rds around and pop that in the CFG file.

If you aren't working Scale = 1 and rescaleFactor = 1 in the CFG yet, I'd recommend you make sure you are. It'll save you a big headache when working with Internals and Cockpits.

Link to comment
Share on other sites

Here's a quick sketch of what I think the collision should roughly look like. Notice in particular how close it matches the cargo hold - this is important for any attachments people may add.

y0T45nl.png

zHSzBhU.png

Edit: The back edge of the wing is probably a lot thinner than I have made out.

Edit 2: You may also want to split the faces representing the leading edge of the wing into two, to better match the surface.

Edited by ZRM
Link to comment
Share on other sites

On the Cockpit and Landing gear yes you can get away with that. On the Cargo bay no, no, no and more no. It'd be fine if the cargo bay had nothing animating inside, and if the cargo is a pernament fixture in the vessel. But I somehow doubt that'll ever be the case. If the cargo is undocked it'll suddenly be in collision with whole cargo bay, since the payload is now its own vessel. This is something you definately don't want to happen.

I think Helldiver meant the intersection between the wing and the cargo bay, not the cargo bay and the cargo. As long as the wing collider does not penetrate the cargo hold it should be fine.

Link to comment
Share on other sites

helldiver, I think now you've flipped the opposite way - trying to oversimplify things. Your initial idea of how to do the Cockpit was a spot on assessment of how the Cargo Bay should be done. Either way, heres a diagram of how I'd do it :

HvT8l6t.png

I didn't use the above as I doubted I could make it make sense that way. I hope this does make some sense.

And for the wing:

wf5Kh4U.png

Because these colliders will define both in flight behaviour and VAB/SPH behaviour.

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • Create New...