• Announcements

    • Brentonator

      Forum Rules (Please Read)

      Hello everyone and welcome to the No More Room In Hell Forums! We greatly appreciate your interest and support. Please feel free to begin post and become a part of this community. But please make sure that you read and understand the following rules so things can stay as clean and as orderly as possible around here. These rules are expected to be follow by any and all members at all times. Disobeying these rules will result in disciplinary action by a moderator. #1. Off color remarks are acceptable but can be deemed inappropriate at the discretion of the moderators. #2. Flaming and disrespecting other members of this community or this mod is strictly prohibited. #3. Please do not post links relating to warez or illegal downloading. #4. No offensive content is to be posted (gore, dead babies, porn). #5. Please do not spam topics to increase your post count. #6. No excessively large signatures. Signatures that violate this will be modified. #7. Signatures are not to be used as a spamming tool. If your signature's sole purpose is to annoy or distract other members, it will be removed. #8. Please do your part to be as friendly, respectful, and helpful to anyone and everyone on this forum. #9. Your posts may be removed at any time at our sole discretion. #10. Remember the terms of your registration...a copy is posted below but may not represent the latest version of our terms of use. #11. No advertising other communities or products. Have fun.
Sign in to follow this  
Followers 0
Socialstyrelsen

Custom cubemap hdr problem

4 posts in this topic

Hey!

I managed to get the sky to reflect in the windows by creating a custom texture that uses a custom cubemap. I think it's really nice eye candy. Perfectly mirrored and everything:

lkXVaoA.jpg

But then hdr puke all over it:


GjIuquO.jpg


This is the vmt file for the custom texture:

"VertexlitGeneric"
{
"$basetexture" "mytextures/custom_skywindow"
"$surfaceprop" "glass"
"$envmap" "mytextures/custom_skywindow_cubemap"
}


Is there some parameter I can add to disable the hdr effect?

I found some interesting threads where people seem to have the same problem, but there are no answers:
http://facepunch.com/showthread.php?t=1284240
https://github.com/ValveSoftware/source-sdk-2013/issues/40
(comment by fuzzzzzz that starts with "the next problem i discovered")

...

I made some progress by changing the Image output format in VTFedit to RGBA16161616F. But the vtf file is 76 mb (!) big (the images are 407 kb in total when importing to VTFedit). Also it still looks strange (it's worse than it looks like in the picture):

KGShXCN.jpg

These are the settings I have in VTFedit:

Md3kSOD.jpg

1wwKIDm.jpg

Any suggestions what to change? Feels like I've tried most of them...

These are the settings for the original sky_broadway_hdr skybox texture:

X75kVmU.jpg

nLyU7UB.jpg

I tried to copy them but it didn't work. Please help...



Edited by Socialstyrelsen

Share this post


Link to post
Share on other sites

Have you tried using a tonemap_controller? I was recently using this skybox texture in nmo_junction. Try this:

Create an entity called env_tonemap_controller, name it 'tonemap'. That's it. Now create another entity called logic_auto (or if you have this entity in your map use the one that exists). Now add outputs to the tonemap controller OnMapSpawn. SetBloomScale, SetAutoExposureMin, SetAutoExposureMax.

Sorry if you already have this, or if it doesn't work.

Share this post


Link to post
Share on other sites
This is the vmt file for the custom texture:

"VertexlitGeneric"

{

"$basetexture" "mytextures/custom_skywindow"

"$surfaceprop" "glass"

"$envmap" "mytextures/custom_skywindow_cubemap"

}

the first thing, you don't have to specify a $envmap texture.

"$envmap" "env_cubemap"

Better read this article: https://developer.valvesoftware.com/wiki/$envmap

VertexLitGeneric

VertexLitGeneric is the shader most commonly used to render models.

https://developer.valvesoftware.com/wiki/VertexLitGeneric

Don't use VertexLitGeneric on BRUSH TEXTURES, only models. Instead use:

https://developer.valvesoftware.com/wiki/LightmappedGeneric

LightmappedGeneric

LightmappedGeneric is the shader most commonly used to render brushes and other lightmapped surfaces.

Share this post


Link to post
Share on other sites

Have you tried using a tonemap_controller?

Yes, but the tonemap controller will affect the sky and the cubemap the same. So even if I set the AutoMaxExposure really low the cubemap will still be much brighter than the rest of the world.

the first thing, you don't have to specify a $envmap texture.

"$envmap" "env_cubemap"

Setting it to env_cubemap means you have to use cubemaps placed in the editor. I could not make it look good that way, also when using that approach every window needs its own cubemap and there are 28 windows. I don't think that's good for performance, especially since they have to be 256px minimum.

Don't use VertexLitGeneric on BRUSH TEXTURES, only models.

Changing it to LightmappedGeneric didn't work. I don't think it has anything to do with the base texture. I think it's the custom cubemap that needs other settings.

Anyways... I found a workaround solution for my specific problem. I put an env_cubemap in an empty skybox and compiled with hdr. Used pakrat to remove the default cubemap, generated a new one, then extracted that one with pakrat and used it as my $envmap with the custom texture. Creating a vtf with correct settings "manually" seems to be impossible. Only way is to generate it automatically which will not be applicable in most situations. It worked in my case though. Looks neat I think!

Edited by Socialstyrelsen

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0