Hard Light Productions Forums

Modding, Mission Design, and Coding => The Modding Workshop => Topic started by: Admiral Nelson on October 25, 2005, 09:03:32 pm

Title: Texture Replacement File Locations
Post by: Admiral Nelson on October 25, 2005, 09:03:32 pm
Sorry for asking what must be a dumb question,  but where does FRED look to find textures used in the texture replacement feature.  If I specify the name of a texture included in one of the Media vps, it hasn't any issue.  If I specify the name of a texture in data/maps, it gives me a message 'FRED could not find texture xxxx.'  What am I doing wrong???
Title: Texture Replacement File Locations
Post by: WMCoolmon on October 25, 2005, 10:48:28 pm
Make sure you're running with the right -mod parameter in FRED.
Title: Texture Replacement File Locations
Post by: Admiral Nelson on October 25, 2005, 11:07:09 pm
Well, now I think it actually didn't like the file format of the nameplate I used.  I substituted a stock nameplate from the collection linked to by the Oracle and got FRED to accept it.  However, the nameplate doesn't show up in mission, though I see the entry
$Texture Replace:
+old: capital01-05a
+new: agamemnon

when opening the mission file in Textpad.
Title: Texture Replacement File Locations
Post by: StratComm on October 25, 2005, 11:10:04 pm
I'm guessing you were trying to use 24-bit PCX.  There's something fishy with texture replacement right now, though I'm not exactly sure what.
Title: Texture Replacement File Locations
Post by: Admiral Nelson on October 25, 2005, 11:11:48 pm
Yep, you are right.  Still even the ancient 8 bit PCX files from the standard pack don't seem to replace, either.
Title: Texture Replacement File Locations
Post by: StratComm on October 25, 2005, 11:16:46 pm
Trashman complained of the same thing not that long ago, actually.  Have you tried both forms of texture replacement?
Title: Texture Replacement File Locations
Post by: Admiral Nelson on October 25, 2005, 11:28:58 pm
Well, what do you know? Using
$Duplicate Model Texture Replace:
+old: capital01-05a
+new: gtdcarthage

it works just fine, even with my homebrew file.  The other form didn't work at all.


