Hard Light Productions Forums
Modding, Mission Design, and Coding => FS2 Open Coding - The Source Code Project (SCP) => Topic started by: Bobboau on May 22, 2004, 08:25:37 pm
-
the build (http://freespace.volitionwatch.com/blackwater/fs2_open_r_decal_5-22-04.zip)
the test data (http://freespace.volitionwatch.com/blackwater/decal_data.zip)
I'd also like to petition someone to make some good new decal art, everything currently is ripped out of Red Faction and I'd rather get new art if posable. and the glow/burn maps I made or the resuult of five minutes (for all of them total) of tooling around with some color/contrast/brightness controles, so, there realy ugly, let this serve as motivation to you out there makeing new content.
I've added two new features to the damage decals, first glow mapping, decals are lit now, so this will actualy do something, it doesn't suport animation, though I could probly enable it, but all decals would be useing the same frame at the same time (on a single ship at least). also I implemented a animated effect (doesn't use animated textures though) calling it a burn map, it's like another glow map that fades out over the course of however long you want (if you don't specify a time in the tables it defalts to 1 second).
as a result the decal table entry has been altered slightly
(optional)
$decal:
+texture:
[COLOR=skyblue]+backface texture:[/COLOR]
+radius:
[COLOR=skyblue]+burn time:[/COLOR]
in this build 'burn time' is actualy 'glow time' I just realised it, but that's irrelevent, it'll be 'burn time' in every other build from now on. it's in milliseconds
oh, and I nearly forgot to mention, becase decals are organised by texture, any given texture must use the same glow map/ burn mapp across all weapons, as a result you only specify the base texture in the tables, it'll look for texturename'-glow' and texturename'-burn' based on that.
-
This has env built in, too? I hope?
-
yes, all build I make from now on will have env and decals
-
Looks very nice indeed Bobb, especially with the mv_textures installed :D
The only thing I would say is, rather than have them die out after a specific amount of time, as they seem to now, just have a definable maximum per ship? It looks a little bit strange to be strafing a ship and waching your own hits fade away to leave unblemished hull :(
-
it shouldn't be leaveing an unblemished hull...
there should be a scorch mark, like the last version of decals you used (only haveing a orange glowing center), though there is only a set limit of how many you can have on a ship (this is imposed more for perfomence and resorce reasons than being a hard limit, though there are hard limits on the number of decals in the entier mission, and the number of polygons they can use colectively)
-
Question: Will the weapons.tbl eventually be put in as a part of the code, so it doesn' t break mods??
-
Another Question: for the limit, do you mean after it has x number of decals...
1. no more can be created?
or...
2. when you make a new one the oldest existing one disappears?
-
Originally posted by jdjtcagle
Question: Will the weapons.tbl eventually be put in as a part of the code, so it doesn' t break mods??
Is this in Reference to the Media VP?
-
no, to the decals... download
-
Hmmmm... these seemed to vanish after they had faded? And it was only me cos my wingmates had snuffed it ages ago, so I don't think it was hitcount :(
I'll keep testing and make sure I'm not losing it ;)
-
@Carl: after you hit the limit, it starts recyleing the first decal in the list, wich is probly the oldest, in fact I can't think of how it could not be the oldest, so yeas #2. though the limit and recycleing works on a per texture basis, so if you have a ship with 20 or so big bomb marks on it there not going to disapear becase fighters are takeing pot shots at it.
@jdjtcagle: no. that would be... stupid. if I made this hard coded, can you imagine the outcry I'd get from people who wanted to use this, and had no controle over it? no I'm following standard procedure for this sort of feature, it's a weapon specific thing so it needs to be made in the tables.
@Flipside: I can assure you, unless you'r pounding something insainely hard (like with fifty fighters) there should be marks left, if you'r seeing anything at all, you should see the decal left there. you sould be able to get I think about 150 decals on a cruser sized ship.
-
Hmmmmmmmmmm... Yes, it seems to be ok now, not sure what caused that, if it happens again, I'll see if I can figure it out :)
One little thing, I was playing around with a blast texture on photoshop, but it seems to slow the game down massively for some unknown reason, they are .dds file as opposed to the .tga ones, but I tried them first as .tga and the slowdown was just as bad :(
http://www.aqsx85.dsl.pipex.com/Blasts.zip
It could be the 128 x 128 size, but that doesn't really seem an excessive size :(
They are named after some of yours at the moment, since I was just using them to test with :)
-
Ishould mention that there are a few bugs to work out of this yet, for instance, some times, the wrong decal is told to burn, it's somewhat rare, but it's anoying the **** out of me.
the new blast mark looks very good.
-
Bob: I promised to do some decals - and I will definately do this :)
Might even give it a look today...
-
My poor Horus was covered in pot marks after playing 'Speaking in tongues.' Was fun.
-
screenshots you bastards!
-
LOL!
Heres the higher res versions of those burn marks if anyone wants to test them, they created an incredible level of slowdown on my machine, but then they are pretty large for impact stencils at 256 x 256 :)
http://www.aqsx85.dsl.pipex.com/BlastHi.zip
I'll try to get some screenies of this build today :)
-
Theres some odd slowdown with this, similar to what happens with the env maps (sometimes) - though here its more often.
(http://www.penguinbomb.com/lightspeed/SCPTest/decals.jpg)
This is the same ship, same number of decals, viewed from external camera mode. There seems to be a magic barrier - if I get closer my framerate gets literally halved - if I'm beyond the barrier it stays steady at 85 FPS. As you can see there's absolutely no LOD switching or anything in between so there should be no slowdown on approach whatsoever.
-
Do you have d3dmipmapping enabled?
-
Yes, I did, I've disabled it now and will give it a try once Lightwave has finished rendering :D
Flipside :)
Nope, still got slowdown.
-
Note: it was an odd guess, but i remember that d3dmipmapping creates a sort of LODding for texes. Since it creates the LODs itsself, it might have the maps scaled down when you are in the distance. Or it might have actually scaled the maps up :wtf: , when you close.
edit: spelling
-
The wierd part is that the damaged part of the ship just has to be in the same hemisphere as your FOV to start slowing down the computer, before they even appear on screen :(
-
For now, I'd rather have vertex painting than decals, wouldn't need them to go, and wouldn't look too bad imho.
-
I used the ones that came with Bob's zip so there shouldnt be that huge kind of slowdown.
-
Why are the decal marks red? Ships don't bleed last time I checked :D:D
-
becase I made a four second glow map for them.
the slowdown I'm thinking is from the dynamic decals, I origonaly tryed makeing a seperate list for them, but that was buggy as hell so I just had it look through the whole list to find ones that were still smoldering, wich worked, but also means that if you have a ship with 200 decals on it it's looking at 200 decals on that ship every frame, and that's not good, so I'll see if I can get that seperate list working, that should be nice and fast.
-
I think a priority should be given to weapons with a hell of a punch - a Helios will leave quite a noticeable dent, while a Subach won't.
Maybe decal data should contain this priority too.
-
each weapon is given a diferent decal texture, generaly I'd expect weapons of the same damage range to use the same decals (i.e., bombs would use a big scorched twisted metal texture, fighter weapons would use a small puny 'look ma' I nicked the paint' decal) so it sort of does this already.
-
oh, I know why it's so slow now, I such a freaking dunce, I commented out the thing to tell it not to rebuild the buffer every frame becase I wanted to look at it a few times, and I for got to turn it back on, so it was rebuilding the decal buffer every frame!
that said it was actualy going prety fast :D, I'll have another build up before the end of the night.
-
w00t. Now for the graffix peoples to fix the lame damage and we'll be set. :)
-
ok, I bandaided over a small crash error in the decal recycleing code (and god damned I have had more problems with that one function :mad: ) it'll keep it playable, but it might cause decals to stop working and probly will cause a (small) memory leak, but I'll fix it later.
this zip (http://freespace.volitionwatch.com/blackwater/fs2_open_Bobboau_5-23-04.zip) has been updated, lower end cards may also see an improved performence, as that build uses index buffers for everything but the decals (and small scale effects). on the other hand you may see random crashes while doing nothng, if it seems too crashy I'll post a build with index buffers disabled.
oh, and I supose I should mention that index buffers impose a poly limit of 21,845 triangles, yes, I know, it's quite restrictive, but we'll just have to get used to it I guess :)
-
screenshots!
-
but the current art is mediocer at best, and the cooler effects are animated.
-
ehhh... fine :rolleyes:
(http://freespace.volitionwatch.com/blackwater/bwodec01.jpg)
(http://freespace.volitionwatch.com/blackwater/bwodec02.jpg)
(http://freespace.volitionwatch.com/blackwater/bwodec03.jpg)
(http://freespace.volitionwatch.com/blackwater/bwodec04.jpg)
(http://freespace.volitionwatch.com/blackwater/bwodec05.jpg)
(http://freespace.volitionwatch.com/blackwater/bwodec06.jpg)
look at the smoldering death all over that bomber. :)
you've all seen the Vanir before, I nearly missed one of the ships you havn't see, you can still see part of the engine section if you look closely. and if you look closely you can sort of see some of the improvements I've made to the Golgotha. and while you'r looking at her, note all the little glowing pot marks covering her surface, burn baby burn :D
-
:lol: @ the censoring. ;)
-
Looks like it's been infected by the Beast (from HW:Cataclysm)
-
Using the new build, the odd slowdown's still there :doubt:
Also, I spotted two bugs:
1. Sometimes decals simply stop working (they appear for about 1/10 seconds, but seem to be facing me and are NOT aligned with the hull and then vanish) - Sometimes they get working again later or they wont work for the whole game
2. I got some decals 'floating above the hull' rendering in front of fire plumes and other stuff. They were in about 1 m height above the hull of the ship (but rendered correctly with their alpha). :wtf:
-
you are useing the build I linked to in my post not the one at the top of this thread right?
-
yes.
-
ok lets try this build, I think I've fixed the junk polys that would show up from time to time (every decal was given 1 too many polys becase one was always needed to work with, and I never got rid of it)
http://freespace.volitionwatch.com/blackwater/fs2_open_Bobboau_5-25-04.zip
-
Bob, what mission is that from? (PM me with the reply when you have the time) Because I've love to see shots from either E1M19 or E2M4.
The high poly Golgotha looks great in those shots, so does the Vanir.
-
um... I think it was... blindsided... yes, what ever mission number that was.
eh, the Vanir could look better, it's all scratched up.
and I have a version of it with it's normals done properly (auto-faceted) so it should be lit corectly as well.
if I have time I'll try to get shots from them, might have to post them internaly though (as there may be confedential materials involved)
-
me thinks the scorch marks have way too much red in them. limit the red to the very center on the marks.
-
yeah, that's the art issue I was talking about.
and I found something that's probly going to cause that build to crash, so, expect it
-
Try the ones I posted some days ago, Carl.
-
Originally posted by Bobboau
oh, and I supose I should mention that index buffers impose a poly limit of 21,845 triangles, yes, I know, it's quite restrictive, but we'll just have to get used to it I guess :)
that is per model right? I mean, throw 2 HTL-Fenris's and 2 hi-poly Anuket's in a mission and you got 20K+ poly's right there!
-
Hi Bob,
what campaign or mod are the screenshots from. I don“t think i have seen this ships before:eek: :confused:
-
BWO most likely.
-
:welcome:
Blah blah exits blah blah flamethrowers etc ;)
And it looks like BWO to me, though I'm intruiged by the 'Censored' ;)
-
the limit I mentioned is per texture per submodel,
the screens shots are from BWO, mission called blindsided in wich the Golgotha blows some **** up. :)
-
Can you fix the last build you posted so we dont have to expect it to crash? :)
-
you should probly expect crashes for a while, it has an incredably complex memory management system as a central part. thing is most of the problems seem to go away when I try to debug, so it's makeing it very hard to fix.
-
Well I gave this build a whirl. It seems that the particles have gone all funky.
(http://members.shaw.ca/deuteronomy/funk1.jpg)
What's causing this?
Also aside from the ruined particles, my FPS is horrible with this build, going down to the low teens when close to a Capship like the Fenris in the screenshot.
-
Originally posted by SA22C
Also aside from the ruined particles, my FPS is horrible with this build, going down to the low teens when close to a Capship like the Fenris in the screenshot.
And thats not even the HTL Fenris...:nervous:
And Low-teens FPS are not THAT bad. Mine hovers around 12.5 FPS when I'm chasing a craft with a particle behind it (using IPAndrews released BSG Stuff, which is not really fair on the HTL engine).
Good FPS for me is ~37.5. Then again I"m only runing 128mb of RAM. Hopefully I'll get some more soon...
-
The prob with the slow downs is easy to fix, just make them go away after say 15 seconds the FS engene can't handel them being there all the time its not built to. unless you make it so only missiles leave marks, or somthing that is not shot 24/7 this slow down prob will always be there.
-
They already go away after a certain ammount was fired from the same stuff.
-
The messed up particles is the -batch dynamic data flag in the launcher. Turn it off.
-
and that might also be what's causeing your slow down,
the decals are off in there own world, it's completly seprate from the rest of the FS code, and it is built from the ground up to be able to render absurd numbers of decals, the only thing that realy isn't working as best as it theoreticaly could is the burn pass.
-
and I just figured out what was causeing that crash I was mentioning, if a decal should ever fail to create (and it happens due to the culling mechanism being too agressive (need to work on that)) the bit that gets a new decal redy to be made from a model forgets to mantion to the rendering code that it's been changed, and thus it's vertex buffer never gets updated with the new geometry, and when the burn pass trys to access the verts in the vertex buffer for the last decal it's over shooting the vertex buffer, and this is very very _very_ bad.
I also reorganised the whole system (again) it's a lot more modular now, wich enabled me to get decals to work on submodels. the only thing is they won't work on turret barrels, but I might have a way to fix that, but it's extreemly low on the priorities.
nex build I post (or posably the last one I posted) also has an implementation of point sprites, RT was working on this, but the particle system is so unbeleaveably slow I had to do something (don't mean to step on toes RT) I made a thing that will render out a bunch of pointsprites quite speedaly and integrated it into the particle system, also integrated it into the bitmap drawing function so that is why thrusters and stuff are not going to look as good, just bare with it it'll get better, I'm going to try and get a build posted before I go to sleep, but if I can't get it decently stable before I pass out, it won't happen.
-
ok, I turned point sprites off for normal bitmap drawing becase suns were refuseing to draw and I don't have the energy to fight anymore, but particles are still useing my new batched pintsprite thingy, so if you see anything bad with particles this is why (this has nothing to do with the problem above), anyway that's just a bit of fore warning, the big thing is the decals, I played through a mission of BWO a rather intense mission that I died in, hear that I DIED FOR THESE DECALS DAMIT, eh I'm tired, what was I talking about again,... :wtf: em, play with the decals and post a lot so that when I wake up I can see all the happy people with burning scorch marks on them :D
http://freespace.volitionwatch.com/blackwater/fs2_open_Bobboau_5-28-04.zip
-
Hi Bobboau!!!
(I didn't want you to feel lonely when you woke up and saw you were all by your lonesome).
-
:doubt:
happy birth day too me,
happy... birth... day?
:(
-
Happy birthday, again, as in the thread in the main forum :)
I'm waay to tired to do anything but browse forums and read a book. I'll try this out later.
-
I was just kidding, but it is demoraliseing to be up to 3am working on something post it and 6 hours later nobody responds.
-
Hey, I responded!!! What am I, chopped liver? :(
-
I haven't been online for over 12 hours, if it's any consolation.. Otherwise I'd have DLed it and tried it, I'm sure. :nod:
Plus, you did post it at 3 in the AM... I sleep at around 12...
-
Originally posted by Bobboau
the screens shots are from BWO, mission called blindsided in wich the Golgotha blows some **** up. :)
I thought it was Blindsided :) Make sure you have the latest version I made. The events play out better, meaning that the Golgotha firing shots should be even more impressive.
-
just got the build. Will be testing it later on :D
-
Gonna nab that build as soon as I get home.
-
Deepblue: Using the quote tags in signatures tends to make them incredibly huge.
Bob: Okay, I've done some excessive testing with this build, and as always I've found out quite a few things (bad news first):
1) After playing a couple of missions, suddenly there seemed to be some missing textures. For example, the dark bits of the Demon destroyer weren't there, and the Lucifer was completely transparent, the Lilith cruisers also had no textures anymore. I quit the game, and restarted it - and alas, they were there again. I could NOT replicate this bug till now, but it might be worth being looked into.
2) Someone seems to have been fiddeling with the particles again screwing them up like when RT tried implementing the HTL particle system - they have the same issues as they had back then, they're way too small and seem to be spawned sometimes, and sometimes not at all.
3) The build still causes some odd slow-down (I think its down to env mapping) which it technically shouldnt.
(now for the good news)
4) No crashes whatsoever, it ran pretty stable except for the bugs listed above.
-
I've been screwing with the particles, exactly as you think, the old system will be preserved for people who don't have suport for point sprites.
I think bug #1 is the one I'm most concerned about
I'll make a comand line option (or two) for environment mapping, alowing you to disable it or turn off it's dynamic nature (switching render targets can lead to major slowdowns and environment mapping does it 7 times)
-
Well, the particles *do* work, but not as they should :wtf:
As for the env thingy... "turn off it's dynamic nature (switching render targets can lead to major slowdowns and environment mapping does it 7 times)" - what exactly does that mean, and how would it affect the in-game looks?
-
I'm talking about this when I say they're screwy: Click (http://www.penguinbomb.com/lightspeed/SCPTest/HugeProblems.jpg)
This is an image from an old bug report of mine on Mantis showing exactly the same situation (when RT was working on them).
-
do the particles seem to be diferent sizes (from one another) or are they all the same (wrong) size?
some cards may not allow point sprites to be diferent sizes, also check them in a default fov.
the turn off dynamic cubemaps will have virtualy no visable effect generaly, the only time you'd see a diference is if the mission incorporated animated background effects or if it was in subspace (in wich case you would see a very noteable diference). switching render targets is what you do when you render to a texture or something, so we switch the render target once for each of the faces of the cube (6) + 1 for returning it back to the back buffer.
well right now I think I've got the decal generation code to never generate illegitimate (containing fewer than 1 poly) decals again. there are some places on some ships that would never get a decal applyed, like the entirety of the Seraphis, nothing on that model will take to the decal code, and I'm not completly sure why, but I now have code wich I am confedent will never fail to generate decals. (about to test in 'surender belasarius', bet it doesn't work :doubt: )
-
meh... it's even worse than before :doubt:
-
I have an idea :rolleyes: :p
Wouldn't it be perfect then, to check if the mission is or isnt in subspace and THEN deciding which method to use for the env mapping?
That would speed up things and look exactly the same (as the subspace env is still animated). I think this would be the ideal setting for most people.
As for the particles: TBH no idea if they're all the same size; does a Radeon 9800 support differently sized point sprites?
-
Okay, more info:
I did some more testing, and managed to replicate the missing textures bug. It occurs almost every time I play several campaign missions in a row. It seems to appear after/while a mission has been loaded as in the first mission that is played they're still there, but in the briefing of the second mission they're already missing.
About 50% of the game's textures seem to vanish (went through the techroom after it happened) - there seems to be no order behind which vanish and which not (it's all mixed up).
Erm to replicate load up your favourite campaign, play a few missions in a row and check if the textures are still there.
-
hell I didn't even need to play two missions, all of the sudden Nephelems are gone, wonder what the hell is going on there, I havn't touched the texture system with a ten foot poll
-
you may be capping out the video card's texture memory with the decals eh? I had a similar problem back with Diablo 2 when I was using an 8mb card, went to 128mb card and the problem fixed itself... so somewhere, memory is not being released like it should...
just an idea here, not certain since I don't do any serious coding and don't have a clue with FSO's code
-
I've got some interesting numbers in the final mission, a total of only 522 decals ever get used, if everything is working right, this is the number of the most decals that are in mission at a time, only 3487 polys ever get used at a time also. (an average from this will show 6.68 poly per decal)
in the test I ran (final mission) 1234 decals are made (total more than half of these are recycled though) each one has an average of 9.357 polys, the average polys per decal has been an extreemly eratic number, it was 4.727 the first time I tested, and 6.412 the second time.
it seems that I over estimated how many polys and decals would be needed by nearly an order of magnatude, if these numbers hold up for the other mission I could probly get away with 3500 polys and 1000 decals (current prealocated block is 11000 polys and 5000 decals)
-
I think if it's running out of memory it starts swapping stuff back and fourth from system memory.
-
Yeah, and it then would whiten out the textures, not making them 'invisible'.
-
it might be an over write thing, god I hope not
-
I had the same bug as lightspeed using the 'fs2_openT-20040405'
build, in the second mission of the main campain. all the shiven ships textures went away, no shines no glows nothing but shield mesh, and engine glows, I still tryed to play the mission out, but descovered that I could fly right through the capship (cant remember the name) and my weapons had no effect on it, realy odd bug. have not tryed with any of the newer versions, but I've DLed the decal build and I'm trying to duplacate it now.
If I duplacate it, I'll post my system specs and shuch.
-
I'v spent much of the day trying to get this to happen in a debug build, why do these sorts of things never happen in the debug builds?
I'm thinking maybe a ship is getting it's textures freed when it shouldn't, and seeing as this isn't native to my code path, someone try to track down the earliest build were this does show up.
-
Originally posted by terren
I had the same bug as lightspeed using the 'fs2_openT-20040405'
build, in the second mission of the main campain. all the shiven ships textures went away, no shines no glows nothing but shield mesh, and engine glows, I still tryed to play the mission out, but descovered that I could fly right through the capship (cant remember the name) and my weapons had no effect on it, realy odd bug. have not tryed with any of the newer versions, but I've DLed the decal build and I'm trying to duplacate it now.
If I duplacate it, I'll post my system specs and shuch.
Post the specs anyway, please....
I've had this happen on 2 occasions:
1) When FS2 (retail, HOTU like) gave me an error about not finding a certain texture, that was just in the maps dir. Nothing unexpected
2) Sometimes a ship just ain't there, and only secondary (lock on!) weapons could harm it. Sometimes collision detections was forked as well, sometimes not. Engine glows would be there, I can't remember for shields.
-
yeah, I got #2, still no luck with reproducing it though. I'm hoping it was a one time thing.
specs
P4 3Ghz
1 Gig of ram
GeForce FX 5700 128Megs ram
640*480*32 res
using
-spec -glow -pcx32 -jpgtga -d3dmipmap -fps
lightspeeds weapon pack w/o decals
am I missing anything?
-
No, no, this is the bug Bob and I were talking about earlier.
Bumping from some posts back to Bob's attention:
Wouldn't it be perfect then, to check if the mission is or isnt in subspace and THEN deciding which method to use for the env mapping?
That would speed up things and look exactly the same (as the subspace env is still animated). I think this would be the ideal setting for most people.
So... is this possible? I think that's what would comfort most people.
-
yeah I guess I could do that, I don't think people would see that big of a diference even once animated backgrounds start getting used, though you'r still going to have slow downs in subspace missions.
-
Originally posted by terren
yeah, I got #2, still no luck with reproducing it though. I'm hoping it was a one time thing.
specs
P4 3Ghz
1 Gig of ram
GeForce FX 5700 128Megs ram
640*480*32 res
using
-spec -glow -pcx32 -jpgtga -d3dmipmap -fps
lightspeeds weapon pack w/o decals
am I missing anything?
Why are you running that monster of a machine on 640*480?
Are you using the media VP or any other high-res art?
-
Originally posted by Bobboau
yeah I guess I could do that, I don't think people would see that big of a diference even once animated backgrounds start getting used, though you'r still going to have slow downs in subspace missions.
Well, if it can't be helped :p
See, the slow-down is not mortal or anything, it's just annoying. And if it looks the same and runs faster that sounds like a very very good thing to do.
-
I happen to like 640*480 now if the text size scaled up along with everything else I'd push the envlope a bit, but as it is I get headaches from reading the text.
I'm using the new drive flares and weapon effects, also shine and glow maps. Forgot about those sorry.
-
I guess I have diagnosed the true reason: small monitor.
Hard to fix, though not vital for a gamer.