Page 1 of 1
Particle System / Volumetric fills / Clouds
Posted: 26.01.2008, 01:54
by buggs_moran
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...
Posted: 26.01.2008, 02:55
by MKruer
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
Posted: 26.01.2008, 10:14
by Imy
Volumetric clouds may be also interesting to draw high dense atmospheres in gazeaous planets such Uranus or Neptune : this could allow trips inside this planet like we do for Earth or Mars...
Posted: 26.01.2008, 17:13
by duds26
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_Pagehttp://www.web3d.org/x3dAnd volumetric images for clouds:
http://www.2kan.org/jp3d.html
Posted: 10.02.2008, 19:03
by Jugalator
I agree, the multiple uses of volumetrics in Celestia could sure make it a useful feature, for the many celestial objects that are more of a gaseous type, or consist of this in a part.
I am personally a programmer, I just wish I knew more about graphics programming like this.
Posted: 21.02.2008, 23:16
by fsgregs
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
Posted: 22.02.2008, 10:30
by rthorvald
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
Posted: 22.02.2008, 17:52
by fsgregs
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
Posted: 22.02.2008, 18:12
by chris
rthorvald wrote: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.
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
Posted: 22.02.2008, 20:23
by buggs_moran
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...
Posted: 22.02.2008, 20:54
by chris
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
Posted: 22.02.2008, 21:44
by buggs_moran
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...
Posted: 23.02.2008, 15:25
by Buzz
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
Posted: 23.02.2008, 16:54
by chris
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
Posted: 23.02.2008, 17:17
by Buzz
Oops, no I didn't have them turned on! I do see the 'spriteneb' now, thanks Chris!
Posted: 25.02.2008, 20:36
by Buzz
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
Posted: 25.02.2008, 20:43
by chris
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
Posted: 25.02.2008, 21:10
by Buzz
I see, good to know. This of course makes it impossible to create nebulae that are not purely emissive. I would be interested to see what can be created with depth sorted sprites and to see how large the performance impact is. Is this something that is easy to add as an option?
Buzz
Re:
Posted: 31.08.2008, 17:41
by duds26
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=21Don't know if it helps but was worth mentioning anyway.