Jump to content

[Min KSP 1.12.X] Sandcastle: 3D printing for parts and vessels


Angelo Kerman

Recommended Posts

On 8/29/2024 at 8:09 PM, Angelo Kerman said:

I've been bashing my head on my desk for the past two weeks trying to figure out how to ensure that when landed, the spawned craft is always level (meaning, your navball is reading 0 for roll and pitch). Thus far, I've failed to figure that out. For various reasons, it's hard to do in KSP. If I can't figure it out by the weekend, I'll release what I have into the wild- the spawned craft will have the same orientation as the printer, so you might need to find some creative ways to level your printer before printing your desired craft.

I personally feel like it makes sense for the print to end up in the same orientation as the printer itself.  Out here in the real world, if I don't have my printer sitting level, the finished print won't be level either.  I feel like it is on the user to level everything.  Lots of options out there for in-situ leveling (pylons from your own Buffalo 2, legs from KerbalFoundries, cradles and frames from SSPXr, etc.).  The biggest concern would be portions of prints overlapping portions of the ground or ground scatter with collision, but again, I feel like this lies with the player to solve.  I have a number of imagined print mishap videos playing in my head as I type this :lol:.

The question I have is if this will eventually have interoperability with Kerbal Konstructs.  I know you have recently been working on the interface for that, too.  Being able to manufacture KK bases with Sandcastle would be incredible and really push towards that colony creation goal.  I'm even imagining kerbal road crews building highways across the munar highlands.  Grand visions.

Link to comment
Share on other sites

I can see up-down distance being hard to guess at, but I'm a fan of it printing how it's laid out in the VAB or SPH. Whatever is up there is up for the printer. If someone prints and it's sideways or pointing at the ground, it's a bit of a bummer, but time to go back to the VAB, change the orientation to what's correct, and print it again. Having Sandcastle attempt to assess something about a craft/building and change the orientation from what it is in the building mode sounds like it will lead to things not always being built the way I intend and no way to fix it, if it's automatic.

Link to comment
Share on other sites

8 hours ago, aviin said:

I personally feel like it makes sense for the print to end up in the same orientation as the printer itself.  Out here in the real world, if I don't have my printer sitting level, the finished print won't be level either.  I feel like it is on the user to level everything.  Lots of options out there for in-situ leveling (pylons from your own Buffalo 2, legs from KerbalFoundries, cradles and frames from SSPXr, etc.).  The biggest concern would be portions of prints overlapping portions of the ground or ground scatter with collision, but again, I feel like this lies with the player to solve.  I have a number of imagined print mishap videos playing in my head as I type this :lol:.

The question I have is if this will eventually have interoperability with Kerbal Konstructs.  I know you have recently been working on the interface for that, too.  Being able to manufacture KK bases with Sandcastle would be incredible and really push towards that colony creation goal.  I'm even imagining kerbal road crews building highways across the munar highlands.  Grand visions.

I have plans to add printable base parts inspired by things like Subnautica, and the new vessel printing/recycling feature is vital to that goal. If I can do that, then Sandcastle will soft-deprecate Pathfinder, which is really showing its age at this point.

But the new feature also opens the door to larger Kerbal Konstructs-based colonies. With the demise of KSP 2, I've been gathering all the developer notes and screenshots that they shared about colonies with the intent to make a self-sustaining colony mod. Think of Project Eagle, which is available on Steam, which is on a much larger scale than Pathfinder, Sandcastle's base parts, and so on. To get there, I have permission to revamp the Kerbal Konstructs' user interface. If I can make Kerbal Konstructs work more like the VAB/SPH when snapping statics together (existing statics would need new attachment nodes), then my dream colony mod will be possible. If not- well, Sandcastle's latest update gives me the ability to expand my base building.

Anyway, those are all long-term plans. In the near term,

Sandcastle 1.2.0 is now available.

Changes

