Announcement

Collapse
No announcement yet.

Replicating Infamous texture effect

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Replicating Infamous texture effect

    In Infamous(PS3), if you were to follow the infamous the main character, Cole, would develop these black tendrils on his scalp and other visible skin areas.

    Ex:
    [SHOT]http://i33.photobucket.com/albums/d76/hbcityslicker/infamousbadandgood.jpg[/SHOT]

    Is there a way to replicate this effect within UDK? Any help or alternate suggestions are appreciated.

    #2
    I just came from another thread where I explained where to look to control materials better at: http://forums.epicgames.com/showthre...1#post27629751
    I've never played that game, but I'm guessing that you need a material that can begin looking like the left side of that character and slowly change to look like the right side.

    This is all from memory and without the editor, so I may miss a detail or two. This should get you close. Feel free to correct my math if it's backwards somewhere...

    I'm at work, so no UDK or happy screen shots. I'll try to explain how you'd set this up though. Make a material that uses your normal textures. I'll just use the diffuse texture in the example here to keep it simple. Every texture in the mat could be hooked up the same way. Use the single Scalar Parameter to control all of your textures (Diffuse, Normal Map, Specular, Etc) so that a single number can control them all. Easier that way.

    Add a scalar parameter node
    Name your Scalar Parameter something easy to remember like 'Tendrils'.
    Add a subtract node.
    Add a constant node and set it to a value of 1.0.
    Connect your constant node to your subtract node.
    Hook your scalar parameter node into the subtract node.
    Your subtract node should now be read as "1.0 - ScalarParameter"
    Add a multiply node.
    Connect your subtract and your diffuse texture to the multiply node.

    Add your alternate diffuse texture.
    Add another multiply node.
    Connect your scalar parameter (From above) and your alternate diffuse texture to the multiply node.

    Add an 'Add' node.
    Connect both of your multiply nodes to the add node.
    Add a Constant Clamp node.
    Connect your Add node to the Constant Clamp node.
    Connect your Constant Clamp node to your Diffuse.

    Once you are done, click the green arrow at the top of the material editor to compile your material and then close the editor.

    In your browser, find the material that you just made. Right click on it and choose to create a new material instance.
    Once you have your new instance, open its properties.
    You'll find your scalar 'Tendrils' listed in its properties. You can directly change it here or via Uscript or kismet.
    If Tendrils is set to 0, it will use the normal texture. 1.0 will use the alternate texture. You can set it anywhere that you want between 0 and 1 to blend them. 0.5 will blend both of them together evenly.

    You can use this material instance anywhere that you would normally use a material. So, you could add it to a mesh by opening the mesh props and adding it there. Make sure that the instance is selected (Not your original material) and click the little green arrow in the mesh properties.

    EDIT: If you want to keep your original texture and just add an overlay on top of it like a tattoo, you'd need to change a few things, but you can do that too. If you want, I'll try to find time to explain that way later when I have more time.

    Comment


      #3
      Thanks for the reply i'll give your method a shot. What i'm really trying to achieve here is something tattoo like that would appear after an event in the game. Not really too gradual as you mentioned.

      Comment


        #4
        [SHOT]http://i596.photobucket.com/albums/tt46/Wyldhunt/UDK/Tattoo.jpg[/SHOT]

        If you change the Scalar to 1, then your tattoo will show up. In this case, my grass shows up on my granite wall.

        Comment


          #5
          That trick works with any masked alpha (Always 0% or 100% opaque).

          If you can't figure out how to make a good blend for transparency (The slight graying of the skin and keeping any diffuse details slightly visible under the tattoo), I'll try to find time to write up a full tutorial. No promises though.

          Basically, you'd crop the main texture the same way as above, then multiply your tattoo's RGB by the tattoo's Alpha to adjust the color scale.
          Then you'd multiply the main texture by the tattoo's alpha to grab a tattoo shaped slice and desturate it (There's a node for that). Multiply your desaturated slice with your adjusted tattoo and then add that multiply to your cropped main texture as above.

          Depending upon your desaturated main texture slice and tattoo colors and brightness, you might need to add a multiply node on one of them just before you multiply them together to make one of them brighter so that they don't get washed out.

          If you do begin multiplying by constant numbers to add brightness, make sure that you have a constant clamp to keep the final color from going above 1.0.

          If you replace the tattoo texture node with a Texture Param node, then you'll be able to swap out your tattoo via scripting or kismet as well.

          Comment


            #6
            you don't need to make a tutorial but if you could post another fantastic tree that would be great.

            Comment


              #7
              Originally posted by Wyldhunt View Post
              [SHOT]http://i596.photobucket.com/albums/tt46/Wyldhunt/UDK/Tattoo.jpg[/SHOT]

              If you change the Scalar to 1, then your tattoo will show up. In this case, my grass shows up on my granite wall.
              So with that material the value of the scalar would need to be controlled through unreal script to change within the game right?

              Comment


                #8
                Uscript or kismet. Maybe Matinee but I've never had a reason to try.

                In my comment in the thread that I linked to above, I listed the UDN pages specific to controlling parameters for each method.

                EDIT (Important Reminder)
                Remember that you can control 'instances' of materials. I'm not sure if it'd work on your main material or not, but the instructions are specific that way. So, make sure that you make an instance of your final material and use that.

                Comment


                  #9
                  As for making another tree for you, it'll be a few days at least before I have the time. Even then, I don't have any textures with opacity that I would want to use in the example and I don't want to ask one of our artists to do extra PS work making one...
                  I advise that you try it yourself first and see if you can get it. If you really can't, I'll see if I can get you an example. I'll probably still be using a masked alpha(Probably the same ones as this example), so it'll wind up looking the same. But, you'll have the nodes and tree that you need.
                  You have at least a few days to play with it first though. Let me know if you figure it out so I don't waste my time if you already have it.

                  Comment


                    #10
                    Alright. Much obliged for your help. This is one more thing down in a long list for a project.

                    Comment


                      #11
                      Yeah. The lists are long. I spent about a month obsessing on the mat editor alone to figure out these tricks. And, I'm a scripter. :P
                      I'll try to find time to make you that alt mat tree though.

                      Comment


                        #12
                        You do unreal script? Any chance i could get your email? I will need some help with that in the near future.

                        Comment

                        Working...
                        X