Cloud effect

Discussion in 'Mapping' started by Silk, Mar 30, 2012.

  1. Silk

    Silk Mapper

    Messages:
    3,147
    Likes Received:
    36
    Trophy Points:
    0
    So i have this problem:

    I want to have a cloud effect to
    1) break up the tiling pattern of textures on large surface
    2) add atmosphere to a map

    A quick method would be to use some cloudpattern texture in combination with "$detail" on every material used on a large surface

    This has several drawbacks however:
    1) The cloud pattern starts and stops suddenly with the textures that have it
    2) The pattern only matches between textures that are aligned to eachother
    2b) On vertical surfaces touching horizontal surfaces (like cliffs) they are never aligned properly with the pattern on the flat surface
    3) "$blendmodulate" doesn't work with "$detail", so you can't have nicely blended textures, not even with the displacement scale set to maximum.

    Trying to come up with an alternative method i tried:
    - Lightblock brushes close to the skybox
    ==> this produces very dark shadows, and you need a shitloads of brushes to mimic a cloud pattern over such large distances
    - Transparant texture with a cloud pattern, to be used together with certain vrad parameters so they cast shadows
    ==> the vrad parameters only work for transparant textures on models, not brushes, and i'm sure a model of that scale would cause many problems (not tested, but i'm pretty sure the engine can't handle it)

    Is there some much easier way i just never read about?
     
  2. Chris0132'

    Chris0132' Developer

    Messages:
    9,482
    Likes Received:
    0
    Trophy Points:
    0
    It should be fine with a very large static mesh. Alternaitvely you could put it in the skybox, in which case it would be a comparatively small model, and newer source version can inherit shadows from the 3d skybox onto the map. I don't know if texture shadows work like that, but it'd be worth a try.

    My only other suggestion is trying a really huge overlay, using vmt parameters to tile it many times over the area defind by the overlay entity, but that'd be really hard to get working.

    What situation exactly do you want this for, there may be a better way to achieve the function of the cloud shadows without using cloud shadows.
     
    Last edited: Mar 31, 2012
  3. Demented

    Demented Member

    Messages:
    2,337
    Likes Received:
    0
    Trophy Points:
    0
    I recall there being a feature, maybe of VRAD, that would allow you to determine a global shadow over the entire map based on an image.

    But strangely, I can't find it.
    Either I'm looking in the wrong places, or I've been transported to an alternate universe where it doesn't exist.
     
  4. Chris0132'

    Chris0132' Developer

    Messages:
    9,482
    Likes Received:
    0
    Trophy Points:
    0
    I'm not familiar with it if there is.
     
  5. Solokiller

    Solokiller Member

    Messages:
    4,861
    Likes Received:
    7
    Trophy Points:
    0
    Try using a projected texture for the shadow, and a func_illusionary with the cloud texture on it. It won't look very good if it's not animated, so you might want to look into that.
     
  6. Chris0132'

    Chris0132' Developer

    Messages:
    9,482
    Likes Received:
    0
    Trophy Points:
    0
    You couldn't make a projected texture that large without massive amounts of pixellation, and also you can't use projected textures with shadows and flashlights in the same scene.
     
  7. Beerdude26

    Beerdude26 OnThink(){ IsDownYet(); }

    Messages:
    7,243
    Likes Received:
    13
    Trophy Points:
    0
    Multiple shadow support can be added by us
     
  8. Chris0132'

    Chris0132' Developer

    Messages:
    9,482
    Likes Received:
    0
    Trophy Points:
    0
    It *can* but as yet it *isn't* and saying 'get the devs to change the game code for me' is cheating.
     
  9. Varbles

    Varbles Simply Maptastic. Staff Member

    Messages:
    2,093
    Likes Received:
    26
    Trophy Points:
    0
    would a large scale overlay be too expensive/unrealistic?
    You'd probably need to use at least 4 or so but you can set the u/v scale and end up with it looking pretty decent quality while still covering large areas with no visible tiling. Combined with the natural shadows on the terrain it would probably be alright, you might even get away with animating it. I've had decent results from using overlays to add snow to large areas of brushwork, not sure about trying to overlay on a full grid terrain mesh.

    Blocklight tool brushes in the sky might work pretty well if you have a high sun spread angle. I think blocklight is discarded after being used by vrad so it's not really a part of the map while playing, and if you're trying to get a cloudy atmosphere than you'll want a high sun spread angle anyway.

    As for clouds in the sky the Cloud shader is great because it allows you to specify a separate texture for the alpha and then scroll or rotate the cloud texture while having the alpha stay still.
     

Share This Page