- The Quicksand and Sandcastle 3D print shops now have IVA variants that let you switch between horizontal and vertical orientations.
- In EVA Construction Mode, engineers can now switch part variants.
- In EVA Construction Mode, engineers can now change flags, set flag sizes, and toggle them on/off.
- The Sandcaster 3D Printer and EL-OCD Konstruction Manipulator are now available even when Extraplanetary Launchpads isn't installed.
- The Sandcaster 3D Printer and EL-OCD Konstruction Manipulator can now print a single part regardless of volume and drop it into space or onto the ground.
- The Sandcaster 3D Printer and EL-OCD Konstruction Manipulator can now print a vessel and drop it into space or onto the ground.
NOTE: Multiple Sandcasters/Konstruction Manipulators, whether on the same vessel or on a different vessel, can collaborate to finish the build.
- When printing vessels, the Sandcaster/Konstruction Manipulator can use pre-printed parts to reduce print time.
- The Sandcaster 3D Printer and EL-OCD Konstruction Manipulator can now recycle vessels. If there's room in the inventory, the recycler can store the recycled vessel's parts and if not, it will convert the part into raw resources.
NOTE: Multiple Sandcasters/Konstruction Manipulators, whether on the same vessel or on a different vessel, can collaborate to finish the recycling.
- If in timewarp, the print shop will now kill timewarp when all print jobs are done.
- Added a new Sandcastle game settings menu. It has things like a debug flag and the option to disable the check for kerbals occupying parts and vessels that are about to be recycled.
- Fixed EC smelter config - thanks Aelfh1m! :)

New Part Modules

- SCModuleEVAFlagSwitch: Lets your engineers change flag decals set in the VAB/SPH.
- SCModuleEVAVariants: Lets your engineers change the part variants during EVA Construction. TODO: Figure out how to charge for changes in mass.
- SCBasePrinter: Base class for other printers.
- SCShipwright: Handles all things vessel printing.
- SCShipbreaker: Handles all things vessel recycling.

Changes - Wild Blue Core
- Added new ModuleInternalVariants - lets you switch IVA INTERNAL models.
- Added new ModuleAnimateGenericExtended - provides options for skill checks, requiring resources, and enabling/disabling part modules.
- Added new Settings menu, accessed through game settings.

--- Future Updates ---

