Jump to content

Is anyone else having trouble with stack nodes on modded parts?


Recommended Posts

For some reason I'm having a really hard time getting modded pieces to attach to stock ones. They will only attach if they are parts with two nodes (top and bottom) and I hold Alt and connect the second node :P They surface attach no problem. Anyone else come across this or know of a solution?

Ex:

zi8LPRyh.png

f4g1przh.png

Link to comment
Share on other sites

Hmm interesting... The cockpit above is from my own mod so I can fix all of the parts that are doing this. How exactly do the nodes have to work now? The only part of mine that works correctly with stack nodes is the one that I have nodes defined with NODE{}. I looked through stock configs and they seem to still have the old node coordinates..

Link to comment
Share on other sites

I'm looking at the issue myself today. As far as I can see it's a case of making sure node orientation is set correctly to -1.0 or 1.0, rather than just letting it default.

Edited by AlphaAsh
Link to comment
Share on other sites

I suspect this will be a problem with many mods. The stock parts afaik are all correct. If you have game object nodes that don't work you will need to turn them around 180 degrees. The correct orientation is +Z.

There are also other fixes to the stack nodes for anyone interested, which allow you to create more varied parts without side-effects. Here's what I found.

9jGSKa7.png

Link to comment
Share on other sites

I suspect this will be a problem with many mods. The stock parts afaik are all correct. If you have game object nodes that don't work you will need to turn them around 180 degrees. The correct orientation is +Z.

There are also other fixes to the stack nodes for anyone interested, which allow you to create more varied parts without side-effects. Here's what I found.

http://i.imgur.com/9jGSKa7.png

Ahh this info is great to know, thanks! Good thing I made sure all of my attach nodes were facing +Z from the start.

Link to comment
Share on other sites

I suspect this will be a problem with many mods. The stock parts afaik are all correct. If you have game object nodes that don't work you will need to turn them around 180 degrees. The correct orientation is +Z.

There are also other fixes to the stack nodes for anyone interested, which allow you to create more varied parts without side-effects. Here's what I found.

http://i.imgur.com/9jGSKa7.png

I may feel awful silly, but you can define stack nodes in Unity?

Link to comment
Share on other sites

I may feel awful silly, but you can define stack nodes in Unity?

Indeed you can. Best way really. No need to mess around with numbers. It's just an empty referenced with a module. Very convenient. Remember that orientation must be +Z and not what it says in that thread.

- - - Updated - - -

I've edited my post there to reflect that. Remember to give them names like "top" and "bottom" if other modules make use of the nodes, like the docking node.

Link to comment
Share on other sites

Indeed you can. Best way really. No need to mess around with numbers. It's just an empty referenced with a module. Very convenient. Remember that orientation must be +Z and not what it says in that thread.

- - - Updated - - -

I've edited my post there to reflect that. Remember to give them names like "top" and "bottom" if other modules make use of the nodes, like the docking node.

The more you know eh!

Many thanks for the information. :)

Link to comment
Share on other sites

Indeed you can. Best way really. No need to mess around with numbers. It's just an empty referenced with a module. Very convenient. Remember that orientation must be +Z and not what it says in that thread.

Is there a way to snap an empty object to a mesh vertex in unity? I ended up using the old coordinate method in the past because I couldn't line them up precisely, but since I have to update the nodes anyway it's a good time to try again. Btw holding v didn't seem to do it.

Link to comment
Share on other sites

Is there a way to snap an empty object to a mesh vertex in unity? I ended up using the old coordinate method in the past because I couldn't line them up precisely, but since I have to update the nodes anyway it's a good time to try again. Btw holding v didn't seem to do it.

You'll probably have to figure out the 3D coordinates of that vertex in Blender (or whatever 3D modelling program you're using), and then transcribe the values manually to the empty GameObject you're using to define the node.

Link to comment
Share on other sites

I'm still a bit confused on which values exactly to change in the nodes...I've been looking at some configs and can't really tell. For example I was noticing that with the flat base in procedural fairings I can't connect the fairings, and the others I can, but the node values are exactly the same except for some different height values.

Any chance someone could post a successful before and after of their node in a config?

Link to comment
Share on other sites

I'm still a bit confused on which values exactly to change in the nodes...I've been looking at some configs and can't really tell. For example I was noticing that with the flat base in procedural fairings I can't connect the fairings, and the others I can, but the node values are exactly the same except for some different height values.

Any chance someone could post a successful before and after of their node in a config?

The second three numbers define the orientation. If you're working with axis-aligned nodes, then one of those numbers will be -1 or 1. change it to its negative. -1 becomes 1 and vice versa. If you'd dealing with angled nodes I would forget all that and just switch to EGOs. In fact I would switch to EGOs anyway. +Z then is all you need to know.

Edited by Cpt. Kipard
Link to comment
Share on other sites

Is there a way to snap an empty object to a mesh vertex in unity?

Not any that I know of. I just used Blender empties and "snap to vertex" for all nodes and thrustTransforms. Unity treats Blender empties as it's own.

Link to comment
Share on other sites

The second three numbers define the orientation. If you're working with axis-aligned nodes, then one of those numbers will be -1 or 1. change it to its negative. -1 becomes 1 and vice versa. If you'd dealing with angled nodes I would forget all that and just switch to EGOs. In fact I would switch to EGOs anyway. +Z then is all you need to know.

Can we get someone from squad to explain what they have changed with the node definitions, or at least a refined and detailed descrition of how to set stack nodes in unity.

