Hard Light Productions Forums
Modding, Mission Design, and Coding => FS2 Open Coding - The Source Code Project (SCP) => Topic started by: Nico on July 27, 2003, 09:00:23 am
-
ok, I just figured how stupidly easy it was to do them :doubt:
with some sacrifices, it can even be done w/o the SCP, but the sacrifices are annoying, that's why I post it here for you to judge.
ok, how to make a localized nebula:
1) create the smallest mesh you can and pof it, assign the invisible texture to it.
2) pick a species to sacrify...
3) replace the engine glow pcx of this specie with a nebula poof of your choice
4) on your previously created pof, create an engine glow.
5) make various copies of that pof, giving them the names of all the asteroids pof of a given color.
6) create a dense ( or not, you can use large engine glows, after all, might even look better actually ) asteroid field in fred.
voila!
now, the flaws:
-I don't remember, so I assume it's not there:
there's no tbl entries for the asteroids used in the asteroid field, just one for the lone roid. so you can't assign the no collision transparent tag. you'll bump stupidly against space dust, and destroy clouds if you shoot in it
-glows don't show from every direction, so you'll need 9 glows per roid. IIRC, tho, Bob changed that for the SCP exe?
-well, you sacrify a species, it's annoying...
-you also sacrify a roid field type.
-the engine glows flicker.
-that's it!
Thoughts, anybody? ( and anybody who wana try? I must confess I didn't, it's all theory :p - but it most likely works, can't see why it wouldn't ).
-
Why do you want to do it? Why isn't the 'non-localized' standard nebula good?
If you want to say nebula placing would have been easier, what would be a good thing.
-
Doing it this way allows you to have a nebula you can enter and leave. I know that's astronomically impossible but then so are dense asteroid fields and I don't see anyone complaining about them either.
-
Let's make one thing clear at the beginning: You are thinking about the nebula like dneb10, or the Full nebula?
-
ok, how is this difficult to understand? If you've played Freelancer, you've seen this a million times... Venom is asking for the ability to define a region in which you have nebular effects, while not making them cover the entire map. I'd like to see this implimented, if only for some less-obvious campaign options.
-
If you make something a navbuoy, you won't crash into it or shoot it.
-
I asked for something along these lines a while back....didn't get much attention. I still vote that we let modders define the shape of the nebula with a pof, and then create subsystems to define areas of separate poofs and density. A new table can define the actual poofs in each subsystem area and the density. The actual rendering would be the same as a regular nebula, just without the background.
Just one of many ways to implement this thing.
-
mmm it may work..maybe..I'm just curious to see the result, btw the collision thing could be annoying, and even if you would be able to fly inside the cloud, I dare th inside effect could be little weird.
Probably when transparency levels will be implemented, it could work better a specific pof, with animated textures/glowmaps, with scp modifications for low density and the nebula effect applied when you are inside of the pof fading at extremities
-
I do beleve you can have a pof with now geometry, just open up PCS (don't open any pof) add a few glow points and save, I actualy havn't tested this, but it should work, if not then make a cob that is just a couple of lights glued together and use that, glow points can have a null vector (0,0,0) wich will define them as never fadeing when you look away from them.
-
Originally posted by StratComm
ok, how is this difficult to understand? If you've played Freelancer, you've seen this a million times...
I haven't played Freelancer, so I think it is fully understandable I don't know how do you mean this thing.
:confused:
-
ooooooooooooooooook.
look in the sky. you see a cloud, most likely: voila! localized nebula is a cloud. clear enough?
for the rest: well, my way is simple to do, that's why I told about it. No need to make a pof for each cloud, the density can be set thanks to the poof pcx itself ( make it dark, it'll be very transparent, so even if many of them overlap, inside it it should look exactly like your normal nebula ), etc. would be your average generic space cloud.
If bob is right, the main pb, the collision one ( main pb coz it's a gameplay issue ), is gone ( goober, since there's no entry for the asteroids in the ships.tbl, a navbuoy entry won't work any better than a no collision tag ;) ).
the rest would be just to "avoid" sacrifying table entries ( the flickering thing shouldn't not be too annoying ingame ).
But if you think my idea sucks, well, whatever :doubt:
-
btw with density I was meaning the fact that you can fly in w/o colliding
well, if the glow thing can work, and if it looks nice, well probably it should be added in the to do list of the coders, in order to have the engine automatically doing all the steps, w/o all the race/asteroid limitation
-
The 'terrain' of the mission you're making has a large part in making it interesting. By terrain in space i mean such things as asteroids, minefields, sentry guns, installations etc, all the static stuff the player has to take into account while navigating around and planing his actions. It's one of the main things that distinguishes one mission from another, and so having another terrain option, ie. a nebula field just like we can have an asteroid field, would rock for giving missions more variety.
For instance, currently the only way to have a ship present but hiding is to put it behind a different object and use the stealth sexp to screen it from sensors and targeting, but if you had a nebula cloud in one area you could potentially have a whole fleet lurking there, or maybe nothing - the player would be unable to tell and thus kept on his guard every time there was a nebula. So two thumbs up for this idea, and I hope it can be implemented effectivly. Ideally so that ships inside the nebula cloud are screened from sensors beyond a certain distance just as if they were in the full nebula environment.
-
bobbaou is correct, i used that technique to make weapons effects. it would be nice if you could add something to the game where you can place pof defined effects. you simply give fred a model name and it will place that pof om the fred grid. it doesnt interact with the game, you dont colide with it, just a visual thing.
-
Originally posted by KARMA
btw with density I was meaning the fact that you can fly in w/o colliding
well, if the glow thing can work, and if it looks nice, well probably it should be added in the to do list of the coders, in order to have the engine automatically doing all the steps, w/o all the race/asteroid limitation
woomeister told me that if you set the asteroid field to passive, you shouldn't collide with it. didn't try, tho.
-
Originally posted by Venom
woomeister told me that if you set the asteroid field to passive, you shouldn't collide with it. didn't try, tho.
No thats not correct. Passive asteroid fields just mean that capital ships are not "targeted" by the field. In FreeSpace 1 you'd often find that if a fighter went through the asteroid field there were no problems...but as soon as a cruiser or larger went through the asteroids were always heading towards the cruiser (or a good majority were). Passive just makes the field be random no matter what vessel is passing through. Unless you want the asteroids to be a problem for a large capital ship, you set it to passive. Collisions still take place...they just rarely threaten a vesse like a Hecate or even a Fenris.
-
OK WHen you choose to have nebula as your mission, where you select it, it covers the entire field/mission. why couldnt it be possible to conjure up a selection of buttons that allow you to localize a nebula in one spot rather then another?
i mean if theres a tag or SC entry that says COVER ENTIRE MISSION, wouldnt it be possible to build it to be localized? i mean, the ability to make a nebula isnt that hard, the hard part mayeb just trying to make the WHOLE MISSION ability, downsize it so it can be placed in one section of space.
i dunno if its clear enough but the best example would be like freelancers nebulas and space zones.
and btw who sez EVERY NEBULA in the universe is made up of light years of "nebula space"? a nebula could be only 100KM wide, a 1000, 10.....it all depends, ur thinking in the perspective of the now and known.
-
Originally posted by IceFire
No thats not correct. Passive asteroid fields just mean that capital ships are not "targeted" by the field. In FreeSpace 1 you'd often find that if a fighter went through the asteroid field there were no problems...but as soon as a cruiser or larger went through the asteroids were always heading towards the cruiser (or a good majority were). Passive just makes the field be random no matter what vessel is passing through. Unless you want the asteroids to be a problem for a large capital ship, you set it to passive. Collisions still take place...they just rarely threaten a vesse like a Hecate or even a Fenris.
My experience was while doing a mission for ITHOV is that even Passive fields target large ships(I used an Orion in that mission), and if I don't defend it(and why would I defend it, it's hostile :D ), then it is destroyed or severly damaged quite often
-
Originally posted by deep_eyes
and btw who sez EVERY NEBULA in the universe is made up of light years of "nebula space"? a nebula could be only 100KM wide, a 1000, 10.....it all depends, ur thinking in the perspective of the now and known.
Astronomy and Astrophysics say.
That doesn't mean that I'm against having them. Just don't try making out for a second that it's possible in real life.
-
well I'm not a scientist, but I think it isn't so impossible to have little clouds made by dust/little debris, maybe even gas(althought it should be at solid state if too far from a star or if not enough concentrated), with an apearance of something like a small localized nebula.
From what we know, there may be nebulaes at very low density(maybe at the edges of a "true" nebula), so low that you will not have a fog effect, with areas of higher density like clouds.
And anyway..it's science fiction and the effect could be cool in game, and may give some interesting opportunities(bespin? )
-
The solution might be a new type of asteroid field, just they are not asteroids, only the nebula effect.
-
Originally posted by KARMA
and may give some interesting opportunities(bespin? )
You have no idea how many places this could be used, gas giants, clouds, clouds for atmosphere to space missions - all over the place :).
-
Black Wolf pretty much nailed the biggest application of localized nebulas, at least what I've been trying to do for this long.
-
I was just pointing the most evident for me:p
-
could you use a simple pof mesh as a way to define the perimiter of such effect. the model would be like a shield mesh and would not be drawn. nebula sprites would then be placed within the perimiter of the model. the number or detail of the sprites could then be raised or lowered to adjust performance. you could make some cool effects this way, not just the local nebula, but weapons effects, thruster flames and the like. it would be cool.
-
Well, if it was to be done, I would have thought the best way is to generate them using an event, so you specify centre, radius, density and flags (Damage, NoShields, NoLock, ECM etc). From the outside, the best bet is just a collection of rotating player oriented alpha-polys, 'puffs' of gas in multi colours, you could even use the in-nebula PCX's from Freespace. Possibly twenty of them, with pulsing brightnessness ;)
When you enter the nebula, you start getting more clouds, however they are very transparent at the edge of the nebula. The would decrease their Alpha state more and more as you got closer to the centre. The hard part here is the fact that a nebula sort of works opposite to all other objects as far as distance is concerned, as it needs to become denser when you are on the edge and looking inwards. You would certainly, I think, need localised direct 3d fogging/volumetrics to make it work properly.
I don't program in C, I'm not saying this is feasible, but I just thought I'd add my idea of how I would approach it if I programmed in any language that hadn't died out 10 years ago :)
Flipside :)
-
Originally posted by KARMA
From what we know, there may be nebulaes at very low density [...] so low that you will not have a fog effect,
from what we know they're all like that.
-
well, yes, actually I admit it is some years that I don't fly into a nebula, so I wasn't sure :p
-
ok now that we have physics out of the way, let's keep our eye on the ball here. Localized nebula. I like the idea of having it set up like an asteroid field. Do we make it a part of the Background editor, or does it get it's own like the asteroid editor.
Things to consider:
density--number of clouds
average size per
color(s) easiest with poofs
opacity
and wouldn't it be fun if we could add lightning storms and emp storms in this?
-
Alright, lets just cut to the chase. Clouds.
While there are many uses to localized nebulas, I feel that this is one of the larger ones and takes localized nebula effects to a new level. Once localized nebulas are implemented, this should be relatively easy to do as most of the hard stuff is localizing in and of itself.
Anyone working on atmospheric missions is working on a way to implement this, they're pretty much the only things we need besides possibly gravity to create convincing (reasonably decent) atmospheric missions. Implementing cloud effects using modder-created cloud models (miniature localized nebulas) would be ideal.
To this end, I propose the following: Pofs can define size, shape, and densities in certain areas (using subsystems to specify separate density zones, actual distance between poofs can be specified in a table similar to asteriods.tbl). These clouds would then be used through a system similar to asteriod fields, call it cloud layer for sanity's sake.
The table, which could perhaps be called clouds.tbl, can define individual cloud properties (speed and density in density zones in a way similar to how subsystems are defined in ships.tbl). Possibly defining which poofs to be used as well for that given cloud. Following lightning.tbl, cloud layers can be defined in the same table by specifying a number of different cloud types to use, as well as minimum and maximum distance between clouds. Clouds would be generated in a field and travel in a set plane (fred editor, which could also define direction of movement). The variation in elevation too can be defined in fred.
Example of possible clouds.tbl
$cloud: c_normal ; name
$model: cloud01.pof
$speed: 10 ; m/s
$subsystem: zone01 ; pof subsystem
+poof: poof_white ; bitmap
+dist: 3 ; distance in m between poofs
$subsystem: zone02
+poof: poof_white
+dist: 7
$subsystem: zone03
+poof: poof_gray
+dist: 10
$subsystem: zone04
+poof: poof_white
+dist: 7
$subsystem: zone05
+poof: poof_lightgray
+dist: 5
$subsystem: zone06
+poof: poof_white
+dist: 7
$cloud: c_storm
$model: cloud02.pof
$speed: 13
$subsystem: zone01
+poof: poof_darkgray
+dist: 3
$subsystem: zone02
+poof: poof_gray
+dist: 7
$subsystem: zone03
+poof: poof_gray
+dist: 10
$cloud layer: l_strato
$dist: 30 100 ; minimum and maximum distance between clouds
+cloud: c_normal
$end
$cloud layer: l_tstorm
$dist: 20 60
+cloud: c_norma
+cloud: c_storm
+cloud: c_storm
+cloud: c_storm
$end
-
The Babylon Project could use this for the Third space ships later in the future.
-
Originally posted by ShadowWolf_IH
ok now that we have physics out of the way, let's keep our eye on the ball here. Localized nebula. I like the idea of having it set up like an asteroid field. Do we make it a part of the Background editor, or does it get it's own like the asteroid editor.
Things to consider:
density--number of clouds
average size per
color(s) easiest with poofs
opacity
and wouldn't it be fun if we could add lightning storms and emp storms in this?
asteroid like editor for me, but with the possibility to create multiple different clouds, at different places ( that should be extended to asteroids, you can have only one asteroid field in a mission, that sux ). We don't need pof to make the shape, if you want a complicated nebulae, just creta multiple nebula gizmo that will intersect to create the desired shape.
-
my idea is to create a particle system that has particles occupy the area of a pof model. that way we could use them for weapons effects and stuff like that. particle behavior, size and the pcx/ani they use would be defined via tbl entry.
-
I believe I have a better idea, gentlemen. It will require two pofs, one or more animated textures, two table entries, and one sexp per mission with a repeat count of 999999999. No further code work should need to be done.
Steps involved:
1) Create an animated texture to be used as the apparent cloud effect:[list=a]
- Make a convincing animation that looks like dust clouds floating towards the player. One could probably use a couple of the nebula poof PCXs for this quite easily.
- Over each frame of the animation, overlay an alternating grid of pure green pixels like so:
[/li][/list]
x[color=green]o[/color]x[color=green]o[/color]x
[color=green]o[/color]x[color=green]o[/color]x[color=green]o[/color]
x[color=green]o[/color]x[color=green]o[/color]x
[color=green]o[/color]x[color=green]o[/color]x[color=green]o[/color]
x[color=green]o[/color]x[color=green]o[/color]x
- Compile to a Freespace2 ANI file.
2) Create a spherical pof whose polygons have their normals facing inwards, and map it with a texture with the same name as the ani you just made in step 1. Convert for FS2.
3) Create another pof shaped like a wall or something (be creative as you see fit) to be the edge of the nebula for when the player is out of it. Texture it with a single frame nebula poof PCX (not an ANI) that has also had the alternating green grid applied to it.
4) Add table entries for the sphere and wall, marking them with the "navbouy" and "stealth" flags. Also make them Shivan so they will by default not appear on the radar.
5) In Fred2, create instances of these new nebula pofs, positioning the wall (or walls, if you like) wherever it needs to be (I suggest placing it parallel to one of the three major planes, such as the XZ plane, in order to keep life simple later), and the sphere at the same location as the player.
6) Set up a sexp event with a repeat count of 99999999 such that whenever the player's location is on one side of the wall, the sphere has its position moved to the location of the player using the set-ship-position sexp, and whenever the player is on the other side of the wall, it does not have its position changed. You will be making use of the get-object-x, get-object-y, get-object-z, and set-ship-position sexps to do this:
(Assuming the wall is parallel to the XZ plane and positioned at 0,0,0)
when
>
get-object-y
Alpha 1
0
set-ship-position
LocalNebulaSphere1
get-object-x
Alpha 1
get-object-y
Alpha 1
get-object-z
Alpha 1
Using this event, whenever Alpha 1's y value is greater than zero, the nebula sphere will follow him around, re-centring on him every second, but if it is less than zero (i.e. he has flown beyond the wall), it will not be re-centred on him. When he is outside of the sphere the normal will be facing away from him, so he won't see it. Instead he will see the wall.
The only problem with this system is that the transitions would be abrupt, but by making two or three sphere pofs of different sizes (you still only need one table entry if you just use the change-ship-model sexp) you could improve things somewhat by having them nest inside each other, and only follow Alpha 1 around at different distances beyond the wall.
-
Originally posted by ShadowWolf_IH
ok now that we have physics out of the way, let's keep our eye on the ball here. Localized nebula. I like the idea of having it set up like an asteroid field. Do we make it a part of the Background editor, or does it get it's own like the asteroid editor.
Things to consider:
density--number of clouds
average size per
color(s) easiest with poofs
opacity
and wouldn't it be fun if we could add lightning storms and emp storms in this?
Don't forget the option to create one or possibly more clear zones within the localized nebula, so that one could conceal a fleet or base. You could control this in FRED, much the same way a safe zone is created within an active asteroid field. As far as lightning and EMP is concerned, if the mission designer chooses to use them for his/her nebula, there could be options for intensity and perhaps contrast. The contrast control localize the effects so some areas could be more intense than others. These would be represented by perhaps a slider much like the control in the background generator that tells how many stars are to be displayed (not suns). An additional manifestation of the lightning could be showing the effect from outside the localized nebula. Perhaps not arcs, but localized flashes.
Later!
-
Originally posted by Sesquipedalian
I believe I have a better idea, gentlemen. It will require two pofs, one or more animated textures, two table entries, and one sexp per [...] that the transitions would be abrupt, but by making two or three sphere pofs of different sizes (you still only need one table entry if you just use the change-ship-model sexp) you could improve things somewhat by having them nest inside each other, and only follow Alpha 1 around at different distances beyond the wall.
that would be ugly as hell, you know.
edit:
that'd be like that:
http://vegastrike.sourceforge.net/gallery/user_screenshots/refinery_red_nebula( no offense to the VS people, but that looks like a jelly blob, not a cloud of gaz )
-
I don't consider this shot SO ugly, the problem seem to be that there are like 3 or 4 3d nebula one over each other, generating a strange effect, like if you are seeing it through a diamond. Another problem is the 3d nebula little low detailed.
If those problems will be fixed I think the result could be very good.
The problem actually is that I'm not sure the alternating grid of green pixels will work the way sesqui hope, I dare that without transparecy levels it will look a bit weird.
It should be possible, I think, to simulate a transparency level by working on the concentrations of the red(oops, green, sorry:)) dots...mmmm actually it sound like a funny thing to do in photoshop with the use of it's filters, I may try to make a single pcx if someone want to try, but still the result may be a little weird in the transparency transitions (it will depend by the background of the mission and the background of the nebula texture)
With transparency levels this should be pretty easy and well looking instead.
About the shot posted by venom: what about using some flat polys in different positions/angles (instead of a deformed spherical mesh) with those semitransparent textures to simulate (don't know the right words) a nebula made of threads? The result should be like this shot, without the distorsions
-
Local nebulas based on POF or a nebula table are the way to go. Take a look at the nebula in Iwar2 (the Efreet). It doesn't get better than that. Its murky and thick, and it is defined by an in game object (an avatar, just like any ship or installation). The only thing that makes it different than most other game objects is that it isn't collidable.
-
but there's no actual mesh, just a gizmo. that's how asteroids work in FS2 ( save that instead of particles, you have meshes ).
The way I posted is about exactly the way it works in IWar2, but people keep ignoring me. ah well, I should get used to it, every of my requests end up like that. dunno if yuo've noticed or not, but the SCP guys have ignored almost all resquests for the last few months.
It's time for me to stop wasting my time in the source forum :doubt:.
-
I must admit, I'd prefer an asteroid field thing than a POF. After all, the asteroid field routines are, at least in part, written to handle this sort of thing. If it was to be done as a POF you'd have to fill it with points (so it looks a bit like a globular cluster) and get the engine to convert those into player oriented cloud bitmaps when rendering. I think Freespace 2 as it sits probably won't be able to do a particuarly 'realistic' (from a gaming point of view) localised nebula without some modification to the main render engine. But then, I await eagerly for someone to prove me wrong :D
Flipside :)
-
i thing using the asteroid system could be combined with the pof area definition would be even better. instead of each astroid being replaced with a sprite wouldnt be dense enough. thus the engine would be overtaxed with too many objects. instead each asteroid would be replaced with an area definition model to define the location where multiple nebula sprites would be placed. that way each asteroid would be a cloud, and a field of them would be a bunch of clouds. put them close enough together, or make them big enough to overlap.
an another idea you could use the object as an area that involks the regular nebula rendering code when your ship is inside it, then return to the star rendering when you leave. then you can have a few large sprites that look like a nebula from the outside.
-
In and out of the nebula are moderately easy, I would think, even if the game just swapped between stars and nebula mode. The hard bit is getting from one to the other :(
As for 'puffs' and 'sprites', I would say all but some very old graphics cards can handle about at the minimum 2-3000 on the screen at once ;)
Flipside
EDIT : Let's approach this from another angle, how do the programmers feel about the likelyhood of being able to implement localised nebula, either as sprites, multiplane pofs (i.e, multiple flat planes intersecting so that a cloud texture can be seen from any angle - see Unreal's flames for an idea) or fogging?
-
dont do that multiplane crap, i use that when rendering interface art. it would look like crap in game.
-
LOL Probably a good idea, they do tend to look a bit like intersecting planes, no matter how good the texture :(
Flipside :)