Procedural sky texture


hello, I was trying to see how much realism can I achieve the node editor to do sky textures with generated textures within blender, without the need of any resource image or added geometry, and how much control can I have over it. I’m kinda stuck, so I came here to look for help or advice. first, any clue for reducing the size of the sun, and any better way of change the color of the sky and the sun without loosing the variations of the sky textures, I managed to make a more realistic sky, adding the sky texture to the cloud texture with a noise texture in a ramp of light blue to white, but I didnt have enough control over it. I want this sky for me and everybody to use adapting it into different scenes. I think its going to be useful for animation or simple renders, It can be used to light interior scenes far better than an image texture. so, anyway, thank you. luck!


thanks, benny g, the goal is to make it all inside the world material, but I going to drop the ball in there, here is a little improvement to the latest render, just added an gradient texture to show more of the clouds in the horizon and not that much in the zenith.



Very nice, thanks for the great tip.

I just want to say this is awesome. Sorry I don’t know enough to provide insight into getting more control over size of sun etc but I do think something like this would be really useful for making quick environment for reflective materials.

Another hint, you can perform direct manipulation of the coordinate data (which is essentially a type of RGB data), to make it so the scale of the clouds are actually getting smaller the closer it is to the horizon (which can give a convincing effect of a cloud layer far above the ground).


well, I made some obvious changes, like changing the cloud texture to the mix factor between the sky texture and the white color, this can be modified to change the color of the clouds to black or grey for a stormy sky. I also will be attaching the blend file for you to modify. I dont get how to do the tip that ace dragon suggested. feel free to download it, play with it and share your renders and tests.


Attachments

sky.blend (563 KB)

I’ve had good luck using the gamma node to sharpen and decrease the size of the sun.


thank you SterlingRoth for the gamma node tip. I was playing a little bit with the sky. I still not had tried to go into the advice that dragon ace suggested, but I will soon. also, i could need more tweaking. i was going to add the gamma node result in an black and white to the sky texture with less turbidity.


sky1.blend (565 KB)


my most recent render, to me looks great. I am not uploading a screenshot of the node sistem because I started to use nodegroups and I am lazy, but I will upload the file. I added a different tone to the clouds and changed some settings tha were bad and I didnt notice. still no luck whit the size stuff, i will ask ace dragon if can help me. still, I think that looks ok for an image that is not using any textures or smoke simulation. there is a problem, needs a lot of tweaking, and the sun is not always round and perfect, is good for an still image, but its really tricky for animation

Attachments

sky1.blend (586 KB)

well, there is a pretty good tutorial on adding procedural clouds to an sky texture by enigmatoots based on a nodetree twitted by sebastian koenig: http://www.youtube.com/watch?v=Tr6wTyfAO04
I adapted it to my scene, also figured it out how to change the cloud size as they get close to the horizon by using a normal node and a ramp, also added an multiply math node to change the overall size of the clouds, BEWARE! it gives you random results, if you dont want this remove it and change the size directly in the ramp node.
and the sun, when using this world in different scenes I didnt look right, so i started testing and I figured that I could just add light to the scene without brighten the color of the sky, so I added the sun node as another shader and changed the strength of it. so, here are my tests

first sun shader with a strength of 1


second sun shader with a strength of 20


remember to check multiple importance sample in the world properties, it will give you a significally less noisy result

you can see how sharp shadows you get whitout using any light source besides the world. but I highly recomend doing it.

I really really wish the sky texture to have a sun direction input where you can plug a normal node, It would be great to fix the size of the sun.
so good luck in your renders, and please post here your results[INDENT=7]
[/INDENT]

so, the last time I tried, you couldn copy the data of the sun direction, or at least I couldnt, but now you can, and can copy it to a normal node and viceversa. so I used a normal node and a ramp as the sun and copy the data everytime I move the skytexture, it can use a lot of tweaking but it worked and is good.
now, To Do:

a driver or something to copy the sun direction to the normal node of the sun

the clouds could use some color variation to match the scene, maybe using and add operation instead of a mix, or mixing the colour of the sky texture with a brighter and less satured version of the same

fixed a little bit the size ramp of the clouds, but could use some tweaking

the sun fade is to harsh, could use some tweaking

the .blend file attached:
sky4.blend (660 KB)




That’s what I have been doing. Add a driver to the normal then X, Y, and Z get the values of the sun object’s matrix_world: [2][0], [2][1], and [2][2].

I generally set it up so that all I have to do is manipulate the sun rotation and everything else gets adjusted based on that. You can automate quite a bit. Make stars show up appear at night, moon/moonlight, lat/long position, etc.

A couple of fast tests. All I have to do is rotate the sun. (excuse the crappy normal map on the snow):


This one is a bit dark. No change in exposure and also no moon.



Mid day test:


I still need to play around more with faking clouds on world shader, would be nice if you could simulate cloud shadows with synchronized textures between the world shader and the sun shader.

This thread is genius. I hope people keep developing these node and driver setups, and perhaps create some kind of add-on for Cycles. My biggest gripe with Blender (and it has been for a looonnng time) is that you can’t ever generate a realistic, good looking world setup without needing to rely on HDRI maps, or photos you took of clouds, or whatever. I even bought Terragen 2 a year or so ago and tried stitching together sky renders to create equiangular maps to use as skies in Blender. I hoped that would give me the ability to customize the look of my skies to fit the scene, and thus not have to rely on stock photos. Well, it was doable, but it turned out to be a giant pain in the @$$ and required a lot of additional work. It would be nice if Cycles’ World settings had the ability to easily set up a sun, various cloud types and coverage, and perhaps even volumetrics like 3d clouds, god rays, etc. by using a ‘generator’ of sorts that creates the node setups for you. All of the pieces of the puzzle are there, I just hope someone has the know-how to do this.

Also SynaGl0w, would you mind sharing a .blend of your tests? I’d like to learn how to set up the drivers!

Here is a simplified test file: sun_drivers.blend (206 KB)

Just rotate the sun and the driven values update.

I think we should suggest a sky redo for the next blender something volumetric with volumetric sky and clouds. If blender could include a good sky or environment shader then I would consider blender too be the best program on (or off :slight_smile: ) the market

It shouldn’t be too difficult they already have volumetrics in both blender and cycles. They just need a more user friendly setup.

i totally agree, although i’m not a developer so i’m not sure how hard it would be. i would guess that once they get render times down for volumes in Cycles it might become easier to develop. i’ve been playing with voxel data and Synaglow’s driver setup in the latest build and it’s looking pretty cool.

Hey this is what I’m looking for. I’m though you can only make sky using the skydome. This will be useful.

I actually asked Ton during a live BlenderArtists chat today whether or not the World settings can be further developed with regard to clouds and volumetrics, Sun and sky placement, perhaps a “generator” of sorts for Cycles. He suggested we hit up the Cycles dev team by going to http://wiki.blender.org frontpage, and using the “contact developers” link. Thomas Dinges also replied and said this would make a great add-on. :slight_smile: