Sign in to follow this  
YenTown

Help!Model got wrong color in Assimp!

Recommended Posts

Hello,everyone.

Im new here.

 

I downloaded one cool FPS model of .blend format.

It's alright in blender(3rd pic),then I export a .obj file.

When I use AssimpViewer(from AssimpSDK 3.0,) to view it,the texture turns green(1st pic).

And it turns purple after I load it in a OpenGL tutorial(2nd pic).

I also test the .obj in 3dsMax,the model scratched but the textures got right color.

What it originally is like the 4th pic...

 

anyone can help?Thanks.

 

Share this post


Link to post
Share on other sites

Most likely an RGBA<->BGRA issue, that is, the blue and red channel are swapped. This happens, if you upload a BGR(A) texture (fileformat) as RGB(A) texture (internal GPU format) and vice versa (eg. blender expects a RGB(A) texture and the demo a BGR(A) texture). Double check the texture format and the demo code.

Edited by Ashaman73

Share this post


Link to post
Share on other sites

Hi Yen,

 

it might be a problems due to the materials, 

 

can you supply me with the .blend file if it isnt too much trouble?

 

-MIGI0027

here is the link:

http://tf3dm.com/3d-model/cod-ghosts-ak-12-with-animation-94963.html

 

It's frustrating to intitle a username :D

 

Yentown is a name for  the illegal immigrants in a japanese movie "Swallowtail Butterfly" as "yen thieves" :P

Share this post


Link to post
Share on other sites

Most likely an RGBA<->BGRA issue, that is, the blue and red channel are swapped. This happens, if you upload a BGR(A) texture (fileformat) as RGB(A) texture (internal GPU format) and vice versa (eg. blender expects a RGB(A) texture and the demo a BGR(A) texture). Double check the texture format and the demo code.

Thanks!I think it could be the answer.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this