RaendyLeBeau

[reopen] ksp Node Definitions - explained.

16 posts in this topic

Hi all, I wonder is it possible to offer a gameobject the Horizontall is oriented (see pictures) to the side (thus in the principle surface).
 

http://imgur.com/gallery/tsoQC


Here pictures for the better understanding. It is a radiator / or an antenna - no matter. It is attached to a ring. This RING is horizontally aligned.
So now it should be connected to a surface (surface).

- why I make the so un not as a horizontal-stack object.
Simple: I could simply move the object (ring) through the tank where it makes sense. Without separating the fuel tank structure.

Big Q: is this possible?

Would it work by defining 'attach-nodes' on the fuel-tank? (Last picture)

For every advice as always very grateful - cheers Raendy

 

lolTRsv.jpg

X2JOwtB.jpg

 

mBRBiAR.jpg

7tDK9uc.jpg

6MYINvu.jpg

BlvEAdu.jpg

AoYBAl2.jpg

 

 

 

Edited by RaendyLeBeau

Share this post


Link to post
Share on other sites

There are multiple ways to achieve this:

1) Use a surface attachment node which is not located in the center of the ring, but shifted outwards to sit on the surface of the mesh it is supposed to be attached to.
You have to use the old, "classic" way of defining such node in the config:

node_ring = x-position, y-position, z-position, angle x, angle y, angle z, size

attachRules = stack, srfAttach, allowStack, allowSrfAttach, allowCollision

Say your ring is 1 unit in diameter, so it would look like this:

node_ringp = 1, 0, 0, -90, 0, 0, 1.

attachRules = 0, 1, 1, 0, 1

Could be +90 though,I cant remember which way it turns.

PRO:

  • can be used on any model with the correct diameter

CON:

  • might need some tries to get the parameters right.
  • node coordinates have to be adjusted each time the model is scaled
  • Also, the part would be not be attached cantered so it could introduce some wobbling/instability.

 

2) you can use nodes defined via a node{} entry in the config that uses an empty gameobject to place the node and its direction. If you do this, place a empty on the surface of the inner vessel, and let its positive z-axis point outwards. Also, place another empty on the ring in the same location as the first one, but pointing its z-direction inwards.

nodessidec1ulq.png

Config on the Core Model

    NODE
    {
        name = top
        transform = node_CoreTop
        size = 3
        method = FIXED_JOINT
    }
    NODE
    {
        name = side
        transform = node_CoreSide
        size = 1
        method = FIXED_JOINT
    }
    NODE
    {
        name = bottom
        transform = node_CoreBottom
        size = 1
        method = FIXED_JOINT
    }

Config on the Ring Model

    NODE
    {
        name = side
        transform = node_RingSide
        size = 1
        method = FIXED_JOINT
    }

PRO:

  • using the node{} method provides very precise nodes that are easy to setup (position and direction can be seen in 3d editor and unity
  • node stays in place regardless of model scale, as it scales with the model
  • ring can be attached higher or lower by just moving the node_CoreSide up or down (or having multiple of then in different heights)

CON:

  • might need some tries to get the parameters right.
  • Also, the part would be not be attached cantered so it could introduce some wobbling/instability.
  • And it needs the node{} setup on the core model.

3) you can use nodes defined via a node{} entry in the config that uses an empty gameobject to place the node and its direction. Like above, but with centered nodes. If you do this, place a empty on the center of the inner vessel, and let its positive z-axis point up or downwards (like a top or bottom node). Also, place another empty on the ring in the same location as the first one, but pointing its z-direction in the opposite direction (down or up).

nodescenterl3umb.png

Config on the Core Model

    NODE
    {
        name = top
        transform = node_CoreTop
        size = 3
        method = FIXED_JOINT
    }
    NODE
    {
        name = center
        transform = node_CoreCenter
        size = 1
        method = FIXED_JOINT
    }
    NODE
    {
        name = bottom
        transform = node_CoreBottom
        size = 1
        method = FIXED_JOINT
    }

Config on the Ring Model

    NODE
    {
        name = side
        transform = node_RingCenter
        size = 1
        method = FIXED_JOINT
    }

