Jump to content

[WIP] "FloatNode" / Procedural Engine Housing (23-2-2014 New download v0.4)


codepoet

Recommended Posts

Current Download

You can download something to play with here. It is offered in the spirit of seeking feedback and bug reports. I am grateful to those who take the time to experiment and test my work. Please do not use it for anything important - no compatability with any previous or future releases is guarenteed.

Source code is available here. Even better than posting a bug is to post a fix for it :) Get in touch with me if you are planning to create a pull request.

Introduction:

I have started work on something that has been spinning around in my head for a while now - a solution to several problems:

1) stack mounting an upper stage with more than one engine above a booster

2) Fairings for engine compartments

3) Mountings for engine clusters.

Of these problems 1) can be solved using the PWB Engine fairing for clustered engines. 2) Can be addressed using Procedural Fairings and 3) by mobius works. However I wanted to sort of bring them all together, along with another part I created for my own use that I call the "FloatNode".

The idea is to have a single part mounting plate, on which patterns of attachment nodes can procedurally be created (typically to hold engines). A bottom stack node is then procedurally relocated up or down depending on the size of what is connected to the plate, and when something (typically the previous stage) is connected to it a fairing is procedurally created to enclose everything that is attached to the plate.

I have started work, and so far have a part that is the plate, on which you can arrange patterns of nodes, and also relocate the "floating" node based on what you attach to it. The next thing I need to start thinking about is the fairing (I am sure procedural fairings will provide some inspiration), but wanted to get a dev thread running on this as I would welcome ideas and inspiration as to which direction to take this in.

Instructions:

1) Create the part and add it to the bottom on your stack

2) mouse over the part and press 't' to change the size of the top edge of the engine mounting plate

3) mouse over the part and press 'p' to change the patter of attachment nodes on the bottom of the mounting plate.

4) add engines

5) mouse over the part and press 'f' to relocated the "floating" bottom attachment node

6) add a lower stage

Eye Candy

screenshot55.png

The plate. Note that it starts with the floatnode above the plate. This is because I could not figureout which way was up in blender (yes I am that bad at this stuff!)

screenshot56.png

Turn it around and pop it on the bottom of a tank.

screenshot57.png

Mousing over the plate, and pressing 'p' changes the pattern of attachment nodes on the plate.

screenshot58.png

You can have lots

screenshot59.png

Or none, and use octostructs to attach stuff instead

screenshot60.png

Here I have attached a wacky selection of engines

screenshot61.png

