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

cubemaps not working #40

Closed
Freshz24 opened this issue Jun 29, 2013 · 27 comments
Closed

cubemaps not working #40

Freshz24 opened this issue Jun 29, 2013 · 27 comments
Assignees
Labels

Comments

@Freshz24
Copy link

I see this issue quite everywhere now, the cubemaps don't seem to work.

I can use the buildcubemaps command normally but it has no effect. Deleting the default black cubemaps from the bsp file leaves me with pink/black textured reflective floor.

Where does this issue come from?

@fuzzzzzz
Copy link

fuzzzzzz commented Jul 1, 2013

Same problem here

@reepblue
Copy link

reepblue commented Jul 1, 2013

Seems to be an in-engine error. If you were to port the maps to the 2007 engine, it will build normally.

@221boy221
Copy link

Same

@fuzzzzzz
Copy link

Bump !
because this is Major issue, please guys do something about that, the version of the source base 2013 is not an acceptable version to work with.

There is something i can't catch in your strategy, the time pass , and I am now really sceptical about the 2013 SDK,
I know that Source 2007 will never being steampiped, and I have a strong feel that Sourcesdk and the older sdk base will be removed very soon.
Valve, are you into breaking all mods and all the support the community of developer helped to build around the source engine ?
if you want to know what the community wants. It's kind of simple
Community Developer on Source engine wants to know what are the Valve plan for the source Engine 2, that all.
some developer wants to know if it will be possible to lately port their project to the source Engine 2.
Currently we just want to be sure that base 2006 and 2007 will be maintained for a time.

Nicolas Kirsch

@Barnacle
Copy link

BTW seems this is not only Source2013 issue, other "new" steampipe games has same problem.

@Riomaki81
Copy link

I can confirm that Episode 2 has this issue as well. "buildcubemaps" begins the process, and flashes all the cube maps on the screen, but none of them are apparently getting baked out to the map itself. I have yet to find any solution. The one claimed solution on the Steam forums did not work for me:
http://forums.steampowered.com/forums/showpost.php?p=34643902&postcount=21

Can anyone else confirm success or failure on the above approach?

EDIT: ValveSoftware/Source-1-Games#860

@dessertmonkeyjk
Copy link

Really? It worked for me. Like I noted on the steam forums, what are supposedly the cube map .vtf files aren't being initially saved properly. If you open them up in Pakrat, they appear black. However, if you delete said .vtfs, save the .bsp, reload the map, build the cube maps, then they work.

Here are some pics for you.

initial cube maps
fixed cube maps

Of course, the actual problem is that this wasn't and shouldn't be happening in the first place. For now, this is just a workaround until an actual solution is found.

@Riomaki81
Copy link

Thank you, it looks like that technique does work. I suspect my problem was that I got confused over which .bsp I was editing. For me, the .bsp file is outputted to both sourcesdk_content/ep2 (where the .vmf lives) and /ep2/maps in /common. I was editing the one in sourcesdk_content when it should have been the other one.

@reepblue
Copy link

Hmm, I could not get this to work for me. I also tried building cubemaps in 2007 and then playing the map in 2013, but the default black cubemap texture over written my cubemap build.

@ShockaPop
Copy link

Any idea if Valve is fixing this anytime soon?

@jimbomcb
Copy link

The VBSP source is included in the 2013 SDK, if you comment out "Cubemap_CreateDefaultCubemaps" on line 860 of vbsp.cpp and compile your own version then VBSP will stop writing out the black cubemaps. After that, it's just a matter of building the cubemaps like normal, works fine for my 2013 based mod.

@fuzzzzzz
Copy link

Thank you John, it work well to for me:
Also I have generated vbsp for SP and Mp, and it can be downloaded here: http://puppet-master.net/download/Source_SDK_base_2013/vbsp/vbsp-fix-source-2013.rar
Just a question do you planned to submit a pull request ?

@jimbomcb
Copy link

I don't plan on it because I don't consider stomping out all cubemap generation in VBSP a reasonable solution. I'd rather Valve figure out the root cause behind buildcubemaps not overwriting the files than do a dodgy fix.

@tealsuki
Copy link

I think the point of creating "default" black textures for cubemaps in VBSP is so the first time (and every time with new cubemap entities) you build the map, you don't have to go through the process of making cubemaps, which eases the process of quickly prototyping out elements. I agree though that Valve should fix this ASAP

EDIT: Though, isn't there a default envmap texture the game falls back to, if cubemaps aren't present at the time of build?

@ghost ghost assigned JoeLudwig Jul 30, 2013
@fuzzzzzz
Copy link

i am not sure about, but if the default cubemap are all black, it's may be related to a skybox issue instead of cubemap.
As the code of vbsp.exe for source 2007 episodic is exactly the same than 2013, accepted that a pointer has been added to manage the map component to refer to.

@fuzzzzzz
Copy link

fuzzzzzz commented Aug 2, 2013

How to fix HDR cubemaps :

1. Fix the VMT files :

Vbsp is looking for a $hdrbasetexture variable, and from the VPK and the skyday01_01_hrd and skyday02_01_hrd
Materials file, the $hdrbasetexture variable is missing, instead of that, VBSP will not being able to grab that variable from the material file.
So i just have extracted all the vmt and vtf and added $hdrbasetexture "skybox/skyday01_01hdrrt".
like that :

