www.jpct.net

jPCT-AE - a 3d engine for Android => Support => Topic started by: fintroll on September 14, 2011, 07:53:45 pm

Title: Setting texture opacity
Post by: fintroll 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]
Title: Re: Setting texture opacity
Post by: EgonOlsen on September 14, 2011, 09:18:33 pm
I...don't get the question!?
Title: Re: Setting texture opacity
Post by: fintroll on September 14, 2011, 10:33:30 pm
question:
What I need if i want replace black fields on texture to transparency.
Title: Re: Setting texture opacity
Post by: EgonOlsen 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).
Title: Re: Setting texture opacity
Post by: fintroll 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?
Title: Re: Setting texture opacity
Post by: EgonOlsen 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).
Title: Re: Setting texture opacity
Post by: fintroll on September 15, 2011, 10:43:16 pm
Thanks.