@GeonBit wrote:
I created some simple obj and fbx models with no texture, import them into MonoGame, and once I enable vertex color - violah! - they are all red.
I also tried creating my own effect which renders vertex color and it confirms that all vertex have red color.
Why is that?When I view those models in any other program they all show to have white vertex color, and .obj shouldn't even contain vertex color information to begin with.
So whats the deal with the red color, is this a bug?
Thanks!
Edit: added a more simple rendering code example - can't get any more basic than this
protected override void Draw(GameTime gameTime) { GraphicsDevice.Clear(Color.CornflowerBlue); var model = Content.Load<Model>("Cube"); foreach (var mesh in model.Meshes) { foreach (var eff in mesh.Effects) { (eff as BasicEffect).VertexColorEnabled = true; } } model.Draw(Matrix.Identity, Matrix.CreateLookAt(new Vector3(0, 0, 650), Vector3.Zero, Vector3.Up), Matrix.CreatePerspectiveFieldOfView(MathHelper.PiOver4, 800f / 600f, 0.5f, 1000f)); base.Draw(gameTime); }
Once I set
effect.VertexColorEnabled = true;
the cube appear completely red, even in formats that don't have vertex color.
Posts: 2
Participants: 2