XNA Creators Club Online
Page 1 of 1 (12 items)
Sort Posts: Previous Next

UV problems with BLENDER.

Last post 11/17/2009 11:48 AM by Ilda Ladeira. 11 replies.
  • 10/16/2009 7:16 PM

    UV problems with BLENDER.

    hello everybody.

    I have problems when exporting a textured model when the texture was not build using the UV EDITOR.
    when saving and loading as BLEND file everything working normally, but when exporting it to 3ds DAE or any other format no DSI and nor Visual studio finding any textures in it.
    actually Visual studio (XNA) reporting this error:

    Error 1 BasicMaterial has a texture, but the mesh "Sphere" has geometry that does not contain texture coordinates. C:\Users\hido\Documents\Visual Studio 2008\Projects\The Invaders\The Invaders\Content\models\earth.fbx The Invaders

    Any clue what's going on? I've tried everything, and with no success.

  • 10/16/2009 7:33 PM In reply to

    Re: UV problems with BLENDER.

    No idea how to fix it in blender - I installed it, tried to do something and gave up after 15 minutes and still not being able to build a simple primitive :-/
    But the error is pretty clear, the exported vertices are not declared as a VertexPositionTexture but just as VertexPoitionColor which is impossible to use with a texture since the uv coordinates are missing.
    Having a texture is not enough, you cant say "apply that texture on my mesh" (like in some modeling programs).
    Each vertex must have the uv coordinates so the shader knows what part of the texture should be sampled and rendered at a particular pixel.
  • 10/16/2009 7:43 PM In reply to

    Re: UV problems with BLENDER.

    ERiba:
    No idea how to fix it in blender - I installed it, tried to do something and gave up after 15 minutes and still not being able to build a simple primitive :-/
    But the error is pretty clear, the exported vertices are not declared as a VertexPositionTexture but just as VertexPoitionColor which is impossible to use with a texture since the uv coordinates are missing.
    Having a texture is not enough, you cant say "apply that texture on my mesh" (like in some modeling programs).
    Each vertex must have the uv coordinates so the shader knows what part of the texture should be sampled and rendered at a particular pixel.

    I know what's the problem. and i know that the UV mapping is not part of the exported file. My question is WHY and HOW to solve it.
  • 10/16/2009 7:55 PM In reply to

    Re: UV problems with BLENDER.

    uups sorry but you specifically wrote that you exported it without using a UV Editor its logical to conclude you wanted it just that way.
    You should ask this question at the blender forum not here.
    I can only say that you can and must do that in blender I even know what you have to do but not how...

    The mesh you created must be 'unwrapped' which is like cutting your paper model to become a flat surface.
    Next you apply a texture on that surface (which is probably called uv texture) and adjust it to fit on your unvrapped model.
    The Editing program  (blender) finally  calculates the uv coordinates which are ready to be exported with your mesh.

    Did you google for 'blender uv mapping' or unwrapping at all ???





  • 10/16/2009 8:16 PM In reply to

    Re: UV problems with BLENDER.

    ERiba:
    uups sorry but you specifically wrote that you exported it without using a UV Editor its logical to conclude you wanted it just that way.
    You should ask this question at the blender forum not here.
    I can only say that you can and must do that in blender I even know what you have to do but not how...

    The mesh you created must be 'unwrapped' which is like cutting your paper model to become a flat surface.
    Next you apply a texture on that surface (which is probably called uv texture) and adjust it to fit on your unvrapped model.
    The Editing program  (blender) finally  calculates the uv coordinates which are ready to be exported with your mesh.

    Did you google for 'blender uv mapping' or unwrapping at all ???






    Thank you very much for your help, but you missunderstood me, let me explain:
    There are two way to apply textures, one: using the UV Editor which called "UV Image editor" and the other way is the simple way to apply a texture to the material.

    When i'm using the "simple" way for applying the texture, I accunter at the problem i mantioned before. Do you understand my point? 
    The object is a simple Sphere in which i apply and Earth texture using Prebuild Sphere UV that's in blender. on that i'm applying and Normal map the same way.
  • 10/16/2009 8:56 PM In reply to

    Re: UV problems with BLENDER.

    Well I do now.
    I am pretty sure that the uv coordinates are not exported in this "simple" mode because there is an option you need to set while exporting which would include the uv textures.
    This is very Blender specific and I still think the Blender forum will be a better place to ask.
  • 10/16/2009 9:05 PM In reply to

    Re: UV problems with BLENDER.

    ERiba:
    Well I do now.
    I am pretty sure that the uv coordinates are not exported in this "simple" mode because there is an option you need to set while exporting which would include the uv textures.
    This is very Blender specific and I still think the Blender forum will be a better place to ask.

    That's was my thought exactly. I googled for days, watched tutorials, and there was nothing new that I'm not doing.
    I've tried my luck in this forum, since the blender.org forum is not much active. moments ago i googles for other blender forums to try my luck.

    Anyway, i'm pritty sure that someone on this furum is using blender and can solve my little problem.

    thank you for your kind help anyway.


  • 10/19/2009 6:18 PM In reply to

    Re: UV problems with BLENDER.

    c64days:
    Thank you very much for your help, but you missunderstood me, let me explain:
    There are two way to apply textures, one: using the UV Editor which called "UV Image editor" and the other way is the simple way to apply a texture to the material.

    When i'm using the "simple" way for applying the texture, I accunter at the problem i mantioned before. Do you understand my point? 
    The object is a simple Sphere in which i apply and Earth texture using Prebuild Sphere UV that's in blender. on that i'm applying and Normal map the same way.
    I'm quite sure that no export script uses the material settings (the "simple" way) in Blender (at least none of the formats that are used in real-time applications). If you want proper uv coordinates you'll have to unwrap (Press "U" in edit mode, you can mark seams by selecting an edge and pressing "CTRL"+"E") the model and make sure it looks okay in the uv editor.

    Also, the way you assign textures in Blender (when you're not using materials) is by selecting all (unwrapped) vertices in edit mode and then selecting the correct texture using the small button with arrows on it next to the image name field. (If you haven't opened the image in blender before you'll have to press "Image -> Open")
  • 10/24/2009 10:57 PM In reply to

    Re: UV problems with BLENDER.

    Answer
    Reply Quote
    If you are using the FBX Export script you will need to apply the texture through the UV Editor and mappings for it to work. I have done several projects using Blender for both XNA Games and some smaller projects and each time the UV Mapping is needed. The only time that I have been successful is when I just used the material system to change the basic diffuse colors and such.
  • 10/25/2009 2:11 AM In reply to

    Re: UV problems with BLENDER.

    Answer
    Reply Quote
    When you don't use the UV editor, but instead use one of the other mapping options in the Material settings in Blender, no UV coordinates are actually generated... at render time, Blender generates the UV coordinates automatically, based on the selected setting (sphere, box, etc).  Because no UV coordinates are actually stored in memory as part of the mesh, there are no UVs to export.

    if you want to export with UVs, you either need to create the UVs yourself, or find a script that will create UVs based on the other settings in Blender for you.

    If you go into edit mode for your object, select all of the verts, and press the "U" key, you will get a pop-up with a variety of options of how to unwrap the model.  that will generate proper UVs for you.
  • 11/17/2009 11:48 AM In reply to

    Re: UV problems with BLENDER.

    Hi,

    I'm a n00b to both Blender and XNA so I'm not sure if this will be at *all* helpful, but I have been fiddling with both for the past month. I am wondering if what you are trying to get at is that you don't want to painting the UV coordinates but would prefer that the texture tile onto your sphere is a more-or-less random way. I've managed to do that but I still had to go through the process of unwrapping my mesh and using the UV Image Editor in Blender. Basically, I unwrapped my mesh and generated a UV map. Then I painted this map externally and reloaded it in Blender, applied it to my model with no UV painting (so bascially it tiles all over my model in a really slap dash way) and then I exported using the modified-for-XNA fbx exporter. And that model + texture shows up in XNA just fine.
Page 1 of 1 (12 items) Previous Next