• Drawing Custom Skybox
    5 replies, posted
I recently found a clientside hook called GM:PreDrawSkyBox, where you can disable drawing the skybox by returning true. This means I can draw a custom skybox by rendering a "room" behind everything else, but how would I do that? I also tried using SetMaterialOverride to force another material to the skybox, but that only changes the materials of objects in 3D skyboxes (even though I know from Foszor's Day/Night script that skyboxes use materials). So can anyone explain how this works?
Looking through Foszor's code would inevitably give you the answer you're looking for.
If you mean that I should replace worldspawn's skyname keyvalue, that's not quite what I was hoping for, but I guess it's better than nothing. What I was hoping to do was to be able to change what the sky looks like in real-time.
[QUOTE=Noxic;35830320]If you mean that I should replace worldspawn's skyname keyvalue, that's not quite what I was hoping for, but I guess it's better than nothing. What I was hoping to do was to be able to change what the sky looks like in real-time.[/QUOTE] Ah, right, sorry.
Bump. Or, if that isn't allowed, another question: Is it possible to remove/modify the friction a player has while walking?
If I replace the skybox material with a rendertarget and draw it similarly to a 3D skybox, shouldn't that make it possible? Quite a lot of work to do that though. Besides, I know little to nothing about how RTs work (in case what I just said doesn't make any sense, that's why). Also, apparently you can change a material's texture with material:SetMaterialTexture( str param, texture value ), where value is the texture of another material fetched with material:GetMaterialTexture(str param), where param is usually "$basetexture". Would this work? And would it after the client has initialized?
Sorry, you need to Log In to post a reply to this thread.