PRO:

  • using the node{} method provides very precise nodes that are easy to setup (position and direction can be seen in 3d editor and unity
  • node stays in place regardless of model scale, as it scales with the model
  • ring can be attached higher or lower by just moving the node_CoreCenter up or down (or having multiple of then in different heights)
  • ring is attached perfectly centred

CON:

  • needs the node{} setup on the core model, like above.

 

I use the method 3 on several models (for example the ring droptank of the breeze) and it works perfectly. There is no need for separating the inner model.

1 person likes this

Share this post


Link to post
Share on other sites

@InsaneDruid thank you very much for the SUPER explanation ! The picture explanation is brilliantthank so much ! :D 

Also the hints pro / contra are relevant (thnx)  to the disadvantages I have not correctly thought. - thanks again for your hints.

17 hours ago, InsaneDruid said:
  • ring can be attached higher or lower by just moving the node_CoreCenter up or down (or having multiple of then in different heights)
  • ring is attached perfectly centred

 

yes i agree - method 3. is the best solution for my problem. ! thanks again for your Professional consulting !

 

Edited by RaendyLeBeau

Share this post


Link to post
Share on other sites

@InsaneDruid

  @Bonus Eventus ( I have seen that you can experience synonymous with docking nodes. Therefore my request also to you. )

hi all, i have another Q:

It is possible to make 2 docking port on the same object ("ship"-bee pod). One down there others at the front up.
It tried but it seems so that only the upper (on the front
TF1 ) would function.

It is possible to make 2 docking port on the same object ("ship"). One down there others at the front up.
It tried but it seems so that only the upper (on the front) would function. "Control from here" does not seem to work - there is a total of 3 of them - with none of the three it is possible to switch to the lower side (TF2).

Apparently only one docking port per object can be addressed. 

Of course it could be solved by creating a separate docking port, and attached to the ship. But this would be my last ratio :/

- Later I deleted "TRFbot" and "TRFtop". But has not brought anything.

- bevore i have consulted this thread :

Thank you in advance for your support !

WiUv7gz.jpg

 

8sDJE87.jpg

 

 

http://imgur.com/gallery/tuaoi
config file of bee-pod

Spoiler

 

//----------------------------------------------------
// attach top

NODE
{
   name = top
   transform = TRFtop
   size = 2.0
   method = FIXED_JOINT
//FIXED_JOINT, HINGE_JOINT, LOCKED_JOINT, MERGED_PHYSICS or NO_PHYSICS
}

// attach bottom
NODE
{
   name = bot
   transform = TRFbot
   size = 2.0
   method = FIXED_JOINT
//FIXED_JOINT, HINGE_JOINT, LOCKED_JOINT, MERGED_PHYSICS or NO_PHYSICS
}

// docking nodes are here

 NODE
 {
    name = CONNECT1
    transform = TF1
    size = 2.0
    method = FIXED_JOINT
//FIXED_JOINT, HINGE_JOINT, LOCKED_JOINT, MERGED_PHYSICS or NO_PHYSICS
 }

 NODE
 {
    name = CONNECT2
    transform = TF2
   
    size = 2.0
    method = FIXED_JOINT
//FIXED_JOINT, HINGE_JOINT, LOCKED_JOINT, MERGED_PHYSICS or NO_PHYSICS
 }
 
 

 //----------------------------------------------------
 // docking modules are here

 
  MODULE
 {
    name = ModuleDockingNode
    referenceAttachNode = CONNECT1
    nodeType = size1
    nodeTransformName = TF1
    controlTransformName = LBSI_CDU-62_Bee-POD_Front
 }
 
 // docking bottom
   MODULE
 {
    name = ModuleDockingNode
    referenceAttachNode = CONNECT2
    nodeType = size2
    nodeTransformName = TF2
    controlTransformName = LBSI_CDU-62_Bee-POD_Rear
 }

 //----------------------------------------------------

 

 

Edited by RaendyLeBeau

Share this post


Link to post
Share on other sites
40 minutes ago, RaendyLeBeau said:

@InsaneDruid

  @Bonus Eventus ( I have seen that you can experience synonymous with docking nodes. Therefore my request also to you. )

hi all, i have another Q:

It is possible to make 2 docking port on the same object ("ship"-bee pod). One down there others at the front up.
It tried but it seems so that only the upper (on the front
TF1 ) would function.

It is possible to make 2 docking port on the same object ("ship"). One down there others at the front up.
It tried but it seems so that only the upper (on the front) would function. "Control from here" does not seem to work - there is a total of 3 of them - with none of the three it is possible to switch to the lower side (TF2).

Apparently only one docking port per object can be addressed. 

Of course it could be solved by creating a separate docking port, and attached to the ship. But this would be my last ratio :/

- Later I deleted "TRFbot" and "TRFtop". But has not brought anything.

- bevore i have consulted this thread :

Thank you in advance for your support !

WiUv7gz.jpg

 

8sDJE87.jpg

 

 

http://imgur.com/gallery/tuaoi
config file of bee-pod

  Hide contents

 

//----------------------------------------------------
// attach top

NODE
{
   name = top
   transform = TRFtop
   size = 2.0
   method = FIXED_JOINT
//FIXED_JOINT, HINGE_JOINT, LOCKED_JOINT, MERGED_PHYSICS or NO_PHYSICS
}

// attach bottom
NODE
{
   name = bot
   transform = TRFbot
   size = 2.0
   method = FIXED_JOINT
//FIXED_JOINT, HINGE_JOINT, LOCKED_JOINT, MERGED_PHYSICS or NO_PHYSICS
}

// docking nodes are here

 NODE
 {
    name = CONNECT1
    transform = TF1
    size = 2.0
    method = FIXED_JOINT
//FIXED_JOINT, HINGE_JOINT, LOCKED_JOINT, MERGED_PHYSICS or NO_PHYSICS
 }

 NODE
 {
    name = CONNECT2
    transform = TF2
   
    size = 2.0
    method = FIXED_JOINT
//FIXED_JOINT, HINGE_JOINT, LOCKED_JOINT, MERGED_PHYSICS or NO_PHYSICS
 }
 
 

 //----------------------------------------------------
 // docking modules are here

 
  MODULE
 {
    name = ModuleDockingNode
    referenceAttachNode = CONNECT1
    nodeType = size1
    nodeTransformName = TF1
    controlTransformName = LBSI_CDU-62_Bee-POD_Front
 }
 
 // docking bottom
   MODULE
 {
    name = ModuleDockingNode
    referenceAttachNode = CONNECT2
    nodeType = size2
    nodeTransformName = TF2
    controlTransformName = LBSI_CDU-62_Bee-POD_Rear
 }

 //----------------------------------------------------

 

 

I haven't tried this before, so I have no idea how to do it.

1 person likes this

Share this post


Link to post
Share on other sites

IMHO, delete the controlTransformName lines or let them point to the TF1 and TF2 transform objects.

Maybe even delete the nodeTransformName line.

@Porkjet and @Alskari could help, too, as they seem to have got it to work once.

1 person likes this

Share this post


Link to post
Share on other sites

@InsaneDruid    many thanks for your help and solution hints :)

