Page 1 of 2
Question about ship design
Posted: Fri Jun 06, 2008 10:48 pm
by DaddyHoggy
Do all the rendering improvements since 1.65 mean that Oolite can handle transparency (properly / at all)?
I'm thinking about windows in the interplanetry equivalent of those glass bottomed ships you get to view coral reefs.
Would it be possible to design a ship that had a big "glass"* section that you could see in to (textured to look as though lots of people were looking out)? I think I've gleamed from some of the discussions I've tried to catch up on that the new shader models mean that cockpits can be made better in the texture because they can now "glow" - and thus suggestive of light being emitted outwards.
Related to texturing/ship design - Ahruman introduced us to a new word "greebles" - a subtle texture difference that stops the ship looking like it was cut out of paper (similar to what erm, Sung(?) did just before I stopped playing last year). Can a texture have a bump map overlayed to alter the lighting normals that way, thus adding detail that isn't really there? If not, is there any plans to do this?
I want to start to play around with ship design and texturing - all of which will be very new to me and I just would like to know what my bounding conditions are before I start.
TIA
DaddyH
*Transparent Aluminium / Forcefield, etc.
Posted: Fri Jun 06, 2008 11:01 pm
by Svengali
I think it is not possible, or to be more precise - it is only a yes or no question. You can - with OpenGL - turn the orientation of a face, but this is not what you mean. A 60% opacity isn't supported, but maybe Ahruman has a plan for the MSNR? We'll see.
But while testing the GRS station, I've found one case where you can get some kind of transparency, because I thought about it for the docking bay entrance. You have to use the rotational_velocity, but unfortunately this also means a duplicated and flickering object. So I think you should think about an alternative.
Posted: Sat Jun 07, 2008 9:06 am
by LittleBear
The Astro Farms in Dictators.oxp have a glass bubble on them, through which you can see the buildings inside. Don't know how the author did that though.
Posted: Sat Jun 07, 2008 9:13 am
by DaddyHoggy
Cheers LB - I knew I'd something in the game (and that was 1.65) like I wanted before - Dictators is a Dr. Nil oxp I believe - hopefully he'll grace the boards soon else I'll PM him and ask.
Posted: Sat Jun 07, 2008 9:25 am
by Frame
Hmm i thought Transparency was impossible, but looking at Ramirez Textures for that dome i got a good clue... to how he might have done it.
In photoshop
new document...
Now create a new layer, make that the colour of you window..
set opacity of that layer to say 40%
create a new layer and draw your "windows", make it also a transparency of 20 %
now pick the eye in the layers tab for the background, so that it does not show the background...
save the png file, and aplly it to your model..
I could replicate the effect of the Astrofactory in photoshop, but have not gotten around to put my replicated texture on a dat model yet...
Posted: Sat Jun 07, 2008 9:30 am
by DaddyHoggy
I don't have photoshop - as an Ubuntu user I've got GIMP, but will investigate should/when I pursue this further. Thanks for the tip
Posted: Mon Jul 07, 2008 8:22 pm
by JensAyton
Frame wrote:Hmm i thought Transparency was impossible, but looking at Ramirez Textures for that dome i got a good clue... to how he might have done it.
In photoshop
new document...
Now create a new layer, make that the colour of you window..
set opacity of that layer to say 40%
create a new layer and draw your "windows", make it also a transparency of 20 %
now pick the eye in the layers tab for the background, so that it does not show the background...
save the png file, and aplly it to your model..
I could replicate the effect of the Astrofactory in photoshop, but have not gotten around to put my replicated texture on a dat model yet...
This should have the effect of compositing the texture against black, not against the background.
Alpha blending is not supported in Oolite. If you find a way to do it, it’s a bug and will not work properly and consistently (I can fully guarantee this). This will not change for MNSR.
Posted: Mon Jul 07, 2008 9:34 pm
by Frame
Ahruman wrote:Frame wrote:Hmm i thought Transparency was impossible, but looking at Ramirez Textures for that dome i got a good clue... to how he might have done it.
In photoshop
new document...
Now create a new layer, make that the colour of you window..
set opacity of that layer to say 40%
create a new layer and draw your "windows", make it also a transparency of 20 %
now pick the eye in the layers tab for the background, so that it does not show the background...
save the png file, and aplly it to your model..
I could replicate the effect of the Astrofactory in photoshop, but have not gotten around to put my replicated texture on a dat model yet...
This should have the effect of compositing the texture against black, not against the background.
Alpha blending is not supported in Oolite. If you find a way to do it, it’s a bug and will not work properly and consistently (I can fully guarantee this). This will not change for MNSR.
Yeah i tried looking at the astrofarm from dictators.oxp on my system it is not transparent... as stated in another thread...
Posted: Fri Jul 11, 2008 9:03 am
by caracal
Ahruman wrote:Alpha blending is not supported in Oolite. If you find a way to do it, it’s a bug and will not work properly and consistently (I can fully guarantee this). This will not change for MNSR.
How are the planetary atmospheres done? That looks exactly like the effect I'd like to have in some models. Are they "faked" somehow?
Posted: Fri Jul 11, 2008 12:14 pm
by JensAyton
caracal wrote:How are the planetary atmospheres done? That looks exactly like the effect I'd like to have in some models. Are they "faked" somehow?
What I said above only applies to ships. Atmospheres do use alpha blending (and various other special effects use additive blending). However, in order for this to work the game has to take drawing order into account. For alpha-blended polygons on ships to work properly, it would have to draw each potentially transparent polygon in back-to-front order, which involves a bunch of extra work. The atmosphere is a simpler case because it’s known to be convex and can’t occlude itself.
Posted: Fri Jul 11, 2008 2:57 pm
by caracal
Ahruman wrote:caracal wrote:How are the planetary atmospheres done? That looks exactly like the effect I'd like to have in some models. Are they "faked" somehow?
What I said above only applies to ships. Atmospheres do use alpha blending (and various other special effects use additive blending). However, in order for this to work the game has to take drawing order into account. For alpha-blended polygons on ships to work properly, it would have to draw each potentially transparent polygon in back-to-front order, which involves a bunch of extra work. The atmosphere is a simpler case because it’s known to be convex and can’t occlude itself.
That makes sense, and thanks for the explanation. I'd consider getting together with my OpenGL buds and seeing if we couldn't come up with a simple solution, perhaps by placing some restrictions on how such materials could be used in arbitrary user-specified models ("only domes", "only windows", etc.), but that sounds like we're verging into create-more-work-for-Ahruman territory, and nobody wants that.
Posted: Fri Jul 11, 2008 3:33 pm
by JensAyton
caracal wrote:That makes sense, and thanks for the explanation. I'd consider getting together with my OpenGL buds and seeing if we couldn't come up with a simple solution, perhaps by placing some restrictions on how such materials could be used in arbitrary user-specified models ("only domes", "only windows", etc.), but that sounds like we're verging into create-more-work-for-Ahruman territory, and nobody wants that. :)
If your OpenGL buds suggest doing the sensible thing – throwing out all of Oolite’s drawing code and dropping in an off-the-shelf graphics engine – go ahead. Don’t worry about hurting my feelings or anything. Remember that shader bindings have to keep working, though. :-)
Posted: Fri Jul 11, 2008 3:49 pm
by caracal
Ahruman wrote:caracal wrote:That makes sense, and thanks for the explanation. I'd consider getting together with my OpenGL buds and seeing if we couldn't come up with a simple solution, perhaps by placing some restrictions on how such materials could be used in arbitrary user-specified models ("only domes", "only windows", etc.), but that sounds like we're verging into create-more-work-for-Ahruman territory, and nobody wants that.
If your OpenGL buds suggest doing the sensible thing – throwing out all of Oolite’s drawing code and dropping in an off-the-shelf graphics engine – go ahead. Don’t worry about hurting my feelings or anything. Remember that shader bindings have to keep working, though.
Oh, I know what they'd suggest in that case:
Globe3D. See, my dreadful secret is that I prototype most of my OpenGL code in Python, and implement larger things in Ada. Please don't tell anybody!
I don't know of any engines in ObjectiveC, sorry. In fact, except for oolite, I don't know of any
apps in ObjC, but I'm sure there are tons of them out there, especially in the Mac world. But I program in Ada and Python, oolite is in ObjC, Wings3D is in Erlang, so clearly C/C++/Java don't
quite rule the world, though their proponents seem to imagine they do.
But it's a great idea! I'm a huge fan of off-the-shelf libraries.
Posted: Fri Jul 11, 2008 8:59 pm
by DaddyHoggy
@Caracal - Ada! Wow - tried it a Uni - I was such a sloppy programmer that I couldn't get away with it - having the compiler sit there and tell me (eventually) that it had detected that there was a chance that there would be a div-by-zero error that I hadn't trapped for...
And the great US DoD and the "Thou shalt implement all your models and simulations in Ada" debacle (you think they'd have learnt from the great "Thou shalt use HLA" debacle)
Posted: Fri Jul 11, 2008 9:11 pm
by Cmdr. Maegil
Ada? Never heard of it, and by what you guys are saying, it'd appear that I'm better off in my ignorance...