• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

Texture flipped vertically on a plane model.

Status
Not open for further replies.
Level 5
Joined
Dec 1, 2008
Messages
120
This model is based off of the Plane.mdl from Oinkerwinkle's Extended Primitives:

Code:
Version {
	FormatVersion 800,
}
Model "panel-border-l" {
	NumGeosets 1,
	NumBones 1,
	BlendTime 150,
	MinimumExtent { -16, -16, 0 },
	MaximumExtent { 16, 16, 0 },
	BoundsRadius 32,
}
Textures 1 {
	Bitmap {
		Image "",
		ReplaceableId 32,
	}
}
Materials 1 {
	Material {
		Layer {
			FilterMode Transparent,
			static TextureID 0,
		}
	}
}
Geoset {
	Vertices 4 {
		{ -16, -16, 0 },
		{ 16, -16, 0 },
		{ -16, 16, 0 },
		{ 16, 16, 0 },
	}
	Normals 4 {
		{ 0, 0, 1 },
		{ 0, 0, 1 },
		{ 0, 0, 1 },
		{ 0, 0, 1 },
	}
	TVertices 4 {
		{ 0, 1 },
		{ 0, 0 },
		{ 0.125, 1 },
		{ 0.125, 0 },
	}
	VertexGroup  {
		0,
		0,
		0,
		0,
	}
	Faces 1 6 {
		Triangles {
			{ 2, 0, 3, 1, 3, 0 },
		}
	}
	Groups 1 1 {
		Matrices { 0 },
	}
	MinimumExtent { -16, -16, 0 },
	MaximumExtent { 16, 16, 0 },
	BoundsRadius 32,
	MaterialID 0,
	SelectionGroup 0,
}
Bone "Bone0" {
	ObjectId 0,
	GeosetId Multiple,
	GeosetAnimId None,
}
PivotPoints 1 {
	{ 0, 0, 0 },
}

The image below is the texture I'm using for it and it's UV mapped to use the leftmost piece of it:

oBskc5J.jpg


The model in-game, when used on a destructable that's facing 270 degrees:

76sJbbS.jpg


It's flipped vertically. Why does this happen? Am I missing something obvious here?
 
Probably just has to do with the UV ordering or just the way the vertices are ordered. Since this is just a plane, you can always just try reordering the vertices, i.e. ->
Code:
Vertices 4 {
    { -16, 16, 0 },
    { 16, 16, 0 },
    { -16, -16, 0 },
    { 16, -16, 0 },
}

Perhaps that will work. Or it will go terribly wrong. Or nothing will happen.
 
Level 5
Joined
Dec 1, 2008
Messages
120
This is the best I could come up with. It's no longer flipped like before, but it's facing down. How am I able to change the facing? I guess it has something to do with triangles. I could make the material two-sided, but I think that's a cheap way to solve this problem.
Code:
	Vertices 4 {
		{ -16, -16, 0 },
		{ -16, 16, 0 },
		{ 16, -16, 0 },
		{ 16, 16, 0 },
	}

EDIT:
It was triangles, following this tutorial http://world-editor-tutorials.thehelper.net/magos.php, I found that "a face is made up of 3 vertices (call them v1, v2 and v3). The front side of the face is then the side you see when they are placed in a counter clockwise order.".
 
Actually, the mesh has nothing to do with the texture applied.

The texture applied to the mesh is the tipping point and there there might be something messed up.

Uberplayer. said:
TVertices 4 {
{ 0, 1 },
{ 0, 0 },
{ 0.125, 1 },
{ 0.125, 0 },
}

SHOULD BE said:
TVertices 4 {
{ 0, 0 },
{ 0, 1 },
{ 0.125, 0 },
{ 0.125, 1 },
}

You basically flipped the whole model.
 
Status
Not open for further replies.
Top