KSP-RO / ProceduralParts

A continuation of StretchySRBs, which is a continuation of StretchyTanks
71 stars 79 forks source link

Part Request: Mk2 and Mk3 tanks and cargo bays #199

Closed PortableGoogle closed 5 years ago

PortableGoogle commented 8 years ago

Procedural mk2 and mk3 tanks and cargo bays would be awesome. Thanks for your hard work.

Nerdy314159265 commented 8 years ago

I agree. I'm not sure I understand why it hasn't happened yet. I really want to be able to use the better looking and functioning Procedural tanks instead of Mk3 tanks and adapters.

OtherBarry commented 8 years ago

It hasn't happened yet because no one is actively developing this mod, and having non surface of revolution shapes requires someone to make new code to allow that. I might be able to do it myself from November, but it'll require learning C#, which could take a while.

On Wed, Aug 31, 2016 at 10:06 PM, Nerdy314159265 notifications@github.com wrote:

I agree. I'm not sure I understand why it hasn't happened yet. I really want to be able to use the better looking and functioning Procedural tanks instead of Mk3 tanks and adapters.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/Swamp-Ig/ProceduralParts/issues/199#issuecomment-243743908, or mute the thread https://github.com/notifications/unsubscribe-auth/AGol-Q7fJOVd2a5q1ufPh5o-bXa9shJUks5qlW5hgaJpZM4IRJyO .

Nerdy314159265 commented 8 years ago

If someone can point me to how the fuel tank models are generated, I'd like to take a look. I wrote some code that used parametric graphs to generate 3d models. I would think that could be used to extend the parts out.

On Aug 31, 2016 5:02 PM, "OtherBarry" notifications@github.com wrote:

It hasn't happened yet because no one is actively developing this mod, and having non surface of revolution shapes requires someone to make new code to allow that. I might be able to do it myself from November, but it'll require learning C#, which could take a while.

On Wed, Aug 31, 2016 at 10:06 PM, Nerdy314159265 <notifications@github.com

wrote:

I agree. I'm not sure I understand why it hasn't happened yet. I really want to be able to use the better looking and functioning Procedural tanks instead of Mk3 tanks and adapters.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/Swamp-Ig/ProceduralParts/issues/199# issuecomment-243743908, or mute the thread https://github.com/notifications/unsubscribe- auth/AGol-Q7fJOVd2a5q1ufPh5o-bXa9shJUks5qlW5hgaJpZM4IRJyO .

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/Swamp-Ig/ProceduralParts/issues/199#issuecomment-243916752, or mute the thread https://github.com/notifications/unsubscribe-auth/AF9fhl9SQJdxDnQuyH-C0JQ0MCzM6vNvks5qlfoJgaJpZM4IRJyO .

Swamp-Ig commented 8 years ago

Have a look here: https://github.com/Swamp-Ig/ProceduralParts/blob/master/Source/ProceduralAbstractSoRShape.cs

plus its subclasses.

I expect you'd want to do an ProceduralAbstractExtrudeShape.cs , and then subclass it. If you're getting fancy you could put stuff like non-orthogonal and curved extrude paths in the base class, and pull in a shape from the child class.

You'd probably want a Cuboid subclass, because sliders for width, length, and height would be the best way to handle those. Maybe an ExtrudedPolygon and have sliders for number of sides, diameter, and height, and finally a ShapeExtrude where you can select from a range of shapes (mk1, mk2 etc).

It's been some time since I coded this mod, but I did think about doing something like this before I lost interest and moved on.

Nerdy314159265 commented 8 years ago

Thanks. I'll take a look at it but I'm not familiar to how coding for modding KSP works. If you can throw a good intro to that as well that'd be nice.

If I can wrap my head around how the model generation works, I might make something work.

(Just attempting to understand what you are saying) Are you suggesting I make it based on extrusions? or does the model generation already work by extruding shapes?

Polymaker commented 8 years ago

Hi, I thought that you may be interested to know that I have made a polyhedral prism shaped tanks in my fork. You can have a look there to see how I coded it. (https://github.com/Polymaker/ProceduralParts/blob/prism_shape/Source/ProceduralShapePrism.cs) It is not really an 'extrusion', I just create the top and bottom vertices in a loop and create the triangles accordingly.

Nerdy314159265 commented 8 years ago

First, I'm curious why your fork hasn't been merged in. Prism shaped tanks would be really cool. Haven't finished ironing out the bugs?

Also thanks, I think that helps me get a clearer picture of how mesh generation works. Is there a way we can talk more about this, so I can make sure I have it correct, without flooding this issue? @Swamp-Ig @Polymaker

Polymaker commented 8 years ago

@Nerdy314159265 sorry for not replying sooner, I have no idea what's the best for talking of this (outside from the issue board) but here my email james_w_turner27@gmail_com (replace underscores by dots). I have a couple of notes and hints that may help you. One that I want to point out here now is texturing: for mk2 and mk3 the texture is not simply wrapped around, the texture is mapped so the bottom, top and sides/edges have 'distinct' appearances. Another related point is texturing of the caps/ends. This is the reason why I haven't pushed my branch yet, because a round cap texture does not fit well with every polygon (eg: a triangle). Yes, the texture config allow to set the texture for the end caps, but it is by 'texture', and all shapes shares the sames textures.