Note that the floating node is now too high :(

screenshot62.png

Mousing over the plate and pressing 'f' relocates the floating node based on the size of the engines.

screenshot63.png

Here the lower stage has been attached.

screenshot95.png

If the engines are wider than the tank they are placed under, the engine mounting plate will adapt its shape to take account for this.

screenshot133.png

Since prerelease 0.4 the mounting plate can become quite curvey

Planning

I wanted to build a list of features and things that I hope to do with this, or have been selected. Of the two lists, the "vision" are all the things that it would be nice to achieve, or would be really cool. The "scope" is what I am going to realistically aim for, for a first release.

Vision

  • Add procedural attachment nodes to any part
  • Add procedural attachment node from a list of predefined patterns
  • Add procedural attachment nodes in any pattern (ie x rings, y nodes in a ring of radius z etc etc)
  • Generate a mesh for the attachment plate
  • Generate a mesh for the attachment plate that blends the cross section from the bottom from the part above to the pattern of nodes below
  • Generate procedural fairings to enclose the stuff attached to the procedural nodes (optional)
  • Get the fairings to blend from the part above to the part below.
  • Get the part to also act as a decoupler?
  • Create a GUI to set all the complicate options if all the above gets implimented
  • Use Blizzy toolbar

Scope

  • (Done) Add procedural attachment node from a list of predefined patterns
  • (Done, but needs to be textured nicely) Generate a mesh for the attachment plate that blends the cross section from the bottom from the part above to the pattern of nodes below
  • Generate procedural fairings to enclose the stuff attached to the procedural nodes (optional)

Edited by codepoet
New download
Link to comment
Share on other sites

Sounds good to me!

One suggestion/request/something: make the part itself procedurally rescalable.

Oh, and make the node sizes depend on the amount of space available to them, so if you have 4 nodes on a 2.5m part, the nodes are size 1; if 4 on a 5m part, they're size 2, etc.*

*also add a "rescale by 0.8" option for the nodes, since RO uses 1m/2m/3m/etc as sizes for its nodes rather than 1.25/2.5/3.75

Link to comment
Share on other sites

It would not replace Procedural Fairings which are essential for housing payloads. Also I am not sure that I will be looking to provide the funky use of the aerotail that mobius does to taper out towards the engine when it is wider than the tank. I think the thing it wopuld be most useful for is mounting things on top of boosters. We will see - it is early days and i have little time to spend on coding!

Link to comment
Share on other sites

...

One suggestion/request/something: make the part itself procedurally rescalable.

Oh, and make the node sizes depend on the amount of space available to them, so if you have 4 nodes on a 2.5m part, the nodes are size 1; if 4 on a 5m part, they're size 2, etc.*

*also add a "rescale by 0.8" option for the nodes, since RO uses 1m/2m/3m/etc as sizes for its nodes rather than 1.25/2.5/3.75

Could you please elaborate on the rescaling stuff, and how it works. As I understand it a part can have a scalingfactor and a rescaling factor. One of these (scallingfactor?) is set to 1.25 by default. Rescallingfactor can be used to "double up your part size". Do I ned to just multiply all my measurements by scalefactor and rescale factor? That way if your scalingfactor is 1 (RO?) rather than stock (1.25) then it will all come out in the wash.

How did the 1.25 scaling thing start in the first place!

Progress update:

-------------------

I have not yet made a download available for folks to look at as I am struggling with the Save / Load. The game wants to bolt the other parts as it loads them before I get a chance to procedurally create the attachment nodes, so it is taking a bit of jigery-pokery to make it work.

The good news is that I have got it to create patterns of attachment nodes made up of more than one ring of nodes. Captain Sierra's mega cluster will be just a click away!

Edited by codepoet
Added update
Link to comment
Share on other sites

Hi,

I find this mod very promising, but I would also like to raise a thought: Would it be possible to include the functionality of this new part into the existing parts themselves? I'm figuring that an extra part always means another link that can fail through shearing, overheating, collision or whatnot; what if the node generation/multiplication could be integrated into the attachment nodes of parts?

For example, by mousing over the part, the existing bottom node would cycle through "default", "detached" (for octo placement), "detached + cluster nodes" upon "p" keypress.

Or, if possible even, mousing over the actual node would do the same, so for whatever reason, extra nodes could be created on top as well.

Perhaps ModuleManager could be employed to modify node_stack_bottom as necessary (and node_stack_top by extension).

At any rate, best of success with your mod!

Thanks

A.

Edited by Andersenman
Link to comment
Share on other sites

Two scalings involved. One is if you make the part itself procedurally scalable. For that you'd need to (a) rescale the transform, (B) rescale the stacknodes involved, and © move anything either stack or surface attached to the part. StretchySRB is a good source for how to do that; it's about to become a better source, as swamp_ig is adding support for rescaling by tweakables.

You'd want the scale and rescaleFactor in the cfg to both be 1.0 I think; makes life easier.

Second is changing the node size. FAR uses node size to calculate drag, which means it's important to get it close to right. That is, if your part is 5m across, you don't want it to have four size-0 nodes; you want it to have four size-2 nodes. Thus you should calculate how wide your part is, how many nodes you've placed (and thus how large a radius around each node is its own space), and thus what size to make the nodes.

If you would then also add support for a cfg-tunable scalar for node size, that would be great for RO (since in RO's case the example for size-2 nodes would be a 4m part with room for four size-2 nodes).

Again, StretchySRB might be a good place to nick code from. :)

Link to comment
Share on other sites

Hi,

I find this mod very promising, but I would also like to raise a thought: Would it be possible to include the functionality of this new part into the existing parts themselves? I'm figuring that an extra part always means another link that can fail through shearing, overheating, collision or whatnot; what if the node generation/multiplication could be integrated into the attachment nodes of parts?

For example, by mousing over the part, the existing bottom node would cycle through "default", "detached" (for octo placement), "detached + cluster nodes" upon "p" keypress.

Or, if possible even, mousing over the actual node would do the same, so for whatever reason, extra nodes could be created on top as well.

Perhaps ModuleManager could be employed to modify node_stack_bottom as necessary (and node_stack_top by extension).

At any rate, best of success with your mod!

Thanks

A.

That is an interesting thought - add this finctionality to any part. I don't know anything about ModuleManager, but perhaps it could help. In fact it is not stack_node_bottom that is the problem - that remains constant as that is in fact the floating node. The complication is adding all the other nodes, but perhaps module manager could help.

For now I will try and get it all working on a specific part, and then see where we go from there. I am keen to get something up that people can play with, and then start loking into how to procedurally general a mesh (I am both excited and intimidated by the prospect :) ) I am sure other procedural mods will provide food for thought!

