Hard Light Productions Forums
Modding, Mission Design, and Coding => FS2 Open Coding - The Source Code Project (SCP) => Topic started by: Bobboau on August 19, 2003, 04:45:52 am
-
http://freespace.volitionwatch.com/blackwater/fs2_open_c.zip
and I thought you needed something like pixel shader for ths
:)
BTW this will text weather DX handels texture stageing with multipassing is a card doesn't suport it.
-
Are those... mirrored surfaces?!
-
no
cell shadeing
-
That too :p
But I still see it... very cool! I think it's because the code for the shine-maps on the Ulysses are still in that build, and it looked shinier somehow. I'll shut up.
Love the Hecate though - tres cool, SD-1 mod anyone?
-
Originally posted by Bobboau
no
cell shadeing
what?
"d/l"
-
Screenshots!
-
tested it. yeah, well, it needs FS2 at a higher res :p
btw, transparency on the ulysses works, I don't undrestand why it doesn't on my valkyrie :doubt:
edit: ah, I think I know.
-
How about some screenshots people
-
Please! Show me a screenshot! I'm still stuck at work here! :D
Cheers
-
Bob, if you could add this and your shine mapping together, it'd look A-1 supa!
In truth, tho, it looks more like reflective surfaces than cell shading ;) But it's very good! :yes:
-
mmh, really,; it's not worth it :p
ok, I've found why transparency didn't work:
in modelview, the map must have the tag added to its name too, unlike the glow and specular maps.
But it's TOO transparent :p over my cockpit, it's about invisible unless it's over a black background ( which makes the thing look like that are in fact the windows on the other side that shows, coz you space space through them. Also, things that are very far away don't show the farther it is, the more opacity the transparent map gets.
-
*begins to chant* SCREENSHOTS SCREENSHOTS SCREENSHOTS! */begins to chant*
I have no idea what you guys are talking about so I don't know what this is. So please, show some screenshots!!! ;7
-
(http://www.swooh.com/peon/FreeTerran/bob/screen00.jpg)
(http://www.swooh.com/peon/FreeTerran/bob/screen01.jpg)
(http://www.swooh.com/peon/FreeTerran/bob/screen02.jpg)
(http://www.swooh.com/peon/FreeTerran/bob/screen03.jpg)
(http://www.swooh.com/peon/FreeTerran/bob/screen04.jpg)
-
(http://www.swooh.com/peon/FreeTerran/bob/screen05.jpg)
(http://www.swooh.com/peon/FreeTerran/bob/screen06.jpg)
(http://www.swooh.com/peon/FreeTerran/bob/screen07.jpg)
(http://www.swooh.com/peon/FreeTerran/bob/screen08.jpg)
(http://www.swooh.com/peon/FreeTerran/bob/screen09.jpg)
(http://www.swooh.com/peon/FreeTerran/bob/screen10.jpg)
-
you're never showing the right thing, free terran :lol:
the 3d shockwave is already in the previous build, this one basically just modifies the shading gradient, so intsead of having a smooth shadow gradient, you have a two steps gradient.
an exemple might help:
imagine a sphere with a light on a side: one side will be lit up, the other will be in shadows. on a normal build, the shadow will have a gradient, there will be a transition between the lit up and the shadowed sides. with this exe build, the shadow goes directly from "lit up" to "shadow", there's no transition ( like if the sphere was cut in two, one side is all the same color, the other side is all dark, with a defined edge between them ). now to add outlines, Bob ;) ( I can do that alrady, but that will basically double the polycount of any ship ).
-
:lol: :lol: Oh sorry i donno it :lol: :lol:
-
The original explosion effect was much better.
-
This build doesn't work for me. I mean it loads, but all the ships are completely transparent except for at 2 oddball angles... :(
Edit: Did I say Transparent? I mean invisible. Only thruster plumes...
-
(http://freespace.volitionwatch.com/blackwater/cell01.jpg)
(http://freespace.volitionwatch.com/blackwater/cell02.jpg)
(http://freespace.volitionwatch.com/blackwater/cell03.jpg)
-
BTW this might not work on anything other than radeon cards as it uses 3 texture stages were most cards only suport 2, but DX is suposed to multi-pass in these cases or at least this is what I have been told
-
So, Freespace has gone Anime... does this work on all cards or just the newer ones? Anyway, looks like it'd be perfect for a campaign like Deus ex Machina, but I think I still prefer my FS-looking ships for more serious stuff.
EDIT: well you beat me to it, nevermind about the card question.
-
I'm going to have to add some way of setting the background color
-
Play the Robotech mod with that enabled.
-
Would have been good for something like the robotech mod though.
-
Hey bob! What's so special on that Artemis? I can see the changes on the Hecate, but the Artemis appears to be unchanged for me.
-
you can't see the stepped lighting gradient?
-
i think the 3d shockers suck.....
-
I second that...:p
What I'd really like to see is planar shockwaves like in Prophecy or StarLancer. They are scientific nonsense, but they are the coolness!:cool:
-
I gotta try this with the RT mod :D
I'm downloading it right now, heheheee....
-
Originally posted by Bobboau
I'm going to have to add some way of setting the background color
No. that can be done by modders, and anime ( I just pick an exemple ) have very elaborate backgrounds, not plain ones like US cartoons.
-
Bob, this might intrest you:
http://freespace.kefren.be/screenshots/screen00.jpg (http://freespace.kefren.be/screenshots/screen00.jpg)
http://freespace.kefren.be/screenshots/screen01.jpg (http://freespace.kefren.be/screenshots/screen01.jpg)
http://freespace.kefren.be/screenshots/screen02.jpg (http://freespace.kefren.be/screenshots/screen02.jpg)
This is what i get with this build :(
The card is an ATI Rage Fury Pro
Cheers
-
BTW, it's not every ship that has this, the amazon drone eg is rendered completely, but i think no shine/cell shading...
(Unless that's not visible in the techroom?)
PS: Joystick is *still* working here ;)
Cheers
-
Originally posted by Bobboau
Anime Hecate pics
:eek:
-
i guess your next order of buisness bob is to make it as compatable with various hardware as possible.
-
GeForce4 MX440's don't support 3 texture stages :(
Flipside :D
-
Cellshading support is going to be great for some mods.
Similarly with some tender loving care, 3d shockwaves can be made to look very impressive.
-
Originally posted by Ace
Cellshading support is going to be great for some mods.
Similarly with some tender loving care, 3d shockwaves can be made to look very impressive.
well, the shockwave just needs a better pof. I bet Bob didn't spend more than 5 minutes making it :p
-
3d shockwaves also need to be 3d instead of models in the background (i.e.-they need to go through things, like in Descent 3)
-
when I tested it, they were going through stuff, so I don't really know what you're talking about...
-
I think what is causing the confusion here is that the shockwave is non-transparent, so anything inside it is invisible?
Try this......
Not perfect, this is just a throw together, but you get the idea.
www.aqsx85.dsl.pipex.com/Anims/Shockwave.zip
Flipside :D
P.S. Did you know that -trans-glow will make a glowing transparency texture ;)
Par example -
www.aqsx85.dsl.pipex.com/Anims/Shock2.zip
Another WIP
-
Just realised what is going wrong here....
You need 2 spheres for the shockwave, one with the polys facing out, the other with the polys facing in, else you don't see the back of the Shockwave through the front.
Will look into it tomorrow :)
Flipside :D
-
would be super easy to make. *goes into TS and makes t spheres*
-
the shock wave should be doing that,
and you people know that the middle of the shock wave is rendered with more transparency than the edges right, it used aditive alpha with the alpha values determined by the angle between the normal of each vertex and the camera, a poly that is faceing strait at you will be completly transperent while a poly faceing to the side will be opace.
and I spent about fifteen minutes on the model becase the plugin for geodecics didn't work in TS5 and I had to get TS4.2 running again but after that it was about maybe a minute of work for the model and the map.
if someone would make me a decent explosion I'd be willing to try out modeled fire balls.
Venom, were the hell is that Arcadia model you made!!
also if the lighting is not to anyones likeing you can change it by editing cellmap.pcx, I don't think anything not in the first row of pixels will be used. and people who have been haveing rendering problems, look at any ship that does not have a glow map, the glow mapping is the third texture stage so if that is whats giveing you problems it will show up there
-
Bobbau, how are you doing cel-shading? I'm assuming texture stage 0 is the base texture, texture stage 1 is the lighting texture with D3DCOLOROP_MODULATE, and texture stage 2 is glowmap with an add?
-
I just updated, it won't be any more compatable but I changed the texture filtering to point rather than liniar during cell shadeing (for the lighting) so it have sharper diliniation between the lighting bands, wich should be better looking.
I'm going to look into makeing it more compatable now
-
Totally unrelated, but I just got a Radeon 9800 Pro All-in-Wonder for free! Whee! :D
On the topic, I kind of disagree about the bilinear filtering matter. If you'd played Zelda: The Wind Waker, you'd agree that it looks terrific there with the bilinear filtering. But, tthe more I think about it, the more sure I am that it's due to the average size of a polygon there being much smaller.
How about also drawing the silhouttes? On the other hand, that might not be viable, since graphics cards are terribly slow at drawing anti-aliased lines.
-
it's kind of hard to explain how I did it if you don't know how cell shadeing works, but basicly the first stage is defuse + base texture (defuse is currently set to full bright) then the second modulates the cellmap texture, then a third stage is the glow map added on.
now the second stage has a seperate UV coordanants in wich the U is based on the intinsity of the of the lighting values, and v is set to 0
also I just updated a new version that should be more compatable
-
Originally posted by Bobboau
it's kind of hard to explain how I did it if you don't know how cell shadeing works, but basicly the first stage is defuse + base texture (defuse is currently set to full bright) then the second modulates the cellmap texture, then a third stage is the glow map added on.
now the second stage has a seperate UV coordanants in wich the U is based on the intinsity of the of the lighting values, and v is set to 0
also I just updated a new version that should be more compatable
Adunno how it is in Direct3D, but in OpenGL you can simply use 1d texturing for it. If you want diffuse to be fullbright, the color op in stage one should be select_arg1 (or arg2, depending on which is the texture), which will simply discard the diffuse color. At least as far as I remember. Play aroud with mfctex. It's useful to learn about how Direct3D behaves with blending modes
Edit: After some checking around, Direct3D does support 1d textures. Also, make the texture a luminance texture instead of RGB. Saves video memory.
-
"select_arg1 "
why am I such a dunce?
/*shakes head*/
/*smacks self*/
changeing that to a luminence map wuld probly be more hassle than it's worth, and yes DX does suport 1d textures as well as 3d and (don't ask how) 4D, I just had a set of 2d coords set up alredy from my little environment mapping experement and decided not to bother mucking about with the FVF (also I was thinking there might be a way to make a colored light map, but after a while I realised it was more work that I was thinking it was going to be)
-
So in theory an opposite shockwave with the center opaque and the edges translucent could be done? To simulate a spherical nuclear detonation?
-
yes it's just a mater of literaly changeing one flag
but this isn't about the explosions, this is about the cell shadeing, someone post pics of the various mods that will benefit from this
-
Well, i'm still having the problem that most ships show up as completely white blobs (See links in previous post) while other ships work.
The exe itself seems stable, doesn't crash or anything, it's just that the ships are white blobs (looks like they're not loading any textures at all) while others are.
The specular build however doesn't have this problem, so it must be a big in this one :)
Cheers
-
Originally posted by Bobboau
Venom, were the hell is that Arcadia model you made!!
k, I'm gonna try it and post pics, but the maps were overdetailled, I doubt that will do anything good.
edit: up, as I suspected... in fact, the thinng looks like there's 100% ambient lightning, like there's no shadows on it at all. I'll post a couple pics when swooh lets me connect myself :doubt:
-
Hey, that's mighty impressive. Errr, good effort Free Terran :D
-
Sorry Bob, you're right about the shockwaves, they do already do that, that'll teach me to attempt modding at 2am ;)
Flipside :D
-
(http://www.ebaumsworld.com/forumfun/positive5.jpg)
-
Bobbau, what's wrong with splitting it up to two passes, if you detect the hardware doesn't have enough texture stages (should be in the hardware caps (It seems that DirectX isn't doing multipass by itself. Sorry about that one :( ).
-
it should be doing that now,
void set_stage_for_cell_shaded(){
if(current_render_state == CELL)return;
d3d_SetTextureStageState(1, D3DTSS_MINFILTER, D3DTEXF_POINT );
d3d_SetTextureStageState(1, D3DTSS_MAGFILTER, D3DTEXF_POINT );
d3d_SetTextureStageState( 0, D3DTSS_COLORARG2, D3DTA_DIFFUSE);
d3d_SetTextureStageState( 0, D3DTSS_COLORARG1, D3DTA_TEXTURE);
d3d_SetTextureStageState( 0, D3DTSS_COLOROP, D3DTOP_SELECTARG1);
d3d_SetTextureStageState( 1, D3DTSS_TEXCOORDINDEX, 1);
d3d_SetTextureStageState( 1, D3DTSS_COLORARG1, D3DTA_CURRENT);
d3d_SetTextureStageState( 1, D3DTSS_COLORARG2, D3DTA_TEXTURE);
d3d_SetTextureStageState( 1, D3DTSS_COLOROP, D3DTOP_MODULATE);
d3d_SetTextureStageState( 2, D3DTSS_COLOROP, D3DTOP_DISABLE);
current_render_state = CELL;
}
void set_stage_for_cell_glowmapped_shaded(){
if(current_render_state == GLOWMAPPED_CELL)return;
d3d_SetTextureStageState(1, D3DTSS_MINFILTER, D3DTEXF_POINT );
d3d_SetTextureStageState(1, D3DTSS_MAGFILTER, D3DTEXF_POINT );
d3d_SetTextureStageState( 0, D3DTSS_COLORARG2, D3DTA_DIFFUSE);
d3d_SetTextureStageState( 0, D3DTSS_COLORARG1, D3DTA_TEXTURE);
d3d_SetTextureStageState( 0, D3DTSS_COLOROP, D3DTOP_SELECTARG1);
d3d_SetTextureStageState( 1, D3DTSS_TEXCOORDINDEX, 1);
d3d_SetTextureStageState( 1, D3DTSS_COLORARG1, D3DTA_CURRENT);
d3d_SetTextureStageState( 1, D3DTSS_COLORARG2, D3DTA_TEXTURE);
d3d_SetTextureStageState( 1, D3DTSS_COLOROP, D3DTOP_MODULATE);
d3d_SetTextureStageState( 2, D3DTSS_TEXCOORDINDEX, 0);
d3d_SetTextureStageState( 2, D3DTSS_COLORARG1, D3DTA_CURRENT);
d3d_SetTextureStageState( 2, D3DTSS_COLORARG2, D3DTA_TEXTURE);
d3d_SetTextureStageState( 2, D3DTSS_COLOROP, D3DTOP_ADD);
current_render_state = GLOWMAPPED_CELL;
}
void set_stage_for_additive_glowmapped(){
if(current_render_state == ADDITIVE_GLOWMAPPING)return;
d3d_SetTextureStageState( 0, D3DTSS_COLORARG1, D3DTA_DIFFUSE);
d3d_SetTextureStageState( 0, D3DTSS_COLORARG2, D3DTA_TEXTURE);
d3d_SetTextureStageState( 0, D3DTSS_COLOROP, D3DTOP_MODULATE);
d3d_SetTextureStageState( 1, D3DTSS_COLOROP, D3DTOP_DISABLE);
current_render_state = ADDITIVE_GLOWMAPPING;
}
snipet
...
if(cell && cell_enabled){
if(GLOWMAP < 0){
d3d_SetTexture(2, NULL);
d3d_SetTextureStageState( 2, D3DTSS_COLOROP, D3DTOP_DISABLE);
set_stage_for_cell_shaded();
}else{
gr_screen.gf_set_bitmap(GLOWMAP, gr_screen.current_alphablend_mode, gr_screen.current_bitblt_mode, 0.0);
d3d_tcache_set_internal(gr_screen.current_bitmap, tmap_type, &u_scale, &v_scale, 0, gr_screen.current_bitmap_sx, gr_screen.current_bitmap_sy, 0, 2);
if(d3d_caps.MaxSimultaneousTextures > 2)
set_stage_for_cell_glowmapped_shaded();
else
set_stage_for_cell_shaded();
}
gr_screen.gf_set_bitmap(cell_shaded_lightmap, gr_screen.current_alphablend_mode, gr_screen.current_bitblt_mode, 0.0);
d3d_tcache_set_internal(gr_screen.current_bitmap, tmap_type, &u_scale, &v_scale, 0, gr_screen.current_bitmap_sx, gr_screen.current_bitmap_sy, 0, 1);
for (i=0; i {
//d3d_verts[i].color = D3DCOLOR_ARGB(255,255,255,255);
d3d_verts[i].env_u = ((verts[i]->r + verts[i]->g + verts[i]->b)/3)/255.0f;
d3d_verts[i].env_v = 0.0f;
}
d3d_DrawPrimitive(D3DVT_TLVERTEX, D3DPT_TRIANGLEFAN, (LPVOID)d3d_verts, nverts);
if(d3d_caps.MaxSimultaneousTextures < 3){
gr_screen.gf_set_bitmap(GLOWMAP, gr_screen.current_alphablend_mode, gr_screen.current_bitblt_mode, 0.0);
if ( !d3d_tcache_set_internal(gr_screen.current_bitmap, tmap_type, &u_scale, &v_scale, 0, gr_screen.current_bitmap_sx, gr_screen.current_bitmap_sy, 0, 0)) {
mprintf(( "Not rendering specmap texture because it didn't fit in VRAM!\n" ));
return;
}
set_stage_for_additive_glowmapped();
gr_d3d_set_state( TEXTURE_SOURCE_DECAL, ALPHA_BLEND_ALPHA_ADDITIVE, ZBUFFER_TYPE_READ );
d3d_DrawPrimitive(D3DVT_TLVERTEX, D3DPT_TRIANGLEFAN, (LPVOID)d3d_verts, nverts);
gr_d3d_set_state( texture_source, alpha_blend, zbuffer_type );
}
return;
}
...
-
What I'd like to see are the OTT ships cel-shaded since the designs are anime-influenced :)
-
Originally posted by Ace
What I'd like to see are the OTT ships cel-shaded since the designs are anime-influenced :)
they wouldn't look any different, you need dead flat colors to have any obvious effect. I tried the macross YF19 I did with cell shading, which has basic shading drawn on the maps, well, that was enough to render the effect impossible to see. you need pure white for exemple. s I'd have to reskin all the ott ships so it works ;).
-
could you do just one :D
not even a realy good job, just enough to show off the efect
-
bah, I'll see about it. Tell me the ship you wanna see, at least.
-
there's a few of them, but I think a few of the vasudan ones would look best (as there smooth shaded)
I'd say this'n
(http://www.3dap.com/hlp/staff/maeglamor/OTT/aoh.jpg)
or this'n
(http://www.3dap.com/hlp/staff/maeglamor/OTT/mihos.jpg)
you know they'd probly look good without any modification at all
-
well, I still can't access my swooh ftp :( the site iteslf works, but the ftp account doesn't, it connects, but it stops at "wainting for welcome message". kindda bothersome when you wanna show someting :sigh:
-
Bob, just to let you know, the latest exe did work properly, i can see cell shading ;)
WOOHOO! ;)
Cheers