"sky"
{
    "$hdrcompressedTexture" "skybox/sky_day02_01_hdrrt"
    "$hdrbasetexture" "skybox/sky_day02_01_hdrrt"
    "$nofog" "1"
    "$ignorez" "1"
    "$basetexturetransform" "center 0 0 scale 1 2 rotate 0 translate 0 0"
    "$basetexture" "skybox/sky_day02_01rt"
}

2. Compile the maps with the modified VBSP

About the VBSP fix, and as vbsp don't not create the default cubemap, the game must be set without hdr enable, to build the LDR cubmaps. And so the ldr cubemap will be written into the bsp file.
No for the HDR cubemaps, you must to set the video properties to HDR enable, reload the maps and do the buildcubemap again.

Note :
It's important to build the cubemaps in that order : ldr > hdr.

Bugs :
I notice another issue with buildcubemaps executed directly ingame
I must to execute the buildcubemaps command a second time, because some of my VertexLitGeneric materials are not affected by the env_cube.

@reepblue
Copy link

reepblue commented Aug 4, 2013

I've been getting only half my map to build the cubemaps fine and the other half I've gotten purple and black reflections. I've been using my own custom skybox with "$hdrcompressedTexture". I may try building the cubemaps in ldr, then hdr, although I doubt it will fix my problem

@fuzzzzzz
Copy link

fuzzzzzz commented Aug 4, 2013

the next problem i discovered about the cubemap, is that sdk base 2013 have a "plateform/materials/engine/defaultcubemap.vtf"
the default cubemap are named cubemapdefault.vtf, aslo cubemapdefault.hdr.vtf, is totally missing.
with hdr sky you will have to use buidlcubemap two times, just to remove the pink/black colour that comes from the missing cubedefault.hdr.vtf.

What's has been resolved for me :
when i run a map with mat_hdr_level 1, the defaultcubemap.vtf is properly displayed.

With hdr, the default render is odd, so i try to regenerate de hdr from that material, with hdrshop, PFM and Vtex, but i doubt my cubemapdefault.hdr.vtf, is added in both ( "../sourcemods/mymod/materials/engine/" and "../common/source sdk base 2013 singleplayer/plateform/materials/engine/")
and i always gets this very bright effect on the materials.

ldr-hdr-buildcubemap

@reepblue
Copy link

reepblue commented Aug 4, 2013

Hmm, interesting. I looked at my backed up gcfs to see if there was ever cubemapdefault.hdr.vtf, but I could not seem to find one. But it would make sense that of the cubemaps not building because there is no file to override the default black with.

@saul
Copy link

saul commented Aug 4, 2013

engine/defaultcubemap.hdr.vtf doesn't exist because it's not referenced by the engine.

@fuzzzzzz
Copy link

fuzzzzzz commented Aug 4, 2013

hi again, i am m not sure this is necessary but I made a cubedefault.hdr.vtf with all the requirements:

128*128
RGBA16161616F
PointSample,
Clamp S & T
NOLOD
NOMIP
ENVMAP
EightBitAlpha

the link :
http://puppet-master.net/download/Source_SDK_base_2013/cubemapdefault-hdr/cubemapdefault.hdr.rar

Credit

The file cuebmapdefault.hdr.vtf has been generated with source engine ingame tools( buildcubemap) and extract from the bsp file that use skyday02_01_hdr skybox
This file hasn't been create with HDRshop software.

credit : Nicolas Kirsch
email : fuzzzzzz@gmail.com

@reepblue
Copy link

reepblue commented Aug 5, 2013

Thanks @fuzzzzzz! Hopefully I'll have better luck with this then modded vbsp. :)

@PotcFdk
Copy link

PotcFdk commented Aug 8, 2013

It worked, @Riomaki81. Thanks.

@fuzzzzzz
Copy link

fuzzzzzz commented Sep 4, 2013

I thought the edits in VBSP with the 3/09 update should fix cubemaps issue, but nope.
This message is just informative purpose.

wouterpleizier added a commit to wouterpleizier/source-sdk-2013 that referenced this issue Jul 17, 2014
Disabled default cubemap creation in VBSP. This is a workaround to issue
ValveSoftware#40 that prevents existing cubemaps from being overwritten when the
buildcubemaps command is used.
@Nephyrin
Copy link
Contributor

Nephyrin commented Feb 9, 2016

The beta_test branch of the Multiplayer SDK Base should now have a few engine fixes for buildcubemaps.

If you're experiencing this issue test again and let me know if there are still problems.

@Nephyrin Nephyrin closed this as completed Feb 9, 2016
@1157
Copy link

1157 commented Feb 27, 2017

Still broke for hldms, It is adding default cubemaps, any other ones render black, If they are added,
I have not using them for 3 1/2 years ,using cheap water, texture's as a work around

@kisak-valve
Copy link
Member

The hldms cubemap issue is being tracked at #403.

untodesu added a commit to untodesu/refraction that referenced this issue May 19, 2021
buildcubemaps seem to shit itself when cubemaps are present in
the .bsp so keep this thing commented out until guys at Valve
start being dudes and do something.
1upD referenced this issue in entropy-zero/source-sdk-2013 Aug 4, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests