Author Topic: Setting texture opacity  (Read 1611 times)

Offline fintroll

  • byte
  • *
  • Posts: 6
    • View Profile
Setting texture opacity
« on: September 14, 2011, 07:53:45 pm »
Good time of day, everybody.
tell me please how to extract texture, using opacity map(texture with alpha-mask) like on picture(3ds max example)?

[attachment deleted by admin]
« Last Edit: September 14, 2011, 07:57:24 pm by fintroll »

Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 11777
    • View Profile
    • http://www.jpct.net
Re: Setting texture opacity
« Reply #1 on: September 14, 2011, 09:18:33 pm »
I...don't get the question!?

Offline fintroll

  • byte
  • *
  • Posts: 6
    • View Profile
Re: Setting texture opacity
« Reply #2 on: September 14, 2011, 10:33:30 pm »
question:
What I need if i want replace black fields on texture to transparency.
« Last Edit: September 14, 2011, 10:35:32 pm by fintroll »

Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 11777
    • View Profile
    • http://www.jpct.net
Re: Setting texture opacity
« Reply #3 on: September 14, 2011, 10:40:36 pm »
I see...you can either rely on the auto-conversion that jPCT does by default for black parts of textures or use your favourite image editing program to create an alpha channel for it and load it with new Texture(..., true).

Offline fintroll

  • byte
  • *
  • Posts: 6
    • View Profile
Re: Setting texture opacity
« Reply #4 on: September 15, 2011, 03:21:46 pm »
Just one layer(texture with alpha channel)? Don't need to create Alpha-channel texture(like heigth map) and combine layers with TextureInfo?

Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 11777
    • View Profile
    • http://www.jpct.net
Re: Setting texture opacity
« Reply #5 on: September 15, 2011, 08:49:49 pm »
No. You simply add the alpha channel to the image and save it as png (because jpg doesn't support alpha).

Offline fintroll

  • byte
  • *
  • Posts: 6
    • View Profile
Re: Setting texture opacity
« Reply #6 on: September 15, 2011, 10:43:16 pm »
Thanks.