Author Topic: Idea: Procedural Planet Surface  (Read 11190 times)

0 Members and 1 Guest are viewing this topic.

Idea: Procedural Planet Surface
Hello people,
it's time that I once again bring up an idea for a feature.

Over the course of the SCP's history, there have been a few attempts in writing missions in planetary atmospheres or even over planetary surfaces.
For the former, skyboxes were usually used like in WCSaga. For the latter, a huge textured planar-ish mesh was usually used with quite some impressive results, like in Blue Planet Act III.

While working on XWVM, we figured out that most games featuring planetary surfaces (IE aircraft simulators) use some sort of procedure to create these. X-Wing also creates the Death Star's surface that way. Same with Wing Commander III and IV as well as Elite II (Frontier) and Elite III (First Encounters).

Which brings me to the point:
What do you think about having procedural planetary surfaces as part of Freespace Open? Is something like this even feasible for the SCP?
Audio Converter of Enigma Campaign 2666:
http://enigma.de.to/

German translator of WC: Hostile Frontier:
http://www.ciinet.org/kevin/wchf/

My Youtube Channel:
http://www.youtube.com/user/FekLeyrTarg?feature=mhee

 

Offline The E

  • He's Ebeneezer Goode
  • Moderator
  • 213
  • Nothing personal, just tech support.
    • Steam
    • Twitter
Re: Idea: Procedural Planet Surface
It may be possible to do with scripting. The basic idea there would be to have a set of terrain tiles that is spawned as the player moves through the mission space.
If I'm just aching this can't go on
I came from chasing dreams to feel alone
There must be changes, miss to feel strong
I really need lifе to touch me
--Evergrey, Where August Mourns

 
Re: Idea: Procedural Planet Surface
Would it need pre-built meshes to choose from or could the procedure generate the meshes itself? In X-Wing for instance, there's no mesh of the surface itself. The procedure generates some sort of infinite planes for the surface and the trench, then places the pre-built buildings and turrets on top of it.
Audio Converter of Enigma Campaign 2666:
http://enigma.de.to/

German translator of WC: Hostile Frontier:
http://www.ciinet.org/kevin/wchf/

My Youtube Channel:
http://www.youtube.com/user/FekLeyrTarg?feature=mhee

 

Offline General Battuta

  • Poe's Law In Action
  • 214
  • i wonder when my postcount will exceed my iq
Re: Idea: Procedural Planet Surface
I think the biggest problem is the AI having no damn idea what to do if it gets close.

 
Re: Idea: Procedural Planet Surface
I think the biggest problem is the AI having no damn idea what to do if it gets close.

Sure, but that effects all ground-missions, what hasn't stopped FREDers from making good ones.

Overall this sounds like a job for ship-create SEXP, unless I misunderstand the whole concept.

 

Offline wookieejedi

  • 29
  • Intensify Forward Firepower
Re: Idea: Procedural Planet Surface
As mentioned you could do it more effectively with scripting. Ie moving the ground tiles to where the player is (along with having a matching skybox model). I think moving the tiles would be more efficient then creating new ones everywhere.

 

Offline m!m

  • 211
Re: Idea: Procedural Planet Surface
Apart from the AI issues, this is definitely doable with a script at the moment but only with a limited tile set.

If you start to generate the geometry on the fly (e.g. on the GPU via tesselation) then you would need additional, specialized shaders for rendering this geometry and it would also cause issues with collision detection since the engine has no idea what kind of transformations the GPU will do.

 
Re: Idea: Procedural Planet Surface
As mentioned you could do it more effectively with scripting. Ie moving the ground tiles to where the player is (along with having a matching skybox model). I think moving the tiles would be more efficient then creating new ones everywhere.

Could probably done with SEXPs too.

 

Offline wookieejedi

  • 29
  • Intensify Forward Firepower
Re: Idea: Procedural Planet Surface
That is very true. In my experience though something like this would be much easier to script, though if the person who wanted to make liked sexps better then it is definitively possible that way, too.  :)

 

