Talk:Porting GoldSrc content (maps, models, etc.) to Source
Porting GoldSrc content (maps, models, etc.) to Source
.
To add a comment, use the Edit button near the headline of the appropriate section. To create a new section, you can use the Add topic button at the top of this page. Comments on talk pages should be signed with "~~~~", which will be converted into your signature and a timestamp.
Article scope
I noticed you added some info about a bunch of other engines and whatnot. I think it's better to have separate pages for separate engines and major engine revisions. This page should stick to just its namesake: porting GoldSus content to Sorse. The other information is beneficial to have on this wiki, but should be on separate pages, such as User:SirYodaJedi/Porting IdTech 3 maps to Source for Quake III (Nightfire should probs also be a separate page; it's basically unrecognizable from the Half-Life engine).
— SirYodaJedi (talk) 14:38, 22 June 2023 (PDT)
I think you’re right, my goal was to simply combine many porting guides and try to make it suitable for everyone. Also, I have ported NightFire maps and actually this process has many differences (For example, converting not .wad but .png files, renaming outdated entities (they have other names)). but still has some similarities. However, I am still working on this article (some details may be cut later), and I will attach your guide as more specific for porting Quake content. --User:NOUG4AT 11:34, 23 June 2023 (PDT)
Detail textures
Detail textures use the same scale in Sorse as they do in GoldSus, even if they've been resized to a power of two (scale is based on how many times the detail texture repeats; see Detail textures (GoldSrc) and $detail. I converted the detail textures from Day of Defeat (also in and ) to the optimal VTF formats for each given texture (I8 for greyscale, BGR888 for color); I'll try to remember to upload them to GameBanana and Archive.org sometime within the next month.
— SirYodaJedi (talk) 05:07, 25 June 2023 (PDT)
- Here it is; I've also included versions for Strata Source, which use ATI1N and BC7 instead, to save GPU memory without any noticeable quality loss.
— SirYodaJedi (talk) 09:25, 24 July 2023 (PDT) - Usage is pretty simple; if the detail.txt entry in GoldSus says
foo detail/bar 4.0 3.0
, then you put$detail "detail/bar"
and$detailscale "[ 4.0 3.0 ]"
infoo.vmt
, assuming you put the detail texture inmaterials/detail
.
— SirYodaJedi (talk) 14:09, 29 July 2023 (PDT)- That's good! It's helpful to point this out in the article. Thanks also for your edits. It is problematic for me to edit due to cloudflare ban.
— Noug4at (Talk) 15:11, 29 July 2023 (PDT)- Yeah, I get the cloudfare block if I try to edit the entire page, as well; I have to edit individual sections.
— SirYodaJedi (talk) 16:17, 29 July 2023 (PDT)
- Yeah, I get the cloudfare block if I try to edit the entire page, as well; I have to edit individual sections.
- That's good! It's helpful to point this out in the article. Thanks also for your edits. It is problematic for me to edit due to cloudflare ban.
Alpha channel abuse by xwad
{
character designating that they should….I discuss this briefly on the xwad page, but it could use some video explanation. Only the {
textures from a WAD need to be transparent.
— SirYodaJedi (talk) 05:07, 25 June 2023 (PDT)
- I converted They Hunger textures, and was unpleasantly surprised that almost all of the "wall" (materials) that shouldn't have an alpha channel, have one.
— Noug4at (Talk) 15:16, 29 July 2023 (PDT)
- I converted They Hunger textures, and was unpleasantly surprised that almost all of the "wall" (materials) that shouldn't have an alpha channel, have one.
Making Additive glass translucent without glowing
Oftentimes in GoldSrc, glass is made translucent by giving it the Additive rendermode. This unfortunately has the side effect of causing the glass to be fullbright and "glow" (in fact, goldsrc translucency can't be lightmapped, unlike Source). Glass surfaces can be made much more realistic when porting to Source by pre-generating an alpha channel from the RGB data instead of using $additive
. I'll write a proper tutorial if I can remember, but the gist (using ) is this:
- Import the image into GIMP.
- Change the color space to RGB.
Colors>Components>Decompose
[1]. Make sure "decompose to layers" is selected, and color model is "RGB", then click okay.- In the new image, change all layers' blend modes to "Lighten only".
- Flatten the image.
- Copy the flattened result to your clipboard, then close the tab (returning to the original image).
- In the original image (which should still be RGB), right-click the layer, and add an alpha channel.
- Decompose again, this time with the color model set to "RGBA".
- Select the alpha layer, and paste the clipboard, then hit the button that applies it to the original alpha layer.
Colors>Components>Recompose
- Export the original image (which now has translucency) as TGA, then convert to VTF (DXT5 or BGRA8888).
- Put
$translucent 1
in the VMT. For reflective glass, also add$envmap "env_cubemap"
and$basealphaenvmapmask 1
.
I personally manually flip the alpha channel I created and use that as an I8 $envmapmask
, since some branches (like ) don't like using $basealphaenvmapmask
with $translucent
, and $basealphaenvmapmask
isn't flipped on models in , but this does take up more space.
Came up with this method while porting almost all the assets from to (still a long ways to go).
— SirYodaJedi (talk) 16:01, 31 January 2024 (PST)