Home Technical Talk

shadow creature shader

polycounter lvl 18
Offline / Send Message
man_o_mule polycounter lvl 18
On my current project i want to make some enemies that resemble the shadow creatures in Ico. I have no idea really where to start on the shader for this. The target engine is UT3. Anyone have any suggestions where to start or could point me to some good UT3 shader tutorials?

Check out this vid if your not familiar with ico. shadow creatures in question appear at about 1:25. [ame]http://www.youtube.com/watch?v=YSXwreNIuYE&feature=PlayList&p=0BBC0359F8CFF0A6&playnext=1&playnext_from=PL&index=27[/ame]

Replies

  • PolyHertz
    Options
    Offline / Send Message
    PolyHertz polycount lvl 666
    so you want creatures that are pure black, cast no shadows, and have a transparent gradient applied to certain areas? doesn't sound like anything difficult...then again its hard to be sure thats all thats going on with such a low res vid as the ref

    I have some old footage of it back when ico was being transitioned from ps1 to ps2 dev somewhere, ill see if I can dig that up sense I rememebr it being alot clearer

    edit: nevermind, the production footage I have mostly just shows the original enemies before they became shadows
  • man_o_mule
    Options
    Offline / Send Message
    man_o_mule polycounter lvl 18
    i think your missing a key point. the monsters in ico looked like they were made of smoke. that's more the effect i'm going after. no hard edges. I guess i could somehow do that with a bunch of alphad planes but then i wouldn't be able to move them as well. maybe i could somehow link particle emmiters to the verts in the model and have the model have a transparent texture........

    btw, the model i'm doing this with has less than 500 polys :P
  • jocose
    Options
    Offline / Send Message
    jocose polycounter lvl 11
    It might be better to approach this with a shader particle combination. If are able to put some particle emitters throughout the model and then mix it with a shader effect and if everything is black, and unshaded, it should all blend together into a shadow looking thing.

    The additional advantage to this approach is that you could increase or decrease the particles as well as their parameters based off what the model does. If it gets damaged particles could fly off, or if he gets angry he can puff out with particles.

    This breaks up the problem and also makes the shader you have to create simpler. It can basically just be an animated texture.
  • man_o_mule
    Options
    Offline / Send Message
    man_o_mule polycounter lvl 18
    That sounds like a good idea. not sure how to get started though. guess i'll go searching for some UT3 shader and particle tutorials.
  • Slum
    Options
    Offline / Send Message
    Slum polycounter lvl 18
    It's hard to tell from that youtube clip, but it looks like they're using a multiply blend mode. Subtractive blending can do some neat stuff too, depending on the look you're going for.

    If I were going to make a 'smokey' character shader, I'd start with some kind of inverse fresnel on the whole guy (so you have interesting soft falloff along the edges), mix that with a scrolling smoke texture with some DUDV texture warping for smokey wobbles. Some particle trails would help for sure. If you have the time, try some flowing 'ribbons' with a translating smoke texture, you might get some good results with something like that. (I'm envisioning something like the Dementor's from Harry Potter).
  • renderhjs
    Options
    Offline / Send Message
    renderhjs sublime tool
    check this article (by the same creators) that might answer some of your questions reagarding how the effects work:
    http://edusworld.org/ew/ficheros/2006/paginasWeb/making_of_sotc.html
  • man_o_mule
    Options
    Offline / Send Message
    man_o_mule polycounter lvl 18
    never heard of inverse fresnel, will research.

    great article renderhjs, thanks.
  • SideEffect
    Options
    Offline / Send Message
    SideEffect polycounter lvl 19
    renderhjs wrote: »
    check this article (by the same creators) that might answer some of your questions reagarding how the effects work:
    http://edusworld.org/ew/ficheros/2006/paginasWeb/making_of_sotc.html

    Wow thank you for that. The game amazes me even more after reading through that article. Always been curious how they did a lot of that stuff.
  • Slum
    Options
    Offline / Send Message
    Slum polycounter lvl 18
    man_o_mule wrote: »
    never heard of inverse fresnel, will research.

    great article renderhjs, thanks.

    Inverse fresnel is nothing fancy, it's the same thing as a regular fresnel term, you just invert the result, so instead of getting 'brighter' as normals face away from the view, they get 'darker'. In the shader just do something like color * ( 1 - fresnel ) or you can do a lerp(color1,color2, fresnel). If you're not familiar with shaders in general, it may sound kind of strange, but it's super simple to set up in something like Unreal, ShaderFX, or Mental Mill.
  • man_o_mule
    Options
    Offline / Send Message
    man_o_mule polycounter lvl 18
    http://www.wonderhowto.com/how-to/video/how-to-use-a-fresnel-effect-in-materials-in-unreal-3-editor-197044/

    so that's a fresnel shader, so a reverse one would darken the edges? sounds very promising. now to look up the DUDV texture warping you mentioned.


    edit: lol, i did a google search for "DUDV texture warping" and the first result was this thread.
  • Slum
    Options
    Offline / Send Message
    Slum polycounter lvl 18
    A DUDV map is simlar to a normal map, except you only need two channels, which correspond to U and V in the pixel shader. You add the values in your DUDV(often times scrolling) map to your UV coordinates, which results in the texture being 'warped' or 'wobbled'. It's great for adding some organic motion to a static texture.

    Some talk of it here http://tech-artists.org/forum/showthread.php?t=423
  • ablaine
    Options
    Offline / Send Message
    ablaine polycounter lvl 14
    Is that inverse fresnel idea how you would go about doing a "cloaking" or semi-invisibility effect? I'm thinking in terms of the Dark Templar from Starcraft. Would I use the same method to go about creating that?
  • onionhead_o
    Options
    Offline / Send Message
    onionhead_o polycounter lvl 16
    since fresnel is being discussed here. i hope that someone could answer my question which is.

    How to achieve fresnel illumination in 3dmax2009 just like in Unreal3 from the tutorial - http://www.wonderhowto.com/how-to/vi...editor-197044/.
  • Mark Dygert
    Options
    Offline / Send Message
    You can also use Fresnel falloff in max and maya to blend on the world up axis. It can be very useful for adding things like snow to the top of rocks, or dust to the top of objects. The advantage is that you apply the shader and can bake the effect into your jumbled up UV mess.

    It can also be used to help create rim lighting.
  • Vailias
    Options
    Offline / Send Message
    Vailias polycounter lvl 18
    man'o'mule:

    The fresnel term is really a 0-1 range based on the camera to surface normal dot product
    I think the math goes:
    (((LookDirection dot Surface normal ) *-1) +1) ^FresnelStrength

    Which, if applied to specularity or diffuse, makes pixels brighter the closer they are to being perpendicular to the camera's look direction. The FresnelStrength exponent serves as a sort of focus for the effect. Higher exponents make only pixels very close to perpendicular get any measurable brightness.

    So for an inverse fresnel effect its effectively just

    (LookDirection dot SurfaceNormal)^FresnelPower

    for UT3 this requires actually hooking up the math to invert their fresnel term.
    Fresnel node hooked to multiply node by negative 1 constant, then hooked to an add 1 node, then hooked to a power node with a parameter or constant going into it.

    I cooked up a demo shader pack for ut3 that does all this with comments in it so you can know what does what. Mess with it a bit and see what you can find. I included one of my character models in the pack with the shader applied to it so you can see how it would look on a character
    http://vailias.com/files/Smoky_Shaders.rar

    Here it is applied to my Xan model
    Xan_Smoke.jpg
    and here it is on a Krall on a different map
    Krall_Shadow.jpg

    edit: Link fixed
  • ablaine
    Options
    Offline / Send Message
    ablaine polycounter lvl 14
    Looks like that link to the rar file might be broken.
  • Vailias
    Options
    Offline / Send Message
    Vailias polycounter lvl 18
    >_< thanks.
    Mistyped.
    Fixed now.
Sign In or Register to comment.