Jump to content

Cargo Transportation Solutions (WIP)


Talisar

Recommended Posts

Still suffering SEVERE VAB lag when the doors are in motion, or when moving your parts around.

I can second this. Dragging too many cargo frame pieces around as a unit, or grabbing the cargo bay out of the parts list (which makes it start moving its doors) while there are one or more other cargo bay parts on screen, causes pretty severe slowdown. Additionally, attaching and removing large sections of cargo frame causes everything to freeze for a time seemingly proportional to the number of pieces.

I've noticed that the cargo frames seem to have a very detailed collider mesh - the curved orange diagonal pieces, for example, light up the part on mouseover while all the empty space around them doesn't. At least the main pieces on either side and the middle of the saddle seem to act as a unit (the gaps in those are still treated as pointing at the part). Maybe it would help to remove the long curved orange pieces from the collider, or treat the entire saddle as a continuous surface despite the open space?

On the bright side, procedural tanks work perfectly with these parts - they even come with a Copernicus texture:

QLrwZGsl.png

Above are filleted cylinders, just under 6m long, 2.5m diameter and fillet (equal length, diameter, and fillet gives you a sphere, btw) and below is a 3m diameter cylinder.

Edited by Tallinu
wording
Link to comment
Share on other sites

Yeah, the collider on the arches is fairly detailed. I am going to be condensing the texture maps on these pieces next, and believe I can simplify their colliders some more, and if necessary I can remove the collider from the orange curved pieces altogether.

I need to make another pass at the cargo bay to fix that flipped normal, so I'll work on fixing the issue with that as well. I had fixed it before (I think) so I believe I probably accidentally reverted to the previous version.

I've also improved the textures on the new adapters/separators a little, and I'll include those when I update after working on the above issues.

Link to comment
Share on other sites

Ok, I've gone back and looked, and the version of the cargo bay in the packs has been the same one since v0.1.1 (which I had thought corrected the VAB lag when opening/closing the doors).

@MaverickSawyer and @Tallinu - has the slowdown been consistent for each iteration of the pack, or did it go away and come back after an update?

@JustinKerbice - Has the VAB lag returned for you since the v0.1.1 update?

In any case, I'll rework the colliders on that part as well and see if I can do anything about simplifying the animation (it's my first animated part, so it's likely there's a lot I can fix there)

As for the arches, my plan is for the next iteration to have simplified colliders, but still retain them on the curved arches ('cuz I think it's cool :cool:), but if there are still issues I can remove the colliders from those sections completely. Ultimately I expect I'll have to settle on the second option, but it has a -10 to coolness factor.

Link to comment
Share on other sites

I can second this. Dragging too many cargo frame pieces around as a unit, or grabbing the cargo bay out of the parts list (which makes it start moving its doors) while there are one or more other cargo bay parts on screen, causes pretty severe slowdown. Additionally, attaching and removing large sections of cargo frame causes everything to freeze for a time seemingly proportional to the number of pieces.

I've noticed that the cargo frames seem to have a very detailed collider mesh - the curved orange diagonal pieces, for example, light up the part on mouseover while all the empty space around them doesn't. At least the main pieces on either side and the middle of the saddle seem to act as a unit (the gaps in those are still treated as pointing at the part). Maybe it would help to remove the long curved orange pieces from the collider, or treat the entire saddle as a continuous surface despite the open space?

On the bright side, procedural tanks work perfectly with these parts - they even come with a Copernicus texture:

http://i.imgur.com/QLrwZGsl.png

Above are filleted cylinders, just under 6m long, 2.5m diameter and fillet (equal length, diameter, and fillet gives you a sphere, btw) and below is a 3m diameter cylinder.

Are you using custom code for the opening and closing or using Firespitter?

Link to comment
Share on other sites

Ok, I've gone back and looked, and the version of the cargo bay in the packs has been the same one since v0.1.1 (which I had thought corrected the VAB lag when opening/closing the doors).

@JustinKerbice - Has the VAB lag returned for you since the v0.1.1 update?

Yes, with last version (0.3.1).

1 cargo bay is more or less ok, 2 is becoming noticeable, 3 is becoming seriously slow, 4 is killing, 5 I'm dead already :D

With many cargo bays, playing one anim only create slowdown, 2 anims at a time is hard, 3 is very hard to even start as after right-clicking, menu appears 3-4 s later.

It's a kind of KSP'ish mod I guess (the llooooooooonnngg time between "click launch", and get ready to fire the engines)

