Because I'm more familiar with DirectX gfx than the OpenGL platform I thought I'd ask whether it's relatively easy to alphablend in OpenGL and whether there are commands that easily implement this in Oolite?
My reason for asking is that it struck me that no-one has as yet, as far as I can see, implemented any planetary rings of the sort that in our Sol system one sees around i.e. Saturn. An easy if rather simplistic way to produce such a graphical effect might be to texture a plane object (with backface culling off) with a bitmap or .png with a ring graphic on it, then alpha-blend it into its immediate background (to give a sort of ghosting or semi-transparent effect). Then you'd have to scale the plane so that it is larger than the planet and position the plane at the centre of the planet.
I guess this leads onto another question which I haven't yet looked at the source about: does OpenGL have hard coded into it the standard primitives or is this kind of thing for the programmer to implement. DirectX comes with the usual cube, sphere, cone, torus and, of course, the famous teapot!!
Alphablending ... ?
Moderators: winston, another_commander
Alphablending ... ?
Is that a military laser on your ship or are you just pleased to see me?
- DaddyHoggy
- Intergalactic Spam Assassin
- Posts: 8515
- Joined: Tue Dec 05, 2006 9:43 pm
- Location: Newbury, UK
- Contact:
I'm pretty sure alphablending is an issue - this is why ships and other space fodder do not have things such as transparent windows and domes.
Although of course the planets have atmospheres and the ships have exhaust plumes both of which have transparency so I could well be talking out my a-hole...
So, basically, I don't know, other than to say that there are some issues with alphablending but I don't fully understand what those issues are. Somebody much more clever than I will be along shortly.
Although of course the planets have atmospheres and the ships have exhaust plumes both of which have transparency so I could well be talking out my a-hole...
So, basically, I don't know, other than to say that there are some issues with alphablending but I don't fully understand what those issues are. Somebody much more clever than I will be along shortly.
Oolite Life is now revealed hereSelezen wrote:Apparently I was having a DaddyHoggy moment.
- Griff
- Oolite 2 Art Director
- Posts: 2483
- Joined: Fri Jul 14, 2006 12:29 pm
- Location: Probably hugging his Air Fryer
i'm not the clever person DH is referring to, but i remember Ahruman (now this guy is a clever person) mentioning something about the graphics engine sorting polygons in the wrong order (front to back?) to allow transparency to work, it was going to mean a massive re-write and a drop in performance speed to get it working, and that planet atmospheres have their own special bit of code to get them working.
If you are talking about z-depth and rendering the polygons furthest away before rendering polygons closer, as far as I can recall that is standard in both openGL and DirectX and has been for a while. If you are saying that at the moment oolite does not do this despite being based on openGL, then I'm puzzled!!!
Is that a military laser on your ship or are you just pleased to see me?
- DaddyHoggy
- Intergalactic Spam Assassin
- Posts: 8515
- Joined: Tue Dec 05, 2006 9:43 pm
- Location: Newbury, UK
- Contact:
Check this thread: https://bb.oolite.space/viewtopic.php?t= ... ansparency
Oolite Life is now revealed hereSelezen wrote:Apparently I was having a DaddyHoggy moment.
Thanks but that thread effectively repeats my previous (almost rhetorical) question rather than answers it. I'm definitely puzzled by this but my knowledge of OpenGL is not as good as my knowledge of DirectX and I cannot answer it without some poking around into websites about the OpenGL graphics pipeline.
Is that a military laser on your ship or are you just pleased to see me?
- DaddyHoggy
- Intergalactic Spam Assassin
- Posts: 8515
- Joined: Tue Dec 05, 2006 9:43 pm
- Location: Newbury, UK
- Contact:
If (when?) Ahruham comes back he may be able to answer your questions more succinctly.
Oolite Life is now revealed hereSelezen wrote:Apparently I was having a DaddyHoggy moment.
- JensAyton
- Grand Admiral Emeritus
- Posts: 6657
- Joined: Sat Apr 02, 2005 2:43 pm
- Location: Sweden
- Contact:
OpenGL does not automatically sort polygons from back to front for alpha blending, and I’m pretty sure Direct3D doesn’t either. The tradeoffs involved in deciding how to do this are far too complex for a low-level renderer, and new ways of doing it are an active topic of research.
E-mail: [email protected]
- DaddyHoggy
- Intergalactic Spam Assassin
- Posts: 8515
- Joined: Tue Dec 05, 2006 9:43 pm
- Location: Newbury, UK
- Contact:
Hooray - Ahruman is back!!!
Oolite Life is now revealed hereSelezen wrote:Apparently I was having a DaddyHoggy moment.