Outerra forum

Please login or register.

Login with username, password and session length
Advanced search  

News:

Download Outerra Tech Demo. Unofficial Outerra Discord server, MicroProse Discord server for OWS.

Author Topic: Blender Help - Exporting A Model With Textures?  (Read 16303 times)

Hybodo

  • Jr. Member
  • *
  • Posts: 14
Blender Help - Exporting A Model With Textures?
« on: December 26, 2013, 12:45:42 am »

So I was gifted Outerra by a wonderful friend of mine. I imported a simple vehicle model as a test bed the other day, and scripted it to drive around and such. The original model that I had driving around never had any textures, so I went back into blender and slapped some textures on there, re-exported as Collada (.dae) and imported it into Outerra. The textures however, do not appear. Clearly there's a step or two I'm missing, I've never done this before. Any help?
Logged
i5 760 @ 2.8GHz
4GB DDR3 1600 SDRAM
nVidia 9800GTX+ 512MB

ZeosPantera

  • ||>>-Z-<<||
  • Global Moderator
  • Hero Member
  • *****
  • Posts: 2520
  • #1 Outerra Fan Boy
    • My Youtube
Re: Blender Help - Exporting A Model With Textures?
« Reply #1 on: December 26, 2013, 12:46:54 am »

NAME NAMES YOU BASTARD.. I bought it for him. Me.. I am the best.
Logged
"Fear accompanies the possibility of death, Calm shepherds its certainty" - General Ka Dargo

Hybodo

  • Jr. Member
  • *
  • Posts: 14
Re: Blender Help - Exporting A Model With Textures?
« Reply #2 on: December 26, 2013, 01:39:28 am »

The exact error I'm getting is: "WARNING: Cannot compute the correct tangents for mesh "X"! (missing/wrong UVs)

I used dds textures when I applied them in blender. I unwrapped part of the wheel and opened an image (dds) in the UV editor figuring that'd work.
Logged
i5 760 @ 2.8GHz
4GB DDR3 1600 SDRAM
nVidia 9800GTX+ 512MB

necro

  • Sr. Member
  • ****
  • Posts: 451
    • google+ Blog
Re: Blender Help - Exporting A Model With Textures?
« Reply #3 on: December 26, 2013, 02:25:28 am »


Your question is hard to answer. Because this could have several reasons. Texture export out of the box works only until you are using materials for blender render, not cycles. Second, this can only work with .dds textures. Third, i guess you have to make your texture paths relative not absolute.


Your error is actually just a warning. So this is not the reason for not having a texture. This only means, that you've forgotten to unwrap all faces of your mesh.


The easiest way is to copy the texture in your object folder  and name them in your .matlib file.


The object folder might be something like C:\Users\%your_name_here%\Outerra\packages\necro\VikingHouse1. In this folder all information about your model will be stored. Just copy your texture file there and change the line with "tex_diffuse". In my example the line looks like
Code: [Select]
"tex_diffuse" : "wood_diff.dds"

The described method works always and you have 100% control about your material(s).
Logged

PytonPago

  • Hero Member
  • *****
  • Posts: 2284
  • It´s way too complex, dont let me try to explain !
Re: Blender Help - Exporting A Model With Textures?
« Reply #4 on: December 26, 2013, 02:43:32 am »

The exact error I'm getting is: "WARNING: Cannot compute the correct tangents for mesh "X"! (missing/wrong UVs)

I used dds textures when I applied them in blender. I unwrapped part of the wheel and opened an image (dds) in the UV editor figuring that'd work.

 .... you use the clasical or FBX importer ? ... cause the classical one needs the textures in a certain format : http://xtrac.outerraworld.com/trac.fcgi/wiki/Importer

Also i think there was something like by 4 dividable pixel size of the texture being needed. (cant find that post right now but i know i have written a bunch of such texture needs to a guy some time ago - try to check my posts around a half year ago i think)

But the FBX should do it alright even from classic texture formats.  ???

And P.S.:

NAME NAMES YOU BASTARD.. I bought it for him. Me.. I am the best.

Bumper stickers, Zeos ! You need to do some bumper stickers ... :D
« Last Edit: December 26, 2013, 02:45:08 am by PytonPago »
Logged
We are still undeveloped as long as we don´t realize, that all our science is still descriptive, and than beyond that description lies a whole new world we just haven´t even started to fully understand.

PytonPago

  • Hero Member
  • *****
  • Posts: 2284
  • It´s way too complex, dont let me try to explain !
Re: Blender Help - Exporting A Model With Textures?
« Reply #5 on: December 26, 2013, 02:58:45 am »

Ah ... here was that texture size limit mentioned:

http://forum.outerra.com/index.php?topic=2232.msg24219#msg24219

(look for discussion somewhere to the end of that post)
« Last Edit: December 26, 2013, 03:08:53 am by PytonPago »
Logged
We are still undeveloped as long as we don´t realize, that all our science is still descriptive, and than beyond that description lies a whole new world we just haven´t even started to fully understand.

Hybodo

  • Jr. Member
  • *
  • Posts: 14
Re: Blender Help - Exporting A Model With Textures?
« Reply #6 on: December 27, 2013, 03:10:21 am »

Okay so maybe I'm jumping into this a little too head-on. I'm going to give you a rundown of everything I've done so far to get my model into the game.

I've read:

Your question is hard to answer. Because this could have several reasons. Texture export out of the box works only until you are using materials for blender render, not cycles. Second, this can only work with .dds textures. Third, i guess you have to make your texture paths relative not absolute.


Your error is actually just a warning. So this is not the reason for not having a texture. This only means, that you've forgotten to unwrap all faces of your mesh.


The easiest way is to copy the texture in your object folder  and name them in your .matlib file.


