Jump to content

First mod - attachment node problems and questions


mech_engr

Recommended Posts

Yesterday I started making my first mod. I come from a visual effects / engineering background so modeling and texturing was a breeze - especially since I had to minimize polys and texture map resolution (opposite from what I'm used to). I made two parts, a stackable hexagon core piece, and a radially attached arm piece that can be attacked to each of the six sides of the core.

Briefly, I'm working on a system of parts that, because of their geometry, should only be attached at very precise locations. Naturally, I decided to make attachment nodes at each of the six sides of the core, and a corresponding node for the arm pieces. Here's a diagram of what I want:

Node_help_file.png

Currently, it works... but it's not ideal: the user has to manually rotate each piece around Y before it can be attached (this will be more and more cumbersome as I develop larger, higher-sided core pieces). And that's because of the last three numbers in the node attachment definition being "0,1,0" for up, correct? So I tried changing those vectors so that they point outward from the core piece, but that doesn't work at all because then it renders the entire core piece un-attachable to anything (even the stack top and bottom nodes). In fact, no matter what I change the attachment vector numbers to, the core piece becomes unusable. ALL of the nodes have to point up or down for anything to work.

So, the big question is, how can I make radially-attached parts automatically snap to their parent, "core", part at desired angles?

Also, what is the difference between a "node_attach" and a "node_stack_connect" definition? I haven't found ANY materials online that answer this, and both seem to work fine.

Any guidance will be appreciated! Thank you!

Link to comment
Share on other sites

"node_attach" is surface attach, the object you drag will slide along the surface of another part and attach where you click.

"node_stack_" are the green balls you see in Editor mode. parts will snap together when their two green spheres get close together. they can be named anything from what I can tell. as long as you feed the correct name to the modules that requests a node for reference. e.g. the docking port module.

Link to comment
Share on other sites

hi looking at your part I'd say the node_attach is what you need for the radial attached parts, the node attach does not show as a ball as does node stack.

Node attach is mainly used for surface attached parts like the radial pats of your pic, by using node attach you can also make use of the symmetry tool in the vab/sph and the editor extension mod which allows up to 32 times symmetry I believe.

To use the node attach ideally you would set the part to be attached to have it's base at 0.0.0 not essential but easier to start, then specify the node in the cfg something like

node_attach = 0.0, 0.0, 0.0, 0.0, 0.0, 1.0

which basically means surface attach at 0.0.0 and have a node that is z up( this usually takes some experimentation before perfection is achieved)

Which would work if your attachable part is at 0,0,0 and in the part you wish them to be attached to you would in the attach rules have something like

//Attachment rules (Stack, srfAttach, allowStack, allowSrfAttach, allowCollision)
attachRules = 1,0,1,1,0

which allows things to be surfaced attached to it

Using the attach nodes means you dont have to specify nodes on the core part

Link to comment
Share on other sites

To answer your big question straight, put 6 nodes on the hexagon (you can name them stack_node1 to stack_node6), you set the vector to "outside" according to each normal vector.

You can get the correct coordinates using 3dsmax script "get vector tool" (see this for more info) and don't forget to add stackSymmetry setting on the hexagon config (it will make possible to connect 6 arms at once in editor).

The script is not mandatory as the hexagon make things easier for you as angle can be calculated without too much trouble (each angle is 60° so coordinates are, kind of cos(60) and sin(60) depending on each face I guess).

On arm part, just put a single stack node at the bottom (or the left/top/... depending its own orientation, matching the wider area). Another node on the opposite side (top) if you wish to stack other parts (tank, girder, ...).

hope this help.

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