Hard Light Productions Forums
Modding, Mission Design, and Coding => FS2 Open Coding - The Source Code Project (SCP) => Topic started by: Bobboau on May 13, 2004, 10:22:56 pm
-
a lot of people have been commenting on environment mapping lately, but each of the recent ENV builds also has a far advanced version of the decal code it in it, though table changes and additional data files are needed. so I'm going to atach what you need and you can use any of the recent env builds to test it out.
-
You know the Golden Rule... No screenies, no downloads.
-
*downloads*
-
Hum...
What's the latest ENV build? :nervous:
-
well these are kinda old but you get the idea
(http://www.scifi-3d.de/wcsaga/Roy/decal1.jpg)
(http://www.scifi-3d.de/wcsaga/Roy/decal2.jpg)
(http://www.scifi-3d.de/wcsaga/Roy/decal3.jpg)
(http://www.scifi-3d.de/wcsaga/Roy/decal6.jpg)
-
Very nice, is it compatible with lightspeeds weapons??
-
i believe so but i'll have to check it again cause these screenies's where done when bob did the first decal
-
Say, I realise it's another set of textures to load but is it possible to have a different damage decal per weapon?
-
yer if you made different decals for different weapons like a massive burn hole where a beam has it, but its a little limited at the moment but i don't know you'd have to ask bob about it, he know more than i do
-
I can't see why not... if you can have a decal hit a ship you can have it specified that...
If that weapon is a Subach, use texture decal_subach.pcx
If that weapon is a Kaser, use texture decal_kayser.pcx
If that weapon is a "anything else", use texture decal_default.pcx
I'm no coder - but you see what I mean.
Just chucking the idea in the air for anyone to catch / make of it what they will. I don't plan to do this and I don't want to distract people from whatever else they're doing :)
-
I think you can specify which decal each weapon uses, can't you? So you don't need to have it coded...
$decal:
+texture:
+radius: 3.0
See? You can specify each decal on an individual basis.
-
Oh. Great. Well thats nice isnt it :D
-
Originally posted by Raa Tor'h
I think you can specify which decal each weapon uses, can't you? So you don't need to have it coded...
$decal:
+texture:
+radius: 3.0
See? You can specify each decal on an individual basis. [/B]
na thats just for what decal your using you ned to put that at the end of every weapon that will use a decal, so here's an extract from bob wep table on one decal
; Sidearm - Dogfight version
;
$Name: @Subach HL-D
+Title: XSTR("GTW Subach HL-7", 3246)
+Description:
XSTR(
"Standard Issue
Level 3 Hull Damage
Level 3 Shield Damage", 3247)
$end_multi_text
+Tech Title: XSTR("Subach HL-7D", 3248)
+Tech Anim: Tech_Subach_HL-7
+Tech Description:
XSTR(
"The Subach-Innes HL-7 is a xaser weapon, firing an intense, highly focused beam of x-ray emissions. Until the Shivans appeared with their shield technology, these weapons were considered an unnecessary and costly extravagance. But Great War dogfights against Shivan craft quickly taught the Allies that their ships didn't stand a chance unless they could punch through shields. The HL-7 works superbly against shields of all varieties and has become the standard issue Primary weapon for all Terran fighters and bombers.", 3249)
$end_multi_text
$Model File: none
; The following fields (preceded by @) are only required for laser
; rendering, which requires that "Model File:" be none.
; These are the same values that used to be hard-coded:
@Laser Bitmap: newglo9
@Laser Glow: 2_laserglow03
@Laser Color: 250, 0, 0
@Laser Color2: 0, 0, 250
@Laser Length: 10.0
@Laser Head Radius: 0.90
@Laser Tail Radius: 0.90
$Mass: 0.2
$Velocity: 450.0 ;; speed of the weapon (initially) -- may or may not change
$Fire Wait: 0.2 ;; in seconds
$Damage: 15
$Armor Factor: 1
$Shield Factor: 1
$Subsystem Factor: 0.3
$Lifetime: 2.0 ;; How long this thing lives
$Energy Consumed: 0.20 ;; Energy used when fired
$Cargo Size: 0.0 ;; Amount of space taken up in weapon cargo
$Homing: NO
$LaunchSnd: 76 ;; The sound it makes when fired
$ImpactSnd: 85 ;; The sound it makes when it hits something
+Weapon Range: 100000 ;; Limit to range at which weapon will actively target object
$Flags: ("player allowed" "stream")
$Icon: iconSD4
$Anim: SD4
$Impact Explosion: none
$decal:
+texture: bullethole01_A
+radius: 2.0
so the decal goes at the end with what ever decal your using
-
Well yeah. I was just showing that every weapon can have a different decal.
-
well of course you can i would be pretty useless if there was only one decal
-
If this works properly here (still have to test) I'm gonna give some decals a go, maybe. :)
-
new decal textures would be good, cause currently I have simply ripped them directly out of red faction, try to keep the total set to a minimum (ie don't make a seperate decal texture for each individual weapon) but some diversity is good.
-
I'm worried that something bad is about to happen so I just uploaded my codebase
http://freespace.volitionwatch.com/blackwater/code_5-14-04.zip
didn't want to commit becase I didn't want to put it in the CVS untill well after 3.6 relese, someone DL this just in case VW goes down again too. or if you want to see how I did things (and this would help you)
-
Although pure code will confuse me, I'll DL it and look anyway. Maybe I can actually learn something from it.
Edit: //sorce file for decals-Bobboau
//and no, I don't have any idea what I'm doing
:lol:
-
Here's a thought. Its already been discussed about the possiblilty for having different dammage decals for different weapons, but is it possible to have a glowmap for the texture as well? For example, I see beam weapons puncturing the outer hull and hitting some of the internal electronics. The standard dammage decal (much larger of course) would be applied for each weapon hit leaving a scar on the hull, which would have a glow map tiled along the scar at the center of each hitmark, indicating the exposed power conduits & such. Combining this with localized hull lightning (like when a ship gets below 25% hull or so) would be cool, but likely harder to impliment. Is any of this feasable?
[Edit]
Now that I think about it, a glow ani would be better than a standard glowmap, to give variations in the glow intensity for the exposed internals.[/Edit]
Later!
-
Take that one step further...how about ani-glowmapped decals. Dear god!!! The possibilities!! You could have a beam run across a ship's hull and leave behind the glowing wreck of hull plates, that would slowly fade away with time.
*sob* it's so beautiful in my mind... :')
-
I've already thought of all that, now I'm thinking about haveing something that will alow you to leave behind shattered hull plates that conform to the origonal texture, the idea being to give each ship a damage skin and use the alpha of a decal to blend that texture in over the non-damaged texture + scorching.
once I'm sure the basic decal system is working with out flaw the next thing I plan on doing is (after I get decals working for beams, that is going to be a nightmareish propasition) implement dynamic decals, decals that change texture from frame to frame, this wil alow me to then implement animated decals with animated glow maps, so you hit a ship it's hull busrsts into fire a second later the molten metal cools leaveing a scorched mark on the surface, I can also make some realy cool hit effects useing non-clipped decals set to disapear after the animation runs (this is a hit effect that Carl asked for specificly, I was already planing on implementing it)
so the current decal code, once determined to be solid will, then get beam decals and decals for subobjects (you may have seen that they don't show up on turrets, ect...) then I can start playing with new stuf
-
The damage texture is a VERY good idea.
-
What if we could splice a ship into materials (define areas of a texture) than make custom debris for each material?
As a hit effect each are could spew their own debris model.
-
Originally posted by Bobboau
the next thing I plan on doing is (after I get decals working for beams, that is going to be a nightmareish propasition) implement dynamic decals, decals that change texture from frame to frame,
One thing, this is all good and well and I absolutely am thrilled by the idea, I do have one minor remark...please, please, please, build in a max-distance at which this effect is shown...like it is not as if I am going to see any of it when the target is more than 500 clicks away from me...? I just pulled this from my hat, have absolutely no idea at what distance this would realy be still visible, but logically speaking this is detail that only should be visible within a certain range (thinking of how much power a GPU must have to keep a decent framerate and how much RAM this is going to cost to store all these ANI frames...)
-
Well, in theory you could have LODs for this... further out you might just get a slightly smudged black dot for each decal, which resolves itself as you get closer...
-
You'd probably only need 2 lods, one full and one about quarter-size. Anything beyond LOD1 isn't going to need them apart from Beam scars, I would have thought.
-
just make sure you have indepentent glow+enviroment/spec maps for the damage decals. last thing you want is for a charred mark to be shiny and reflective.
-
Is it possible to use an ani for the decal ?
That would be awesome. (at least for people with high end machines :) )
-
Just one thing, can you also make a flag to specify the frequency decal renderings for a beam, since a slasher beam going in an extremely wide arc across a hull can leave only three or four explosion effects right now, which looks kinda stupid.
-
Originally posted by DaBrain
Is it possible to use an ani for the decal ?
That would be awesome. (at least for people with high end machines :) )
What would be cool is if you could use an ANI that played to the end and then stopped.
You could make for some nice heat glow effects. But as it is now it would pulse around- something we dont want :p
-
Perhaps if there were two .ani files - an initial damage and a permenant one that plays immediately after and loops... so it could start with heavy fires and sparking then settle down to pretty much dark metallic damage with the occassional spark.
-
You could do that if looping ANIs work properly with it.
That's a pretty good idea, actually.
One ANI that starts with heavy fire and sparks and loops some sparks after the initial 'blast'.
-
as for beams, I intend to make a spline type thing that uses hit points every few fraction of a second to make a big giant swath of decstruction, on the ends of each spline there will be a capping texture, and there will be a tileing texture between the points in the pline. now the only realy hard part is that with the new decal code this may be extreemly hard to implement as it currently relys upon the UVs out of range not being rendered at all, so tileing of the traditional sence isn't going to work.
and the idea with the damage skin would be something like, you blast a ship with a big missle, then you see exposed internal suports and stuff, the texture would not be alighned to the decal but to the UV coords of the model.
-
I just thought of something - how are the textures being applied? I know HTL doesn't like ships with lots of textures, will this cause the same sort of performance drain you'd get with adding more textures to a ship?
-
yup, but there usualy won't be more than two or three textures per ship, and they tend to be the same two or three textures per ship, this is why I said not to give every weapon diferent decal textures.
-
1-animated decals for shield hit effect on capships
2-it may be good to have a different shine effect on the decal, overriding the original shine effect. In theory those damaged areas should be less specular than before the damage.
-
if you look at it now decals are totaly matte (well actualy they arn't even lit, but there so dark you don't realy see it)