The object folder might be something like C:\Users\%your_name_here%\Outerra\packages\necro\VikingHouse1. In this folder all information about your model will be stored. Just copy your texture file there and change the line with "tex_diffuse". In my example the line looks like
Code: [Select]
"tex_diffuse" : "wood_diff.dds"

The described method works always and you have 100% control about your material(s).
My (.matlib) file is empty when I open it after I've got my vehicle moving around ingame.

And this:
The exact error I'm getting is: "WARNING: Cannot compute the correct tangents for mesh "X"! (missing/wrong UVs)

I used dds textures when I applied them in blender. I unwrapped part of the wheel and opened an image (dds) in the UV editor figuring that'd work.

 .... you use the clasical or FBX importer ? ... cause the classical one needs the textures in a certain format : http://xtrac.outerraworld.com/trac.fcgi/wiki/Importer

Also i think there was something like by 4 dividable pixel size of the texture being needed. (cant find that post right now but i know i have written a bunch of such texture needs to a guy some time ago - try to check my posts around a half year ago i think)

But the FBX should do it alright even from classic texture formats.  ???

And P.S.:

NAME NAMES YOU BASTARD.. I bought it for him. Me.. I am the best.

Bumper stickers, Zeos ! You need to do some bumper stickers ... :D

However I'm still having no luck, so clearly I'm doing something wrong! Here's what I'm currently doing, feel free to explain anything I've done wrong or could be doing better, since this is my first time doing anything like this.

#1
Well I've got my model in blender here:

#2
Here is how I textured the wheels. I unwrapped the wheels in the UV Editor (Projected from view). The image opened in the UV Editor is infact a .dds file. That's the file that's supposed to be (.dds) right? I grabbed the image online and converted it to a (.dds) in photoshop, and it's exported as a (DXT1). Oddly it opens in Blender as a (.jpg), is this where my problem could be occuring? Maybe this is entirely not how to texture things, I don't really know this was just a guess, I've never textured anything before!:

#3
From there I have each of the four wheels parented to the main body of the vehicle. I then export as Collada (.dae) and open Outerra. Once I'm in outerra I hit escape and go to the Object Menu. From there I go to the import tab and select my (.dae) file.:

#4
Here are my configuration settings:

#5
Once I press import I get the errors "WARNING: Cannot compute the correct tangents for mesh "X"! (missing/wrong UVs)".
I can drive the car around after some (.js) editing but the textures are not there. Come to my rescue guys! Teach me your ways!
Logged
i5 760 @ 2.8GHz
4GB DDR3 1600 SDRAM
nVidia 9800GTX+ 512MB

SpaceFlight

  • Sr. Member
  • ****
  • Posts: 252
Re: Blender Help - Exporting A Model With Textures?
« Reply #7 on: December 27, 2013, 07:28:59 am »

I don't know much about texturing or modeling, but did you try the FBX importer (Ctrl-F7)?
Logged
"You see, Killbots have a preset kill limit. Knowing their weakness, I sent wave after wave of my own men at them, until they reached their limit and shut down."
Zapp Brannigan

Hybodo

  • Jr. Member
  • *
  • Posts: 14
Re: Blender Help - Exporting A Model With Textures?
« Reply #8 on: December 27, 2013, 11:56:37 am »

I don't know much about texturing or modeling, but did you try the FBX importer (Ctrl-F7)?

I tried using the FBX importer but I can't seem to get it to import properly, I don't know what happens after I create the package, the model doesn't seem to be in the model list, or in the vehicle list.

Either way I think I want to figure out how to use the standard importer properly, before I move onto learning the FBX one as well. Thanks for the recommendation though, I hadn't tried using it prior to your post. (I didn't even know the FBX importer existed, still learning.)
Logged
i5 760 @ 2.8GHz
4GB DDR3 1600 SDRAM
nVidia 9800GTX+ 512MB

PytonPago

  • Hero Member
  • *****
  • Posts: 2284
  • It´s way too complex, dont let me try to explain !
Re: Blender Help - Exporting A Model With Textures?
« Reply #9 on: December 29, 2013, 04:52:30 pm »

I think now i know what is wrong there  - blender has two ways of aplying UVs. One is just for UV from mesh creation and other an actual texture application as a texture. The first one shows on UV-view but in the model edit screen, it doesnt show in render (alt + z) because the render uses actually applied textures. To apply it, you have to have an material chosen for the mesh and go to texture application tool. But best shown - look to the end of the video :



So - after making the first kind UV and loading it into the UV screen :
1 . select the UVs faces
2 . head to the "texture tool" right aside the "material tool" (you have to be in edit mode like in pic.)
3 . choose in the menu to take an image and find it there (the DDS one)
4 . its vital to choose the UV option in mapping menu !!!

Afterwards, you should see the dds texture be applied to the model even after hitting (alt + z) - in render view that is.

Once you see it in render mode, you should save the project as a normal blender file too - happens that you need to change things and forget about it, making all the steps anew.



Also, when exporting to collada, you have to check the "export UVs" option :



 ... normally it stores the texture anew where you saved the colada (but i had issues whyte this so better dont move the original one around folders till you got the model in OT rightly). and OT then does apply them and saves them inside the OT model directory. Obviously, if you try it multiple times ower whyte the same model, OT may not specify the dds texture in matlib - just write it inside.

P.S.: sorry it takes me so long, but had to learn it myself in last days aside other things  ... have to finish my importing vids for ya ... will make the best to have them out by tomorrow for you folks.
« Last Edit: December 29, 2013, 04:57:59 pm by PytonPago »
Logged
We are still undeveloped as long as we don´t realize, that all our science is still descriptive, and than beyond that description lies a whole new world we just haven´t even started to fully understand.