post release: What to do about nebulas

Talk among developers, and propose and discuss general development planning/tackling/etc... feature in this forum.
Errol_Summerlin
Merchant
Merchant
Posts: 46
Joined: Thu Mar 11, 2010 4:10 am

Re: post release: What to do about nebulas

Post by Errol_Summerlin »

One other thing to note: If a star system exists inside a nebula, unless you are outside the star's equivalent of a heliosphere, I wouldn't expect to see ANY increased density. When a star forms in a nebula (where most of them do form in fact), its initial face called T-tauri phase has a very strong stellar wind which blows all the lightweight nebula material out to its termination shock leaving only the higher density pockets of the beginnings of planetary formation. That being said, the nebula would also exert more pressure than the typical interstellar medium. This would have the result of decreasing the radius of the termination shock compared to a similarly sized star. If Sol were in a nebula, it would experience roughly 10^7 times as much pressure from the nebula's density. That could push its termination shock down from 85 AU all the way to the solar corona...or maybe only down to 50 AU. I would need to do some research to see how the pressure balance works out. However, my best guess now is that the system's termination shock would be around 1 AU (with at least factor of 5 error bars) for a star like Sol. Basically, the wind from the star would carve out a little bubble in the nebula that the planets may or may not be inside of. But if they are outside of the bubble, then the drag from the nebula may be significant which would cause them to migrate into the bubble..eventually. Just throwing out food for thought.
klauss
Elite
Elite
Posts: 7243
Joined: Mon Apr 18, 2005 2:40 pm
Location: LS87, Buenos Aires, República Argentina

Re: post release: What to do about nebulas

Post by klauss »

Going back to the subject of nebulas, pulsars, black holes and such, there's a way to make systems more interesting in on themselves, besides visually.

Saturn, and conceivably many or all gas giants, have strong magnetospheres. Their nearby space is filled with ions coming from its moons, the wikipedia says they've estimated 100kg of ions being ejected into it per second (and I guess being returned to the moons just as well... to conserve energy...).

It's not much, in fact it's probably not enough to cause any damage. But it might be enough to interfere with sensors, and other smaller inconveniences.

Pulsars, stars in general, and many other stronger phenomena will probably have equally interesting "invisible" structures floating around.

I say we should slowly try to model them, post-release. In fact, sensors (or the map) could have/make a mapping of those phenomena and a key could toggle their representation in wireframe or some other computer-assisted overlay form. That ability should be a bonus on advanced radar upgrades, and the effects should range from mild sensor interference hot spots around gas giants (which would let you escape and hide there from attackers, for instance), to damage from the heaviest radiation sources near stars, pulsars and such.

Some systems should have hyperactive stars that eject strong solar storms every now and them. The computer could issue a warning some time before it hits, and it could render your sensors and other sensitive navigational equipment useless for the duration. That would definitely and noticeable impact gameplay, change tactics and even provide for interesting missions.

In fact, sightseeing is perhaps one of the most important motivations for playing a game of this kind, and sightseeing isn't always about graphics, sometimes it's about the whole virtual environment as a whole... discovering those details that make things interesting, those special places that are different and make you wonder what's next. That's, I say, the motivation for exploration.
Oíd mortales, el grito sagrado...
Call me "Menes, lord of Cats"
Wing Commander Universe
Neskiairti
Confed Special Operative
Confed Special Operative
Posts: 334
Joined: Thu Jan 11, 2007 4:10 am

Re: post release: What to do about nebulas

Post by Neskiairti »

Ahh Klauss, now you are speaking my language.

The tiny details that make a universe seem alive and thrive, the things that make it interesting, or the things that just make you watch and stare. Yes, you should have these things.. and more. Put in a random engine that produces space junk, generally generic junk, but have a few random bits that are more complex.. like lost ancient ships, crushed space stations.. floating through the black void.. Beautiful and enigmatic structures created by peoples so far ahead that their science appears magic. binary stars with bezier paths between them siphoning plasma from one and feeding it to the other..

