Jump to content

Idea for how to generate physical landbased terrain scatter


Recommended Posts

Occasionally people wonder if KSP could ever have physical ground scatter, and I don't mean the scatter we have now, but physical collidable scatter and I think I've come up with a potential system which would overcome prior issues.

The idea is that like asteroids they would spawn in a radius around a select craft (say 1km) and they exist physically but for only as long as the craft is within range. As to the visuals, the normal visual scatter can appear as they do now but they become physical at 1km distance. To prevent them from moving when they normally wouldn't, I would have them submerged a few meters into the ground to "lock them in place". Then if a player grabs them with enough power than can move them if desired, but once dislodged they of course experience normal gravity.

The scatter would simply be boulders ranging from 1 meter in diameter to maybe 20 meters in diameter. This would be great for places like the Mun since those who know, one of the major parts of the Apollo 11 mission was the fact that Neil Armstrong actually had to disable the flight computer and fly manually since they came up too long and overshot the planned landing site. Due to that, the flight computer was planning to land them in a massive boulder field and it was Neil's piloting that saved the mission. Why not have this in KSP?

One issue mentioned before is that since they spawn procedurally, when you return to the game they might have moved and might intersect an existing craft and the simply solution is to save the current location of only the nearby physical boulders. Others outside of the 1km bubble would simply regenerate on the next loading into the area. One issue I have considered arising, is what if a scene based boulder randomly generates on a landed craft that is outside of the current vessel's 1km bubble. So the solution would be that the game runs a "quick check" at 1.25km making sure that the locations of all "current" boulders do not intersect with the craft however this should never be an issue as that vessel should be ok considering that the player placing the vessel there would have to have landed on the boulder to actually have encountered it. This issue will only occur for crafts that are generated in the game without having run it (say for contracts), but this system should solve that issue. Last Issue I can image is that players might try to save whilst ontop of an object and then leave the scene and when they return they might phase through the object and be destroyed by it when physics loads in. The solution simply being that you cannot save/revert/go to the KSC while ontop of any scatter.

Of course scatter could be for Kerbin, trees, grass, cacti, and so on. For everything else you really only need boulders, granted any other major objects that exist on the surface of other bodies could easily be added.

If worried about ruining players experience, then, like ground scatter as is, they can be an option in the options menu.

This is just an idea I had and I thought of. So what are your thoughts? Comments? Concerns?

Edited by ZooNamedGames
Link to comment
Share on other sites

I like the idea of having ground scatter we can crash into, but wouldn't a method like that require quite a lot of loading/unloading? I don't actually know the reason they don't have collision meshes - is that a performance issue? I always assumed they just hadn't gotten around to it yet.

Link to comment
Share on other sites

1 minute ago, Deddly said:

I like the idea of having ground scatter we can crash into, but wouldn't a method like that require quite a lot of loading/unloading? I don't actually know the reason they don't have collision meshes - is that a performance issue? I always assumed they just hadn't gotten around to it yet.

Well one of the biggest issue was that since they are procedural, they may spawn inside an existing craft. It also might be a performance issue, but the option exists to disable the current scatter for performance, why not this?

Link to comment
Share on other sites

Just now, Deddly said:

@ZooNamedGames Does that mean that if I go back to the exact same spot I visited before on Kerbin, the trees will be in different places? I understand they are procedurally generated, but that should be the same procedure each time, right? Or am I missing something completely?

With the current scatter, yes. The trees and other scatter will change places every time you leave and return to the vessel. Of course there's no priority on it seeing as they have no collision hit boxes.

They don't run off of map seeds like resources, they randomly generated upon every return so exact placement of previous scatter will be highly improbable.

Link to comment
Share on other sites

Just now, Andem said:

I think that @Galileo might have a different opinion on that... :wink:

I used it and saw nothing and I've looked at the mod listing, it shows nothing about adding physical terrain objects and more to the point this is a request to become stock and methods to assist it being so.

This is in his post for it-

Quote

This mod adds ground textures to ALL celestial bodies within the STOCK SOLAR SYSTEM

I see nothing about physical ground scatter, or any new scatter whatsoever.

I'd like to emphasize it says ground textures.

Link to comment
Share on other sites

3 minutes ago, ZooNamedGames said:

I used it and saw nothing and I've looked at the mod listing, it shows nothing about adding physical terrain objects and more to the point this is a request to become stock and methods to assist it being so.