To give you an idea of what's next for Sandcastle:

  1. Right now, the SCShipwright part module requires that the vessel spawn point be in the same part as SCShipwright. Next update will enable players to select a different part, highlighting your options sort of like how you transfer kerbals from one part to another. That selected part could be located in a different vessel.
  2. Breaking Ground Science- inspired printer parts including a small, stand-alone printer (especially useful for those times when you forget your #$%^& repair kits), an advanced printer drone, and a printer drone control station. The printer drone and control station are essentially an advanced, far more portable form of the Sandcaster.
  3. A Mass Effect-inspired Omni Tool that can print small parts and put them in the kerbal's inventory.
  4. Stretch goal: Investigations into improving stock EVA Construction- If you've ever tried to node-attach a part to another part, and have noticed that the alignment is off, then you know what I mean...
  5. Stretch goal: Investigations into whether or not it's possible to activate EVA Construction without the need for a kerbal. If possible, then automated assembly robots become a possibility.
Link to comment
Share on other sites

@Angelo Kerman, I was going to quote your post to make comments about individual points but, wow, it is all sounding soooooooooo good.  Downloading now.  Don't have alot of time tonight to play around with it, but looks like my upcoming Laythe mission just changed scope.

Very exciting.

*** EDIT ***

One quick note.  The download doesn't have the latest Module Manager.

*** EDIT 2 ***

Testing the shipwright now on the runway.  This feels so organic and clean.  The shipwright GUI is very informative and easy to understand.  I would like to see the Sandcaster have some kind of visual indicator that it is currently running while printing, even it it is just a blinking light.  And a deploy and retract option on the PAW for it.  Oh, and the EC cost for printing doesn't appear anywhere on the part description.  I will say that on my first vessel print, the "print finished" alarm triggered when the vessel was only 67% done, but the other prints have all been almost spot on.  Maybe it was because I ran out of EC at one point during the print while time warping?  And I changed the warp speed many times during that first print.  Maybe something from doing that threw it off.

I admit that Sandcastle was your only mod I never really got into despite trying it out a few times.  But now I can see it will be a part of every playthrough from now on.  You have outdone yourself.  This is exciting.  Your future plans for this mod all sound amazing but even just as it is TODAY, it is a game changer.  Oh, and printing a vessel overlapping another was just as glorious as I had been picturing in my head. :lol:

*** EDIT 3 ***

Ignore my deploy/retract comment above.  In my excitement, somehow I missed updating WildBlueCore.  I am guessing once I do that the option will exist.  Got way too excited to try it.

Edited by aviin
Link to comment
Share on other sites

Since it is a second day, I think a new post is in order.

More testing this morning with the shipwright.  A test vessel on the runway with three Sandcasters.  I am seeing an oddity.  Everything starts out proceeding as I would expect with the initiating Sandcaster loading the entire parts list then it appears to farm out production of individual parts from the part list for the print to the other two Sandcasters.  Observationally, it seems like the "master" caster starts with the root part which in this case is a command pod from another mod.  The two "slave" casters each seem to receive the final parts I added to the build and start printing.  Slave caster 1 receives a ladder (the last part added to the vessel) which prints very rapidly while slave 2 receives a parachute (this vessel contains two identical chutes placed in symmetry as the second to last parts added to the vessel).  Slave 1 finishes the ladder and moves on to a chute while the master continues printing the pod and slave 2 keeps printing its original chute.  All good so far.  Now is when it gets weird.  Slave 2 finishes its chute and goes idle, not receiving a new part to start printing.  Its GUI continues to show the chute but it remains idle.  Slave 2 finishes its chute and starts printing another chute (this would be a third chute printed, despite this vessel having only two chutes).  Slave 2 finishes its chute and goes on to the next part (in this case, a science experiment that was the third to last part added to the vessel).  The master keeps printing the pod, slave 2 continues up the list in reverse order, and slave 1 remains idle.  Slave 1 never starts printing again.  If I close its shipwright GUI and reopen it, it still shows the parachute it died on but now missing its thumbnail and remains idle despite parts still being in the queue of the master.  Pausing slave 1 after goes idle and restarting it doesn't correct the issue.  So printing is now only happening with two of the three casters.  Perhaps it is related to the chutes having been added in symmetry and that is somehow what throws things off?  I will do more testing here in a bit to further the investigation.

One QoL change that would be nice (and I have no idea if it would be simple or complex to implement) would be that if I scrap a print job on the master, I would like to see the slaves scrap their current part print.  As it is right now, a slave will finish printing its part regardless of the master having abandoned the print job.  It is not a huge issue, but would be nice.

Another QoL change would be for the Sandcaster to require deployment before operation.  As it stands, it can print without being deployed.

Something that could be complex to implement but would be sooooo nice would be if the shipwright was smart about how Tweakscale works.  Right now, a vessel with tweakscaled parts prints fine with the tweaked size being correct, but the cost in ore is based on the base version of the part, not the tweaked size.  Is it possible to get the mass of the tweaked size from the vessel rather than the part config?  Even if not, at least it prints correctly which was a pleasant surprise.

I will be testing things more throughout the day.  Absolutely loving it so far.

*** EDIT ***

Further testing with a specially designed test print has yielded some information about what is going on with the shipwright buy having all unique parts with no duplication of any individual part so I can see what exactly is happening.  The initial part assignments work correctly, but whichever slave gets finished first gets assigned to print the exact same part that the other slave is already printing.  The slave that got assigned the duplicate part is the one that stalls.  It seems like the slaves don't respect what other slaves are already working on before they begin printing their next assignment except in the case of the initial part assignments when the print job is first started.

Edited by aviin
Clarifications
Link to comment
Share on other sites

4 hours ago, aviin said:

Since it is a second day, I think a new post is in order.

More testing this morning with the shipwright.  A test vessel on the runway with three Sandcasters.  I am seeing an oddity.  Everything starts out proceeding as I would expect with the initiating Sandcaster loading the entire parts list then it appears to farm out production of individual parts from the part list for the print to the other two Sandcasters.  Observationally, it seems like the "master" caster starts with the root part which in this case is a command pod from another mod.  The two "slave" casters each seem to receive the final parts I added to the build and start printing.  Slave caster 1 receives a ladder (the last part added to the vessel) which prints very rapidly while slave 2 receives a parachute (this vessel contains two identical chutes placed in symmetry as the second to last parts added to the vessel).  Slave 1 finishes the ladder and moves on to a chute while the master continues printing the pod and slave 2 keeps printing its original chute.  All good so far.  Now is when it gets weird.  Slave 2 finishes its chute and goes idle, not receiving a new part to start printing.  Its GUI continues to show the chute but it remains idle.  Slave 2 finishes its chute and starts printing another chute (this would be a third chute printed, despite this vessel having only two chutes).  Slave 2 finishes its chute and goes on to the next part (in this case, a science experiment that was the third to last part added to the vessel).  The master keeps printing the pod, slave 2 continues up the list in reverse order, and slave 1 remains idle.  Slave 1 never starts printing again.  If I close its shipwright GUI and reopen it, it still shows the parachute it died on but now missing its thumbnail and remains idle despite parts still being in the queue of the master.  Pausing slave 1 after goes idle and restarting it doesn't correct the issue.  So printing is now only happening with two of the three casters.  Perhaps it is related to the chutes having been added in symmetry and that is somehow what throws things off?  I will do more testing here in a bit to further the investigation.

One QoL change that would be nice (and I have no idea if it would be simple or complex to implement) would be that if I scrap a print job on the master, I would like to see the slaves scrap their current part print.  As it is right now, a slave will finish printing its part regardless of the master having abandoned the print job.  It is not a huge issue, but would be nice.

Another QoL change would be for the Sandcaster to require deployment before operation.  As it stands, it can print without being deployed.

Something that could be complex to implement but would be sooooo nice would be if the shipwright was smart about how Tweakscale works.  Right now, a vessel with tweakscaled parts prints fine with the tweaked size being correct, but the cost in ore is based on the base version of the part, not the tweaked size.  Is it possible to get the mass of the tweaked size from the vessel rather than the part config?  Even if not, at least it prints correctly which was a pleasant surprise.

I will be testing things more throughout the day.  Absolutely loving it so far.

*** EDIT ***

Further testing with a specially designed test print has yielded some information about what is going on with the shipwright buy having all unique parts with no duplication of any individual part so I can see what exactly is happening.  The initial part assignments work correctly, but whichever slave gets finished first gets assigned to print the exact same part that the other slave is already printing.  The slave that got assigned the duplicate part is the one that stalls.  It seems like the slaves don't respect what other slaves are already working on before they begin printing their next assignment except in the case of the initial part assignments when the print job is first started.

While there are definitely some edge case bugs that I found last night, the print order you're seeing is by design. Support printers start from the bottom of the list so that by the time the primary printer gets to them, they're already done. It reduces the chances that the primary printer has to wait on a support printer to finish its job. I also noticed that for my build, the UI was showing the incorrect part that the primary printer was working on. I also had vessel spawn-in issues that are my top priority to address.

Thanks for the feedback. :)

