Home Unreal Engine

New Tutorials: UDK Animated Sky, and Dynamic Sun.

Hello Everyone, I wanted to share my latest tutorials.

UDK Animated Sky

The first one covers how to create an animated sky dome from beginning to end.

Tutorial results can be seen here:

tutorial_playbutton.jpg

<<PDF download available here>>

UDK Dynamic Sun

The second tutorial is adding a dynamic sun to any sky material within UDK. The tutorial will cover material setup and material instance customization. Using this method, a Sun disc is automatically generated in the position of the main directional light, and its animatable via matinee.

Tutorial results can be seen here:

video_sun.jpg


<<PDF download available on Facebook page (tutorials section)>>

Best Regards,
Juarez Julio
3dbrushwork.com

Replies

  • tristamus
    Offline / Send Message
    tristamus polycounter lvl 9
    Super cool, thanks for this man!
  • riddlaz
    tristamus wrote: »
    Super cool, thanks for this man!

    Pleasure being able to contribute. :) If you run into any problems or you feel that the tutorial could be improved in some way, please let me know.
  • Oniram
    Offline / Send Message
    Oniram polycounter lvl 15
    very cool. thanks for that!
  • PixelMasher
    Offline / Send Message
    PixelMasher veteran polycounter
    looks awesome man. I cant seem to load the dynamic sun pdf, went to the fb page and all that but it just sits there blank...? got the other one though, thanks!
  • riddlaz
    Oniram wrote: »
    very cool. thanks for that!

    I'm happy to contribute. Any questions or comments on how to improve, feel free to contact me.
    looks awesome man. I cant seem to load the dynamic sun pdf, went to the fb page and all that but it just sits there blank...? got the other one though, thanks!

    Thanks, please tell me about your impressions after finishing the tutorial. I don't know why the FB page is not loading for you, but I will send you a private message with a solution.

    Best Regards,
    Julio Juarez
  • Andreas
    Offline / Send Message
    Andreas polycounter lvl 11
  • marcoboy
    Absolutely marvelous! Your tutorials are really easy to follow :)
  • Mik2121
    Offline / Send Message
    Mik2121 polycounter lvl 9
    Hey, just wanted to say thank you for the tutorials!.
    I already gave the sky one a try and made this:

    http://youtu.be/de2qL83sfvs?hd=1

    The textures aren't the best and I'm having issues with the moving clouds (the ones done in Photoshop). I will post the material setup later, see if I got something wrong that I'm just not noticing.
  • riddlaz
    marcoboy wrote: »
    Absolutely marvelous! Your tutorials are really easy to follow :)

    Thanks for the feedback, I'll make sure that future tutorials are written in a similar style :)
    Mik2121 wrote: »
    Hey, just wanted to say thank you for the tutorials!.
    I already gave the sky one a try and made this:

    http://youtu.be/de2qL83sfvs?hd=1

    The textures aren't the best and I'm having issues with the moving clouds (the ones done in Photoshop). I will post the material setup later, see if I got something wrong that I'm just not noticing.

    Video looks cool :), thanks for posting. I'm very happy you got good use out of the tutorial. What problem are you having with the panning clouds? Once you post the material, I'll try to help you to the best of my ability.

    One thing that would improve the quality of the panning clouds is to paint over the Photoshop generated cloud image with brushes <<like these>> . At the end, the panning clouds would have a more realistic look. I'm planning to update the tutorial to implement that.
  • riddlaz
    I updated the tutorial to introduce the use of custom brushes to make a better cloud mask, which is the one used for the panning clouds effect. I decided to add that to the tutorial because I feel it gives the setup more realism, and its a very simple addition.

    One page was added to the tutorial:
    NewPage.jpg
    I decided to put it here also, therefore downloading the .pdf again would not be necessary. Cloud brushes can be downloaded here.

    Sky with modified cloud mask:
    NewPage_Results.jpg
    Note: The panning clouds in this image are the bright yellow clouds.
  • Mik2121
    Offline / Send Message
    Mik2121 polycounter lvl 9
    Hey riddlaz, I just checked again my material now that I'm home, and I noticed that I actually forgot to add an amount on the Panner itself. I guess I sorta skimmed through that part of your tutorial, assuming I just needed Time and the Vector Parameter for the cloud speed, but I guess I was just multiplying whatever speed I would input in the vector parameter, by the original amount in the Panner.

    It was just my problem, but it helped me understand materials that bit more (until now I used to make really basic materials with just detail normals and a couple things, or basic panners and basic rotators).

    Again, thanks for the tutorials.
    I will work on the clouds now and I will also delete the sun from my original sky so I can use the sun from your second tutorial.
  • riddlaz
    Mik2121, Pleasure being able to help. Glad to hear you say my tutorials helped you improve your material creation skills. Hope you also find the second tutorial useful. :)
  • riddlaz
    Someone brought up a good question on how to make the clouds occlude the sun. So I decided to give it a shot and obtained these results:

    tutorial_playbutton.jpg

    Tutorial_Sun_Mask.jpg

    I made a mask in Photoshop that indicates where the sun will be occluded. In the mask, the thick clouds are black and thinner clouds are a shade of gray. The red rectangle on the upper right is highlighting the last node of the sun network. Also important to note that I made that mask received the same animation that the sky color map does.

    What do you guys think? Should I add it to the tutorial?

    Best Regards,
    Julio Juarez
  • yodude87
    Offline / Send Message
    yodude87 polycounter lvl 5
    whoa, exactly what i needed, thx a bunch dude :D
  • Ace-Angel
    Offline / Send Message
    Ace-Angel polycounter lvl 12
    Hey Riddlaz,

    For some reason, I'm unable to access the FB page to DL the tutorial, I was able to get the first one but not the second.

    Is there anything special I need to do? It just shows me a timed out page, ALL the time. Would be possible for you to send it to me via PM?

    Also, as for the sun occluded, yes please sir :)
  • riddlaz
    yodude87 wrote: »
    whoa, exactly what i needed, thx a bunch dude :D

    Its a pleasure being able to help out yodude.. :)
    Ace-Angel wrote: »
    Hey Riddlaz,

    For some reason, I'm unable to access the FB page to DL the tutorial, I was able to get the first one but not the second.

    Is there anything special I need to do? It just shows me a timed out page, ALL the time. Would be possible for you to send it to me via PM?

    Also, as for the sun occluded, yes please sir :)

    I'll send you an alternative via PM. As far as the sun occlusion goes, I'll write the extension once I get a chance, I'm currently doing an art test for a company in LA. :) The addition the the tutorial will most likely be an extra chapter in the 'dynamic sun' tutorial.

    Enjoy :)
  • Ace-Angel
    Offline / Send Message
    Ace-Angel polycounter lvl 12
    Oh, well, in that case, thank you and good luck with the test :)
  • riddlaz
    Ace-Angel wrote: »
    Oh, well, in that case, thank you and good luck with the test :)

    Thanks, I'll post a WIP in here very soon.
  • SnakeDoctor
    Offline / Send Message
    SnakeDoctor keyframe
    Hey, followed your sun tutorial, but for some reason the same dominate directional light is creating two suns. Its the only light in the scene so it couldn't be anything else affecting it. Do you think using a skybox with a texturecube and a material set up like xouli explained it on this page could be affecting it?

    http://www.polycount.com/forum/showthread.php?t=83969&highlight=space+skybox

    Example: I place the dom direction light in scene. Sun appears where it should be, but if I were to draw a straight line through the light to where it is pointing another sun would appear.
  • riddlaz
    Hey, followed your sun tutorial, but for some reason the same dominate directional light is creating two suns. Its the only light in the scene so it couldn't be anything else affecting it. Do you think using a skybox with a texturecube and a material set up like xouli explained it on this page could be affecting it?

    http://www.polycount.com/forum/showthread.php?t=83969&highlight=space+skybox

    Example: I place the dom direction light in scene. Sun appears where it should be, but if I were to draw a straight line through the light to where it is pointing another sun would appear.

    I've seen the problem happen before, It exactly what you said, the light passes through an creates another sun in the opposite direction, it's noticeable using the sky box method, on sky domes it would be hard to tell. I'll take a look at it tomorrow and I'll tell you if I was able to fix that.
  • Oniram
    Offline / Send Message
    Oniram polycounter lvl 15
    here's a fix for the double sun

    Sun_Mat.jpg

    instead of running your dotproduct through a power, multiply it by -1, clamp it, and set the radius in your spheremask to 0.001 or 0.002. in reverse however, now the bigger the glow size, the smaller the rim around the sun will be.
  • riddlaz
    Oniram, Thanks for posting. I'll update the tutorial very soon. :)
  • riddlaz
    Tutorial was updated to fix issues with the double sun.

    Currently available on my website:

    3DBrushwork
  • Froyok
    Offline / Send Message
    Froyok greentooth
    First, thank for these tutorials !
    But I have a problem :


    4f73fbd51e2f9cb82e4f1792357e4tt.jpg
    (Connexion fail, peer's certificate revoked)

    Happen every time...
    So I can't download your udk package. Why don't you provide a direct link as your pdf tutorials ?
    (And honestly, I don't like the fact I need to use Facebook to read/access to a tutorial :()
  • cdrose
    Offline / Send Message
    cdrose polycounter lvl 13
    Awesome tutorial! Thanks!

    2 Questions. Can I replace the Light Vector with another Vector so that I can create an extra sun and/or planet?

    What does the Light Vector output?

    Thanks
  • ambershee
    Offline / Send Message
    ambershee polycounter lvl 17
    @Cdrose - you can indeed use another vector, but you won't quite get the same results without some tweaking.

    The light vector actually differs between light types (you just don't see it because the real shader work is compiled away from your eyes). If you get an old version of UDK (before they precompiled the main shader files, you can see it usually looks something like this:
    Output.TangentLightVector = VertexFactoryWorldToTangentSpace(Input,VFIntermediates,TangentBasis,LightDirection);
    

    I would personally use a second directional light for a second sun. For a planet or similar body, I would handle this in another manner.
  • cdrose
    Offline / Send Message
    cdrose polycounter lvl 13
    Thanks for the quick reply, and wow the output looks complicated :(

    I don't really want to use another light as I just want the disc for the 2nd sun purely for visuals I don't want it to light my scene.

    I'm going to figure out a way for the planet, I was hoping I could replace the light vector with a simple 3 vector input but no chance :poly142:
  • ambershee
    Offline / Send Message
    ambershee polycounter lvl 17
    If you do use a light, you can set the second light to affect a lighting channel that only affects the dome - but as it affects only your sky, I wouldn't do it.
  • cdrose
    Offline / Send Message
    cdrose polycounter lvl 13
    Ah right ok, well I figured that the only thing that needs changing is the light vector right? So I'm just trying different combinations of vector expressions...

    If anyone can help me work this one out I think it would be great to add to the 3DBrushWork tutorial. The basics is to be able to achieve a Sun/Planet in the SkyDome by using custom co-ordinates without the need of the light vector (light direction). Also be able to have multiple Suns/Planets.
  • samcole
    I'd like to download the skydome files, but they were hosted on Megaupload which was brought down. Any other way we can access the files?
  • cdrose
    Offline / Send Message
    cdrose polycounter lvl 13
    samcole wrote: »
    I'd like to download the skydome files, but they were hosted on Megaupload which was brought down. Any other way we can access the files?

    Luckily I still had the packages :poly124:

    LINK

    Here is a .rar with the original packages and the 2 .pdf tutorials
  • samcole
    Sweet I can download them when i get home. Thanks cdrose!
  • cdrose
    Offline / Send Message
    cdrose polycounter lvl 13
    Np :):thumbup:

    By the way I figure out the "Light Vector" replacement to create another sun / planet. Just replace the Light Vector with:

    Normalize <---> Vector Transform ( Source:Tangent, Dest:World) <---> 3 Vector Param

    Start with values of R:-6000, G:6000, B:100 for the vector param and tweak to get your position. Although this tweaking is proving difficult.
  • ambershee
    Offline / Send Message
    ambershee polycounter lvl 17
    It might be easier to use a 'direction' vector and a 'colour' vector, and do the math from there :)
  • cdrose
    Offline / Send Message
    cdrose polycounter lvl 13
    ambershee wrote: »
    It might be easier to use a 'direction' vector and a 'colour' vector, and do the math from there :)

    Could you expand on this more? :)

    I also have an issue with the original tutorial setup. When I move across my map, the sun gradually moves in the skymap rather than being in a fixed position
  • Shuriken UK
    Hey I know you, from youtube lol. Sick work, nice tutorials, although I still haven't tried these two yet cos my latest jobs been eating away at my free time.
  • ambershee
    Offline / Send Message
    ambershee polycounter lvl 17
    cdrose wrote: »
    Could you expand on this more? :)

    Not off the top of my head, I'm afraid.
    cdrose wrote: »
    I also have an issue with the original tutorial setup. When I move across my map, the sun gradually moves in the skymap rather than being in a fixed position

    I didn't observe this when I set up something similar a while back, and it shouldn't be the case; a directional light lighting a skydome is entirely world space and shouldn't care where the player is.
  • cdrose
    Offline / Send Message
    cdrose polycounter lvl 13
    ambershee wrote: »
    I didn't observe this when I set up something similar a while back, and it shouldn't be the case; a directional light lighting a skydome is entirely world space and shouldn't care where the player is.

    Well the material takes into account the camera vector too so I believe this is what is causing the sun to move. I will post some images if you wish but I'll try to explain. I have a skydome with a sky material applied that already has a sun in it. When I line up the "dot" sun that is created by UDK with my sun everything is fine until I move across the map and then the "dot" sun starts to move off of alignment with the sky material sun. :\
  • StaticTheFox
    Is this using some sort-of dynamic radiosity voodoo? :O
  • Edje_GameMaker
    On the creation of a second disk for planets or second/third suns.

    I found a way to duplicate and offset the vector of the light and camera vectors. Instead of tuning a non relative vector you can simply do this:

    Create a 3Vector Pram (*make it low, like 0.1,0.1,0.1) -> add it to the light vector -> then (THIS IS THE IMPORTANT PART) run the result through a normalize node -> then Dot product it with the camera vector as normal

    This ensures that any other disks you add to the sky will move and angle properly with the players view without having to shoot in the dark with a non relative vector.

    Here is an example and a look at the node setup

    tumblr_lzumtpfUP31rqp5gf

    tumblr_lzumtpfUP31rqp5gf
  • naked_chicken
    Offline / Send Message
    naked_chicken polycounter lvl 10
    So I've got two sun's in my skybox... but not on purpose and not in the way you already posted a fix for.

    2suns.jpg

    I set it up just like you did in the tutorial and from a certain angle it looks fine. Upon further inspection, though I notice that there is another bright spot right at the top of my sphere where the uv's come together. As the light gets rotated so the sun reaches the top of the sphere the two bright spots stretch and merge.

    I know it's something to do with the mesh as I brought in the generic udk sphere and it works fine but for the life of me I can't figure out what's different between the two other than the fact that mine has fewer poly's (I tried adding some, it didn't help). UV's look the same and all... I'm just confused. I can use the udk sphere but I'd like to know what went wrong.
  • gauss
    Offline / Send Message
    gauss polycounter lvl 18
    Tremendously helpful tutorials, thanks for taking the time. And congrats on a very big shipped title :)
  • underfox
    Offline / Send Message
    underfox polycounter lvl 7
    Hello, well first i wanted to thank you for thos great tutorials, i have been following them to create a skydome in my scene, and everything went smoothly until i found a little problem wich i don't know how to solve .

    68109985.jpg

    this is the result of the sky with the clouds passing in front of the moon, the only problem is that the stars appear on top of the clouds and disapears in the cloudless areas. Any way to get the stars to hide behind the cloud and make it visible in the cloudless part of the sky ( res zones on the pictures)??

    PS: also, the lightshaft stills shows when there is a cloud in front of the moon? anyone know how i could make it so the cloud would hide the lightshaft?
    So I've got two sun's in my skybox... but not on purpose and not in the way you already posted a fix for.
    I might be wrong, but i had a deformed sun with my previous " skydom static mesh " due to the fact that it was badly unwraped, maybe it is the reason why your 2 suns are joining each other at this specific location. overlapping UV's maybe.
  • chrisavigni
    Offline / Send Message
    chrisavigni polycounter lvl 12
    Hey Riddlaz,

    Really great tutorials! I did a similar Dynamic Sky for a class, but you did a better job.
    Thanks for posting!
  • downarmy
    Offline / Send Message
    downarmy polycounter lvl 7
    Awesome tutorial thanks heaps for it the sky and the sun one!

    Now i got 2 question: first my sun is moving slightly with the player movement and i want it to stay still is there a way to remedy this? i gust its something to do whit the camera vector?

    And second is there a way to put a texture in the sun disk as i want to do a moon and i would like a moon texture in it but i am a nood at material so any help would be nice!

    Again thanks your tutorial rock!
  • downarmy
    Offline / Send Message
    downarmy polycounter lvl 7
    Bump still trying to put a define moon texture on top of my disk and its not showing up at all
  • Mio
    Offline / Send Message
    Mio polycounter lvl 13
    great share! awesome tutorial!

    thanks a lot!
Sign In or Register to comment.