Regarding collider: you can even make a partial cylinder (EVA kerbals won't be able to go through the frame, it will prevent sabotage :P), and maybe provide a more detailed one (just use mesh as collider in unity, without checking "convex" property) as an option for people who really want more.

Link to comment
Share on other sites

Are you using custom code for the opening and closing or using Firespitter?

Just using FireSpitter for the animation

Yes, with last version (0.3.1).

1 cargo bay is more or less ok, 2 is becoming noticeable, 3 is becoming seriously slow, 4 is killing, 5 I'm dead already :D

With many cargo bays, playing one anim only create slowdown, 2 anims at a time is hard, 3 is very hard to even start as after right-clicking, menu appears 3-4 s later.

It's a kind of KSP'ish mod I guess (the llooooooooonnngg time between "click launch", and get ready to fire the engines)

Regarding collider: you can even make a partial cylinder (EVA kerbals won't be able to go through the frame, it will prevent sabotage :P), and maybe provide a more detailed one (just use mesh as collider in unity, without checking "convex" property) as an option for people who really want more.

This is what is confusing me, because I haven't changed anything at all about the cargo bays since the 0.1.1 update. Model/config/animations, etc all exactly the same ones.

about the arch colliders, if necessary I can just remove them completely for that section of the model and that will likely fix the lag from those parts. The colliders for the sides and top are simple boxes (as Tallinu noted). The arches will be there visibly, but kerbals will be able to pass straight through them. You should have seen the lag on the initial version before I replaced the side colliders, even on my relatively beefy rig.

On a side note, I'm slightly offended that no one has noticed that I made the sides of the vertical trusses act as ladders yet :) I thought that was pretty cool.

Link to comment
Share on other sites

Yes, with last version (0.3.1).

1 cargo bay is more or less ok, 2 is becoming noticeable, 3 is becoming seriously slow, 4 is killing, 5 I'm dead already :D

With many cargo bays, playing one anim only create slowdown, 2 anims at a time is hard, 3 is very hard to even start as after right-clicking, menu appears 3-4 s later.

It's a kind of KSP'ish mod I guess (the llooooooooonnngg time between "click launch", and get ready to fire the engines)

Yep, that's what I've been seeing too.

@MaverickSawyer and @Tallinu - has the slowdown been consistent for each iteration of the pack, or did it go away and come back after an update?

Dunno, I only got the pack at 0.3.1. Once it's on orbit, there's no problems and it looks freaking awesome. It's just killing my performance in the VAB.

On a side note, I'm slightly offended that no one has noticed that I made the sides of the vertical trusses act as ladders yet :) I thought that was pretty cool.

Say what? *runs off to VAB to launch a truss and a Hitchhiker storage module*

Link to comment
Share on other sites

On a side note, I'm slightly offended that no one has noticed that I made the sides of the vertical trusses act as ladders yet :) I thought that was pretty cool.

Sorry, too much focused on anim issue :cool: but it's a very bright idea, really, it will make repair/service easier too (just in case failures comes in a distant future).

Have you tried with another anim plugin ? Many of them are available now (stock, stupid_chris, BahamutoD) This way you'll be sure if it's only you or the plug-in or a nasty combination of plug-in + anim. Maybe it's another trick from the Kremlins !

EDIT: more issues (sorry ;) )

the cargo bay surface attachment enabled makes impossible to add dock ports (except the senior) inside cargo bay, those damned nodes are stuck to the cargo bay sides and never get "cautgh" by the bottom node. Worth: with the clamp-o-tron, we can put it but uncentered, and we can't put another port docked on the previous one.

+one suggestion: let the doors open in VAB/SPH (people are most likely to add something inside 1st !

Edited by Justin Kerbice
add nodes issue
Link to comment
Share on other sites

Ok, here's the rework of the cargo bay: DOWNLOAD

The download only includes the new cargo bay model, texture, and configs. Please install over the current versions and allow it to overwrite when asked. I believe this iteration should minimize, if not eliminate, the lag issues caused by the cargo bay.

I built this in the VAB. 18 of the cargo bays together. Had very little lag when moving the stacks around (just a slight hiccup when picking up the entire assembly, no more than usual for picking up large stacks of parts), no appreciable lag when I exited and re-entered the VAB to make them all animate at once. Then I attached them all to an action group and opened them on the launchpad without a hitch.

Et4BtD5.png

I'd appreciate those of you specifically having issues with the cargo bay trying this one out and letting me know what you think.

Link to comment
Share on other sites

And, sooner than expected, here is the rework of the arch section: DOWNLOAD

This one is just a model replacement. As with the cargo bay, please install over the current pack, overwriting when necessary.

This version has simplified colliders, but still includes colliders for the curvy arc pieces. And now for my testing pics:

I built this, and when in the VAB I did get quite a bit of lag when picking up and moving the entire stack, but when placed back down it all went away:

WiK2kIp.png

Then I took it to the launchpad and tested it to destruction, got zero lag while doing so:

uAdJfh9.png

It was spectacular :) Again, please give these parts a test and let me know your thoughts. If necessary, I will remove the colliders from the curvy arch pieces altogether, but (in my install anyhow) I find the lag when moving multiple of these pieces annoying, but not a game breaker. Your input would be appreciated.

Link to comment
Share on other sites

Those parts look pretty damn good. Does the cargo bay adapter have a separate node inside for payload attachment?

Also could you post a few pictures of the collision meshes of the cargo bay and the trusses? There's really no good reason why truss segments should lag more than the cargo bay.

Link to comment
Share on other sites

And, sooner than expected, here is the rework of the arch section: DOWNLOAD

This one is just a model replacement. As with the cargo bay, please install over the current pack, overwriting when necessary.

This version has simplified colliders, but still includes colliders for the curvy arc pieces. And now for my testing pics:

I built this, and when in the VAB I did get quite a bit of lag when picking up and moving the entire stack, but when placed back down it all went away:

http://i.imgur.com/WiK2kIp.png

Then I took it to the launchpad and tested it to destruction, got zero lag while doing so:

http://i.imgur.com/uAdJfh9.png

It was spectacular :) Again, please give these parts a test and let me know your thoughts. If necessary, I will remove the colliders from the curvy arch pieces altogether, but (in my install anyhow) I find the lag when moving multiple of these pieces annoying, but not a game breaker. Your input would be appreciated.