Link to comment
Share on other sites

Yes, stuff can be used for stuff! Amazing, isn't it? :sticktongue:

Well at the moment it can't be used for jack because I am struggling with the reload - but it think I know what the problem is. I need to stop the editor from changing the attachment nodes for all instances of the part! Fail!

Link to comment
Share on other sites

Oh yay! I have fixed the problem I got hung up on with loading. It took a lot of wrestling, but I know better understand the framwork into which the parts and partmodules are loaded and called. In fact it turns out that it is a good thing as I can see away forward that does not require any procedural attachment nodes to be defined in the .cfg file, so hopefully it should be easy to apply it to any part.

In the meantime here is more whacky constructions, and since I can now save and load them, I was able to roll out to the pad an launch.

screenshot64.png

screenshot67.png

Edited by codepoet
Link to comment
Share on other sites

I can't get this to work. Pressing the buttons does nothing for me.

That is because I have not released it yet! This is not the same thing as the PWB Engine Fairing, which I have now retired, and will not continue deveopment on.

This thread releates to a new part that has not yet been made avaiable!

Edited by codepoet
Link to comment
Share on other sites

OK, I have added a download link to the first post so folks can have a play. Bug reports are welcome on this thread, as are suggestions for features.*

Here are some pictures:

screenshot71.png

Now when you press 'p' the procedural attachment nodes' positions are displayed in blue.

screenshot75.png

Pressing 'f' will also display the new location of the "floatnode" in blue.

screenshot76.png

Let's go to space :)

Link to comment
Share on other sites

Just a quick update - progress is slow, but then I have a real life to lead too!

Anyway, I have been playing around with the model for the plate, an in particular have been trying to generate it procedurally. This is necassery because I want to find a way of making things look good if the pattern of nodes that you want takes up more space than the width of the tank you are attching it to. The idea is to automatically generate a shape that is an appropriate adapter.

After a lot of fiddling around, and trying to learn how the unity mesh class works, I have produced this:

screenshot77.png

I know that it is not much, and there are some glitches with it that I need to fix, but the principle is sound. At the top is the shape of the 2.5m tank / pod that it will join to underneath. at the bottom it widens out to a shape that includes 2x 1.25m parts with their attachment nodes on the edge of the 2.5m part (if that makes any sense!). Hopefully it is will be more obvious to see what is going on once I have got the whole thing built correctly - but I wanted to share with you all the direction I am heading in.

Link to comment
Share on other sites

OK, I have made a little more progress, and have the shape of the baseplate being automatically generated as I want it. Unfortunately I have not got on to texturing it, so the part is completely black (which makes it hard to see what it is!) Texturing and recreating the original model is next. However things seem to be pointing in the right direction. Here is a picture for you all:

screenshot79.png

Link to comment
Share on other sites

I'd almost forgotten this, but it seems to be chugging along nicely. I'm not sure how you plan to get the fairings to wrap around adapter shapes as odd as that one, but I imagine you'll come up with something. :wink:

Yes indeed I do have some thoughts about the shape of the engine fairing :) I think if the lower section is larger then it will make it a lot easier to widen out to it, however if the lower stage is the same size as the upper stage then it will lead to an interested looking engine fairing!

Progress Update

I have managed to get some sort of texture onto the mounting plate. It is just a standard geometric texture, but allows me to start experiementing with marking out the UV procedurally. It also make the mounting plate shape a lot more visible. Below are a few more pictures. I plan to get the collider mesh to be rebuilt procedurally, and then update the download, as that would put it in a state where people could experiement with it a bit to see what it is capable of.

screenshot80.png

3 1.25m engines under a 2.5m part. Notice that the engines do not overlap, and so if you look really carefully you can see that the mounting plate widens everso slightly as is required.

screenshot81.png

screenshot82.png

1+6 1.25m engines.

screenshot83.png

A tightly packed, non overlapping cluster of 4 engines.

screenshot84.png

screenshot85.png

1+4 configuration. Notice how some parts of the mounting plate have vertical edges and others have sloping sides.

Link to comment
Share on other sites

This looks insanely useful. Take all the time you need, no need for rushing.

How long until we have procedural everything?* (Well, almost everything. This is not a bad thing!)

Edited by komodo
Punctuation
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...