1. Post #1

    May 2010
    119 Posts
    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?

  2. Post #2
    wizardsbane's Avatar
    January 2008
    372 Posts
    Looking through Foszor's code would inevitably give you the answer you're looking for.
    Reply With Quote Edit / Delete Reply Windows Vista United States Show Events Agree Agree x 1 (list)

  3. Post #3

    May 2010
    119 Posts
    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.
    Reply With Quote Edit / Delete Reply Windows XP Sweden Show Events Agree Agree x 1 (list)

  4. Post #4
    wizardsbane's Avatar
    January 2008
    372 Posts
    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.
    Ah, right, sorry.

  5. Post #5

    May 2010
    119 Posts
    Bump. Or, if that isn't allowed, another question: Is it possible to remove/modify the friction a player has while walking?

  6. Post #6

    May 2010
    119 Posts
    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?