What a magnificent engineering test setup you are using there!

Timbaaa!

Link to comment
Share on other sites

Those parts look pretty damn good.

Thanks!

Does the cargo bay adapter have a separate node inside for payload attachment?

Yes, I gave the adapters and the solid separators separate nodes for payload attachment. That's the main reason for the raised "rim" around the plate, in order to give me space to put both. Here's some pics, with the nodes resized to make them easier to see. In the first you see both nodes, the upper one is for the cargo bay pieces and the lower one for payloads. The second shows the setup when the cargo bay/frame is attached:

a8pPtnW.pnggPupDOp.png

Also could you post a few pictures of the collision meshes of the cargo bay and the trusses? There's really no good reason why truss segments should lag more than the cargo bay.

Sure! The colliders for the basic truss are actually very simple:

RfTk9XQ.jpg

The cargo bay collider is quite a bit more complex (and this is after my most recent rework, where I halved the number of sections:

qY9olUT.jpg

The one that is causing the lag issues is the arch, which is MUCH more complex:

sXwTz1d.jpg

Again, this is after the rework, where I halved the number of polys in the collider. If necessary, I will be removing the purple sections of that collider in the next iteration, which will halve the number of sections again. I'll also be re-working the colliders for the end-pieces to cut the amount of those in half as well. My first version of the basic truss was like this, but I swapped it out for the much simpler one before I put the first test version up for download.

What a magnificent engineering test setup you are using there!

Timbaaa!

Glad you approve! I playtest like a 3-year old tests the structural integrity of a sandcastle at the beach :)

Link to comment
Share on other sites

I suspected those colliders to be something like that. I'm not entirely sure if that's the best way to go. One the one hand those parts are large and the holes are large enough for other parts and kerbals to pass through so it's more realistic that way. On the other hand unless you really need those parts to be penetrable you should make the colliders solid like the cargo bay. In addition complex colliers make physics calculations more intensive, and with the state of KSP right now it's not a good idea to tax the CPU too much. As far as I know all truss colliders I've used so far are simple in comparison.

Anyway the more I see here the more I like what you've done so far. The modularity in particular is pretty nice. One last thing. If you're planning on making those multiple docking ports or multiple connection node how do you plan on making sure the tank docking always fits? How about multiple drop tanks inside one long saddle truss?

Edited by Cpt. Kipard
Link to comment
Share on other sites

Actually, I agree with you about this, which is why I went from the very complex individual colliders to the more simple boxes on the basic truss section. While the individual ones were cooler, that section didn't need to be pass-through-able, as the bars are very close together. For the arch pieces, one of the major points of (for me, at least) it is that it would be passable. If it comes down to having to, I'll end up going with removing the arch collider sections and keeping it passable rather than putting an invisible wall in. I'd rather be able to clip through the arch sections than have a large area that looks traversible but isn't.