there is so much that can be done.. and most of it isnt that hard, just needs a little bit of thought put in to it.
chuck_starchaser
Elite
Elite
Posts: 8014
Joined: Fri Sep 05, 2003 4:03 am
Location: Montreal
Contact:

Re: post release: What to do about nebulas

Post by chuck_starchaser »

Amen.
We need wonders (natural, man-made, and alien-made).
((Just as long as we don't overuse them, such that they become routine...))

BTW, klauss, since you're thinking about a new nav map interface, there should be info one can query about a system before jumping to it, which could show a graph of planets and their orbits, mark landing sites color-coded by faction perhaps, and could include info such as frequency of solar storms and reported stats on presence of factions hostile to the player (though this info would come from map databases that you buy, and you pay extra for extra info like that; and the info could be inaccurate/outdated; and there'd be none to get about outlying regions of space; but your computer would remember them after you visit them). Such richness of info in the nav computer would play well with the idea of making long trips more interesting.
The nav interface should actually have two screens: One showing systems and jump lines; the other showing the selected system (current system by default), each screen with its own zoom and rotatation, rather than a single screen doing both functions via buttons.
safemode
Developer
Developer
Posts: 2150
Joined: Mon Apr 23, 2007 1:17 am
Location: Pennsylvania
Contact:

Re: post release: What to do about nebulas

Post by safemode »

OK, So everyone is on board with adding a system level variable that dictates a range of strength in the effect of screwing with radar/shields/spec/ etc, as long as it's non-damaging. Pobably in all likelihood this would require more than one variable but that's the general idea.

As far as wonders, and i like the term in particular to refer to these game features, I really would like to see some alien wonders leftover from ancient and not so ancient times. Think of the number of failed civilizations that would have to have existed for every successful one. We should see the remnants of those that made it to space but not much further. And even with those that remain, we should see the derelict remains of space stations and junkyards of spaceships etc. Retrieving space junk for space junkyards should be a viable job in the VS universe even. Though, this may require a feature like towing.
Ed Sweetman endorses this message.
Neskiairti
Confed Special Operative
Confed Special Operative
Posts: 334
Joined: Thu Jan 11, 2007 4:10 am

Re: post release: What to do about nebulas

Post by Neskiairti »

for sensors;
you probably want two types of blocks, stealth and disruption.
stealth would be passive, like.. something acquires a certain level of stealth when say entering a nebula. Probably pretty low, but this just matches up with sensor strength vs stealth strength...
so if they are inside a highly charged ring of a gas giant.. it would take some pretty strong sensors to pick them up.
disruption would simply cause sensors to fail actively. this might be something like, if you were flying through an 'ion storm' (wtf ever that is :p) and its fucking with your electronics... or jumping through a wormhole.. whatever. some things that might give you stealthing might also disrupt your sensors, so they have a hard time seeing you, but you cant see them. there might be levels of it too, like level of hardening to the sensor array vs level of disruption strength.

some weapons might carry sensor disruption abilities.

anyway :P thats my 2 cents.
safemode
Developer
Developer
Posts: 2150
Joined: Mon Apr 23, 2007 1:17 am
Location: Pennsylvania
Contact:

Re: post release: What to do about nebulas

Post by safemode »

any sort of means of hiding would go both ways. so if it works to be stealthy for hiding then it is going to be distruptive for you to see anything. But indeed, this is a separate effect from the point of view of the unit.

eg, the unit masked by the whatever is seeing disruption everywhere. Basically a blackout, dependent on how stealthy their cover is.

The other units in the system may be unaffected, but possibly could detect this stealthy thing but not see inside it.

this is opposed to the feature where the entire system is inside what amounts to the stealthy thing. Disrupting everyone's systems and basically leaving everyone without radar/targeting/coms etc.

This puts a new spin on the cloaking feature we dont use. We could re-use it for this purpose (first part). We can create the partial ccoverage by randomly (at varying levels) de-cloak. Causing a momentary blip on other ship's radars before disappearing, at the very least, making targeting nearly impossible to be done. Our version of cloaking would not remove the draws though, just the radar/targeting ability in situations where the ai's cone of visibility is not directed to us (ai's cant see so we have to give them some means of firing at something they are only supposed to be able to know is there by looking)
Ed Sweetman endorses this message.
chuck_starchaser
Elite
Elite
Posts: 8014
Joined: Fri Sep 05, 2003 4:03 am
Location: Montreal
Contact:

Re: post release: What to do about nebulas

Post by chuck_starchaser »

That's a good idea. Just call it "Stealth" instead of "Cloak". Keep in mind that Vegatrek need real cloak; though I'm not sure how that works out because shaders are sharply divided into those that can represent alpha-blendings, and those that can only do opaque stuff. Having alpha-capable shaders as default for ships would bring the FPS down to a crawl. So, for VT the solution may be to allow a ship to switch shaders programmatically.
But anyhow, stealth mode would be a great feature to add, after the release; and it could indeed reuse cloak's plumbing.
safemode
Developer
Developer
Posts: 2150
Joined: Mon Apr 23, 2007 1:17 am
Location: Pennsylvania
Contact:

Re: post release: What to do about nebulas

Post by safemode »

chuck_starchaser wrote:That's a good idea. Just call it "Stealth" instead of "Cloak". Keep in mind that Vegatrek need real cloak; though I'm not sure how that works out because shaders are sharply divided into those that can represent alpha-blendings, and those that can only do opaque stuff. Having alpha-capable shaders as default for ships would bring the FPS down to a crawl. So, for VT the solution may be to allow a ship to switch shaders programmatically.
But anyhow, stealth mode would be a great feature to add, after the release; and it could indeed reuse cloak's plumbing.

why would the shaders operate on VT ships any differently than ours? Cloak should just skip the draw sequence for units with the cloak flag set. (in addition to causing other ships to skip it in unit lists ).

i dont see how the shaders would need to be modified at all, nor would they care about things that aren't there in GL land, as cloak effectively removes them from the scene. It's not like it makes them transparent.

edit: unless you want to really simulate star trek cloak. . then yes. i guess you would need to make them transparent. That would need a whole different shader though to handle bending light through the mesh to cause the star trek-esque ripple effect of ships that are cloaked. ugh. i guess that's what's desired though.

I would prefer my method though.. it's less cpu intensive :)
Ed Sweetman endorses this message.
chuck_starchaser
Elite
Elite
Posts: 8014
Joined: Fri Sep 05, 2003 4:03 am
Location: Montreal
Contact:

Re: post release: What to do about nebulas

Post by chuck_starchaser »

safemode wrote:
chuck_starchaser wrote:That's a good idea. Just call it "Stealth" instead of "Cloak". Keep in mind that Vegatrek need real cloak; though I'm not sure how that works out because shaders are sharply divided into those that can represent alpha-blendings, and those that can only do opaque stuff. Having alpha-capable shaders as default for ships would bring the FPS down to a crawl. So, for VT the solution may be to allow a ship to switch shaders programmatically.
But anyhow, stealth mode would be a great feature to add, after the release; and it could indeed reuse cloak's plumbing.
why would the shaders operate on VT ships any differently than ours?
Because ours don't need cloak :D
Cloak should just skip the draw sequence for units with the cloak flag set. (in addition to causing other ships to skip it in unit lists ).
It's not that simple. Well, if you make it so that ships appear or disappear suddenly, then it IS that simple --that would be called "alpha-testing"; but if you want them to fade-in and fade-out, that's a whole new kettle of fish.
"Alpha-blending" is not order-independent; it depends on you drawing from the farthest to the nearest object, when rendering a frame, perfectly in order, which is really expensive in terms of overdraw. So, we have, for each drawing stage, a front-to back draw order for opaque things using opaque shaders (front-to-back is optimal for opaque drawing), followed by a back-to-front drawing list for things requiring alpha-blending, such as glass, smoke, engine exhausts, etceteras. So our default shaders are opaque, and are called in the front-to-back draw sequence, while the alphablending shaders are called in the back-to-front, more expensive sequence.
So, to do StarTrek syle fades to/from visibility, we'd have to switch shaders temporarily.
i dont see how the shaders would need to be modified at all, nor would they care about things that aren't there in GL land, as cloak effectively removes them from the scene. It's not like it makes them transparent.
Well, in Startrek, when Klingon ships appear, they gradually fade to visibility.
edit: unless you want to really simulate star trek cloak. . then yes. i guess you would need to make them transparent. That would need a whole different shader though to handle bending light through the mesh to cause the star trek-esque ripple effect of ships that are cloaked. ugh. i guess that's what's desired though.
Ah, refraction would indeed be yet another thing; but I was talking about just alpha-fades.
I would prefer my method though.. it's less cpu intensive :)
Indeed; making them suddenly appear/disappear is easy.
Neskiairti
Confed Special Operative
Confed Special Operative
Posts: 334
Joined: Thu Jan 11, 2007 4:10 am

Re: post release: What to do about nebulas

Post by Neskiairti »

there is nothing that says you need to mess with the whole model.
take a page from older games, take a snapshot of the ship from camera angle, turn it in to a sprite.. then have some fun with flashy effects.. (or shady effects as the case may be :P) Ripple effect, bending, and alpha.

Secondlife does something similar, to reduce graphics load. turning distant avatars in to sprites, updated about once every 2 or 3 seconds.

though just an idea, no idea how feasible it is.
chuck_starchaser
Elite
Elite
Posts: 8014
Joined: Fri Sep 05, 2003 4:03 am
Location: Montreal
Contact:

Re: post release: What to do about nebulas

Post by chuck_starchaser »

That's called "impostors"; a feature that we will eventually have to have; but it will take some work to make it happen.
I'd like to turn planets into impostors; they are perfectly suited for that if we make travel take longer and therefore
the view of a planet doesn't change too fast; and rendering them can take a number of passes to have atmosphere
effects, clouds, shadows of clouds, self-shadowing of clouds, normalmapping, parallax... So we could render planets to
an off-screen sprite, one pass per frame; so if it's 8 passes, every 8 frames we update its impostor image.
Neskiairti
Confed Special Operative
Confed Special Operative
Posts: 334
Joined: Thu Jan 11, 2007 4:10 am

Re: post release: What to do about nebulas

Post by Neskiairti »

ahh right.. couldn't remember the term off the top of my head.
safemode
Developer
Developer
Posts: 2150
Joined: Mon Apr 23, 2007 1:17 am
Location: Pennsylvania
Contact:

Re: post release: What to do about nebulas

Post by safemode »

speaking of planets, is there a reason why the atmo around atlantis is so god awful looking? what the hell is up with the crazy large glow ?
Ed Sweetman endorses this message.
chuck_starchaser
Elite
Elite
Posts: 8014
Joined: Fri Sep 05, 2003 4:03 am
Location: Montreal
Contact:

Re: post release: What to do about nebulas

Post by chuck_starchaser »

Donno about Atlantis in particular; but generally the situation is that Klauss wrote a planet shader *years* ago, an unbelievable shader with atmosphere scattering, clouds that cast shadows on the ground and on themselves, etc.; totally amazing; but he was never able to figure out where to add textures to a planet. If you have any knowledge of where that happens it might result in a quick fix of the situation.
Otherwise, I suggested to Klauss that we could just get rid of all the code treating planets like special things, cook up a sphere in Blender and save it to a bfxm, and make planets into "units" like any other units, with textures specified in the bfxm, and having an associated technique and shaders. Shouldn't be too much work; we might even be able to do this for the release, and it would make the game experience a few orders of magnitude better. Planets look like rubbish right now; --all of them.
And while we're at it, we could also introduce cube-map -mapped texturings for planets, instead of the awful cylindrical unwrap.
klauss
Elite
Elite
Posts: 7243
Joined: Mon Apr 18, 2005 2:40 pm
Location: LS87, Buenos Aires, República Argentina

Re: post release: What to do about nebulas

Post by klauss »

chuck_starchaser wrote:Donno about Atlantis in particular; but generally the situation is that Klauss wrote a planet shader *years* ago, an unbelievable shader with atmosphere scattering, clouds that cast shadows on the ground and on themselves, etc.; totally amazing; but he was never able to figure out where to add textures to a planet.
Basically, we need to be able to set a custom technique and texture set for every planet type. I couldn't figure out where the system generator has that information, though I probably could do it for handcrafted systems, since it's just modifying the system xml file.

So, safemode, to motivate you:
Screenshots!
Screenshots!
Screenshots!
Screenshots!
Screenshots!
Screenshots!
Screenshots!
Screenshots!
Screenshots!

And that was an old version... I've added detail texturing since then (the screenshots simply use a 4k texture, not for the masses, though it works perfectly fine @60fps on a GF6800), and a few other tweaks.
Oíd mortales, el grito sagrado...
Call me "Menes, lord of Cats"
Wing Commander Universe
safemode
Developer
Developer
Posts: 2150
Joined: Mon Apr 23, 2007 1:17 am
Location: Pennsylvania
Contact:

Re: post release: What to do about nebulas

Post by safemode »

chuck_starchaser wrote:Donno about Atlantis in particular; but generally the situation is that Klauss wrote a planet shader *years* ago, an unbelievable shader with atmosphere scattering, clouds that cast shadows on the ground and on themselves, etc.; totally amazing; but he was never able to figure out where to add textures to a planet. If you have any knowledge of where that happens it might result in a quick fix of the situation.
Otherwise, I suggested to Klauss that we could just get rid of all the code treating planets like special things, cook up a sphere in Blender and save it to a bfxm, and make planets into "units" like any other units, with textures specified in the bfxm, and having an associated technique and shaders. Shouldn't be too much work; we might even be able to do this for the release, and it would make the game experience a few orders of magnitude better. Planets look like rubbish right now; --all of them.
And while we're at it, we could also introduce cube-map -mapped texturings for planets, instead of the awful cylindrical unwrap.

Wouldn't a mesh of a planet be absolutely humongous and require tons of vertexes to even look remotely round? My guess is that planets are treated special as an optimization to reduce their draw load and deal with GL's culling and LOD's ...as planets are so large they would easily be within multiple LOD ranges.
Ed Sweetman endorses this message.
chuck_starchaser
Elite
Elite
Posts: 8014
Joined: Fri Sep 05, 2003 4:03 am
Location: Montreal
Contact:

Re: post release: What to do about nebulas

Post by chuck_starchaser »

safemode wrote:Wouldn't a mesh of a planet be absolutely humongous and require tons of vertexes to even look remotely round? My guess is that planets are treated special as an optimization to reduce their draw load and deal with GL's culling and LOD's ...as planets are so large they would easily be within multiple LOD ranges.
Nope. No optimization at all. What the current code does is create a mesh on the fly, no different from a bfxm mesh except in that it is procedurally generated, rather than loaded from a file.
In fact, it is LESS efficient than a mesh I could produce in Blender, using icosphere instead of geo.
The currently generated sphere has a highly inefficient, high concentration of triangles towards the poles.
By the way, dividing the sphere into 128 rings and 256 wedges results in 32K quads (64k tris), which is a joke, and looks pretty smooth.
Planets used to use 32 rings and 64 wedges until I bitched and pestered and spammed the forum, years ago, then they finally changed them to 128/256 I think they are now. There was never a good reason for them to be so low-poly as they were.
Just to say that if they look smooth it's because they use the right number of polies, not because of some special optimization.
And I could do better in Blender.
safemode
Developer
Developer
Posts: 2150
Joined: Mon Apr 23, 2007 1:17 am
Location: Pennsylvania
Contact:

Re: post release: What to do about nebulas

Post by safemode »

633 string Planet::getHumanReadablePlanetType() const
634 {
635 //static std::map<std::string, std::string> planetTypes (readPlanetTypes("planet_types.xml"));
636 //return planetTypes[getCargoUnitName()];
637 return _Universe->getGalaxy()->getPlanetNameFromTexture( getCargoUnitName() );
638 }


from planet.cpp

Is that what you want?
Ed Sweetman endorses this message.
klauss
Elite
Elite
Posts: 7243
Joined: Mon Apr 18, 2005 2:40 pm
Location: LS87, Buenos Aires, República Argentina

Re: post release: What to do about nebulas

Post by klauss »

safemode wrote:633 string Planet::getHumanReadablePlanetType() const
634 {
635 //static std::map<std::string, std::string> planetTypes (readPlanetTypes("planet_types.xml"));
636 //return planetTypes[getCargoUnitName()];
637 return _Universe->getGalaxy()->getPlanetNameFromTexture( getCargoUnitName() );
638 }


from planet.cpp

Is that what you want?
Hm... nop... that's what gets shown to users as the planet's name. What I need is what gets used when autogenerating the system.xml, what gets put in the <planet> item as attributes (we'd add a technique="..", diffuse="...", etc..., just like with xmesh)
Oíd mortales, el grito sagrado...
Call me "Menes, lord of Cats"
Wing Commander Universe
safemode
Developer
Developer
Posts: 2150
Joined: Mon Apr 23, 2007 1:17 am
Location: Pennsylvania
Contact:

Re: post release: What to do about nebulas

Post by safemode »

I dont think there is any more to the type of a planet than the name you get with that. There are no local variables to a planet other than it's mass, radius, if it has an atmosphere. That's basically all there is to the makeup of a planet unit.
Ed Sweetman endorses this message.
klauss
Elite
Elite
Posts: 7243
Joined: Mon Apr 18, 2005 2:40 pm
Location: LS87, Buenos Aires, República Argentina

Re: post release: What to do about nebulas

Post by klauss »

Well, it's a unit so it must have a mesh. And if it's not specified internally in the constructor it must be specified from outside.

In fact, IIRC, star_system_xml.cpp was the one that specifies the mesh, a Sphere mesh (which inherits mesh and is the procedural mesh chuck was talking about).

star_system_xml.cpp takes the texture from the xml file, IIRC too, so for handcrafted files, editing the xml is enough.

But...

What needs to be found is where does the file="" attribute come from in autogenerated systems. System generation creates a system xml in the home folder every time a system is needed and not found. It's that code the one I don't follow.
Oíd mortales, el grito sagrado...
Call me "Menes, lord of Cats"
Wing Commander Universe
safemode
Developer
Developer
Posts: 2150
Joined: Mon Apr 23, 2007 1:17 am
Location: Pennsylvania
Contact:

Re: post release: What to do about nebulas

Post by safemode »

it's mesh is created in sphere_generic
Ed Sweetman endorses this message.
chuck_starchaser
Elite
Elite
Posts: 8014
Joined: Fri Sep 05, 2003 4:03 am
Location: Montreal
Contact:

Re: post release: What to do about nebulas

Post by chuck_starchaser »

I think the question is where are textures assigned to the mesh.
Not exactly.
The question I think is where it is specified WHAT textures, and how many, are to be assigned to it.
Like I think most planets only have one texture slot, for diffuse.
And some planets actually have two slots, for diffuse and glow.
Klauss needs to add specular, normalmap, height, and clouds, or something like that.
Post Reply