Volumetric effects with point sprites

Discussion forum for Celestia developers; topics may only be started by members of the developers group, but anyone can post replies.
Topic author
chris
Site Admin
Posts: 4211
Joined: 28.01.2002
With us: 23 years
Location: Seattle, Washington, USA

Post #21by chris » 14.05.2007, 15:09

t00fri wrote:Chris,

you wrote in CVS that you fixed point sprite nebula rendering and did quite a few respective commits. But when I try your spriteneb add-on now, it is overbright and VERY slow, indeed.

Bye Fridger


This is expected. The sprite size in that cmod was incorrect, resulting in huge amounts of overdraw--the cause of both the slowness and the overbrightness. I uploaded a version with a corrected sprite size:

http://www.celestiaproject.net/~claurel/celest ... iteneb.zip

--Chris

Avatar
t00fri
Developer
Posts: 8772
Joined: 29.03.2002
Age: 22
With us: 22 years 10 months
Location: Hamburg, Germany

Post #22by t00fri » 14.05.2007, 21:15

chris wrote:
t00fri wrote:Chris,

you wrote in CVS that you fixed point sprite nebula rendering and did quite a few respective commits. But when I try your spriteneb add-on now, it is overbright and VERY slow, indeed.

Bye Fridger

This is expected. The sprite size in that cmod was incorrect, resulting in huge amounts of overdraw--the cause of both the slowness and the overbrightness. I uploaded a version with a corrected sprite size:

http://www.celestiaproject.net/~claurel/celest ... iteneb.zip

--Chris


This is better now, yet close to the nebula the code is forbiddingly slow (~7 fps). I could also test it with my notebooks more modern 7300 card... Also I can see now funy streaks in the fading part of the test nebula.

I would have never dreamt that one day we will be rendering Riemann surfaces in Celestia ;-)

Bye Fridger
Last edited by t00fri on 14.05.2007, 21:41, edited 1 time in total.
Image

Topic author
chris
Site Admin
Posts: 4211
Joined: 28.01.2002
With us: 23 years
Location: Seattle, Washington, USA

Post #23by chris » 14.05.2007, 21:33

t00fri wrote:
chris wrote:
t00fri wrote:Chris,

you wrote in CVS that you fixed point sprite nebula rendering and did quite a few respective commits. But when I try your spriteneb add-on now, it is overbright and VERY slow, indeed.

Bye Fridger

This is expected. The sprite size in that cmod was incorrect, resulting in huge amounts of overdraw--the cause of both the slowness and the overbrightness. I uploaded a version with a corrected sprite size:

http://www.celestiaproject.net/~claurel/celest ... iteneb.zip

--Chris

This is better now, yet close to the nebula the code is forbiddingly slow (~7 fps). I could also test it with my notebooks more modern 7300 card... Also I can see now funy streaks in the fading part of the test nebula.

This is a result of drawing many very large (in screen space) and overlapping sprites. In the process of rendering a single frame, each pixel is updated many times, using up all available bandwidth between the GPU and video memory. There's not much that can be done to the code to make it faster. The fact is that an object like this fuzzy helicoid is best rendered using other techniques (possibly volume tracing), but there are many useful applications of point sprites in Celestia where slowdowns aren't a problem. Notably, performance is fine for the SDSS galaxy data set.

I would have never dreamt that one day we will be rendering Riemann surfaces in Celestia ;-)


Time for me to development some more appropriate examples ;-) I will try my hand at an Ionian volcanic plume very soon.

--Chris

Kolano
Posts: 125
Joined: 15.02.2005
With us: 19 years 11 months
Location: New Jersey

Post #24by Kolano » 15.05.2007, 05:55

I'm very much looking forward to galaxy add-ons using point sprites. I want to be sure I am not overestimating their impact. Can you please confirm/deny my assumptions about them...

We should be able to have something like Selden's galaxy survey add-ons with actually images rather than simple points making up the galaxies. The images used would be limited (one graphic per set of point sprites), but multiple sets could be used to add variety/align with known galactic paramaters.

Point sprites would provide distance based fading, unlike Selden's current add-on where points are brightly visible from any point in the universe.
System:
Asus A8N-SLI Premium nForce4 SLI
AMD Athlon 64 X2 4200+
2xeVGA GeForce 7800 GTX 256MB
2gb Dual Channel DDR (400) 3200

Avatar
t00fri
Developer
Posts: 8772
Joined: 29.03.2002
Age: 22
With us: 22 years 10 months
Location: Hamburg, Germany

