Hi all,
some days ago, I promised to Martin (aka Cham) to enter into a discussion here at CelestialMatters about existing options to reduce the familiar
granulariy that remains after using
standard Sprite rendering techniques.
Symptoms
+++++++++++++
The remaining granularity I am referring to is best illustrated by two examples one from Cham's 3d nebulae and one from my galaxies in celestia.Sci:
3D Nebula (Cham's 7_Neb5_1.jpg):
=================================
a) Normal view from far away
------------------------------------
[Click on image by all means for a bigger view]
b) Close-up view
----------------------
The granularity is clearly visible
Galaxy (M 74, celestia.Sci)
===========================
a) Normal view from far away
--------------------------------------
[Click on image by all means for a bigger view]
b) Close-up view
---------------------
Also here granularity is clearly visible.
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Let us ask in this thread, what can be done here to improve the close-up impressions significantly?
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Background Info
++++++++++++++++++
First of all, let me recall that the reason for this granularity in the usual Sprite-based rendering is quite easy to understand. Here is a brief reminder:
In OpenGL rendering based on Sprites, one maps suitable (polygone) subsets from a mathematical point-template of e.g a 3D nebula to an extended 2D object like a 2D texture. This leads to the desired coverage of the object with many such mini sprites in different relative orientations. Usually --as an important degree of freedom-- one uses these sprites in different sizes from a chosen size distribution.
The total set of points characterizes the geometrical shape of the object to be rendered. The templates can be generated with Mathematica (Cham) or Maple (me) or GIMP,..
A typical shape for such a Sprite texture for our purposes would look like this:
There is a crucial constraint here: the drawn radially symmetric function MUST vanish towards the border of the square (or there must be total transparency) otherwise the rendering looks horrible: you then can see all the square boundaries of your sprites in the rendered object!
The requirement that the bright radial shape vanishes at the border already implies the residual black (or transparent) space in-between the various sprites.
Here is a simplified illustration using just four sprites covering a plane surface:
Of course this illustration is enormously blown up, but in the end, it's the reason for the remaining granularity seen e.g. above.
A non-granular 3D rendering of Nebulae
+++++++++++++++++++++++++++++++++++++
Let me go
in medias res by presenting a much improved 3D nebula rendering technique without ANY granularity.
The method is known to me since quite a while. It's simple to implement in OpenGL and it is FAST.
Here I even found a great YouTube video describing it in much detail. Just take your time and watch it. It's easy to understand....and there are demos all along!
+++++++++++++++++++++++++++
http://youtu.be/CaTI2d0tQME
+++++++++++++++++++++++++++
Let me stop here for now and wait for feedback!
Fridger