The current solution is as follows:

http://imgur.com/gallery/lYGV7

 

DjOwkWg.jpg

nGe59EI.jpg


 

Spoiler

 

// nodes definitions are here

 NODE
 {
    name = CONNECT1        //top
    transform = TF1
    //size = size2
    size = 2
    method = FIXED_JOINT //FIXED_JOINT, HINGE_JOINT, LOCKED_JOINT, MERGED_PHYSICS or NO_PHYSICS
 }

 NODE
 {
    name = CONNECT2        //bottom
    transform = TF2
    //size = size2
    size = 2
    method = FIXED_JOINT //FIXED_JOINT, HINGE_JOINT, LOCKED_JOINT, MERGED_PHYSICS or NO_PHYSICS
 }

 
 //----------------------------------------------------
 // docking modules are here
 
  MODULE
 {
    name = ModuleDockingNode
    referenceAttachNode = CONNECT1        //reference to top node
    nodeType = size2
    nodeTransformName = TF1
    controlTransformName = TF1_ctrl
    //controlTransformName = TF1
 }
 
 // docking bottom
   MODULE
 {
    name = ModuleDockingNode
    referenceAttachNode = CONNECT2        //reference to bottom node
    nodeType = size2
    nodeTransformName = TF2
    controlTransformName = TF2_ctrl
    //controlTransformName = TF2
 }
 //----------------------------------------------------

 

 

Edited by RaendyLeBeau
2 people like this

Share this post