(http://img.photobucket.com/albums/v106/NelsonAndBronte/FS2/Carthage.jpg)

As you see, I'm trying to find ways to do something useful with my presently limited skill set. :)
Title: Texture Replacement File Locations
Post by: StratComm on October 26, 2005, 12:51:52 am
Needs.... more.... light.....

But I'm glad you got the replacement working, it makes using nameplates useless otherwise.
Title: Texture Replacement File Locations
Post by: Admiral Nelson on October 26, 2005, 01:39:10 pm
Is there a reason why there would be a color shift of the Fenris nameplate from the dark side to the lighted side?  My Orion nameplates do not display this behavior.  The stock supplied GTC Orff nameplate does this too.

(http://img.photobucket.com/albums/v106/NelsonAndBronte/FS2/GCTRampartWhite.jpg)

(http://img.photobucket.com/albums/v106/NelsonAndBronte/FS2/GCTRampartGrey.jpg)
Title: Texture Replacement File Locations
Post by: StratComm on October 26, 2005, 01:45:13 pm
No shinemap.  This is why I encourage using an alpha channel, so that you don't have to worry about the shinemap lining up.
Title: Texture Replacement File Locations
Post by: Goober5000 on October 26, 2005, 02:25:08 pm
Quote
Originally posted by Admiral Nelson
Well, what do you know? Using $Duplicate Model Texture Replace it works just fine
Yeah, the original way is still broken (must be ages now).  I still need to get it fixed. :D
Title: Texture Replacement File Locations
Post by: Admiral Nelson on October 26, 2005, 04:01:03 pm
Next stupid question, sorry... :)

I've tried adding an alpha channel (using photoshop elements) and just ended up ruining the transparency.  Do I need to create a GTC_Orff-shine.pcx file to go along with these?  Or do I need individual named shinemaps for each nameplate?  Finally what is the advantage to using a fully transparent map such as this one, where the Orion and hi poly Faustus, for instance, have chunks of the actual hull as part of the nameplate.

Thanks!
Title: Texture Replacement File Locations
Post by: Vasudan Admiral on October 26, 2005, 05:06:35 pm
Oh dear, big smoothing errors in the fenris rear there, not to mention that the map is being weird with the lights. Are you certain that's the fenris in the latest VP's? I was _sure_ I'd fixed the latter prob. :\

*checks*
Oh no, WMC stuck in the wrong glowmap - that's not the one I supplied with the HTL pack. :(

Well, that's another thing for me to fix with the next batch I guess, along with sorting out nameplates (they were supposed to use a map named "nameplate", not "GTC_Orff") and the rest. :\

Anyway, to get alpha-transparency, you should save the nameplate as a .dds file or tga. 8 bit PCX doesn't have a transparency AFAIK. :)
Title: Texture Replacement File Locations
Post by: Admiral Nelson on October 26, 2005, 05:21:53 pm
Well, I can't seem to get good results with the transpartent nameplates.  The non transparent type seems to be okay:

(http://img.photobucket.com/albums/v106/NelsonAndBronte/FS2/Hinton.jpg)

Is inclusion of the alpha channel itself enough to govern the shine, or am I misunderstanding what needs to get done?
Title: Texture Replacement File Locations
Post by: StratComm on October 26, 2005, 06:54:21 pm
Ok, number one, if you're intending to use alpha maps (tga/dds) for nameplates, you have to stop using pure green for the invisible channel.  Instead, set the regions you don't want to display to 0% alpha (fully transparent).  The only real advantage of alpha-channel transparency is that it isn't on or off; you can set the nameplate itself to be partially transparent and to show the texture underneath through.  Because the plates below will shine through the nameplate in this case, you get the shine taken care of for free as well.  Otherwise, you need to create a shinemap for the nameplate.
Title: Texture Replacement File Locations
Post by: Admiral Nelson on October 26, 2005, 08:59:31 pm
OKay I've got all the transparency stuff figured out. As you see, the hull plates do shine through.  WhatI still don't understand is why if the color originally used for the text is pure white(Red 100%, Blue 100%, Green 100%, Alpha 75%),  why does this appear grey?

(http://img.photobucket.com/albums/v106/NelsonAndBronte/FS2/GCTRampartGreyTransparent.jpg)

(Yes I know that RAMPART isn't a destroyer, I fat fingered the text box :) )
Title: Texture Replacement File Locations
Post by: Vasudan Admiral on October 26, 2005, 09:09:42 pm
Does it appear pure-white if you set the alpha to 100% as well?
Title: Texture Replacement File Locations
Post by: Admiral Nelson on October 26, 2005, 09:12:31 pm
If you look back up a few posts,  it was appearing whitish on the dark side, and greyish on the lighted side, evidently due to no shinemap.  I ended up converting your GTD_Off.pcx to TGA, typing the white text on a transparent background, then adjusting the text alpha to 75%.
Title: Texture Replacement File Locations
Post by: Vasudan Admiral on October 26, 2005, 09:18:14 pm
That's what I mean - "the text is pure white(Red 100%, Blue 100%, Green 100%, Alpha 75%) why does this appear grey?" - I'm thinking it appears grey because of the 75% you used as the alpha - the way to test it is to see if giving the text 100% alpha results in pure-white text. :)
Title: Texture Replacement File Locations
Post by: StratComm on October 26, 2005, 09:25:43 pm
It doesn't.  It's doing that because it's defaulting to no-shine, while the hull underneath is getting shinemapped to a brighter level.  Try turning off spec and see if it still does that.
Title: Texture Replacement File Locations
Post by: Admiral Nelson on October 26, 2005, 09:26:45 pm
Olay, that makes it look greyer... :)

(http://img.photobucket.com/albums/v106/NelsonAndBronte/FS2/GCTRampartGreyerTransparent.jpg)
Title: Texture Replacement File Locations
Post by: Admiral Nelson on October 26, 2005, 09:29:21 pm
Still grey with spec turned off.
Title: Texture Replacement File Locations
Post by: Vasudan Admiral on October 26, 2005, 09:43:32 pm
Could perhaps giving it a shinemap help? (purewhite text on pureblack background)
(I can't test any of this myself just yet sorry)

Seems really weird so far. :\

Oh, it still looks to be a bit transparent in that last pic - if the alpha is 100% it should be opaque solid colour.
Title: Texture Replacement File Locations
Post by: StratComm on October 26, 2005, 09:53:16 pm
Quote
Originally posted by Admiral Nelson
Still grey with spec turned off.


A shinemap would probably help.  I need to look in to this, but is it still darker than the hull like that?  Or just grey because of lighting?
Title: Texture Replacement File Locations
Post by: Admiral Nelson on October 26, 2005, 09:59:12 pm
I wouldn't rule out some form incompetence on my part.  :) Just in case, here are the two TGAs I made:

Clicky (http://www.fileh.com/NelsonAndBronte/Rampart.zip)
Title: Texture Replacement File Locations
Post by: StratComm on October 26, 2005, 10:24:47 pm
Looks right to me.  I compared it with a "white" texture under the same lighting conditions and it looked perfectly normal in OGL.  It also looks exactly like the default nameplates that I've been distributing with ships for a while now.  I didn't try it on a Fenris, I'll admit, but I can't see why that would act any different.
Title: Texture Replacement File Locations
Post by: Admiral Nelson on October 26, 2005, 10:44:00 pm
I'm wondering if this is some odd consequence of grey ship and white sun making things look strange.  I changed to a gold sun,  and it still looks greyish to me, though.

Eh, I'm just going to start cranking through these.

(http://img.photobucket.com/albums/v106/NelsonAndBronte/FS2/UhuruArtemis.jpg)

(http://img.photobucket.com/albums/v106/NelsonAndBronte/FS2/UhuruBoom.jpg)
Title: Texture Replacement File Locations
Post by: StratComm on October 26, 2005, 11:14:59 pm
I'm not able to reproduce that effect under any circumstances actually :wtf:  What kind of card are you using?  And how are you running FSO?
Title: Texture Replacement File Locations
Post by: Admiral Nelson on October 26, 2005, 11:20:15 pm
I have a GT 6800; D3D
F:\Games\FS2\fs2_open_r.exe -spec -glow -pcx32 -jpgtga -2d_poof -cache_bitmaps -orbradar -ship_choice_3d -3dwarp -warp_flash -snd_preload -env  -ambient_factor 85 -fov 0.39 -allslev
Windows 2000.

Did you place that nameplate on a Fenris and see how it appears on your own system?
Title: Texture Replacement File Locations
Post by: StratComm on October 26, 2005, 11:26:26 pm
Yeah I did.  It's always lighter than the Fenris hull.  This could be environment mapping being wierd, but that's about the only thing I can think of at this point.

And for the record,
X800XT, OGL (prefered, I looked in D3D too)
C:\Games\FreeSpace2\fs2_open_r-20051024.exe -spec -glow -jpgtga -nomotiondebris -2d_poof -ship_choice_3d -3dwarp -snd_preload  -ambient_factor 85
Windows XP

I don't use PCX32, but that's not going to do that.  The only other thing that could be altering bitmap rendering at all is going to be -env, which you should try disabling.
Title: Texture Replacement File Locations
Post by: Flipside on October 26, 2005, 11:36:25 pm
Hmmm... is -env still using the technique where the alpha-map is defining the Environment mapping? If so, that could be causing a problem?
Title: Texture Replacement File Locations
Post by: StratComm on October 26, 2005, 11:50:35 pm
Actually that's -alpha_env, but that would cause the entire face (the invisible parts too) to reflect.  Plain old -env might be causing the name to reflect a blue-grey nebula back at some strange UV aspect though.
Title: Texture Replacement File Locations
Post by: Admiral Nelson on October 27, 2005, 02:43:45 pm
They seem to look okay in an actual mission.  I changed to OpenGL, so no env mapping anyway.  Opinions?

(http://img.photobucket.com/albums/v106/NelsonAndBronte/FS2/RampartProfile.jpg)

(http://img.photobucket.com/albums/v106/NelsonAndBronte/FS2/RampartBeams.jpg)

(http://img.photobucket.com/albums/v106/NelsonAndBronte/FS2/Refute.jpg)

(http://img.photobucket.com/albums/v106/NelsonAndBronte/FS2/Repulse.jpg)

(http://img.photobucket.com/albums/v106/NelsonAndBronte/FS2/Majestic.jpg)

(http://img.photobucket.com/albums/v106/NelsonAndBronte/FS2/Repulse2.jpg)
Title: Texture Replacement File Locations
Post by: Admiral Nelson on October 27, 2005, 06:23:46 pm
Okay, now I've got nameplates for all the ships in FS2 that have nameplates available (Fenris, Leviathan, Aeolus, Orion and Faustus classes).  There's one important issue yet remaining in this little project:

(http://img.photobucket.com/albums/v106/NelsonAndBronte/FS2/DeimosTurrets.jpg)

Anyone care to help me out with this one?? :)
Title: Texture Replacement File Locations
Post by: FireCrack on October 27, 2005, 07:40:40 pm
i pwersonaly add some cloud and noise filters to the alpha channel for a "paint" effect
Title: Texture Replacement File Locations
Post by: WMCoolmon on October 27, 2005, 08:29:40 pm
I'm not seeing the prob in that last image?
Title: Texture Replacement File Locations
Post by: StratComm on October 27, 2005, 08:34:39 pm
There's not a nameplate on the Deimos :p
Title: Texture Replacement File Locations
Post by: Admiral Nelson on October 27, 2005, 08:35:07 pm
Stratcomm beat me to it...
Title: Texture Replacement File Locations
Post by: StratComm on October 27, 2005, 08:46:40 pm
If I had the source scene I'd be happy to cook one up.  Unfortunately, decompiling it with PCS, repositioning all of the pivots, and recompiling it just to get a couple of nameplates just isn't worth it.  You might PM Bob, and see if he can either cook one up real fast or release the scene (again, if he already has once).
Title: Texture Replacement File Locations
Post by: Admiral Nelson on October 27, 2005, 09:06:55 pm
PM sent. Thanks!