Post #25by t00fri » 15.05.2007, 19:37

Kolano wrote:I'm very much looking forward to galaxy add-ons using point sprites. I want to be sure I am not overestimating their impact. Can you please confirm/deny my assumptions about them...

We should be able to have something like Selden's galaxy survey add-ons with actually images rather than simple points making up the galaxies. The images used would be limited (one graphic per set of point sprites), but multiple sets could be used to add variety/align with known galactic paramaters.

Point sprites would provide distance based fading, unlike Selden's current add-on where points are brightly visible from any point in the universe.


Could you please explain how you imagine to attach about 100000 images to the surveys ?? ;-) By hand? Which images will you leave out because you'll run out of patience ? ;-)

And point sprites may be pretty slow for these purposes, too (see the discussions above this post)

Bye Fridger
Image

Kolano
Posts: 125
Joined: 15.02.2005
With us: 19 years 11 months
Location: New Jersey

Post #26by Kolano » 15.05.2007, 23:07

t00fri wrote:Could you please explain how you imagine to attach about 100000 images to the surveys

I don't, I'd hope a single image could be attached so that the galaxies would look like galaxies rather than simple points. I'm suggesting that we'd have one set of point sprites per galaxy type, and a single galaxy image for each type.

t00fri wrote:And point sprites may be pretty slow for these purposes, too (see the discussions above this post)

As Chris explained, that is mainly caused by excessive overlapping, and large sprites. A more dispersed set of points would theoretically be faster. particularly for galaxies where most sprites would be rendered as points. Chris specifically says that point sprites have acceptable performance...

chris wrote:Notably, performance is fine for the SDSS galaxy data set.
System:

Asus A8N-SLI Premium nForce4 SLI

AMD Athlon 64 X2 4200+

2xeVGA GeForce 7800 GTX 256MB

2gb Dual Channel DDR (400) 3200

Avatar
t00fri
Developer
Posts: 8772
Joined: 29.03.2002
Age: 22
With us: 22 years 10 months
Location: Hamburg, Germany

Post #27by t00fri » 15.05.2007, 23:22

Kolano wrote:
t00fri wrote:Could you please explain how you imagine to attach about 100000 images to the surveys

I don't, I'd hope a single image could be attached so that the galaxies would look like galaxies rather than simple points.

But in Celestia our galaxies don't look like points. They look pretty much like galaxies. We use sprites to render them. And they are computer-generated directly from the scientific catalog data without ANY human interference. That's crucial when the task is to render many thousands of them.

How do you suppose one may attach a single image to so many objects?? Who selects these many images from which source?? How? By hand?

As Chris explained, that is mainly caused by excessive overlapping, and large sprites. A more dispersed set of points would theoretically be faster. particularly for galaxies where most sprites would be rendered as points. Chris specifically says that point sprites have acceptable performance...

chris wrote:Notably, performance is fine for the SDSS galaxy data set.


But one has to be EXTREMELY fast when rendering so many galaxies. It has NOT been proven yet that the speed is sufficient when I get CLOSE to extended galaxy structures. Remember, galaxies are 3d objects. So we can't simply suspend a 2d image to points.

Honestly, I don't see what you have in mind.

Bye Fridger
Image

Kolano
Posts: 125
Joined: 15.02.2005
With us: 19 years 11 months
Location: New Jersey

Post #28by Kolano » 16.05.2007, 00:14

t00fri wrote:But in Celestia our galaxies don't look like points. They look pretty much like galaxies.

This is true only for a small set of galaxies (10608 in your current DB to my understanding) when compared to the millions of known galaxies captured in the 28megs of Selden Ball's cmod galaxy survey add-ons (i.e the closest thing currently to what I think you like to call "cosmo-celestia").

t00fri wrote:How do you suppose one may attach a single image to so many objects? Who selects these many images from which source?? How? By hand?

We associate an image with a point sprite set, with each point representing a galaxy. I'd presume images would be selected as other content in Celestia is, taken from various space agency sources. We could also capture generic galaxy type images via your galaxy code.

t00fri wrote:But one has to be EXTREMELY fast when rendering so many galaxies. It has NOT been proven yet that the speed is sufficient when I get CLOSE to extended galaxy structures.

Point sprites are very fast. I'm unsure that the current galaxy code/modern hardware is up to handling the large galaxy data sets otherwise.

One thing I'd like to hear from Chris would be how point sprites compare performance-wise to Selden's cmod galaxy add-ons. I think the point sprite galaxy data recently converted from that other space simulator may be comparable.

