Home 3D Art Showcase & Critiques

Planet Shader for Unreal 3

polycounter lvl 11
Offline / Send Message
Ryan Smith polycounter lvl 11
Hey guys,

Been having this idea in my head for a while to build a planet shader for the unreal 3 engine using height maps as an input, and generating other details and masks procedurally. In my shameful joblessness, I was able to find some time to do this.

And because i don't want to type a 2000 page description of the functionality, i thought i'd just demo it and put it on the interwebz for all to gawk at.

************VIDEO***************

http://www.vimeo.com/7323255

************VIDEO***************



And for you fools who are too busy to watch a demonstration, here are some screenshots to entice you into clicking the link. :-D

this is the result, after a good 3-4 hours work.

shot1.jpg

shot2.jpg

Replies

  • P442
    Options
    Offline / Send Message
    P442 polycounter lvl 8
  • 3DK.P.
    Options
    Offline / Send Message
    3DK.P. polycounter lvl 10
    Man that's some intense shader awesomeness! I would love to know how to make more advance shaders like this one. Good luck with the job hunt, I hope someone scoops you up after seeing stuff like this.
  • myles
    Options
    Offline / Send Message
    myles polycounter lvl 13
    Thats really neat, it was more awesome you made it all editable in a parameter.
    Good job!
  • Fang
    Options
    Offline / Send Message
    Fang polycounter lvl 7
    It'd be cool seeing this used in some mod, awesome.
  • Matroskin
    Options
    Offline / Send Message
    Matroskin polycounter lvl 11
    great stuff, seems pretty complex to make it this editabe :)

    The planet is lacking actual glow around its edge and water/terrain transitions look a bit too sharp to me.

    Great job on that anyways, i wouldn't be able to do that complex thing myself, just sharing aesthetical thoughts ;)
  • Junkie_XL
    Options
    Offline / Send Message
    Junkie_XL polycounter lvl 14
    Sorry my sound is low...so this is the mars surface?

    Converting to a height map then showing the water on the low points spilling in I thought was pretty cool. NASA could probably use something like this to simulate what mars might have looked like eons ago... :)
  • Avanthera
    Options
    Offline / Send Message
    Avanthera polycounter lvl 10
    all of your fx are awesome, great job on this one
  • Ryan Smith
    Options
    Offline / Send Message
    Ryan Smith polycounter lvl 11
    Thanks guys, I'm going to work on adding some glow functionality to give it some bloom along the edges.
  • JohnnyRaptor
    Options
    Offline / Send Message
    JohnnyRaptor polycounter lvl 15
    great stuff mate! agree about the water/land transition being a bit too hard. Also, maybe a good idea to exclude the clouds from the water specular?
  • Shogun3d
    Options
    Offline / Send Message
    Shogun3d polycounter lvl 12
    Great stuff, I love the fx you have on your portfolio.
  • Lee3dee
    Options
    Offline / Send Message
    Lee3dee polycounter lvl 18
    awesome! Your first piece in the fx reel came out really good!
  • Neox
    Options
    Offline / Send Message
    Neox godlike master sticky
  • hobodactyl
    Options
    Offline / Send Message
    hobodactyl polycounter lvl 18
    VERY nice work man, thanks! The functionality video is great!
  • Ryan Smith
    Options
    Offline / Send Message
    Ryan Smith polycounter lvl 11
    Hey thanks guys, Neox, if you don't mind, could you either send me a PM or get a hold of me on AIM (urtypicalmoron)... I seen the shader work in Airborn and i would love to pick your brain and get some tips off of you.

    As for the if statement, the if statement actually creates the alpha input of a lerp statement that blends the ground and vegetation layers with the water layer. The same mask also feeds into the alpha channel of a lerp expression between the detail normal of the water, and the normal map of the planet's surface. So these maps are dynamically updating. The masks update dynamically depending on what you want the water level to be. I would love to learn how to blend the sharp transition tho. I admit i don't know as much about shader tech as i would like to know, so i want to learn more. If you want to fiddle in the shader i'll be happy to supply you with the UPK. I'm not using it for anything, but wouldn't mind making it the best that it could be, and slapping a CC liscence on it for the mod community, but before i do that i need it to look good.

    Also i want to point out that although it seems like an excuse, the shader was never intended to be used for close ups... it was designed to be more of an approximation of what a planet could look like from a geosynchronous orbit (22,000 miles out, depending on the radius of the planet.) If you were to get any closer the map files would have to be alot bigger and use alot more resources (mix maps, height maps, etc. Right now the shader is using heightmaps that are 1024x512.

    I was thinking of trying to create a procedural cloud system that has some noise maps flowing through the UV coordinates to create a dynamic "Flow" as you were saying, but am not sure the best method to do this. I would love to get some input on this or maybe some reference.

    I really want to make this shader awesome, so any help and critique i can get would be awesome.

    Thanks guys :-)
  • Davision3D
    Options
    Offline / Send Message
    Davision3D polycounter
    This is already a Awesome shader! Very clever made. :) A random function somehow would be great, that changes all values and you get a whole different planet generated in a sec. A beaches color would be nice and maybe deserts somehow. Maybe makeing it connected to temperature change that goes from top pole to middle to bottom pole , so similiar to our planet. :) At the top and bottom is more snow and in the middle are more deserts.
  • Neox
    Options
    Offline / Send Message
    Neox godlike master sticky
    hmmmmm might be possible in newer builds with custom code, but you can't (or at least i can't as i don't know how) create a random value in the material editor, you can in kismet so maybe thats a way to do such a thing but its not possibe in the material or MIC editor
  • Davision3D
    Options
    Offline / Send Message
    Davision3D polycounter
    you could make a noise texture, and then get with uv scale on 1 pixel of it, then you could make a random seed value which controls the position of that 1 pixel uv. So if you have a 256x256 texture you have already 65536 possibilities. to make every settings value different just make +10 u for every value, so for example random seed = 56, earth color u pos= 56 + 10, water color u pos = 56 + 20, ...
    Its no real random, but basicly it does the trick.
  • Ryan Smith
    Options
    Offline / Send Message
    Ryan Smith polycounter lvl 11
    The pole idea is possible... Alot of the trick of this shader depends on the actual model you apply it to. For instance, like i said in the demonstration, the planet in the material view has vertex paint to blend between the base color and vegetation color. I think it would be pretty easy to apply a second Top down UV set and just plop the "Ice caps" map over what i already have. This would increase the texture samples from 6 to 8, as the icecaps would need a normal map. I th ink the main challenge right now, however, is to find a way to create an expression that changes the 1 bit mask to something thats 16 bits, so i have a smooth transition... I have NO CLUE how to do this tho.

    We should get together and develop some new material expressions that can be added to the editor. That would be pimpin.

    Davision i understand your random Seed idea and i think it's cool.

    If i understand correctly i could mask each channel of a Texture Coordinate expression, then have a constant 10, multiplied by a scaler paramater, and then add that to the masked texture coordinate, then append both inputs back together and plug it in to the UVs of the noise channel.. i'm te sting it now.
  • Neox
    Options
    Offline / Send Message
    Neox godlike master sticky
    just don't use if, if always is 1 and 0 so you could also just do some mask and increase the contrast and use that as the mask for the lerp instead of an if
  • ralusek
    Options
    Offline / Send Message
    ralusek polycounter lvl 10
  • GoK
    Options
    Offline / Send Message
    GoK polycounter lvl 18
    Hi iv actually done something very similar, though mine uses vertex painting for the terain and details instead of masks.

    Some vids

    http://www.jodygallagher.co.uk/Files/Demo2.mp4

    http://www.jodygallagher.co.uk/Files/Demo.mp4

    And pics

    zinstancev2.jpg

    zearth.jpg

    zmetals.jpg

    zorion.jpg

    zsun.jpg

    zmoon.jpg

    zpixie.jpg

    zkindomofkamon.jpg
  • mdogh
    Options
    Offline / Send Message
    hello,

    I have sent you a message, any possibility of explaining a little bit more, how you have integrated the heightmaps? Or maybe some sample of the map?

    Regards,

    M.
  • ScribbleHead
    Options
    Offline / Send Message
    ScribbleHead polycounter lvl 13
    Been learning alot from, sorry about resurrecting an ancient thread, but i was wondering - how do you handle the atmosphere and clouds if your staticmesh has multiple elements.

    Reason im asking is because im working on a planet thats basically cube mapped, with 6 different textures for a high resolution result.

    Im thinking though that it would probably be better to create seperate SM's, one for the clouds and one for the atmosphere.
Sign In or Register to comment.