Problem with 3D objects textures

Hi,

I have a small problem with MonoGame 3.4.

I tried to use some models in my MonoGame application, but the model still black, like if the texture was not loaded.

I tried to create my own 3D object on VS2013, but i got the same problem.

My 3D object use 3 differents textures.

I put my 3D object and the textures on Content.mgcb, on the Models, and Textures folder, with related path to the texture.

The Content Pipeline build is successfull.

Somebody know a solution to my problem?

(Sorry for my bad english)

what 3d program did you use for the models, and do you have lighting enabled when drawing?

I used the visual studio 2013 graphics editor.
Lightning is enabled too.

well sorry, never used that… I use blender, and there are some settings you have to apply there when exporting your model… The default settings produce a file with the right extension, but that is unusable by monogame… … …
-Perhaps! you are having a scimilar problem…

Ok thanks.

I will try with 3ds max.
Do you know how to use 3ds max models on monogame?

When i debug the application, the Texture property of each my BasicEffects (of the model meshes) are set to null.
I think the probleme is from this.

My model in the visual studion graphics editor:

My model in the applicaiton:

Yes, I think that may be because of the export settings… You may need to export using settings for previous versions, like I do in blender…

-Or you may need to build your game for windows 8…!
I couldnt get my 3d to work either, untill I read somewhere that I had to set my “solution configuration” to windows 8 SPECIFICALLY, and now I can display models…

Another bug I had was colors… My models came out white because i had been using ints instead of floats for changing color values somewhere else in my code…

Ok, heres what it is…

You need to apply the changes you made in your editor…

I dont know much about this stuff, but in blender, after scaling, moving or doing certain things,
you have to APPLY that change to the model…

Your base cylander is drawn elongated, like it was when you created it, before shortening it, am I right?
-And the ball is missing, because it is ofcoarse inside the cylander…

Yes you are right, i tried to save, rebuild the solution, delete the content folder on the generated bins…
No changes.

I will try with 3ds max

Well, you are getting closer… I just got passed what you are on a few days ago, and now Ima having issues drawing multiple things together… … … My backgrounds are drawn in front, some models looked inverted, and all sorts of crazy stuff…

Every day a new barrier… Every week a new solution…

Just a question, how do you export models from Blender to use it in Monogame?
The export function doesn’t allow me to change the file version of exported file.
Do you export model to fbx file?

hmmmm… First of all, I just got the most recent version the other day, so you may need to do that for these options to be available to you…

besides that, here are the steps I take to export:

file > export >fbx

Then the export window opens, prompting you for a name and location to export to…

In the bottom LEFT of this window, there is a small scrolling menu, titled ‘EXPORT FBX’

the second or so item on this menu is a dropdown menu > select ascii 6.1

Hi,
when drawing a 3d model using the BasicEffect class you need to set Texture (your texture file) and TextureEnabled (true) properties.

Hi,

I need to specify the texture directly on the Draw method?
I thought the 3d model preserved the texture link when i import it to the Content file.

I will try it.

Is there a better solution than BasicEffect to draw a 3d model?

Thanks :slight_smile:

Models I export using blender store the texture in the file… I dont need to specify any texure information when I draw them… So you shouldnt need to.

I have seen other people have the same issues…
make absolutely sure to set the right export settings, file extension is NOT enough :slight_smile:

Ok.
So, in the Content.mgcb file, you just add the model?
For the textures, you use neither “Content” mode for the build, nor the Content.mgcb file?

Thanks for your help :slight_smile:

Well, I dont know about mgcb files… I cant remember seeing those…

All I do, is drag and drop model files into my solution explorer (into my content project), rebuild my solution, and it runs…

I dont have files for the textures, as they are stored in the model…

Also, I use VS2010.
I couldnt get all this XNA / monogame stuff working on later versions at all…

Which monogame version do you use?
I have read that the content project has been replaced by the Content.mgcb file.
I will try it this afternoon
Thanks a lot :smile:

I am using the newest public download version… maybe its a few weeks old at most…

I had trouble getting content into monogame too, merging from xna… I read a lot of posts and tried 2 or 3 versions of visual studio… also tried some pipeline tool that came with monogame…

The only combination that I can make work at all, is vs2010 express, and using a content-project next to my regular game-project… Its really easy, a few steps of mouse clicking…
I dont know the reasons for any of this, but it works for me… … …