t00fri wrote:Remember, galaxies are 3d objects. So we can't simply suspend a 2d image to points.


Though ideally we would have a full 3d structure for each galaxy, we can "simply suspend a 2d image to points". I'd rather have them represented that way than not have them. We already make this compromise for other complex structures like nebula (though I guess this thread started out proposing a way of addressing that).
System:

Asus A8N-SLI Premium nForce4 SLI

AMD Athlon 64 X2 4200+

2xeVGA GeForce 7800 GTX 256MB

2gb Dual Channel DDR (400) 3200

Avatar
t00fri
Developer
Posts: 8772
Joined: 29.03.2002
Age: 22
With us: 22 years 10 months
Location: Hamburg, Germany

Post #29by t00fri » 16.05.2007, 11:22

Kolano,

it seems what you advertise is to attach stucture to ALL SDSS galaxies, e.g. in form of photographic or template images.

This is both physicswise and wrto Celestia's possibilities besides the point. The essential reason for measuring so many galaxies in the SDSS project is to measure the mass distribution in the Universe as function of the redshift z. The crucial result is the large-scale filiamentary structure and correspondingly the shape of the power spectrum in the conjugate Fourier space. That's the physics that is relevant at the scales concerned. Notably, one would also want to fill up the SDSS "data holes" eventually with results of N body simulations as I discussed elsewhere. These simulations only generate points not detailed galaxies!

The SDSS database is HUGE. As soon as you try to pull out actual images, you will be swamped with data. I have done that myself. I doubt you did it yet...Also the photographic resolution of the far-away galaxies is quite low. So why should we bother? I would just want to attach a sprite of some sort to each galaxy, without resolving it further. The emphasis in this case is shifting on completely different aspects of visualization.

There would be very little reward for the huge and actually unrealistic effort to encourage Celestia's users to visit any of these huge number of galaxies and correspondingly, to show some sort of primitive galaxy image... Everywhere in Nature we have to make a cut to the resolution with which we look at it. So it is here.

Bye Fridger
Image

Topic author
chris
Site Admin
Posts: 4211
Joined: 28.01.2002
With us: 23 years
Location: Seattle, Washington, USA

Post #30by chris » 16.05.2007, 18:38

Kolano wrote:We associate an image with a point sprite set, with each point representing a galaxy. I'd presume images would be selected as other content in Celestia is, taken from various space agency sources. We could also capture generic galaxy type images via your galaxy code.

The problem is that such images would look the same from all directions. I don't think the effect would be very convincing. But if you did want to just have 2D images, it would be possible. You could have a point sprite cmod file divided into groups by galaxy type, with each group getting a separate sprite image. But, I just don't know if the data is there to do this.

t00fri wrote:But one has to be EXTREMELY fast when rendering so many galaxies. It has NOT been proven yet that the speed is sufficient when I get CLOSE to extended galaxy structures.

I'll upload the point sprite cmod with > 500,000 SDSS galaxies tonight. It's viewable on my GeForce 8800 at 60fps from any point.

One thing I'd like to hear from Chris would be how point sprites compare performance-wise to Selden's cmod galaxy add-ons. I think the point sprite galaxy data recently converted from that other space simulator may be comparable.

It renders just as quickly.

t00fri wrote:Remember, galaxies are 3d objects. So we can't simply suspend a 2d image to points.

Though ideally we would have a full 3d structure for each galaxy, we can "simply suspend a 2d image to points". I'd rather have them represented that way than not have them. We already make this compromise for other complex structures like nebula (though I guess this thread started out proposing a way of addressing that).


I guess my preference is not to just use a 2D image. But with the latest Celestia from CVS, you should be able to create such a model yourself, to what ever degree available data will allow.

There are some more sophisticated things we could do with shaders. With point sprites, you are not just restricted to drawing a simple textured square. A basic volume tracing algorithm could be implemented in the shader, allowing each galaxy to be represented as a fuzzy, oriented ellipsoid. It could be extremely fast, but again, I don't know if available data warrants the effort.

--Chris

Avatar
t00fri
Developer
Posts: 8772
Joined: 29.03.2002
Age: 22
With us: 22 years 10 months
Location: Hamburg, Germany

Post #31by t00fri » 16.05.2007, 18:55

