Scaling texture image of steel grid in Cycles

I have a simple PNG file which I’m attempting to map to a plane (and, ultimately, a cylinder) below.

I have constructed a node configuration which renders the plane in a grey, transparent way, which is fine.

However, I want to make sure that the plane is recognised as a steel mesh rather than translucent perspex or smoky glass.

So what I want is to scale up the image so that the gridlines are visible, but I can’t seem to achieve this.

I have tried various scales from 2,000 to .001, but they all produce the same smoky glass transparent plane.


Attachments


Right now you’re telling Cycles to mix the diffuse and transparent shaders with a constant ratio of 50:50.

If I understand you correctly, you want

  • the object to be opaque where the texture is black and
  • the object to be transparent where the texture has alpha?

If so, you will need to connect the “Alpha” output of the image texture node to the “Fac” input of the mix shader. This will tell Cycles that the alpha is supposed to drive the material mix. You will have to switch the top and bottom inputs on the mix shader, though - just try this out.

Hi IkariShinji,

Thanks for the help.

Yes, that’s what I’m trying to do. The black cross should be tiled width-wise and height-wise to produce a grid like a steel sieve. If the alpha channel can have a slightly see-through quality so that the structure behind it is hinted at, that would be great.

I’ve tried what you suggest:
ImageTexture ‘Alpha’ -> MixShader ‘Fac’ removes the semi-transparency. It just renders as black. However, if the mix shader inputs are swapped as you suggest, then the plane is perfectly invisible. ie it is entirely opaque if the mixshader inputs are not swapped, or entirely transparent if they are.

~ Dave

That’s strange. This is what I get with the node setup and my version of the cross texture:


I disconnected the “Color” output of the texture from the “Color” input of the diffuse shader, though, because I didn’t want the object to be black… If I leave it connected, it looks like this:


It’s got me.

I tried a fresh blend, but it’s still giving me either a fully opaque plane or a fully transparent (invisible) plane depending on which input the DiffuseBSDF and the TransparentBSDF are using on the MixShader,

My plane is the standard 2x2 plane and the scaling on the Mapping node is 30, 30, 20 as you had it.



Are you sure the texture really has an alpha channel?
We had some posts recently with Cycles not being able to read out the alpha channel in some PNGs… Can you upload the PNG somewhere so we can check (BTW, the material preview works correctly… weird)?

Here is my PNG, if you want to try…

Ensure your object is also UV unwrapped if you are using the UVs as the texture coordinates

Changing your “Mapping” node from “Point” to “Texture” might do the trick.
If not, can you upload your image texture and .blend file and so we can take a closer look?

Thanks guys.

blend attached.

The PNG file is in the OP.

gridplane.blend (465 KB)

You did not UV unwrap the plane, but told Cycles to use UV coordinates - just as Richard suspected.
And btw, no, the PNG is not in the OP - there is just a screenshot of your PNG…:wink:

Sorry, it appears that the object needs to be UV unwrapped.

(Thanks, Richard)

Sorry, yes, I saw Richard’s post after uploading the blend.

Thanks!

So it is.

:o