Offline Colonol Dekker

  • HLP is my mistress
  • 213
  • Aken Tigh Dekker- you've probably heard me
    • My old squad sub-domain
Re: Idea: Procedural Planet Surface
Who doesn't like a good sexp.
Campaigns I've added my distinctiveness to-
- Blue Planet: Battle Captains
-Battle of Neptune
-Between the Ashes 2
-Blue planet: Age of Aquarius
-FOTG?
-Inferno R1
-Ribos: The aftermath / -Retreat from Deneb
-Sol: A History
-TBP EACW teaser
-Earth Brakiri war
-TBP Fortune Hunters (I think?)
-TBP Relic
-Trancsend (Possibly?)
-Uncharted Territory
-Vassagos Dirge
-War Machine
(Others lost to the mists of time and no discernible audit trail)

Your friendly Orestes tactical controller.

Secret bomb God.
That one time I got permabanned and got to read who was being bitxhy about me :p....
GO GO DEKKER RANGERSSSS!!!!!!!!!!!!!!!!!
President of the Scooby Doo Model Appreciation Society
The only good Zod is a dead Zod
NEWGROUNDS COMEDY GOLD, UPDATED DAILY
http://badges.steamprofile.com/profile/default/steam/76561198011784807.png

 

Offline Zarax

  • 210
Re: Idea: Procedural Planet Surface
Wasn't there some "planet" code buried in the game? IIRC calling something "planet" would damage ships flying too close for example.
The Best is Yet to Come

 
Re: Idea: Procedural Planet Surface
Wasn't there some "planet" code buried in the game? IIRC calling something "planet" would damage ships flying too close for example.

Yep. Just a few days ago I learned that the player ship self-destructs if something named Planet warps in.

  

Offline Bryan See

  • Has anyone really been far as decided to use even go want to do look more like?
  • 210
  • Trying to redeem, but under Tiger Parents
    • Skype
    • Steam
    • Twitter
Re: Idea: Procedural Planet Surface
Wasn't there some "planet" code buried in the game? IIRC calling something "planet" would damage ships flying too close for example.
Found the file which is said to have a "planet," other than briefing icons. It is collideshipship.cpp.

Code: [Select]
#define PLANET_DAMAGE_SCALE 4.0f
#define PLANET_DAMAGE_RANGE 3 // If within this factor of radius, apply damage.

fix Last_planet_damage_time = 0;

EDIT: I've forgot to add the code in the fred.rc file. This code appears to have something to do with planets.
Code: [Select]
    ID_VIEW_FIGHTERS        "Show/Hide Fighter objects"
    ID_VIEW_CAPITALSHIPS    "Show/Hide Capital Ship objects"
ID_VIEW_PLANETS "Show/Hide Planet objects"
« Last Edit: March 02, 2019, 07:00:46 am by Bryan See »
Bryan See - My FreeSpace Wiki User Page (Talk, Contributions)

Full Projects:
Shattered Stars

Campaigns:
Lost in the Mist - Cyrene vs. Psamtik
FreeSpace: Reunited

Ships:
GTS Hygeia, GTT Argo, SC Raguel

Tools:
FSO TC/Game template

I've been under attack by Tiger Parents like Jennifer Pan...

 

Offline Zarax

  • 210
Re: Idea: Procedural Planet Surface
Wasn't there some "planet" code buried in the game? IIRC calling something "planet" would damage ships flying too close for example.
Found the file which is said to have a "planet," other than briefing icons. It is collideshipship.cpp.

Code: [Select]
#define PLANET_DAMAGE_SCALE 4.0f
#define PLANET_DAMAGE_RANGE 3 // If within this factor of radius, apply damage.

fix Last_planet_damage_time = 0;

I... hoped there was a little more than that. That said, if there was the SCP would have used it already...
The Best is Yet to Come

 
Re: Idea: Procedural Planet Surface
Given the scale of FS with fighters travelling around with a few hundred m/s at best, having 3D planets thousands of km wide doesn't make that much sense.

 