Many SDSS galaxies are ellipsoidal. In fact the older and hence most distant ones are. So for simple ellipsoidal shapes I could imagine some respective point sprite action to be satisfactory... But again... with a density of 100 -1000 SDSS galaxies/screen area I am very sceptical of a successful detailed rendering that will not be slowing Celestia down too much. With spirals we also need to generate the spacial orientations from the SDSS data base! That needs several quaternionic rotations/galaxy.

Given that on a cosmological scale individual galaxy rendering is physically uninteresting I am convinced the result is not worth its price.

Don't forget, the aim is that sort of visualizations:
Image

each little dot being a galaxy...

+++++++++++++++
To repeat: whereever we look in Nature, eventually we
need to make a cut in resolution in order to expose the
features that are most relevant!
+++++++++++++++


Bye Fridger
Image

Avatar
t00fri
Developer
Posts: 8772
Joined: 29.03.2002
Age: 22
With us: 22 years 10 months
Location: Hamburg, Germany

Post #32by t00fri » 16.05.2007, 21:41

That may be the stage Kolano is talking about?

Image
I took that image from the ongoing international conference on
Image
In Hamilton/Canada. Very interesting meeting ;-)
http://www.physics.mcmaster.ca/cgi-bin/ ... ogramme.pl
Bye Fridger
Image

Kolano
Posts: 125
Joined: 15.02.2005
With us: 19 years 11 months
Location: New Jersey

Post #33by Kolano » 16.05.2007, 23:27

Yes Fridger, that image is along the lines of what I'm imagining. Scaled out to an appropriate degree it should gain the aspects of the other image you posted (i.e. as the sprites reduce in size down to points).

I agree that it's probably not appropriate for users to be going off to visit individual galaxies in these surveys, but having the sprite images there helps give a sense of scale/perspective (i.e. in the cmod version of things, all galaxies, no matter how close you get, are only a single point, the same size as a galaxy millions of light years away).
System:

Asus A8N-SLI Premium nForce4 SLI

AMD Athlon 64 X2 4200+

2xeVGA GeForce 7800 GTX 256MB

2gb Dual Channel DDR (400) 3200

Kolano
Posts: 125
Joined: 15.02.2005
With us: 19 years 11 months
Location: New Jersey

Post #34by Kolano » 18.05.2007, 05:07

I had one other query. When using Selden's add-ons as I increase the distance from 3900 mpc to 4,900 mpc (i.e. the next scroll-wheel click), a significant portion of Selden's add-on disappears. I presume this has something to do with distance limits in Celestia

Will use of point sprites address that?
System:

Asus A8N-SLI Premium nForce4 SLI

AMD Athlon 64 X2 4200+

2xeVGA GeForce 7800 GTX 256MB

2gb Dual Channel DDR (400) 3200

Topic author
chris
Site Admin
Posts: 4211
Joined: 28.01.2002
With us: 23 years
Location: Seattle, Washington, USA

Post #35by chris » 18.05.2007, 05:23

Kolano wrote:I had one other query. When using Selden's add-ons as I increase the distance from 3900 mpc to 4,900 mpc (i.e. the next scroll-wheel click), a significant portion of Selden's add-on disappears. I presume this has something to do with distance limits in Celestia

Will use of point sprites address that?


Point sprites has nothing to do with it, but we will be addressing the distance limit very soon.

--Chris

Avatar
t00fri
Developer
Posts: 8772
Joined: 29.03.2002
Age: 22
With us: 22 years 10 months
Location: Hamburg, Germany

Post #36by t00fri » 18.05.2007, 09:23

Kolano,

I had fixed the maximum distance limit so far to 1.8 Giga ly from performance tuning wrto my deepsky.dsc galaxy data base ONLY. So far there was little need to extend that value at the price of a ~5% deterioration in fps for some (nearby) galaxies.

But now we shall extend the distance limit to the entire visible Universe ( ~100 Giga ly) , in order to be able to visualize also data of cosmological distance scales.

Bye Fridger
Image

Avatar
Cham M
Posts: 4324
Joined: 14.01.2004
Age: 60
With us: 21 years
Location: Montreal

Post #37by Cham » 05.02.2008, 02:19

From the first page of this topic :

chris wrote:Point sprites in cmod meshes are only rendered with hardware sprites. I could take the time to code a software emulated path, but I haven't taken the time to do so yet because most graphics cards support hardware sprites.

--Chris


Well, we still have problems with CMOD point sprites. Is it possible to implement that software emulated path ?
"Well! I've often seen a cat without a grin", thought Alice; "but a grin without a cat! It's the most curious thing I ever saw in all my life!"


Return to “Ideas & News”