Jump to content

  • Log In with Google      Sign In   
  • Create Account

Banner advertising on our site currently available from just $5!


1. Learn about the promo. 2. Sign up for GDNet+. 3. Set up your advert!


Help!Model got wrong color in Assimp!


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
4 replies to this topic

#1 YenTown   Members   -  Reputation: 108

Like
0Likes
Like

Posted 28 August 2014 - 03:17 AM

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.

 

Attached Thumbnails

  • 1.png
  • 2.png
  • 3.png
  • chgddghh.png


Sponsor:

#2 Migi0027 (肉コーダ)   Crossbones+   -  Reputation: 3747

Like
0Likes
Like

Posted 28 August 2014 - 05:20 AM

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/


#3 Ashaman73   Crossbones+   -  Reputation: 11675

Like
2Likes
Like

Posted 28 August 2014 - 05:34 AM

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, 28 August 2014 - 05:36 AM.

Ashaman

 

Gnoblins: Website - Facebook - Twitter - Youtube - Steam Greenlit - IndieDB - Gamedev Log


#4 YenTown   Members   -  Reputation: 108

Like
0Likes
Like

Posted 28 August 2014 - 05:38 AM

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



#5 YenTown   Members   -  Reputation: 108

Like
0Likes
Like

Posted 28 August 2014 - 05:40 AM

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.






Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS