on 31-08-2012 09:55 AM
I have an MDX which works fine in the viewer with an alpha blended texture. It's exported from Max as an FBX with the alpha texture as a 32bit BMP.
When I render using BasicModel, the alpha is not being read by the shader. I've tested this by setting alpha explicitly with:
color.w = step(0.5f, max(max(color.x, color.y), color.z));
And this comes out with some alpha'd sections of the textures, as expected.
I'm using a custom version of BasicModel to add some point lights, and have traced the texture loading down to one line:
new Texture2D( image, true ) ;
Which loads the texture from a block of data in memory and generates mipmaps. I've tried forcing the format to rgba, but this makes no odds.
So, my question is, where is my alpha channel?! It looks like Texture2D isn't working, as the data in the MDX is correct (going by the model viewer).
Can anyone shed some light on this?
Thanks!
-- James
Solved! Go to Solution.
on 31-08-2012 12:04 PM
on 31-08-2012 03:20 PM
Hi:
Tell me how it's the image info(from explorer) did oyu set the texture as rgba4444? on SDK?
Cheers,
on 31-08-2012 04:23 PM
on 31-08-2012 04:57 PM
Hi:
Could oyu please try using png files? rgba 32bit?
Cheers,
on 31-08-2012 05:30 PM
Saving as 32bit PNG does appear to work, although it's a bit of a pain from photoshop as it wont save the alpha channel, rather is saves the transparency.
So this does seem to be a bug in the Texture2D code, as it works in the viewer, and also in other 32bit BMP's.
I can provide an MDX which fails if anyone from the SDK team are reading. It really does need fixing -- and preferably increasing the supported texture formats and adding compressed support....
)
Cheers!
-- James
on 31-08-2012 06:38 PM
Hi:
Nice to hear that with png works,, now lets try to find out why that image don't work could you please send me the BMP? but ..may be I'm wrong but BMP format never had alpha channel.
Cheers
on 31-08-2012 09:54 PM
on 05-09-2012 04:30 PM
I'm not too bothered about which format I use, it just happens that BMP is a bit easier to deal with when using alpha channels in PhotoShop.
What I find weird is that on some models, the BMP alpha works, on others it does not. Even when using a texture which "works" and copying it to another model, it mysteriously stops working.
I've swiched to using PNG's where appropriate but supporting something like TGA would be nice to have. Although PNG does indeed seem to do everything I need.
Cheers,
-- James
on 05-09-2012 05:52 PM
Hi:
MMM that's strange anywasy glad to know PNG worked for eveything you need.
Cheers,
PSM Developer Registration (for free) on PSM DevPortal is required to post on the forum.
Please sign out then sign in again to the forum and PSM DevPortal after you have completed the registration.
フォーラムへ投稿をするにはPSM DevPortalへの登録(無料)が必要です。
登録後はフォーラムと
PSM DevPortalを一度ログアウトし、再度ログインしてください。


Website ©2013 Sony Computer Entertainment Europe
All content, game titles, trade names and/or trade dress, trademarks, artwork and associated imagery are trademarks and/or copyright material of their respective owners. All rights reserved. [more info]
%%http://community.eu.playstation.com/t5/Announcements/Beta-Trial-Information/td-p/11386362
best_shooter.png%%http://community.eu.playstation.com/t5/Announcements/Introducing-Best-of-PlayStation/td-p/13741979
best_driver.png%%http://community.eu.playstation.com/t5/Announcements/Introducing-Best-of-PlayStation/td-p/13741979
best_performer.png%%http://community.eu.playstation.com/t5/Announcements/Introducing-Best-of-PlayStation/td-p/13741979
best_footballer.png%%http://community.eu.playstation.com/t5/Announcements/Introducing-Best-of-PlayStation/td-p/13741979
best_fighter.png%%http://community.eu.playstation.com/t5/Announcements/Introducing-Best-of-PlayStation/td-p/13741979
best_creator.png%%http://community.eu.playstation.com/t5/Announcements/Introducing-Best-of-PlayStation/td-p/13741979
best_action_player.png%%http://community.eu.playstation.com/t5/Announcements/Introducing-Best-of-PlayStation/td-p/13741979
dev2.png%%http://community.eu.playstation.com/t5/Website-and-Forum-Help-Feedback/Producer-and-Developer-Ranks/td-p/18407352
trophy.gif%%http://community.eu.playstation.com/t5/Website-and-Forum-Help-Feedback/The-Community-Awards-FAQ/td-p/18407096
PSlogoSM.png%%http://community.eu.playstation.com/t5/Website-and-Forum-Help-Feedback/Online-Support-Coordinator-rank/td-p/18414870