Announcement

Collapse
No announcement yet.

How to get a not tiled texture based on image alpha?

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

  • How to get a not tiled texture based on image alpha?

    Hi,

    I have a PNG with transparency and ask me, how can I get the area around the texture also transparent? Where I can define the transparency outside the textured area? Maybe an option is missing.

    -Micha

    Click image for larger version

Name:	Screen Shot 10-21-21 at 09.36 AM.JPG
Views:	334
Size:	271.8 KB
ID:	1127821
    www.simulacrum.de ... visualization for designer and architects

  • #2
    Use the same texture in the opacity texture/bitmap slot. Make the background black, and the foreground white (your logo).

    Comment


    • #3
      Thank you, that's the standard way without "Diffuse Texture Alpha".

      So, if there is no direct way than I want to formulate my question as a wish to the team: please allow to use the opacity slider for the area around the map. At the moment the slider is inactive and why not use them?
      www.simulacrum.de ... visualization for designer and architects

      Comment


      • #4
        Will not decal work for you ?

        Is this what you're after (on the right side):
        Click image for larger version  Name:	decalcloud.png Views:	0 Size:	189.6 KB ID:	1127856
        Last edited by nikolay.bakalov; 21-10-2021, 03:44 AM.

        Comment


        • #5
          General decals are nice, but some times I have trouble to use decals, for example if I use metal within materials. Than the decal doesn't look good since it can't be limited to be plastic.
          www.simulacrum.de ... visualization for designer and architects

          Comment


          • #6
            What I posted is not a decal, so I'm asking if that is what you ate after

            Comment


            • #7
              Oh, yes, the right side shows what I want - alpha from PNG and anything around invisible.
              www.simulacrum.de ... visualization for designer and architects

              Comment


              • #8
                In this case you have to copy the diffuse texture to the opacity slot and set its "Default Color" to black. This property is the texture/color outside of the UV space
                stamp.zip

                Comment


                • #9
                  Thank you, your example file works fine. I tried an own texture and it doesn't work. Is it needed that the background of the texture is black?
                  Attached Files
                  www.simulacrum.de ... visualization for designer and architects

                  Comment


                  • #10
                    Hi,

                    ideally - yes, your background is white and it has a red, green and blue values different than 0. It is better to have a BW image for the opacity channel

                    Comment


                    • #11
                      It would be great if the nice simple option "Diffuse Texture Alpha" could work with any not tiled PNG. Couldn't the opacity slider be enabled as opacity default color if "Diffuse Texture Alpha" is enabled. So, no extra UI element would be needed and user would get all freedome for a quick and simple setup.
                      www.simulacrum.de ... visualization for designer and architects

                      Comment


                      • #12
                        Well, itis simpler than that. You only need the default colorof the diffuse slot to be AColor(0,0,0,0). However the Asset Editor is not a big friend to the alpha color channel. This is why I suggest using a special opacity texture. In the currently released versions there is no other way. I'm making some changes in the backend so it would be possible in the near future.
                        Last edited by nikolay.bakalov; 26-10-2021, 09:20 PM.

                        Comment


                        • #13
                          Guys,

                          we just rolled out a new update,
                          I made some changes there to simplify this workflow. It is not perfect, but kind of OK for the limited time frame I had

                          so.. just make your material as usual, put a texture in the diffuse slot, check the "diffuse texture alpha" checkbox for the opacity
                          and then run this code in the python editor:
                          Code:
                          import rhVRay as vray
                          
                          vray.Scene.BeginChange()
                          vray.Scene["/Generic/VRay Mtl/Bitmap"].nouvw_color_color=[0,0,0,0]
                          vray.Scene.EndChange()
                          where "/Generic/VRay Mtl/Bitmap" is the url path to your diffuse texture for the given material. You can find it by exporting a .vrmat file and taking the <your material>'s diffuse name
                          here is the result
                          Click image for larger version  Name:	Annotation 2021-11-04 165932.png Views:	0 Size:	407.2 KB ID:	1129307

                          I hope we can be able to expand the color picker to use alpha channels, in which case the whole scripting thing won't be necessary
                          Last edited by nikolay.bakalov; 04-11-2021, 01:21 PM.

                          Comment

                          Working...
                          X