Volume Transparency meathod

I don’t know about the flexibility of it but it would be nice to say something like this




and then opengl goes thorought it and finds the volume of the object drawn by finding distances between the pixels and such and then multiplying that to the glcolor alpha value and if blending is on then it can blend it good, it would be very nice for fogs, light shafts, and any other volume object that may very in an odd shape.

so basically it would be nice to have open gl draw out the object to it self then when you end volume drawing the things that where drawn with in find the alpha of the points that are visible by the volume behind that point.

I don’t belive that it is that high level, and it would be a wonderful and very useful tool that would eliminate many of the terrible side rouets that must be taken now to achive the same effect at an interactive rate.

In other words, you would like OpenGL to provide a generic “volumetric fog” mechanism ? (also useful for volumetric lights and such)

I like that suggestion, especially because that is low-level enough I think. I’m not really sure if implementations could support it, but if it could be done it would be nice.

That is pretty much what I ment, I belive that it would be very useful for many problems that come up when writeing any peice of software that requires any sort of volumetric objects.

It could also could apply to liquids in a way, kindof like in the ocean or lake the deeper it gets the darker and less transparent it gets so it could be used for that.

Another note to add to this is that when it is doing the filling it may be selectable to include the depth buffer into the back of the volometric object to make things simpler on the programmer when there are objects inside of the volume mass. So when the checking is being done it instead of doing per vertex as I said be fore it would be better per pixel. it igonres everything and when the filling process takes over if enabled it will check to see if the depth buffers value is grater then the back of the object and if so then it can adjust the alpha of the object to suit the distance to that pixel. If not enable then it would check the distance to the back of the object from that pixel and then color it ignoring the depth buffer.

[This message has been edited by Xero-X2 (edited 11-04-2002).]

I’m afraid you’ can’t simply use the depth buffer, because the depth buffer stores only a single depth per pixel. If the ‘volume’ is not convex, you may need something more advanced than the current depth buffer.

I didn’t mean for the whole process just so it can include other non volumetric objects. like walls or trees