Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug: Combining $detail and $bumpmap renders incorrectly #1346

Closed
lodyb opened this issue Jan 29, 2025 · 1 comment
Closed

Bug: Combining $detail and $bumpmap renders incorrectly #1346

lodyb opened this issue Jan 29, 2025 · 1 comment
Labels
Type: Bug This is a problem with something that should be working one way, but isn't.

Comments

@lodyb
Copy link

lodyb commented Jan 29, 2025

Describe the bug

Image
A texture like this that combines a bump map with a detail renders like this

Image
Left is the above texture and right is without $detail (looks correct)

I have looked at this in the Valve docs and it mentions for CSGO:

Image
https://developer.valvesoftware.com/wiki/$detail

I am using mode 10 which I thought would work

Tested in Momentum 0.9.38 so far, this works fine in CS:S (But I understand this may be a CS:GO engine issue)

To Reproduce

  • Make a texture with a bump map + a detail (any $detailblendmode it seems)

  • Compile map, build cubemaps

  • Checkerboard appears on the texture instead of the $detail texture

Issue Map

material_map_detail.zip

Map has the issue texture packed, and the non issue texture next to it for reference

Image
In hammer++ looks fine

Image
In CS:S looks fine

Expected Behavior

It should be the albedo texture + bumpmap + detail together

Operating System

No response

@lodyb lodyb added the Type: Bug This is a problem with something that should be working one way, but isn't. label Jan 29, 2025
@lodyb
Copy link
Author

lodyb commented Feb 3, 2025

Image

I have since tried this with different materials, and it has worked.

I suspect I was using a broken texture or something,

LightmappedGeneric
{
	"$basetexture" "cammie/wall/sandstone01"
	"$bumpmap" "lody/s3/s3_normal"

	"$detail"  "custom_textures/marble_tile"
	"$detailscale" 1
	"$detailblendmode" 3

	"$ssbump" 1

	"$envmap" "env_cubemap"
	"$envmaptint" "[0.04 0.04 0.04]"

	"$color2" "[0.93 0.93 0.93]"
}

My new texture works fine. There's a chance that there's something up with the combination of materials and vmt in the source post but I think this issue is misleading.

@lodyb lodyb closed this as completed Feb 3, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Bug This is a problem with something that should be working one way, but isn't.
Projects
None yet
Development

No branches or pull requests

1 participant