codepoet

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

Recommended Posts

I have uploaded a new download. New features are:

1) It rebuilds the shape of the mounting plate to match the node pattern you have chosen

2) The top side of the mounting plate is resizeable (press 't')

3) it tries to so (re)scaleFactor stuff properly. As I do not use RSS of similar, I would be really grateful if someone using a rescale factor other than 1.25 could give it a go and provide some feed back.

As always do please let me know what is not working, and which direction you would like to see this develop. In particular - I can add different patterns of nodes very easily, but what I think it really needs is a GUI so you can define your own node patterns - I would welcome views on how this could work.

More pictures:

screenshot86.png

Blender, Unity and part tools have conspired together to rotate the default mesh (sometimes). This does not matter as it gets rebuilt anyway, but is very annoying. BTW there is no need to flip the whole thing over anymore.

screenshot87.png

Here it is underneath a 1.25m part. Press 't' to change the size of the "top" edge of the mounting plate. (there is a bug that this does not work until you have selected a pattern by pressing 'p')

screenshot88.png

You can build some really crazy stuff.... But I am sure I have not even begun to imagine what you guys will do with it!

Share this post


Link to post
Share on other sites

I have spent the last few days trying to get the shading correct and laying out the UV map for the texturing. The part now has a circular top and bottom texture and a flat, wrapped around texture for the sides. In have also been struggling with the normals to get the shading correct.

I got very frustrated because it has these "stripes" on the sides:

screenshot90.png

screenshot91.png

However it turns out that in flight it looks a lot better:

screenshot93.png

screenshot94.png

screenshot95.png

screenshot96.png

screenshot97.png

screenshot98.png

I work on a rubbish old laptop, so there is a limit to how pretty I can make it look before I can't test it as my machine will not render it!

I think I will try to make a new download available as it is, and then start work on the fairings for theengine compartment.

Edited by codepoet
spelling

Share this post


Link to post
Share on other sites
*Bump* Hows the fairings coming? I'm really loving the profess on these so far, but get fairings would be awesome.

Sorry, I have not yet started coding for the fairings yet. I have got distracted with another project. I am also heasitant to start until I feel more confident with the procedural meshes stuff (which is why I have been experimenting with the mounting plate stuff.) I am also toying with the design of the shape and how the fairing will join to the mounting plate - I am not fure if the mounting plate should have an extra flange around the edge. Oh and I am also toying with using a beizer curve as the profile shape where the mounting plate needs to widen out rather than a flat slope.

I suppose I should just get on with adding some sort of fairing to demonstrate the concept, but I am worrying about the details!

Share this post


Link to post
Share on other sites

I know you've been mostly working on CLS, but for fairings why not talk to e-dog about using the code from Proc. Fairings? The licence certainly allows it.

Share this post


Link to post
Share on other sites
I know you've been mostly working on CLS, but for fairings why not talk to e-dog about using the code from Proc. Fairings? The licence certainly allows it.

I know, I know! I need to get back to this. CLS is starting to gain some traction now, so hopefully I will soon be able to get back to this and add the fairings and make it look pretty. I don't think that it will be a huge challenge now I have started to figure out how to do meshes procedurally.

Sorry to keep you waiting.

So many fun projects - too little time!

Share this post


Link to post
Share on other sites

The good news is that I am back to work on this mod after getting distracted. The bad news I'd that after two weeks I have completely forgotten how the code for building the mesh works. Desperately trying to refactor it it make it easier to understand.

Share this post


Link to post
Share on other sites

A picture is worth a thousand words - so here you go...

screenshot126.png

screenshot127.png

As you can see I have changed the profile shape of each segment to be a bezier curve to make the whole thing a bit "smoother" I lke the result, but in the case of mounting plates that are much wider than the top the curve perhaps needs to be adjusted a bit so that it is a bit more pointy.

Also notice that I have added what I call a "flange" at the bottom. This is a small section that has straight sides, and this has been added so that I have something solid to model the fairings against. It also means I can add a different texture around the base of the plate there (rivits for example) and the text will not get streched out of shape by the procedural nature of the mesh.

There is however a problem - take it back to the VAB and it looks like this:

screenshot128.png

screenshot129.png

It also looks like this on the pad at night time. I am not sure what is going on here. I suspect it has something to do witht he normals, but I am not sure what. I use RecalculateNormals() after building the vertices and triangles of the mesh, and it looks ok in the daytime, which suggests to me that there is something more subtle going on. Could it be that in the VAB and at night time a different shader is used, and that is why it there is a difference? Could it be that I need to do something with tangets, and those tangents are only used by some shaders and not the one in use in daytime on the pad?

