Hard Light Productions Forums
Modding, Mission Design, and Coding => The Modding Workshop => Topic started by: Reprobator on February 04, 2009, 03:21:18 pm
-
Hi everyone!
I'm actually working on a cockpit view (via cockpit pof in the ship.tbl) i made a pof, export it and everything is looking fine.
But when i add glasses to the cockpit, (via a dxt5 diffusemap with a dark grey color filled in the alpha channel) the whole external part of the cockpit (the ship's hull in the other side of the glass) disapear...
what is wrong with my way to do that?
-
Ah, that.
Rendering order is botched in the model. As it is, it renders the hull first, then it renders the "transparent" glass on top of it- making the hull behind the glass seemingly transparent as well. You need to set it so that the glass is rendered first on the model, then what is behind it (cockpit and hull).
Now how to exactly achieve this, I don't remember so I'll leave it for someone more experienced in modeling to answer. I always have to test it the hard way to get it right (I hit the issue first with the ringed planet for Cardinal Spear, and about a week ago with a certain skybox) but IIRC you need to set the glass as child of the hull... or maybe you need to set the hull as the child of the glass, I'm not completely sure. :nervous:
-
ah ok so actually my hierarchy is the following :
-Cockpit model is the parent
-hull
-glass 1
-glass 2
-glass 3
-glass 4
are all childs of the cockpit
anyway, thanks you for replying
edit :
Ok finnally i've set the glasses as sub objects of the hull and now that works greatly!
Anyway , my glasses aren't well placed, it sucked :nervous:
-
Now i come with another problem with those glass :
the shine map :
I ve set a full black shinemap, i don"t want environnement mapping on it.
I set a full black alpha chanel too , but ingame, the glasses keep to reflect the environnement no matter my alpha is black or white...
i use a dxt5 with alpha chanel for the shinemap, is it normal?
-
Having a full black shinemap with a black alpha channel is the equivalent of having no shinemap at all... :doubt:
Still, if environmental mapping is showing up when the alpha channel is black, then that alpha channel might not be getting into the DDS. DXT5 should be fine, though you might want to use 32 bit TGA just for testing purposes.
-
i used black/black for testing purpose ;)
now i ll try targa to see what happens
-
targa 32 bit tried :
I still have environnement reflection on my windows,
The difference i noticed beetwen full black and full white alpha chanel is that black alpha channel make reflections black but with the same strengh than a white one???
-
targa 32 bit tried :
I still have environnement reflection on my windows,
The difference i noticed beetwen full black and full white alpha chanel is that black alpha channel make reflections black but with the same strengh than a white one???
...I hope I took into account the shinemap alpha channel when I was coding the environment mapping shader <_<
-
the issue doesn't seem to appear on the hull where i got some enverionnement and shine, it just work fine (at least hard to notice).
I seem to have it only with the glasses of the cockpit view...
-
If the windows are assigned to the mediavp glass texture, changing your texture will have no effect on them.
-
no they aren't.
i made a special texture for it, as i wanted to be free to set the way it reflects inside the cockpit.
-
So i try this :
I open the shine texture with toshop and save as dxt1c (no alpha)
it should have no env... in fact it s still have a full env...
-
If the shinemap has no alpha channel, the environmental reflections are based on the RGB intensity of it.
-
so i should'nt have any with a pure black color right?
anyway, as i said , having a black alpha channel juste made my envmap reflect with black color...
edit : I use the latest nightly build fs2_open_3_6_10r-20090203_r5063.exe and the 3.6.10 mvp and my graphic card is a radeon hd4870 with the latest catalyst.
i attached the texture i use for my test
[attachment deleted by admin]
-
so i should'nt have any with a pure black color right?
anyway, as i said , having a black alpha channel juste made my envmap reflect with black color...
:wtf: Having a full white spec map will lead to full environmental reflections.
But I'm not sure you know what spectacular and environmental mapping are in FS terms. Spectacular mapping (controlled by the shinemap's RGB) is the general colored light reflections off of the hull, without any real definition to them. Environmental mapping is the reflected nebulae/planets/stars you sometimes see on areas like cockpit glass. Since I know I'm not very good at explaining things, you man wayt to try playing around in the Lab (F3 from the mainhall). Click "ships" and "render options" at the top of the screen, pick a ship, and play around with the "no spectacular map" and "no environmental map" options in the render options window.
-
you maybe misread me, i wrote black , i didn't wrote white color :D
i understand the way it works, i done some already for some ships and didn"t have any problem (i mean rgb for the shine and alpha for the env)
now, the way i understand it work, a full black rgb channel and full black alpha channel for a shine map should result with : no shiness and no env.
But it didn't happen to me :nervous:
so now , yes maybe i understood what you mean, having black color in rgb explain why my reflection goes black, but anyway i m looking for a way to reduce the env reflection (testing with full black alpha chanel and then trying slowly to make it more... grey)
-
Well, theoretically, that should have the same effect as no shinemap at all...
-
ok, so i think i ve found what was wrong, and that was not fs2 related...
Photoshop do not save alpha chanel into the dds or tga file if this one is pure black filled.
Thank you for your help, i ll try now if that works.
edit : Even with almost black alpha channel, the env is still there, well , i ll see that tomorrow.
-
If it's anything like making planets then when you create your Alpha channel, make sure the base layer is transparent or no color at all. Make a copy of the original file, then in that copy, create your Alpha channel. Save the Alpha channel. Then go back to your original and to the base layer, fill in your Black again. Apply the Alpha channel and save it. Then create your .dds file.
Should work. Good luck!