Link to post
Share on other sites
On 11.2.2017 at 2:04 AM, RaendyLeBeau said:

The current solution is as follows:

Would like to add : why per docking node 2 need to transform is unclear to me. - the transforms needed for the docking are the "controlTransformName = TF2_ctrl" - these are each rotated by 90 '(see pictures above)

but is ok, i have a solution that works on game.

Edited by RaendyLeBeau

Share this post


Link to post
Share on other sites

Posted (edited)

hi all, hi @InsaneDruid

sorry mate, i have a Q: what i am make wrong here : a simple docking port as usual - Until now I could make this problem-free. 

But now it does not seem to work anymore - What do I overlook here?  Who can give me a tip  :blush:

- many many thanks in advance!

ps. the LOG file has no Error to this part.

http://imgur.com/gallery/35gqd

8N3mTA4.jpg


 

Spoiler

 

    name = LBSI_APAS_ADP-500
    module = Part
    author = Ing.Randazzo - LeBeau Space Industries
    
        
    MODEL
    {
        model = LBSI/STS_AVALON/ATS/LBSI_APAS_ADP_Series/LBSI_APAS_ADP-500
    }
    
       scale = 1
    rescaleFactor = 1

    node_stack_top    = 0.0, 0.0718, 0.0, 0.0, 1.0, 0.0, 2
    //node_stack_top    = 0.0, 0.07181777, 0.0, 0.0, 1.0, 0.0, 2
    node_stack_bottom = 0.0, -0.54, 0.0, 0.0, -1.0, 0.0, 2
    
    //TechRequired = metaMaterials
    TechRequired = heavierRocketry
    entryCost = 0
    cost = 0
    category = Coupling
    subcategory = 0
    title = LBSI_APAS_ADP-500
    description = LBSI_APAS_ADP-500 is fully compatibl with - Clamp-O-Tron Sr. - size 1
    attachRules = 1,0,1,0,0
    mass = 0.18
    dragModelType = default
    maximum_drag = 0.25
    minimum_drag = 0.25
    angularDrag = 0.5
    crashTolerance = 20
    maxTemp = 2000 // = 3400
    bulkheadProfiles = size2
    
    tags = berth capture connect couple dock fasten join moor socket
    
    stagingIcon = DECOUPLER_VERT
    
    MODULE
    {
        name = ModuleDockingNode
        referenceAttachNode = top
        //referenceAttachNode = DockingNode
        nodeType = size2
        
        captureMinRollDot = 0.08
        // captureMinRollDot = 0.98
        snapRotation = true       
        snapOffset = 5
        
        stagingEnabled = False
    }
    
    
        MODULE
    {
      name = FlagDecal
      textureQuadName = FlagTransform
    }
    

}

 

 

 

 

 

FyrxYTR.png

Edited by RaendyLeBeau

Share this post


Link to post
Share on other sites

Silly question: have you tried the other docking port? The one that the highlighted one in the image is attached to?

If that is not working: try without colliders, maybe a collider is blocking the node?

1 person likes this

Share this post


Link to post
Share on other sites
4 hours ago, InsaneDruid said:

Silly question: have you tried the other docking port? The one that the highlighted one in the image is attached to?

If that is not working: try without colliders, maybe a collider is blocking the node?

@InsaneDruid

Hi Druid thanks a lot for your support !!!  it works now - i have changed the config to this :

I changed it back to "top" node. and give the exact 'dockingnode' point. - Before I rounded the value, maybe this was the error.

attachRules = 1,0,1,0,0

    node_stack_top      = 0.0, 0.07181779, 0.0, 0.0, 1.0, 0.0, 2
    node_stack_bottom = 0.0, -0.54, 0.0, 0.0, -1.0, 0.0, 2

    MODULE
    {
        name = ModuleDockingNode
        referenceAttachNode = top
        nodeType = size2

        captureMinRollDot = 0.08
        snapRotation = true       
        snapOffset = 5
    }

 

1 person likes this

Share this post


Link to post
Share on other sites

Posted (edited)

On 18.1.2017 at 8:06 PM, InsaneDruid said:

nodescenterl3umb.png

