Volumetrics

Blitz3D Forums/Blitz3D Programming/Volumetrics

_PJ_(Posted 2016) [#1]
Anybody got any examples or demos pertaining to volumetric effects done with Blitz?

I appreciate this is a pretty compex area and without certain features (i.e. those offered by Shaders), will likely be extremely CPU intensive.

I also appreciate the best solution would be to either not use blitz, or at least, make use of the FastExtention or something libraries...

However, I am really just trying to get an understanding of HOW this sort of thing might be approached and so what points might be offered as a starting point. So has anyone got any information at all?


RemiD(Posted 2016) [#2]
Can you post screenshots of what you mean, so that we better understand what you are looking for ?


RustyKristi(Posted 2016) [#3]
You mean like volumetric clouds or fog? I've seen a few demos but not sure if I still got the links.

It's possible with the use of irrlicht wrapper. You just use the built-in cloud volumetric function. There's also an example in Aqualung's package.


_PJ_(Posted 2016) [#4]
RemiD:

vol¡¤u¡¤met¡¤ric
(vŏl¡äyo͝o-mĕt¡ärĭk)
adj.
1. Of or relating to measurement by volume.

2. Having the appearance of existing in three dimensions: volumetric computer animations.


Generally regarding the 2nd definition.

I mean anything that involves display pertaining to the volume of space - typically this is with clouds or particles but can be any fluid.
I am interested in the 3D depiction and calculation of these, rather than (old style) replacement with sprites or assemblage of quads




You mean like volumetric clouds or fog? I've seen a few demos but not sure if I still got the links.

It's possible with the use of irrlicht wrapper. You just use the built-in cloud volumetric function. There's also an example in Aqualung's package.


Thanks, if you can find any of these demos (in B3D) that would be useful to me, I've not actually found anything sufficent.
I do not wish to use existing libraries such as Irrlicht, as you mention the "built in volumetric cloud function" means that the library has the details locked within.


________________

My thoughts so far on the matter are as follows:


1) Determine the general shape of the volume.
2) This volume can be represented in terms of many smaller cubic areas of a given unit size
2) Calculate & Store rudimentary density of each smaller cube in a simple format say "x parts per thousand" or so.
3) Determine the additive effect of the number of such cubes for Z-axis (local) to the camera


RemiD(Posted 2016) [#5]
ok...
for particles you can use sprites/quads or 3d shapes.

for volumetric clouds you can use textured quads, positionned in 3d space, childs of a root pivot, for example : http://www.blitzbasic.com/toolbox/toolbox.php?tool=188

for volumetric fog you can use textured quads, positionned in 3d space, for example :
http://www.blitzbasic.com/Community/posts.php?topic=31460 (post #2)
http://www.blitzbasic.com/codearcs/codearcs.php?code=265

for volumetric lighting, you can use a 3d flare/ray (a 3d shape with progressively decreasing alpha), for example : http://www.blitzbasic.com/codearcs/codearcs.php?code=1090
there was also an effect on the blitz3dfr forum with a volumtric light flare and a projected light which is not here, so i will try to recreate it when i have some time.

for volumetric glow, you can use several layers of the same 3d shape, each layer being scaled up with decreasing alpha (blendmode add), for example : http://www.blitzbasic.com/codearcs/codearcs.php?code=391


_PJ_(Posted 2016) [#6]
It's really the 'clouds' that are most similar to what I look for.

The PCL_Cloud tool linked is informative and very good, but falls short in that it only represents an arbitrary surface, not the volume contained within. Taht is, there is no differential of density and from within the cloud you would see nothing, since it uses a quad/sprite approach.

I do not with to use quads/sprites, since, although faster and may be suitable for many games, I am more interested in actually depicting the volume of space and the density of material within.