Game Development Community

Couple of Blender exporter questions

by Alex Rice · in Artist Corner · 06/01/2004 (9:51 pm) · 8 replies

(DTS Exporter 0.6, Blender 2.33a)

First of all thanks James U. and garagegames for this great tool. Blender is so amazing and I look forward to being proficient at getting .blend modles into Torque.

I am nearly grokking DTS exporter, after several nights of study. In the tutorial that James has published, "Blender Exporter Documentation", the procedure is explained for assigning a texture and a UV-map to a material, and assigning the material to a mesh so that the exporter will accept it and put it into the .dts. It works! OK, but lots of questions nonetheless:

1) Working in the tutorial, the base of my radar tower model is being textured with a stucco-like image, and it look bad if each (large) face gets a 128 pixel texture spread across it How do you do an export a tiled texture? (1 texture that gets tiled within each face) In Blender, I can accomplish this by selecting Shading btn | Texture btn | Image | X repeat, Y repeat and setting to > 1. Render, and it tiles the texture in the render. But the dts exporter does not see the tiling apparently.

2) In Blender look at: UV Face Select | Editing button. There are several buttons on the tab "Texture face". Tex, Tiles, Light, Invisible, Collision, etc. etc. Does the dts exporter look at these settings? Seems like many ways to control how a texture is mapped to faces, including a Tiles button, which relates to my question 1).

3) What does the Scale slider do, on the Material Options panel of the exporter? I can't discern anything that it actually does to the output, although I was expecting to get some kind of tiling of the material as a side effect.

4) Lastly, and this is more of a Blender question than an exporter question. But a serious workflow issue. When following the tutorial procedure (creating a material with a texture, then creating the UV-map, but never actually selecting an image in the UV-image editor) then Blender displays the textured faces as a solid white color. I guess this indicates the UV-map is assigned to those faces. When I render, the texture/material is there OK. But how do I get rid of the white faces in the 3D-View and see the texture in the 3D-View? Yes I am in "potato" view Opt/Alt-Z.

I hope the answer is not that one must add the image via the UV/Image Editor window, because that has got to be the single most confusing part of Blender. And the exporter mentions that it uses the Material setting, NOT the UV/Image Editor assignment. So I don't even want to go there (UV/Image editor). Unless it's the only way to get a texture to appear in the 3D-window. But that would suck because the texture in the 3D window will look different than the material+texture assignment that blender render uses, and the dts exporter uses.

Cheers!
Alex

#1
06/01/2004 (10:04 pm)
...
#2
06/02/2004 (10:26 pm)
Joseph. OK! Thanks for encouraging me to stick with the UV/Image editor. I found a method that works having the same texture mapping appear in all of:

1) The Blender 3D view window
2) The Blender render output
3) exported DTS files Torque game engine

The textures can be scaled, rotated, etc. (the tiling effect I was looking for). Yay!

Reading back through the Tutorial, it's not clear at all that how I'm currently doing it is correct, or the recommended method of doing it. In fact, as I re-read the tutorial, the method I have come up with seems even easier and more sensible than what is described. Maybe I'm just misunderstanding the tutorial...

Suppose for instance there is a texture image named RadarBase.png you want to apply.

- Right click in 3d view to select your "Radar" mesh
- Click: Buttons Window / Shading / Material / Add New
- Rename the new texture to "RadarBase"
- Toggle on: Buttons Window / Shading / Material / TexFace button
- ***Note: By toggling the TexFace button, we have not actually created a texture! We created a material and told it to watch the UV-Editor for texture info and UV-mappings!
- Same mesh is still selected
- Select popup: 3D window / UV Face Select Mode
- Other window: select UV/Image Editor
- Click Padlock button ON (real time updates)
- Check y: Image menu / Realtime texture mapping / UV Co-ordinates
- Image menu / Open / Select Image / RadarBase.png
- Select popup: 3D window: Viewport shading / Textured
- 3D/Image editor: rotate/scale etc. mapping until satisfied. Changes should be automatically drawn in the 3D view.
- 3D window / Object Mode to finish editing UV mapping
- F12 for render; confirm the texture is showing up almost the same there (modulo lighting, etc)
- Run Blender DTS exporter script
- Make sure to hit "Update" button to it sees the new Material name!
- Click Export button, then Copy .dts, .cfg, and .png files into place.
- Launch Torque with "show"mod and view your new model & confirm texture is correctly mapped.
#3
06/02/2004 (10:31 pm)
Oops, that 3rd step should read:

- Rename the new MATERIAL to "RadarBase"
#4
06/02/2004 (10:40 pm)
...
#5
06/03/2004 (12:07 am)
Alex,

Please excuse the blender documenation. I am currently rewriting it for the new exporter, so it should be clearer next time round.

To answer your initial questions :

1)In the UV Map editor, enlarge the faces so that they go outside of the image. The image should now be tiled accordingly in-game.

2) The exporter does not currently look at many option, though in the newer version it will make a bigger use of the Material options in blender (as opposed to cryptic flags in the exporter gui).

3) Nothing. The exporter only exports texture coordinates from the UV map.

4) Already answered by JG.
#6
06/03/2004 (5:52 am)
James, thanks! As a total noob, the thing that confused me about the current docs is the difference between adding an actual image texture to the material, vs. clicking "TexFace" on the material and using the UV/Image editor to map a texture image.
#7
06/23/2005 (9:27 pm)
I still didn't quite catch the steps in question 4.

I'm still exporting solid white objects while working with the UV editor in Blender. I have so far I have been able to "load" images and have them show in the 3D window, but it's rendering white when importing into Torque. I seriously need step-by-step instruction to colorize the rendered objects. I've been looking for the DTS documentation. The documentation does not seem to be accessible at this time. The junkyardcat.net links to an GhoulNet site. Frustrated

Thanks

Tatjana
#8
06/30/2005 (4:39 pm)
I have it figured out now. I was in misunderstanding of matching names. It's not to match the name.png to name.blend but matching the name.png to what's typed in the MA:name.png in the Material tab. That's how the dts looks for the name of the png file.

It took me a long while to figure this out.