Config on the Core Model

    NODE
    {
        name = top
        transform = node_CoreTop
        size = 3
        method = FIXED_JOINT
    }
    NODE
    {
        name = center
        transform = node_CoreCenter
        size = 1
        method = FIXED_JOINT
    }
    NODE
    {
        name = bottom
        transform = node_CoreBottom
        size = 1
        method = FIXED_JOINT
    }

Config on the Ring Model

    NODE
    {
        name = side
        transform = node_RingCenter
        size = 1
        method = FIXED_JOINT
    }

PRO:

  • using the node{} method provides very precise nodes that are easy to setup (position and direction can be seen in 3d editor and unity
  • node stays in place regardless of model scale, as it scales with the model
  • ring can be attached higher or lower by just moving the node_CoreCenter up or down (or having multiple of then in different heights)
  • ring is attached perfectly centred

CON:

  • needs the node{} setup on the core model, like above.

 

I use the method 3 on several models (for example the ring droptank of the breeze) and it works perfectly. There is no need for separating the inner model.

@InsaneDruid 

hi druid - what "attachRules" id would be used for this solution ?  the cluster fuel tank does'nt work - it only colliding at side - inpossible to place in the middle of th core-fuel tank...

many many thnks in advance !

here all related pictures:  http://imgur.com/gallery/dnSAc

Ft94JAO.png

 

TihbHr2.jpg

SyR2OPq.jpg

BbO6sQJ.jpg

S2jrkpd.jpg

 

 

here the configs :

core-fuel tank:
 

Spoiler

 

   MODEL
    {
        model = LBSI/STS_AVALON/ATS/RelatedCoreParts/LBSI_CFT-FE465
    }

    rescaleFactor = 1.0
    scale = 1.0

    attachRules = 1,1,1,1,0
    

    //--------------------------------------
    
        NODE
    {
        name = top
        transform = node_CoreTop
        size = 3
        method = FIXED_JOINT
    }
        NODE
    {
        name = center0
        transform = NODE_CoreCenter0
        size = 3
        method = FIXED_JOINT
    }
    NODE
    {
        name = center1
        transform = NODE_CoreCenter1
        size = 3
        method = FIXED_JOINT
    }
    NODE
    {
        name = center2
        transform = NODE_CoreCenter2
        size = 3
        method = FIXED_JOINT
    }
    NODE
    {
        name = center3
        transform = NODE_CoreCenter3
        size = 3
        method = FIXED_JOINT
    }
    NODE
    {
        name = center4
        transform = NODE_CoreCenter4
        size = 3
        method = FIXED_JOINT
    }

    NODE
    {
        name = bottom
        transform = node_CoreBottom
        size = 3
        method = FIXED_JOINT
    }
        
    //--------------------------------------

 

ring-cluster fuel tank
 

Spoiler

 

    MODEL
    {
        
        model = LBSI/STS_AVALON/ATS/RelatedCoreParts/LBSI_CLS-FT365
        
    }
    
    
    rescaleFactor = 1.0
    scale = 1.0

    // node_stack_Center    = 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 3
    // //node_stack_bottom = 0.0, 0.0, 0.0, 0.0, -1.0, 0.0, 3
    
    //attachRules = 1,1,1,1,0
    attachRules = 0,1,1,0,1
    
    // ------------------------------
    NODE
    {
        name = Center1
        transform = NODE_Center1
        size = 2
        method = FIXED_JOINT
    }

 

 

 

Edited by RaendyLeBeau

Share this post


Link to post
Share on other sites

Hi, your cluster tank, do you intend for it to be surface attach or node stack attach, as it stands your attach rules will nullify any stack nodes as it set to dis allow stack mounting  but allows parts to be stacked on to it.   01101 =  stack 0  /  srf attach 1 /  allow stack 1/ allow srf 0 / allow collision 1   , maybe you should go with 10101, but if  you go with 11101 you could use ed extensions to turn off the srf attach if it gives trouble when placing

1 person likes this

Share this post


Link to post
Share on other sites

Posted (edited)

16 hours ago, SpannerMonkey(smce) said:

maybe you should go with 10101, but if  you go with 11101 you could use ed extensions to turn off the srf attach if it gives trouble when placing

HI SpannerMonkey,

ok thanks a lot 4 your hints : i tryed today 11101 : it works nice for the Cluster Tank !!

thnks a lot @SpannerMonkey(smce)

cheers !

 

 

 

Edited by RaendyLeBeau

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now