Jump to content

Rendering a texture With Alpha?


Recommended Posts

This really should be built into the standard materials like the constant (and especially the mantra surface material), but anyway.

 

Dive into the network, look at the output node on the right. See the Af connection? That's for alpha, by default nothing is wired into it. Several ways to go about this, here's one way that involves changing the colour texture node from RGB to RGBA, fixing the previous rgb connection you just broke, then splitting off the alpha and connecting it to Af.

 

  1. select texture1, this is the colour map node. Set its signature to 'RGBA values'.  It's now outputting a 4-value vector4 rather than a regular 3-value vector.
  2. create a 'vector4 to vector', drop it between texture1 and multply1. This means the colour channel downstream is back to regular rgb.
  3. create a 'vector4 to float', connect texture1 to it's input.
  4. connect the 4th value (ie, the alpha) of the vector4tofloat node to Af on the globals

 

alpha_example.hipnc

  • Like 1
Link to comment
Share on other sites

This really should be built into the standard materials like the constant (and especially the mantra surface material), but anyway.

 

Dive into the network, look at the output node on the right. See the Af connection? That's for alpha, by default nothing is wired into it. Several ways to go about this, here's one way that involves changing the colour texture node from RGB to RGBA, fixing the previous rgb connection you just broke, then splitting off the alpha and connecting it to Af.

 

  1. select texture1, this is the colour map node. Set its signature to 'RGBA values'.  It's now outputting a 4-value vector4 rather than a regular 3-value vector.
  2. create a 'vector4 to vector', drop it between texture1 and multply1. This means the colour channel downstream is back to regular rgb.
  3. create a 'vector4 to float', connect texture1 to it's input.
  4. connect the 4th value (ie, the alpha) of the vector4tofloat node to Af on the globals

 

attachicon.gifalpha_example.hipnc

THNX Mestela!!!

 

You gave me a better understanding about witch connection the alpha is.

I understand the whole step by step instructions but it doesnt seem to work correctly

 

First i tested it on a png with transparency , also with tif with a real Alpha, and also with targa.

But no result yet.

My image borders are getting black instead of seeing trough the object.

Any Idea?

 

Also on the vector4 to vector there's already a fourth output on the node ;-)  

 

thnx!

post-13607-0-24308700-1441736796_thumb.j

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...