Announcement

Collapse
No announcement yet.

Hiding a part of texture

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

    Hiding a part of texture

    Hi there.
    i have a character with a skin material. the skin material is auto generated by a software called iclone.
    it contains the diffuse.
    i want to hide only a certain part of the mesh (right hand and arm) when a key is pressed.

    i tried everything i know.
    i tried deleting the write hand texture from the main body skin with Photoshop but it didnt work.
    anyway to hid a certain part of the texture?

    http://4.1m.yt/pwPJ3z_.png

    (i dont know why i couldn't post the photo directly(database error))

    i want to hide the area highlighted.


    thank you very very much in advance.
    Attached Files

    #2
    You need to create a channel mask (you can put it in the alpha of the diffuse) and then set your material to "masked".
    Then hook the mask channel up to the opacity pin of the material node.

    (i dont know why i couldn't post the photo directly(database error))
    Your file probably exceeded the max allowed file size. (Its 5 MB as far as I know)
    On the other hand.. every DB has its hickups now and then ;p
    Last edited by KVogler; 01-19-2017, 11:59 PM.

    Comment


      #3
      Hi.
      Thank you for the reply.
      I'm truly a beginner.
      So I don't understand how to create a channel mask.
      If you could take a screenshot if the material Bp if you have time or something to give me an idea of how to do it.

      Thank you.

      Comment


        #4
        No Problem..

        Here is a little example:

        Lets say you have a mesh that looks like this:

        Click image for larger version

Name:	UVMap.JPG
Views:	1
Size:	60.3 KB
ID:	1121799

        As you can see, I have isolated the right "arm" in the Uv space. That makes masking a bit easier.

        In Photoshop, you create a simple black/white image (that is your mask).

        Click image for larger version

Name:	Mask.JPG
Views:	1
Size:	11.4 KB
ID:	1121800

        That mask is now copied into the alpha channel of the diffuse texture.

        Click image for larger version

Name:	Texture.JPG
Views:	1
Size:	162.2 KB
ID:	1121801

        Be sure to save the image as 32 bit file.

        Now import the texture and create a material.
        - Change the Blend mode to "masked"
        - Connect the alpha channel of the texture sampler with the Opacity Mask pin

        Click image for larger version

Name:	Material.JPG
Views:	1
Size:	86.2 KB
ID:	1121802

        In the level, it looks then like this:

        Click image for larger version

Name:	Editor.JPG
Views:	1
Size:	67.5 KB
ID:	1121803

        That should give you an idea about it

        A few things to note though:
        - The hidden geometry does not leave a "hole" because the geometry of the arms and the torso are not connected
        If you use a connected topology, you would see inside the mesh...

        - In this case, the mask channel data has the same resolution as the diffuse texture. For precise masking this is important.
        Here however, a mask with lower resolution would actually suffice.
        So it you create a second texture asset with a lower resolution (say 512*512), you can save some memory.
        The masking would create a small gradient when sampled against the 4k diffuse texture, but that would be well outside the UV polygons..

        Comment


          #5
          Oh that's awesome!
          I think that's exactly what I'm looking for.
          Thank you very much

          Comment


            #6
            hi. can i know which format to save? i tried PSD but it didnt import.
            LogFactory: FactoryCreateFile: Texture with ReimportTextureFactory (0 0 ../../../../../../Users/Aviator/Desktop/1111.psd)
            Format of this PSD is not supported
            Error: Texture import failed
            whats wrong?
            thank you

            Comment


              #7
              never mind tga worked.
              you are freaking awesome. thats exactly what i needed.
              Thank you so much for putting the time and effort to explain thoroughly.

              Comment

              Working...
              X