Particle System / Volumetric fills / Clouds
-
Topic authorbuggs_moran
- Posts: 835
- Joined: 27.09.2004
- With us: 20 years 1 month
- Location: Massachusetts, USA
Particle System / Volumetric fills / Clouds
I am not versed in OpenGL or C++ so I assume it has something to do with it & I am not being picky, but it would make so many of the current issues with volumetric fills (nebulae, clouds, jets) easier to model if particle system cloud effects like Orbiter (below) were possible... I have been toying with the idea of learning about programming to achieve this goal in Celestia, but am reticent to do it for fear that someone is already on it, and the fact that it would put me off of other Celestia/non-Celestia projects for some time...
Homebrew:
WinXP Pro SP2
Asus A7N8X-E Deluxe
AMD Athlon XP 3000/333 2.16 GHz
1 GB Crucial RAM
80 GB WD SATA drive
ATI AIW 9600XT 128M
WinXP Pro SP2
Asus A7N8X-E Deluxe
AMD Athlon XP 3000/333 2.16 GHz
1 GB Crucial RAM
80 GB WD SATA drive
ATI AIW 9600XT 128M
You might want to check out this.
http://www.markmark.net/clouds/
http://www.markmark.net/SkyWorks/
If this could be done, it could be a real killer improvement for Galaxies and Nebulae
http://www.markmark.net/clouds/
http://www.markmark.net/SkyWorks/
If this could be done, it could be a real killer improvement for Galaxies and Nebulae
Enhancements for Celestia
http://www.celestiamotherlode.net/
http://www.celestialmatters.org/
Development Road Map
http://en.wikibooks.org/wiki/Celestia/D ... t_Road_Map
http://www.celestiamotherlode.net/
http://www.celestialmatters.org/
Development Road Map
http://en.wikibooks.org/wiki/Celestia/D ... t_Road_Map
For dense atmospheres it would be also handy to have volumetric images that we can apply on planets. Therefor we need a volumetric file format.
But nothing like this already exists and no standards exist for volumetrics or particle effects.
Or wait there is take a nice look at these things:
https://www.khronos.org/collada/wiki/Main_Page
http://www.web3d.org/x3d
And volumetric images for clouds:
http://www.2kan.org/jp3d.html
But nothing like this already exists and no standards exist for volumetrics or particle effects.
Or wait there is take a nice look at these things:
https://www.khronos.org/collada/wiki/Main_Page
http://www.web3d.org/x3d
And volumetric images for clouds:
http://www.2kan.org/jp3d.html
Last edited by duds26 on 15.04.2018, 21:10, edited 1 time in total.
I too have always wondered why, with the exceptional capabilities of Celestia programmers, they have been unable to introduce the use of realistic cloud and nebula effects. I am no programmer, but I am a video game user, and virtually all games in use today contain spectacular environmental effects without a serious penalty in frame rates. They include explosions, flames, mist, very realistic clouds, falling rain, nebula clouds, etc.
Is it that such effects take too many lines of code, or is it a difficulty to implement specific to C++?
Are such effects possibly available as pre-written sub-routines that might be available open source?
I'm just curious.
Frank
Is it that such effects take too many lines of code, or is it a difficulty to implement specific to C++?
Are such effects possibly available as pre-written sub-routines that might be available open source?
I'm just curious.
Frank
fsgregs wrote:Is it that such effects take too many lines of code, or is it a difficulty to implement specific to C++?
Without knowing much about programming, i suspect the reason we won??t see this soon is more that the lead devs aren??t interested than that it is difficult. Celestia??s focus is on other things... But i would *love* to have this feature.
- rthorvald
Are such effects possibly available as pre-written sub-routines that might be available open source?
I have checked out MKruer's links above to a free software routine called Skyworks. Although it was written in 2002 by a college Ph.D student in C++ 6, and is therefore a bit dated, it does create a reasonable set of free-floating, fly-through clouds floating above ground. the GREAT news is that the author has posted and made his entire source code available FREE, with no restrictions. The link can be found here.
http://www.markmark.net/SkyWorks/
Is there anyone in the forum with C++ experience willing to examine that code as a starting point, modify it as needed without too much labor, and give Celestia at least a beginning ability to render free-floating clouds, realistic nebula, smoke, etc, without the need to draw a mesh?
I wish I could do it, but I have zero experience in C++. When I retire ... ... it is on my "bucket list" of things to do before I "kick the bucket".
Frank
-
- Site Admin
- Posts: 4211
- Joined: 28.01.2002
- With us: 22 years 9 months
- Location: Seattle, Washington, USA
rthorvald wrote:Without knowing much about programming, i suspect the reason we won??t see this soon is more that the lead devs aren??t interested than that it is difficult. Celestia??s focus is on other things... But i would *love* to have this feature.fsgregs wrote:Is it that such effects take too many lines of code, or is it a difficulty to implement specific to C++?
Exactly--a lack of time and not skill is the reason that Celestia doesn't have particles systems yet. I actually am interested in adding support for them to Celestia, but there have been other priorities.
Implementing particle systems is pretty easy stuff, though there are some special considerations in Celestia. A big difference between Celestia and games is that the user has complete control over time: it can be stopped, sped up to an effectively arbitrary degree, and even reversed. Traditional particle systems work by calculating the forces on the individual particles and calculating new velocities and positions at each time step. In Celestia, we'd have to constrain particle motions to just those that can be expressed analytically--quadratics seems like they'd give enough flexibility. Generation of new particles could be accomplished with some clever use of a pseudorandom number sequence: use the current simulation time to compute the starting position in the pseudorandom sequence, use the pseudoranom values to build a set of quadratics describing the motion of however many particles are in the system, then evaluate the quadratics to get particles positions, and render.
We'd need some sort of file format to describe the particle systems. Nothing special would need to be done to the ssc format--you could just specify a particle system for the mesh instead of a cmod or 3ds file.
--Chris
-
Topic authorbuggs_moran
- Posts: 835
- Joined: 27.09.2004
- With us: 20 years 1 month
- Location: Massachusetts, USA
I can't speak for all, but I am not looking for time related particle systems, though it might be neat for those Io volcanoes. I would just like the ability to use cloud "like" meshes for nebulae, accretion disks, cloud layers, etc. A static cloud is fine, because I can make it move using orbit and body frames.
The eventuality of a time dependant particle system is nice to think about, but I would just like to create my addons without all those sharp edges...
The eventuality of a time dependant particle system is nice to think about, but I would just like to create my addons without all those sharp edges...
Homebrew:
WinXP Pro SP2
Asus A7N8X-E Deluxe
AMD Athlon XP 3000/333 2.16 GHz
1 GB Crucial RAM
80 GB WD SATA drive
ATI AIW 9600XT 128M
WinXP Pro SP2
Asus A7N8X-E Deluxe
AMD Athlon XP 3000/333 2.16 GHz
1 GB Crucial RAM
80 GB WD SATA drive
ATI AIW 9600XT 128M
-
- Site Admin
- Posts: 4211
- Joined: 28.01.2002
- With us: 22 years 9 months
- Location: Seattle, Washington, USA
buggs_moran wrote:I can't speak for all, but I am not looking for time related particle systems, though it might be neat for those Io volcanoes. I would just like the ability to use cloud "like" meshes for nebulae, accretion disks, cloud layers, etc. A static cloud is fine, because I can make it move using orbit and body frames.
The eventuality of a time dependant particle system is nice to think about, but I would just like to create my addons without all those sharp edges...
You can already do that with cmod point sprites. The drawback is that right now they don't work on Macs with ATI hardware because of broken drivers I need to get around to adding a workaround that avoids the use of hardware point sprites.
--Chris
-
Topic authorbuggs_moran
- Posts: 835
- Joined: 27.09.2004
- With us: 20 years 1 month
- Location: Massachusetts, USA
I guess I don't understand sprites well enough...
I did one simple test with them once, but didn't like how they looked the same from every angle. I probably just don't understand how to use them and should take another look. However, my meager understanding after doing some reading this afternoon is that the sprites are 2D (hence always facing the viewer) and what I was talking about is really a 3D volume that changes with the viewer... Maybe that's not possible without the particle system...
I did one simple test with them once, but didn't like how they looked the same from every angle. I probably just don't understand how to use them and should take another look. However, my meager understanding after doing some reading this afternoon is that the sprites are 2D (hence always facing the viewer) and what I was talking about is really a 3D volume that changes with the viewer... Maybe that's not possible without the particle system...
Homebrew:
WinXP Pro SP2
Asus A7N8X-E Deluxe
AMD Athlon XP 3000/333 2.16 GHz
1 GB Crucial RAM
80 GB WD SATA drive
ATI AIW 9600XT 128M
WinXP Pro SP2
Asus A7N8X-E Deluxe
AMD Athlon XP 3000/333 2.16 GHz
1 GB Crucial RAM
80 GB WD SATA drive
ATI AIW 9600XT 128M
I want to find out how point sprites work, and installed Chris' spriteneb addon as a first step. The add-on is found in Celestia, but when I go to it I don't see anything. OpenGL 2.0 was used. I am running Vista home premium 32 bits with an ATI 2600 XT. I was wondering if this could have anything to do with Vista.
Buzz
Buzz
-
- Site Admin
- Posts: 4211
- Joined: 28.01.2002
- With us: 22 years 9 months
- Location: Seattle, Washington, USA
Buzz wrote:I want to find out how point sprites work, and installed Chris' spriteneb addon as a first step. The add-on is found in Celestia, but when I go to it I don't see anything. OpenGL 2.0 was used. I am running Vista home premium 32 bits with an ATI 2600 XT. I was wondering if this could have anything to do with Vista.
Do you have nebula turned on? The fact that you're running on Vista shouldn't matter, though it's possible there's a problem with the ATI OpenGL driver for Vista.
--Chris
I have started some simple experiments with point sprites. What I am trying to do is to obscure "emission nebulae" by dark nebula. I am using a partly transparant png as the texture. Although I am not using "blend add", the opaque sprites always appear in front of the transparant ones, even if they are behind these. Is this behaviour as expected? My cmod code:
Code: Select all
#celmodel__ascii
material # index 0
diffuse 1 0 0
opacity 0.5
texture0 "blob.png"
end_material
material # index 1
diffuse 0 1 0
opacity 1
texture0 "blob.png"
end_material
mesh
vertexdesc
position f3
pointsize f1
end_vertexdesc
vertices 6
1 0 0 0.25
2 0 0 0.25
3 0 0 0.25
1 1 0 0.25
2 1 0 0.25
3 1 0 0.25
sprites 0 3
0 1 2
sprites 1 3
3 4 5
end_mesh
-
- Site Admin
- Posts: 4211
- Joined: 28.01.2002
- With us: 22 years 9 months
- Location: Seattle, Washington, USA
Buzz wrote:I have started some simple experiments with point sprites. What I am trying to do is to obscure "emission nebulae" by dark nebula. I am using a partly transparant png as the texture. Although I am not using "blend add", the opaque sprites always appear in front of the transparant ones, even if they are behind these. Is this behaviour as expected? My cmod code:
Right: the individual particles are not depth sorted. This can be addressed, but it will be incur a big performance cost with large numbers of particles.
--Chris
Re:
chris wrote:rthorvald wrote:Without knowing much about programming, i suspect the reason we won??t see this soon is more that the lead devs aren??t interested than that it is difficult. Celestia??s focus is on other things... But i would *love* to have this feature.
Exactly--a lack of time and not skill is the reason that Celestia doesn't have particles systems yet. I actually am interested in adding support for them to Celestia, but there have been other priorities.
Implementing particle systems is pretty easy stuff, though there are some special considerations in Celestia. A big difference between Celestia and games is that the user has complete control over time: it can be stopped, sped up to an effectively arbitrary degree, and even reversed. Traditional particle systems work by calculating the forces on the individual particles and calculating new velocities and positions at each time step. In Celestia, we'd have to constrain particle motions to just those that can be expressed analytically--quadratics seems like they'd give enough flexibility. Generation of new particles could be accomplished with some clever use of a pseudorandom number sequence: use the current simulation time to compute the starting position in the pseudorandom sequence, use the pseudoranom values to build a set of quadratics describing the motion of however many particles are in the system, then evaluate the quadratics to get particles positions, and render.
We'd need some sort of file format to describe the particle systems. Nothing special would need to be done to the ssc format--you could just specify a particle system for the mesh instead of a cmod or 3ds file.
--Chris
Collada would seem a good format.
It's for 3d and can also contain physics stuff.
https://www.khronos.org/collada/
And there is an interesting physics library called bullet physics library.
https://pybullet.org/Bullet/phpBB3/
https://pybullet.org/Bullet/phpBB3/viewforum.php?p=&f=21
Don't know if it helps but was worth mentioning anyway.