Author Topic: localized nebula  (Read 6808 times)

0 Members and 2 Guests are viewing this topic.

Offline TopAce

  • Stalwart contributor
  • 212
  • FREDder, FSWiki editor, and tester
The solution might be a new type of asteroid field, just they are not asteroids, only the nebula effect.
My community contributions - Get my campaigns from here.

I already announced my retirement twice, yet here I am. If I bring up that topic again, don't believe a word.

 

Offline Black Wolf

  • Twisted Infinities
  • 212
  • Hey! You! Get off-a my cloud!
    • Visit the TI homepage!
Quote
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 :).
TWISTED INFINITIES · SECTORGAME· FRONTLINES
Rarely Updated P3D.
Burn the heretic who killed F2S! Burn him, burn him!!- GalEmp

 

Offline LtNarol

  • Biased Banshee
  • 211
    • http://www.3dap.com/hlp/hosted/the158th
Black Wolf pretty much nailed the biggest application of localized nebulas, at least what I've been trying to do for this long.

 

Offline KARMA

  • Darth Hutt
  • 211
    • http://members.fortunecity.com/aranbanjo
I was just pointing the most evident for me:p

 

Offline Nuke

  • Ka-Boom!
  • 212
  • Mutants Worship Me
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.
I can no longer sit back and allow communist infiltration, communist indoctrination, communist subversion, and the international communist conspiracy to sap and impurify all of our precious bodily fluids.

Nuke's Scripting SVN

 

Offline Flipside

  • əp!sd!l£
  • 212
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 :)

 

Offline Nico

  • Venom
    Parlez-vous Model Magician?
  • 212
Quote
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.
SCREW CANON!

 

Offline KARMA

  • Darth Hutt
  • 211
    • http://members.fortunecity.com/aranbanjo
well, yes, actually I admit it is some years that I don't fly into a nebula, so I wasn't sure :p

 

Offline ShadowWolf_IH

  • A Real POF Guy
  • 211
    • CoW
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?
You can't take the sky from me.  Can't take that from me.

Casualties of War

 

Offline LtNarol

  • Biased Banshee
  • 211
    • http://www.3dap.com/hlp/hosted/the158th
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
Code: [Select]

$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
« Last Edit: July 30, 2003, 02:11:47 pm by 528 »

 

Offline redmenace

  • 211
The Babylon Project could use this for the Third space ships later in the future.
Government is the great fiction through which everybody endeavors to live at the expense of everybody else.
              -Frederic Bastiat

 

Offline Nico

  • Venom
    Parlez-vous Model Magician?
  • 212
Quote
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.
SCREW CANON!

 

Offline Nuke

  • Ka-Boom!
  • 212
  • Mutants Worship Me
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 can no longer sit back and allow communist infiltration, communist indoctrination, communist subversion, and the international communist conspiracy to sap and impurify all of our precious bodily fluids.

Nuke's Scripting SVN

 

Offline Sesquipedalian

  • Atankharz'ythi
  • 211
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:
    Code: [Select]
    [/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)
Code: [Select]
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.
Sesqu... Sesqui... what?
Sesquipedalian, the best word in the English language.

The Scroll of Atankharzim | FS2 syntax highlighting

 

Offline Trivial Psychic

  • 212
  • Snoop Junkie
Quote
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!
The Trivial Psychic Strikes Again!

 

Offline Nico

  • Venom
    Parlez-vous Model Magician?
  • 212
Quote
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 )
« Last Edit: July 31, 2003, 04:00:27 am by 83 »
SCREW CANON!

 

Offline KARMA

  • Darth Hutt
  • 211
    • http://members.fortunecity.com/aranbanjo
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
« Last Edit: July 31, 2003, 11:53:40 am by 433 »

 

Offline mikhael

  • Back to skool
  • 211
  • Fnord!
    • http://www.google.com/search?q=404error.com
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.
[I am not really here. This post is entirely a figment of your imagination.]

 

Offline Nico

  • Venom
    Parlez-vous Model Magician?
  • 212
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:.
SCREW CANON!

 

Offline Flipside

  • əp!sd!l£
  • 212
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 :)