Link to comment
Share on other sites

Finally had some time to play with Sandcastle more this weekend.  The foothold you can establish on another world with Sandcastle and the ease of doing it is game-changing.  I have found myself rethinking almost everything about mission planning and execution.  Here are a few pics taken on Bop of my newly established base there.

j56Jli2.png

0fP727k.png

Using the fuel pumps from WildBlueCore , you can make a base that is spread out over an area even without docking modules together and without KIS.  Keeps the kraken at bay and lets you get everything up and running so easily.  From this foothold on Bop, I will build more infrastructure to, with crew from the Bop-orbiting craft that brought my sandcaster-equipped B2 rover here, to spread next to Laythe.

Loving it. 

*** EDIT ***

Getting a foothold on Laythe...  Can't wait to get some boots on the ground to check out that plume in the distance.

m4NfzEQ.png

JdXLwb6.png

Edited by aviin
Link to comment
Share on other sites

I've not seen any issues with orientation yet myself.  Do most of my design work in the SPH.  Whichever side of the craft faces the doors in the SPH faces the sandcaster head on.  The biggest issue I have had has been printed vessels spawning too close to my rover doing the printing and either the rover or the printed vessel (or both) get sent flying away, especially when the vessel being printed has a sandaster itself facing the vessel doing the printing.  On Bop my rover got tossed several hundred meters but I managed to recover thanks to reaction wheels and the low gravity, then slowly thread my way back through all the Parallax ground scatter.  But seeing it go rocketing through the gap between two of my colony modules nearly gave me a heart attack.

My solution going forward is that when I design something, I make sure to save it with the longest side facing the doors of the SPH.

 

Link to comment
Share on other sites

8 hours ago, aviin said:

 

j56Jli2.png

What mod are those conical habitats from? Especially the three floor one on the right.

The drills are from Pathfinder right?

 

Also, how do you use the fuel pumps? I never got around to it myself.

I normally use Simple Logistics myself.

Edited by KspNoobUsernameTaken
Link to comment
Share on other sites

2 hours ago, KspNoobUsernameTaken said:

What mod are those conical habitats from? Especially the three floor one on the right.

DSEV has a large variety of parts that are fantastic for this type of stuff.  The three story one is specifically a DSEV Stateroom (if I remember right) with a DSEV Greenhouse on top.  The conical ones are DSEV OmniLabs with one of DSEV adapters on top.  The adapter has configurable resource storage and built-in fuel pump support.