All I meant was, It gives ground scatter colliders. Saying that all it does was "retexture the ground" is false, that's it.

Link to comment
Share on other sites

7 minutes ago, Andem said:

All I meant was, It gives ground scatter colliders. Saying that all it does was "retexture the ground" is false, that's it.

Where does it mention that? I've used the mod and also looked at the listing and it never mentions it. That's a pretty decent feature to go unnoted.

Link to comment
Share on other sites

It does indeed allow for scatter colliders. SVT was meant to be just a visual mod and I didn't think the colliders were that big of a deal,  just an extra feature.  I will add it to the OP to avoid any future confusion

Edited by Galileo
Link to comment
Share on other sites

I support the notion as outlined. Collidable scatter would make rover exploration far more interesting than currently, and landing a space shuttle in any forest plain, while convenient, skips a relevant challenge that real space programs have to handle.

These two details seem out of spirit to me:

On 17.9.2016 at 4:27 AM, ZooNamedGames said:

To prevent (the scatter objects) from moving when they normally wouldn't, I would have them submerged a few meters into the ground to "lock them in place". Then if a player grabs them with enough power than can move them if desired, but once dislodged they of course experience normal gravity.

From what experience I have with physics engines, clipping things into colliders to hold them in place is asking for all nasty kinds of trouble. A simple force-gauging lock functionality could work, but would the boulders pop out of the ground upon activation? If they would not, clipping issues are bound to manifest. Moreover, movable scatter implies a whole new save system if the changes are intended to be permanent. Clearing a landing field is no use if different boulders generate anew on the next visit.

On 17.9.2016 at 4:27 AM, ZooNamedGames said:

One issue mentioned before is that since they spawn procedurally, when you return to the game they might have moved and might intersect an existing craft and the simply solution is to save the current location of only the nearby physical boulders. Others outside of the 1km bubble would simply regenerate on the next loading into the area. One issue I have considered arising, is what if a scene based boulder randomly generates on a landed craft that is outside of the current vessel's 1km bubble. So the solution would be that the game runs a "quick check" at 1.25km making sure that the locations of all "current" boulders do not intersect with the craft

Procedural does not imply random. What advantage is to be had by changing the seed number upon loading?

Link to comment
Share on other sites

1 minute ago, SchweinAero said:

I support the notion as outlined. Collidable scatter would make rover exploration far more interesting than currently, and landing a space shuttle in any forest plain, while convenient, skips a relevant challenge that real space programs have to handle.

These two details seem out of spirit to me:

From what experience I have with physics engines, clipping things into colliders to hold them in place is asking for all nasty kinds of trouble. A simple force-gauging lock functionality could work, but would the boulders pop out of the ground upon activation? If they would not, clipping issues are bound to manifest. Moreover, movable scatter implies a whole new save system if the changes are intended to be permanent. Clearing a landing field is no use if different boulders generate anew on the next visit.

Procedural does not imply random. What advantage is to be had by changing the seed number upon loading?

Whatever solution is met to keep them in place should be acceptable. Whether it be a simple physics lock until interacted with or whatever other notion conceived.

All this would require is, "if landed true, physical terrain scatter: x y z location, repeat for all terrain". So modified yes, huge overhaul? No.

In this case, the current scatter is random. As I told to @Deddly upon every visit to a location with the current scatter, things will move. This would have that but you mentioned of clearing fields is possible as long as you keep a craft there. This can simply be a dummy probe, but as long as it's within 1km of your cleared field it would remain clear.

Link to comment
Share on other sites

2 minutes ago, ZooNamedGames said:

In this case, the current scatter is random. As I told to @Deddly upon every visit to a location with the current scatter, things will move. This would have that but you mentioned of clearing fields is possible as long as you keep a craft there. This can simply be a dummy probe, but as long as it's within 1km of your cleared field it would remain clear.

I still fail to see why you wouldn't make the system use the same seed each time, unlike current KSP. If anything, it would be easier to implement and debug, and you'd get to keep your clear landing location even if all your vessels leave. Rocks do not walk of their own accord on real moons.

Link to comment
Share on other sites

1 minute ago, SchweinAero said:

I still fail to see why you wouldn't make the system use the same seed each time, unlike current KSP. If anything, it would be easier to implement and debug, and you'd get to keep your clear landing location even if all your vessels leave. Rocks do not walk of their own accord on real moons.

