Home Technical Talk

Clouds and in game engines questions

Hi all, while working on a new scene (first time i'm really focusing on outdoors) i've hit a snag in terms of sky and clouds. Now i got the sky part of my problem solved, i'm still having trouble making clouds look believable. At first i was thinking of just making a smaller semi sphere and slap on a repeating cloud alpha on it and put it in front of my skydome, but that didn't come out looking right. Next i tried using emitters, but i don't know if that's what artists in an actual development studio does it. Can anyone give me a heads up on how to go about doing clouds that can make a smooth transition to a general game engine?

Thanks in advance :)

Replies

  • SHEPEIRO
    Offline / Send Message
    SHEPEIRO polycounter lvl 17
    very dependant on what you want to acheive.... fully dynamic, semi dynamic...just moving....lit, unlit...etc etc...

    in games they are made in alot of different ways maybe an example of what you want to acheive would help
  • Neox
    Offline / Send Message
    Neox veteran polycounter
    what exactly do you want to do? just a sky background, of do you want to fly through them? are they going to be real 3d objects/volumes or do you just need nem in the background? its hard to help you when we do not know where you want to head to
  • Mitz
    sorry for being vauge :p
    what i want to achieve is just viewing them from a distance and having them move around in the sky, nothing too fancy really.

    to give a clear picture, i just want a sky that's mostly clear with sparse clouds floating around. I hope this is clear enough, and also thanks for the quick responses!
  • dn-revenge
    what engine are you working with btw?
  • sparkprime
    The type of clouds of course makes a big difference. For puffy clouds you probably want to do some particle stuff with baked scattering, and have cloud 'objects' (each made from a few thousand particles that do not move WRT to each other) moving around in the scene. For cirrus you can do a flat plane with fractal perlin noise + some filters.
  • Mitz
    none atm, but i'm planning to at least mess around with it on the unreal engine. just wondering how to go about it to have a generally smooth transition from maya to any general engine.
  • dn-revenge
    unreal 3 engine most make use of a sky dome...its just a large ass model, half of a sphere with your sky material applied to it. most of the work is in the material itself..

    you can download the udk and mess with the ut3 maps that come with it for a better idea.

    only other engine i messed with was q3 >_>
  • Mitz
    I understand that i can use a skydome (seamless sky texture) but i want to make actual moving clouds as well. Note this is also going to be rendered out in maya as well so I'm not really sure if what i'm doing in maya will translate well when i bring my scene into the Unreal3 Engine :x
  • SpeCter
    Offline / Send Message
    SpeCter polycounter lvl 14
    just make two skydomes, one with sky(without clouds) and another one inside of it with clouds+alpha map and let the skydome with clouds rotate.Nothing fancy, but it should do the trick and doesn´t consume too much performance and looks quite good if the cloudtexture looks good enough.
  • Mitz
    hmm i guess that is the best course of action after all. I'll try to make a better cloud alpha then :p thanks for the help.
  • divi
    Offline / Send Message
    divi polycounter lvl 12
    in udk you wont even need a second skydome. you can make simple animations for your textures in the material.
  • Neox
    Offline / Send Message
    Neox veteran polycounter
    SpeCter wrote: »
    just make two skydomes, one with sky(without clouds) and another one inside of it with clouds+alpha map and let the skydome with clouds rotate.Nothing fancy, but it should do the trick and doesn´t consume too much performance and looks quite good if the cloudtexture looks good enough.


    wasted performance imho if you want them that way you can always just layer them in shader way cheaper than using a huge ass softalpha sphere in front of the background sphere. I'd only do that if i want to have realtime cloudshadows for example otherwise there is no gain from using more than one mesh with a shader for the sky.
  • CrazyButcher
    Offline / Send Message
    CrazyButcher polycounter lvl 18
    even for cloudshadows one would find a cheaper way that doesnt require a mesh at all (given you assume the clouds to be very far away)

    here is a single mesh solution I had done for bachelor thesis several years ago (actually ran with texture combiners on fixed pipe)

    one mesh with "height UVS", for the sky color gradient, cloud UVs, and automatic UVs in the vertex-stage for the sun billboard projection. It was a clever mix of the various inputs and allowed real-time changes of time-of day..
    and everything fit in one pass for a geforce3 hehe

    http://crazybutcher.luxinia.de/wip/skymeshshaderfull/

    screenshot00015.jpg
    screenshot00004.jpg

    in the lastshot the sun billboard texture leaked...
  • Neox
    Offline / Send Message
    Neox veteran polycounter
    when you have the power to code it yourself, sure thing :D
    but as he is talking about unreal and maya (dunno if you can hack into shadow stuff in maya) you cannot just tell a texture to cast a shadow without havint the object cast a shadow and in that case you would need to split the clouds from the sky as you don't want the sky background gradient to cast the shadow as well :)
  • SpeCter
    Offline / Send Message
    SpeCter polycounter lvl 14
    This was just the easiest solution I had in mind, i didn´t say it´s the best :).
    I know that there are several better solutions, but this would be by far the easiest.
  • Mitz
    Neox wrote: »
    wasted performance imho if you want them that way you can always just layer them in shader way cheaper than using a huge ass softalpha sphere in front of the background sphere. I'd only do that if i want to have realtime cloudshadows for example otherwise there is no gain from using more than one mesh with a shader for the sky.

    I'm not really sure what you mean about "layer them in shader" can you elaborate? does it have something to do with the layered shader?
  • Neox
    Offline / Send Message
    Neox veteran polycounter
    in maya it would be a layered shader where you use alpha masks to layer the clouds over your skygradient, in unreal it would be pretty much the same, using a inear interpolation with the alpha as mask between sky and clouds
  • dn-revenge
    i really thought some of the default udk maps had moving clouds in the sky dome material...just open them up and they're all static :/...my bad on that

    but it is just a matter of implementing it in the material...although a second sky dome with panning clouds could work it may be better to do it in the same sky material Neox siad...it could cost more performance wise (a second model with a second material when one model and one material could do the same)

    *my bad again :D DM-Deck has a sky dome with moving clouds http://dl.dropbox.com/u/9033730/udksky.avi, here are the location/packages in the udk

    material - UN_Sky.SM.Materials.M_UN_Sky_SM_Invasion2
    StaticMesh - UN_Sky.SM.Mesh.S_UN_Sky_SM_Dome01

    the only reason i could think to make the clouds separately is for a flying sim or where the player/camera would need to pass thru them

    as for maya i have no idea :/
  • sprunghunt
    Offline / Send Message
    sprunghunt polycounter
    Neox wrote: »
    when you have the power to code it yourself, sure thing :D
    but as he is talking about unreal and maya (dunno if you can hack into shadow stuff in maya) you cannot just tell a texture to cast a shadow without havint the object cast a shadow and in that case you would need to split the clouds from the sky as you don't want the sky background gradient to cast the shadow as well :)

    In UDK you could use a texture applied to your dominant directional light as a light function mask to simulate the shadows. I think they actually have an example of this in one of the maps that come with the UDK but I can't remember which one it is.

    As Neox said you shouldn't use a separate alpha object because it'll kill your framerate.
  • Neox
    Offline / Send Message
    Neox veteran polycounter
    sprunghunt wrote: »
    In UDK you could use a texture applied to your dominant directional light as a light function mask to simulate the shadows. I think they actually have an example of this in one of the maps that come with the UDK but I can't remember which one it is.

    As Neox said you shouldn't use a separate alpha object because it'll kill your framerate.


    but the light function in a modulated texture projected from the light, i don't think there is a way to combine this with a sky texture that is actually mapped onto real geometry like a hemisphere.
    Also about the sky and alpha, tested it for airborn, no framerate drop so far.
  • sprunghunt
    Offline / Send Message
    sprunghunt polycounter
    Neox wrote: »
    but the light function in a modulated texture projected from the light, i don't think there is a way to combine this with a sky texture that is actually mapped onto real geometry like a hemisphere.
    Also about the sky and alpha, tested it for airborn, no framerate drop so far.

    You would do it using two different materials. One for the dome, and another, for the light. If you wanted to force the two materials to synch up you could control both of the materials pan rates via matinee.

    The framerate drop would depend on how many other alpha materials you have in the rest of the environment. I don't know how many other translucent objects you're testing this with but it's still less efficient than having no translucency in the sky. You just might not notice it in an environment without a lot of other translucency.
Sign In or Register to comment.