The fuel pumps are very simple.  You stick one on a part with resources.  From the PAW, you set it to "distribute locally" (which makes it pump its contents to other tanks that can hold those resources that are a part of the same vessel), "send to remote" (which makes it search for other pumps within 2000m even if they are part of another vessel and send the resources to it), or "receive from remote" (which makes it a target for pumps that are sending to remote).  Works with all resources that can be transferred in the normal ways, including EC (which is something I overlooked in my early days of using them).

Oh, and yes, the drills are from Pathfinder.

Link to comment
Share on other sites

11 hours ago, aviin said:

Finally had some time to play with Sandcastle more this weekend.  The foothold you can establish on another world with Sandcastle and the ease of doing it is game-changing.  I have found myself rethinking almost everything about mission planning and execution.  Here are a few pics taken on Bop of my newly established base there.

- [pics] -

Using the fuel pumps from WildBlueCore , you can make a base that is spread out over an area even without docking modules together and without KIS.  Keeps the kraken at bay and lets you get everything up and running so easily.  From this foothold on Bop, I will build more infrastructure to, with crew from the Bop-orbiting craft that brought my sandcaster-equipped B2 rover here, to spread next to Laythe.

The report here is really motivating. Thanks for sharing! :)

3 hours ago, aviin said:

Whichever side of the craft faces the doors in the SPH faces the sandcaster head on.

Interesting. Haven't played for myself yet but I'm looking to make my own large(r) sandcaster. I would not expect this orientation.

Link to comment
Share on other sites

19 hours ago, aviin said:

I've not seen any issues with orientation yet myself.  Do most of my design work in the SPH.  Whichever side of the craft faces the doors in the SPH faces the sandcaster head on.  The biggest issue I have had has been printed vessels spawning too close to my rover doing the printing and either the rover or the printed vessel (or both) get sent flying away, especially when the vessel being printed has a sandaster itself facing the vessel doing the printing.  On Bop my rover got tossed several hundred meters but I managed to recover thanks to reaction wheels and the low gravity, then slowly thread my way back through all the Parallax ground scatter.  But seeing it go rocketing through the gap between two of my colony modules nearly gave me a heart attack.

My solution going forward is that when I design something, I make sure to save it with the longest side facing the doors of the SPH.

 

This is one of the specific problems that I'm working on. I'm figuring out how to draw a bounding box around where the new vessel will spawn, and then letting players move that box around before the new vessel is placed into the world. The vessel collisions is a main reason why I can't move forward with my own JNSQ save- I need that issue fixed before I can build more mining installations.

Link to comment
Share on other sites

0SbiGjO.png

I finally figured out how to draw a line! The lines in this image depict the X (red), Y (green), and Z (blue) axis of where vessels will spawn. My next goal is to draw the bounding box where the spawned vessel will appear, and after that, let users move that spawn location around to avoid collisions.

Link to comment
Share on other sites

With the help of ChatGPT  computing the vertices, today I rendered the bounding box of the vessel that will be spawned. Where you see the red, green, and blue axis, I'll place the move gizmo that'll let you move the box around.

XTIUJ3Z.png

I figure that once the vessel build completes, the bounding box will appear automatically and let you move it around before you tap the Finalize button and place the vessel into the world. Hopefully this effort will pay off, and the issues with slamming into the ground will go away.

Link to comment
Share on other sites

  • 2 weeks later...
11 hours ago, Angelo Kerman said:

Also, I'm investigating how to add required components to a materials list so that a certain someone can use Sandcastle to play Kerbal Satisfactory...

Who would that be?

 

 

11 hours ago, Angelo Kerman said:

Work is going crazy, but I made some progress...

cyKkFy3.png

Does it move? If so, amazing.

Nice to have a in-situ construction mod being actively developed

Link to comment
Share on other sites

37 minutes ago, Rakete said:

I lost a little bit of track... eehh... is this instantprinting of vessels and parts already live or is at a dev diary content preview?

The latter. Unless I mis-read, Angelo said when the vessel is finished printing, then it presents this bounding box with the movement gizmo.

I'm interested in what the offset limits are and what they're decided from.

Link to comment
Share on other sites

https://github.com/Angel-125/Sandcastle

Nope, it seems the source code has all this added. However, it is not in full release. I can finally make my Minmus base! (maybe also a hotel and casino if you know what I mean..)

No, this is actually in release. A pre-release mind you, but still a release!

https://github.com/Angel-125/Sandcastle/releases/tag/v1.2.0

Link to comment
Share on other sites

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