I believe that part of the problem I've run into is that I have a relatively powerful (if aging) computer, so I'm assuming that while these parts are giving me no problem, they may be a bit rough for others. That's why I'm trying to simplify in steps and get feedback each time, in order to find a sweet spot between my own design for these and what is feasible for most players.

Edited by Talisar
Link to comment
Share on other sites

I'll test these new parts soon, have you seen my last post, doesn't look so.

Oops, no I didn't see your addition to that post, sorry.

Why not give a try to unity colliders ? You add it without giving any other mesh, and try convex and not convex.

I've used them before, and still do for simple box colliders for things like airlocks and ladders. I generally model them along with the visual model for anything more complex than that, as I've found it's easier for me. In this way I can usually make the collider much simpler than the visual mesh, but still keep it matching as closely as possible. It just feels easier to me to do them in the same program.

Have you tried with another anim plugin ? Many of them are available now (stock, stupid_chris, BahamutoD) This way you'll be sure if it's only you or the plug-in or a nasty combination of plug-in + anim. Maybe it's another trick from the Kremlins !

I'll give BahamutoD's and stupid_chris' replacement plugins a shot and see if there's any difference. FireSpitter has the benefit of being a very widely used replacement for the generic plugin, so it's not likely to be adding another plugin to most modded installs.

EDIT: more issues (sorry ;) )

the cargo bay surface attachment enabled makes impossible to add dock ports (except the senior) inside cargo bay, those damned nodes are stuck to the cargo bay sides and never get "cautgh" by the bottom node. Worth: with the clamp-o-tron, we can put it but uncentered, and we can't put another port docked on the previous one.

+one suggestion: let the doors open in VAB/SPH (people are most likely to add something inside 1st !

They're not openable for you? They should be open by default. Actually to be more precise, when you first place it they should be closed and automatically open to display the animation. After that, you should be able to toggle whether they are open or closed by right clicking.

With the surface attach issue, I think I understand what you're saying. The issue is that if I turn off the option to surface attach things to them, you won't be able to attach anything to the sides (inside or out). The main workaround I can think of would be to temporarily move the cargo bay off of the mount, then put your payload on the lower stack point, then put the cargo bay back on the upper stack point. If your doors don't open, that is probably the major contribution to this issue for you.

Link to comment
Share on other sites

Talisar you could add a visual indication that the trusses have ladders, like protruding rungs, or something. Maybe something that looks like vertical handle bars.

Good idea! Easy to add too! Now on the to-do list :)

Well I'd love to get this, but mediafire is just throwing ads and not downloading.

Give it another shot. I went ahead and upgraded to an ad-free account (I should have done that sooner, actually)

Link to comment
Share on other sites

I've used them before, and still do for simple box colliders for things like airlocks and ladders. I generally model them along with the visual model for anything more complex than that, as I've found it's easier for me. In this way I can usually make the collider much simpler than the visual mesh, but still keep it matching as closely as possible. It just feels easier to me to do them in the same program.

I'll give BahamutoD's and stupid_chris' replacement plugins a shot and see if there's any difference. FireSpitter has the benefit of being a very widely used replacement for the generic plugin, so it's not likely to be adding another plugin to most modded installs.

They're not openable for you? They should be open by default. Actually to be more precise, when you first place it they should be closed and automatically open to display the animation. After that, you should be able to toggle whether they are open or closed by right clicking.

With the surface attach issue, I think I understand what you're saying. The issue is that if I turn off the option to surface attach things to them, you won't be able to attach anything to the sides (inside or out). The main workaround I can think of would be to temporarily move the cargo bay off of the mount, then put your payload on the lower stack point, then put the cargo bay back on the upper stack point. If your doors don't open, that is probably the major contribution to this issue for you.

In order:

Of course, such hatch/ladder thing must be done outside unity unless you're crazy :D, I was more speaking about base shape colliders.

It's likely possible unity do some "magic" makes collider smarter then we think (because unity know itself better than us) and sometime "the thing to do is not the best thing to do".

A lonely plug-in itself will not contribute that much to memory usage.

Yes they are openable fortunately :).

By the way, anim does not create slowdown now, I tried with 4 bays.

the workaround is not a full one, as small things doesn't snap correctly (as I said, a clamp-o-tron is mostly impossible to put in the exact center, unless using stock adapter).

Another issue: see last 4 pic of the albums

Javascript is disabled. View full album

The third cargo arch is put in the wrong height (lower than it should) due to those nodes size/snap mismatch again.

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