Importing With Textures To SWBFViewer - Blender [Solved]

How to create models in XSI and other 3D applications and make them work in Battlefront 1 & 2. Post models, tips for application usage and share anything XSI, 3DMax, SketchUp, etc.

Moderator: Moderators

Post Reply
User avatar
lucasfart
Sith
Sith
Posts: 1440
Joined: Tue Feb 24, 2009 5:32 am
Projects :: No Mod project currently.
Games I'm Playing :: I have not listed any games yet
xbox live or psn: No gamertag set
Location: Australia

Importing With Textures To SWBFViewer - Blender [Solved]

Post by lucasfart »

I've been using blender to produce some simple building models for a map I'm making, and most of them have come through alright, however I've been having a bit of difficulty with a few of them. I've been using cube projection to uv them, as I'm only using one texture per model. Anyway, most of them have worked totally fine, but with a few others, if i uv using cube projection, the texture does not import into swbfviewer at all. The model is completely white. I've experimented, and found that using smart projection/standard unwrap export the textures just fine.

Any help getting the textures to export using cube projection would be greatly appreciated. I'm thinking it might have something to do with overlapping uv's on the uv editor, but I'm not a pro and as such I'm not sure.

All these props are meant to fit together like lego, and using cube projection the textures have all been to the right scale, however if i try manually uving the remaining two, it would be extremely difficult to get the scale right...
Last edited by lucasfart on Fri Nov 11, 2011 10:02 am, edited 1 time in total.
mswf
Master Bounty Hunter
Master Bounty Hunter
Posts: 1674
Joined: Tue Mar 31, 2009 3:40 pm
Location: Twello, The Netherlands
Contact:

Re: Importing With Textures To SWBFViewer - Blender

Post by mswf »

Could you post a screenshot of your UV layout? The projection you choose is just selecting the technique blender should use to unwrap them, the end product should be, technically, the same.

The type of projection you've used may have resulted in a weird layout, so that's why I'm asking for a screenshot.
User avatar
lucasfart
Sith
Sith
Posts: 1440
Joined: Tue Feb 24, 2009 5:32 am
Projects :: No Mod project currently.
Games I'm Playing :: I have not listed any games yet
xbox live or psn: No gamertag set
Location: Australia

Re: Importing With Textures To SWBFViewer - Blender

Post by lucasfart »

Here's the image. The UV's are pretty cluttered and have a weird layout, so yeah. :P

IMageshack has disabled the directlink option on their images. :x

http://imageshack.us/f/98/94783931.jpg/
THEWULFMAN
Space Ranger
Posts: 5557
Joined: Tue Aug 17, 2010 3:30 pm
Projects :: Evolved 2
Location: Columbus, Ohio
Contact:

Re: Importing With Textures To SWBFViewer - Blender

Post by THEWULFMAN »

lucasfart wrote:Here's the image. The UV's are pretty cluttered and have a weird layout, so yeah. :P

IMageshack has disabled the directlink option on their images. :x

http://imageshack.us/f/98/94783931.jpg/


Oh hey look, the direct link.
Hidden/Spoiler:
Image


When you upload a single image, it "disables" the direct link field so you can't copy paste it. However all you have to do is right click the image in the link you provided and then copy the image's link. A little hard to explain, grammar is not my best skill. I think you can can figure it out though. :P
User avatar
lucasfart
Sith
Sith
Posts: 1440
Joined: Tue Feb 24, 2009 5:32 am
Projects :: No Mod project currently.
Games I'm Playing :: I have not listed any games yet
xbox live or psn: No gamertag set
Location: Australia

Re: Importing With Textures To SWBFViewer - Blender

Post by lucasfart »

Haha. Thanks for that. :P I immediately saw the greyed out direct link and gave up. :P

EDIT: I'm posting this now for the benefit of others, who may have a similar problem in the future. I managed to fix this problem, and while i still don't completely understand how it occured, i get most of it.

What happened, was that i used a texture off the internet with one of those weird letters/numbers mixes. I used this original name when i first uv'ed the models, and afterwards i decided to change the name to something more memorable. I then went back through and changed the textures for which the uv's had been applied. For some reason, which i still do not know, some of the textures refused to update properly, so when i exported, i mistakenly assumed that there had been a problem exporting due to the white texture on my model.