Current KSP doesn't use seeds. The scatter in the KSP you can boot up right now, will have scatter change upon every return to a vessel.

As of KSP right now rocks and trees do walk of their own accord.

Link to comment
Share on other sites

3 minutes ago, ZooNamedGames said:

Current KSP doesn't use seeds. The scatter in the KSP you can boot up right now, will have scatter change upon every return to a vessel.

As of KSP right now rocks and trees do walk of their own accord.

Are you saying that similarity to current KSP would be a virtue for this suggestion, or that the switch to non-random scatter would be prohibitively difficult? As I see it, the initial creation of (for example) boulders on a body would consist of plugging a body-specific constant into a number sequence generator and getting a sorted list of latitude+lognitude+size entries all over the surface. To make physical objects in the vicinity of a vessel, read through the correct subset of that list. No extra runtime collision checks required.

Link to comment
Share on other sites

1 minute ago, SchweinAero said:

Are you saying that similarity to current KSP would be a virtue for this suggestion, or that the switch to non-random scatter would be prohibitively difficult? As I see it, the initial creation of (for example) boulders on a body would consist of plugging a body-specific constant into a number sequence generator and getting a sorted list of latitude+lognitude+size entries all over the surface. To make physical objects in the vicinity of a vessel, read through the correct subset of that list. No extra runtime collision checks required.

I'm just saying that current scatter will be different from the final product.

Link to comment
Share on other sites

Then we're on the same page, all good. I was just confused by these.

On 17.9.2016 at 4:27 AM, ZooNamedGames said:

since they spawn procedurally, when you return to the game they might have moved and might intersect an existing craft and the simply solution is to save the current location of only the nearby physical boulders.

 

On 17.9.2016 at 4:27 AM, ZooNamedGames said:

So the solution would be that the game runs a "quick check" at 1.25km making sure that the locations of all "current" boulders do not intersect with the craft

 

Link to comment
Share on other sites

This intrigued me so much I went ahead and did a little testing. I discovered a couple of things. Firstly, if you're turning on scatters and are surprised that you can't find any, restart KSP :P

With that out of the way, I drove my "rover" up to a nice big tree and parked it there:

screenshot4.png

 

I figured this would be an easy way to see how much the ground scatter moves about. So I left the car there and went back to the space centre, then from the tracking station I selected the rover again, to see this:

screenshot5.png

The tree has refused to move! The next step was to quit to the main menu, reload the save and look again:
screenshot6.png

Darned tree is still in my way! The only other test I could think of was to shut down KSP completely and reload, so that's what I did:
screenshot7.png

So it looks like the walking trees and rocks issue has been fixed :)

The other thing I discovered whilst testing this is that I could still drive on electric power even when the batteries were empty. :huh: But that's the subject for another discussion.

To sum things up, yes I want to crash into trees.

Link to comment
Share on other sites

12 hours ago, ZooNamedGames said:

Well one of the biggest issue was that since they are procedural, they may spawn inside an existing craft. It also might be a performance issue, but the option exists to disable the current scatter for performance, why not this?

They can be generated following a pseudorandom generator using a single, fixed random seed - that way they always generate in the same location. That way they won't spawn where a craft already is, for the simple reason the craft won't be there because the scatter element was there already the moment that craft arrived there.

Link to comment
Share on other sites

9 hours ago, Deddly said:

This intrigued me so much I went ahead and did a little testing. I discovered a couple of things. Firstly, if you're turning on scatters and are surprised that you can't find any, restart KSP :P

With that out of the way, I drove my "rover" up to a nice big tree and parked it there:

screenshot4.png

 

I figured this would be an easy way to see how much the ground scatter moves about. So I left the car there and went back to the space centre, then from the tracking station I selected the rover again, to see this:

screenshot5.png

The tree has refused to move! The next step was to quit to the main menu, reload the save and look again:
screenshot6.png

Darned tree is still in my way! The only other test I could think of was to shut down KSP completely and reload, so that's what I did:
screenshot7.png

So it looks like the walking trees and rocks issue has been fixed :)

The other thing I discovered whilst testing this is that I could still drive on electric power even when the batteries were empty. :huh: But that's the subject for another discussion.

To sum things up, yes I want to crash into trees.

Well this bursts my logic bubble. Well guess all that remains is to simply solidify them.

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