Help!Model got wrong color in Assimp!

Started by
3 comments, last by YenTown 9 years, 8 months ago

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.

Advertisement

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

FastCall22: "I want to make the distinction that my laptop is a whore-box that connects to different network"

Blog about... stuff (GDNet, WordPress): www.gamedev.net/blog/1882-the-cuboid-zone/, cuboidzone.wordpress.com/

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.

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

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.

This topic is closed to new replies.

Advertisement