The way i found and fixed this was to open the .wrl in notepad ++ and found this section (The section with the colour tags around it:
Hidden/Spoiler:
[quote]#VRML V2.0 utf8

# This file was authored with Blender (http://www.blender.org/)
# Blender version 249
# Blender file Castle Stairs.blend
# Exported using VRML97 exporter v1.55 (2006/01/17)


NavigationInfo {
headlight FALSE
visibilityLimit 100.0
type ["EXAMINE", "ANY"]
avatarSize [0.25, 1.75, 0.75]
}

Background {
groundColor 0.0508761 0.0508761 0.0508761
skyColor 0.0508761 0.0508761 0.0508761
}

DEF OB_Cube Transform {
translation 0.000000 0.000000 0.000000
rotation 1.000000 0.000000 0.000000 0.000000
scale 1.000000 1.000000 1.000000
children [
DEF ME_Cube Group {
children [
Shape {
appearance Appearance {
material DEF MA_Material Material {
diffuseColor 0.8 0.8 0.8
ambientIntensity 0.3333333
specularColor 0.4012008 0.4012008 0.4012008
emissiveColor 0.0 0.0 0.0
shininess 0.0976563
transparency 0.0
}
texture DEF Fortress_-_Wall ImageTexture {
url "Fortress - Wall.png"

}
}
geometry IndexedFaceSet {
solid TRUE
coord DEF coord_Cube Coordinate {
point [
-0.0453548431396 1.25094866753 0.0346293449402
-0.0453550815582 1.25094854832 2.83462953568
-0.0451607704163 0.119577646255 2.83462953568
-0.0451605319977 0.119577646255 0.0346292257309
-3.73296761513 0.118944168091 0.0435324907303
-3.73316192627 1.25031518936 0.0435326099396
-3.27102613449 0.119023561478 0.442418336868
-3.27122044563 1.25039458275 0.442418456078
-3.73219633102 1.25031530857 0.443531274796
-3.73200201988 0.118944406509 0.443531274796
-2.809278965 1.25047385693 0.841304540634
-2.80908441544 0.119102954865 0.841304302216
-3.27006030083 0.119023799896 0.842417240143
-3.27025485039 1.25039458275 0.842417240143
-2.34733724594 1.2505531311 1.24019050598
-2.3471429348 0.119182348251 1.24019026756
-2.80831313133 1.25047397614 1.24130320549
-2.80811882019 0.119103193283 1.24130320549
-1.8853957653 1.25063252449 1.63907647133
-1.88520133495 0.11926150322 1.63907647133
-2.3463716507 1.25055336952 1.64018940926
-2.34617733955 0.119182348251 1.64018940926
-1.42345404625 1.25071191788 2.03796243668
-1.42325973511 0.119340896606 2.03796243668
-1.88442993164 1.2506326437 2.0390753746
-1.8842356205 0.119261741638 2.0390753746
-0.961318016052 0.119420289993 2.4368481636
-0.961512565613 1.25079119205 2.4368481636
-1.422488451 1.25071191788 2.43796110153
-1.42229413986 0.119340896606 2.43796110153
-0.960352420807 0.119420289993 2.83684682846
-0.960546731949 1.25079131126 2.83684682846
]
}

coordIndex [
0 1 2 3 -1,
4 9 8 5 -1,
9 6 7 8 -1,
11 10 13 12 -1,
17 15 14 16 -1,
19 18 20 21 -1,
25 23 22 24 -1,
26 27 28 29 -1,
26 30 31 27 -1,
1 31 30 2 -1,
22 23 29 28 -1,
18 19 25 24 -1,
14 15 21 20 -1,
10 11 17 16 -1,
6 12 13 7 -1,
0 3 4 5 -1,
2 30 26 3 -1,
3 26 29 23 -1,
3 23 25 19 -1,
3 19 21 15 -1,
3 15 17 11 -1,
3 11 12 6 -1,
4 3 6 9 -1,
0 27 31 1 -1,
0 22 28 27 -1,
0 18 24 22 -1,
0 14 20 18 -1,
0 10 16 14 -1,
0 7 13 10 -1,
7 0 5 8 -1,
]
texCoord TextureCoordinate {
point [
0.1254743 0.5173147, 0.1254742 1.9173148, -0.4402112 1.9173148, -0.4402112 0.5173146,
0.5594721 0.5217662, 0.5594722 0.7217656, 1.1251576 0.7217656, 1.1251576 0.5217663,
0.633999 0.5594722, 0.8644869 0.5595118, 0.8643898 1.1251973, 0.6339018 1.1251576,
0.0954578 0.5595515, 0.0953605 1.125237, -0.1351274 1.1251973, -0.1350302 0.5595119,
0.0959406 0.5595516, 0.3264285 0.5595912, 0.3263314 1.1252766, 0.0958434 1.125237,
0.5573993 0.5596308, 0.5573021 1.1253163, 0.3268142 1.1252767, 0.3269113 0.5595912,
0.5578822 0.5596309, 0.7883701 0.5596704, 0.788273 1.125356, 0.557785 1.1253164,
0.019341 0.5597101, 0.0192437 1.1253955, -0.2112442 1.125356, -0.2111471 0.5596704,
0.5597101 0.7184241, 0.5597101 0.9184234, 1.1253957 0.9184234, 1.1253955 0.7184241,
0.4773225 0.1254742, 0.0197266 0.1253957, 0.0198238 -0.4402899, 0.4774196 -0.4402112,
0.125356 0.5189812, -0.4403296 0.5189812, -0.4403296 0.7189806, 0.125356 0.7189806,
0.1253163 0.3195382, -0.4403692 0.3195382, -0.4403691 0.5195377, 0.1253164 0.5195377,
0.1252766 0.1200953, -0.4404088 0.1200951, -0.4404088 0.3200947, 0.1252767 0.3200947,
0.125237 0.9206523, -0.4404485 0.9206522, -0.4404484 1.1206516, 0.125237 1.1206516,
0.5595118 0.7212092, 0.5595119 0.9212086, 1.1251973 0.9212086, 1.1251973 0.7212092,
0.4773226 0.1254743, 0.4774197 -0.4402112, -1.3664838 -0.4405279, -1.366581 0.1251576,
0.4774196 0.9173148, 0.0198238 0.9184234, 0.019341 0.7184241, 0.4774197 -0.4826854,
0.4774197 0.5173146, 0.019341 1.7184241, -0.2111471 1.7189806, -0.2116299 1.5189812,
0.4774197 0.5173146, -0.2116299 1.5189812, -0.4421178 1.5195377, -0.4426007 1.3195382,
0.4774197 0.5173146, -0.4426007 1.3195382, -0.6730887 1.3200947, -0.6735715 1.1200951,
0.4774197 0.5173146, -0.6735715 1.1200951, -0.9040594 1.1206516, -0.9045422 0.9206522,
0.4774197 0.5173146, -0.9045422 0.9206522, -1.1350302 0.9212086, -1.1355131 0.7212092,
0.6335162 0.5217662, 2.4774199 0.5173146, 0.8644869 0.7212092, 0.633999 0.7217656,
0.4773226 0.5173147, 0.0192437 1.7184241, 0.0197266 1.9184234, 0.4773225 1.9173148,
0.4773226 0.5173147, -0.211727 1.5189812, -0.2112442 1.7189806, 0.0192437 1.7184241,
0.4773226 0.5173147, -0.4426979 1.3195382, -0.442215 1.5195377, -0.211727 1.5189812,
0.4773226 0.5173147, -0.6736686 1.1200953, -0.6731858 1.3200947, -0.4426979 1.3195382,
0.4773226 0.5173147, -0.9046395 0.9206523, -0.9041566 1.1206516, -0.6736686 1.1200953,
0.4773226 0.5173147, -1.1356102 0.7212092, -1.1351274 0.9212086, -0.9046395 0.9206523,
0.8643898 0.7212092, 2.4773226 0.5173147, 0.633419 0.5217663, 0.6339018 0.7217656,
]
}
texCoordIndex [
0 1 2 3 -1
4 5 6 7 -1
8 9 10 11 -1
12 13 14 15 -1
16 17 18 19 -1
20 21 22 23 -1
24 25 26 27 -1
28 29 30 31 -1
32 33 34 35 -1
36 37 38 39 -1
40 41 42 43 -1
44 45 46 47 -1
48 49 50 51 -1
52 53 54 55 -1
56 57 58 59 -1
60 61 62 63 -1
64 65 66 67 -1
68 69 70 71 -1
72 73 74 75 -1
76 77 78 79 -1
80 81 82 83 -1
84 85 86 87 -1
88 89 90 91 -1
92 93 94 95 -1
96 97 98 99 -1
100 101 102 103 -1
104 105 106 107 -1
108 109 110 111 -1
112 113 114 115 -1
116 117 118 119 -1
]
}
}
]
}
]
}
[/quote]
In order to fix the problem, i updated the name of the texture on both those lines to the current texture name and voila! Perfect textures....
User avatar
AceMastermind
Gametoast Staff
Gametoast Staff
Posts: 3285
Joined: Mon Aug 21, 2006 6:23 am
Contact:

Re: Importing With Textures To SWBFViewer - Blender

Post by AceMastermind »

lucasfart wrote:

Code: Select all

texture DEF Fortress_-_Wall ImageTexture {
			url "Fortress - Wall.png"
I'm pretty sure the first mention of the image is just a name that defines that section hence "DEF" preceeding it. I'll look into the VRML syntax later to confirm. The second line is the one with the actual image file name. You also shouldn't leave spaces in file names.

Fortress - Wall.png
should be
Fortress-Wall.png
or
FortressWall.png
or
Fortress_Wall.png


EDIT
The DEF syntax gives a name to a node
You can name any node
Names can be most any sequence of letters and numbers
Names must be unique within a file
User avatar
lucasfart
Sith
Sith
Posts: 1440
Joined: Tue Feb 24, 2009 5:32 am
Projects :: No Mod project currently.
Games I'm Playing :: I have not listed any games yet
xbox live or psn: No gamertag set
Location: Australia

Re: Importing With Textures To SWBFViewer - Blender [Solved]

Post by lucasfart »

Yeah i only thought of that after, but they worked fine ingame and in ZE, so i didn't worry about it too much...

So what you're saying is that i can put anything in the first line near DEF and that it's just a title of some sort?
Post Reply