Interestingly sometimes some sections of the part look ok, evening in the VAB while others are messed up. If the parts becomes larger it is build with more meshes. Could it be that there is something (tangents?) being imported from the original mesh, and when that is changed (and made larger) the extra vertices to not have a tangent assigned so render properly?

Any other ideas? I am a bit stumpted on this one, and have tried many different things to fix it.

Share this post


Link to post
Share on other sites

Much better.... the problem is definately something to do with the tangents. I tried setting all the tangents to zero, and it came out looking like this:

screenshot130.png

This is a night time on the pad, but it looks similar in the VAB too.

Here a is what is perhaps the most extreme version of what it can end up being shaped as:

screenshot132.png

screenshot133.png

Obviously it needs to be textured (any offers of help would be gratefully recieved and credited!) and the shape could be tweaked a bit, but I am pretty pleased with the results.

It is now time to start work on the fairings, and with some of the techniques I have developped for doing the mounting base, it should not be too hard.

Share this post


Link to post
Share on other sites

I have made a little progress with this. Here is the first picture:

screenshot134.png

I have added tangents to all the vertices and that seems to have solved the VAB rendering problems. I think this is now looking the way it should (obviously it needs texturing).

I then went to work on the fairings:

screenshot136.png

Clearly there is a bug of some sorts here as the fairing is extending up not down. The good news though is that it does at least exist.

screenshot137.png

Well at least the fairing is entending down and not up, but clearly there are still somemore problems to be ironed out!

Share this post


Link to post
Share on other sites

Here are the latest pictures:

screenshot138.png

Two small engines under a small cockpit

screenshot139.png

Add something to the floatnode and the fairing appears

screenshot140.png

It is the right general shape that I was aiming for (obviously the pattern of engines influances the shape at the top.) However I need to fix up the top and bottom edges where the inside joins with the outside. Also, there is clearly a bug that causes it to extend too far down. However I can't for the life of me find the bug - I have had a really good look too. I will get there, but it is very frustrating!

Share this post


Link to post
Share on other sites

It turns out my problem was all to do wit the (re)scale factors. In calculating the lowest point of the parts contained in the fairing I needed to take into account that they had been (re)scaled.

Anyhow here is a picture of how it is supposed to look :)

screenshot141.png

And some other examples of things that you would more realistically want to do:

screenshot142.png

screenshot143.png

The outside of the fairing is slightly larger than the inside (obviously). There are (unrendered) sloping faces to make it blend in a bit better.

screenshot144.png

Here is a different idea.

screenshot145.png

The base of the fairing has been sized to fit onto a 3.75m part, but I am afraid I have none installed in my development install. You get the idea though.

I now have much to do, havign prooved the concept:

1) Create a GUI to set all the various complex options and settings (top size, bottom size, patterns of nodes, pointiness, curviness)

2) Automatically recalculate the position of the floating node when parts are added to the procedural mounting nodes.

3) render the inside and slopes of the fairings.

4) Fix problems with the colliders (too many triangles to use a mesh collider, I need to build a new approximate mesh for the collider)

5) Fix problems with the part pinning rockets to the ground (something to do with coliders I think)

6) Adapt the fairing shape to extend vertically down the sides of the contents and then taper inwards is the mounting plate is wider than the bottom size.

7) Consider building in a decoupler

Share this post


Link to post
Share on other sites

Sorry, not to have progressed this. Real life is occupying my mind, what with the need to change job and move house by the summer. However I am making progress, both on real life projects, as well as KSP ones.

Realistically I am goingvto need help with the texturing for this. I am planning to directly approach some other modders, but would welcome offers of help.

Share this post


Link to post
Share on other sites

I have just been taking a look at e-dog's new release of procedural fairings, and the new thrustplate in particular. It looks like it is going in the same direction as this project, and probably has more legs as my real life and other KSP projects get in the way. I would like to see this project finished, but if someone else provides the same thing that that is cool, and saves me the time and effort.

It occurs to me that what FloatNode has got that the thrustplate does not is the floating bottom node to attach the next stage, so you can have clustered upper stages.

What do you all thing about this - would it be better to continue development when I get a chance, or just support edog's work? I have not talked to edog about it yet, and I suppose it depends on what direction he wants to take it in. Does anyone have an opinion?

Share this post


Link to post
Share on other sites

Well, this little mod looks interesting. I've read through all the posts and am happy to see the progress made and everything. I, for one, would like to see this continued - not everyone uses pFairings and as you said, the thrust plate doesn't have a bottom attach node (at least yet).

But yeah, texturing.. blackheart's pretty good (he did a few StretchySRB textures), or fusty or Porkjet... all really good at texturing things. If I needed some textures, those three would be the people I asked.

Share this post


Link to post
Share on other sites

I would vote to collaborate with e-dog. I am one that uses pfairings, so it'd cut my mod count by one.

Share this post


Link to post
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.