Offline Bryan See

  • Has anyone really been far as decided to use even go want to do look more like?
  • 210
  • Trying to redeem, but under Tiger Parents
    • Skype
    • Steam
    • Twitter
Re: Idea: Procedural Planet Surface
Wasn't there some "planet" code buried in the game? IIRC calling something "planet" would damage ships flying too close for example.
Found the file which is said to have a "planet," other than briefing icons. It is collideshipship.cpp.

Code: [Select]
#define PLANET_DAMAGE_SCALE 4.0f
#define PLANET_DAMAGE_RANGE 3 // If within this factor of radius, apply damage.

fix Last_planet_damage_time = 0;

I... hoped there was a little more than that. That said, if there was the SCP would have used it already...
Yet to have the functionality. Would it be better if the planet objects be divided as dwarf planets and proper planets, as classified by the IAU back in 2006? For example, Pluto has a diameter of 2,377 km, while Ceres has a diameter of  946 km.

The only limitation is the mission bounds of 700 km. As I found out, removing the hard-coded mission bounds would increase the burden of the renderer, as The E pointed out. But I have yet to test his claims.
Bryan See - My FreeSpace Wiki User Page (Talk, Contributions)

Full Projects:
Shattered Stars

Campaigns:
Lost in the Mist - Cyrene vs. Psamtik
FreeSpace: Reunited

Ships:
GTS Hygeia, GTT Argo, SC Raguel

Tools:
FSO TC/Game template

I've been under attack by Tiger Parents like Jennifer Pan...

 

Offline Zarax

  • 210
Re: Idea: Procedural Planet Surface
How hard would it be to externalize this set of functions?
I have a couple ideas on how this could be turned into a weapon...
The Best is Yet to Come

 

Offline The E

  • He's Ebeneezer Goode
  • Moderator
  • 213
  • Nothing personal, just tech support.
    • Steam
    • Twitter
Re: Idea: Procedural Planet Surface
Here's an important tip for SCP topics. Ignore anything Bryan See says, he doesn't know what he is talking about.

Yes, there is a mostly dummied out "feature" that creates an exclusion zone around an object named "planet", but that's as far as that thing ever went.

The mission space limitations, unlike what Bryan said, don't have anything to do with the renderer; the bigger issue is that we are unable to guarantee that physics still work that far out.

Plus, given the speeds FSO is built around, you'll never want to have a mission that would use that much space anyway.
If I'm just aching this can't go on
I came from chasing dreams to feel alone
There must be changes, miss to feel strong
I really need lifе to touch me
--Evergrey, Where August Mourns

 
Re: Idea: Procedural Planet Surface
Quote
Plus, given the speeds FSO is built around, you'll never want to have a mission that would use that much space anyway.

Not entirely true. While I don't think that there're things several thousand km across in a mission (though I'd like to see that :drevil: ), building missions with multiple stages is easier if you can have the next stage just 100 km away especially if the setting is quite big.

 

Offline Bryan See

  • Has anyone really been far as decided to use even go want to do look more like?
  • 210
  • Trying to redeem, but under Tiger Parents
    • Skype
    • Steam
    • Twitter
Re: Idea: Procedural Planet Surface
The mission space limitations, unlike what Bryan said, don't have anything to do with the renderer; the bigger issue is that we are unable to guarantee that physics still work that far out.
Perhaps this could make use of a physics engine, one that works with space combat simulators.
Bryan See - My FreeSpace Wiki User Page (Talk, Contributions)

Full Projects:
Shattered Stars

Campaigns:
Lost in the Mist - Cyrene vs. Psamtik
FreeSpace: Reunited

Ships:
GTS Hygeia, GTT Argo, SC Raguel

Tools:
FSO TC/Game template

I've been under attack by Tiger Parents like Jennifer Pan...