In fact the cfg files have had rather consistent appearance over the last few versions have changed alot, I think the Squad folks should detail the changes and effects.

For some reason I'm having a really hard time getting modded pieces to attach to stock ones. They will only attach if they are parts with two nodes (top and bottom) and I hold Alt and connect the second node :P They surface attach no problem. Anyone else come across this or know of a solution?

Even scale mods of stock parts do not attach properly, so

I made a scale mod of the RT10 SFRB it will attach to the MK1 capsule in all orientations on stack nodes, but a half scale mod of RT10 will only attach to the bottom. So there appears to be a bug in the program on that limits further attachment.

My own part constructs will attach on the top node correctly but when I try to attach from the bottom instead they attach at the 0,0,0 position.

This is something squad needs to explain precisely.

Edited by sumghai
Merged consecutive posts
Link to comment
Share on other sites

Can we get someone from squad to explain what they have changed with the node definitions, or at least a refined and detailed descrition of how to set stack nodes in unity.

-snip-

This is something squad needs to explain precisely.

SQUAD developers are often too busy to respond to individual questions, so it's up to us add-on authors to figure out the answers.

To cut a long story short:

- The stack attachment node definition format has not changed - it is still of the form:


node_stack_bottom = x, y, z, angx, angy, angz, size
node_stack_top = x, y, z, angx, angy, angz, size
node_attach = x, y, z, angx, angy, angz, size

- What SQUAD has changed is the underlying logic of the game that handles stack nodes. In 0.90 and earlier, the direction stack nodes face didn't matter (this was actually a bug). This was fixed in 1.0, to the stack node directions now do matter.

Consider the relationship between Blender and Unity coordinate systems:

Blender_to_KSP_Co-Ordinates.png

In the case of the stack nodes, note that "Up" is Y+ and "Down" is Y-.

So to fix your add-on part's stack nodes, make sure that the sign of the angy parameter in each of your stack node definitions is correct (i.e. 1.0 for a stack node facing upwards, and -1.0 for downwards)

Link to comment
Share on other sites

SQUAD developers are often too busy to respond to individual questions, so it's up to us add-on authors to figure out the answers.

To cut a long story short:

- The stack attachment node definition format has not changed - it is still of the form:


node_stack_bottom = x, y, z, angx, angy, angz, size
node_stack_top = x, y, z, angx, angy, angz, size
node_attach = x, y, z, angx, angy, angz, size

- What SQUAD has changed is the underlying logic of the game that handles stack nodes. In 0.90 and earlier, the direction stack nodes face didn't matter (this was actually a bug). This was fixed in 1.0, to the stack node directions now do matter.

Consider the relationship between Blender and Unity coordinate systems:

http://www.alternatewars.com/Games/KSP/Tut1/Blender_to_KSP_Co-Ordinates.png

In the case of the stack nodes, note that "Up" is Y+ and "Down" is Y-.

So to fix your add-on part's stack nodes, make sure that the sign of the angy parameter in each of your stack node definitions is correct (i.e. 1.0 for a stack node facing upwards, and -1.0 for downwards)

Nice explanation but it did not work, i'm going to take a close look at my stock scale mod and see if it set differently. This is a much deeper problem than the orientation vector.

Link to comment
Share on other sites

Nice explanation but it did not work, i'm going to take a close look at my stock scale mod and see if it set differently. This is a much deeper problem than the orientation vector.

Scaling might be tangentially related, but for the most part, is a different animal altogether.

Try starting a new thread and post your config for us to examine.

Link to comment
Share on other sites

Scaling might be tangentially related, but for the most part, is a different animal altogether.

Try starting a new thread and post your config for us to examine.

I managed to get it to work, it would appear that they flipped the polarity on the attach vector, so now I will have to go flip it on all the scale mods.

Scaling is simply a means of reducing the parameters of working with a full mod, I did get it to work, almost all of my old scale mods will have to be shifted.

Some bug.

Link to comment
Share on other sites

So if I use blender empties I have to rotate them 90* from where they would be in unity right?

If you're using the latest versions of Blender and Unity editor, there is a built-in Blender prefab system that automatically handles Blender model import and corrects the orientation without further user intervention.

Link to comment
Share on other sites

If you're using the latest versions of Blender and Unity editor, there is a built-in Blender prefab system that automatically handles Blender model import and corrects the orientation without further user intervention.

Yep, the only problem is that if you try to shift your zero position in blender from its starting zero position, depending on how you set up your game object unity may try to use the original position, you have to still keep an eye on the coordinates in Unity to get the orientation and zero-ing that you want.

Link to comment
Share on other sites

Yep, the only problem is that if you try to shift your zero position in blender from its starting zero position, depending on how you set up your game object unity may try to use the original position, you have to still keep an eye on the coordinates in Unity to get the orientation and zero-ing that you want.

If you shift your zero position in Blender, remember to apply the position/rotation/scale transformation, so that Unity will also update itself accordingly.

Link to comment
Share on other sites

If you shift your zero position in Blender, remember to apply the position/rotation/scale transformation, so that Unity will also update itself accordingly.

And you can still have a problem in Unity. Let me give an example where this can pop up, I should add that it might also shift back to the old axis. Suppose that you want to add a collider mesh to a another design. In this case you create a game object that contains two parallel created game objects. Unity will want to place the first mesh into the level 1 object, in this case you move the object to the second layer, and you might find the mesh reverts to the old rotation or old reference coordinates. Therefore if you are making complex parts in Unity you have to continually check to make sure the coordinates and orientation remain set properly.

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...