AC3D Forums Texture Mapping(Planar mapping)
 User Name Remember Me? Password
 Register FAQ Members List Calendar Search Today's Posts Mark Forums Read

 Thread Tools Display Modes
 25th October 2003, 07:58 PM #1 figgy Member Advanced member   Join Date: Jul 2003 Location: Hampshire UK Posts: 38 Texture Mapping(Planar mapping) Please help me, this is doing my head in!! Below is an extract from an Unreal T3D file i am trying to convert to AC3D. The geometry looks fine, but i am having touble with calculating the Texture coords for each poly. Begin Polygon Item=Cap Texture=Terminal_A01 Origin +00212.077362,+00512.000000,-00128.000000 Normal +00000.000000,+00000.000000,-00001.000000 TextureU -00000.707107,-00000.707107,+00000.000000 TextureV -00000.707107,+00000.707107,+00000.000000 Vertex +00212.077362,+00512.000000,-00128.000000 Vertex +00512.000000,+00212.077347,-00128.000000 Vertex +00512.000000,-00212.077393,-00128.000000 Vertex +00212.077255,-00512.000061,-00128.000000 Vertex -00212.077347,-00512.000000,-00128.000000 Vertex -00512.000061,-00212.077179,-00128.000000 Vertex -00511.999969,+00212.077438,-00128.000000 Vertex -00212.077347,+00512.000000,-00128.000000 End Polygon Origin is the first vertex in the poly. TextureU and V are the Vectors describing the cordinate system(Normalized) Here's my code(it doesn't work) //temp is the vertex - the origin temp.x = (vertex.x - origin.x); temp.y = (vertex.y - origin.y); temp.z = (vertex.z - origin.z); U = Dot(temp,textureU)/128;//128 is the Bitmap Width V = Dot(temp,textureV)/128;//128 is the Bitmap Height Any ideas? The internet is hopeless! Thanx Mark

 Thread Tools Display Modes Threaded Mode

 Posting Rules You may not post new threads You may not post replies You may not post attachments You may not edit your posts BB code is On Smilies are On [IMG] code is On HTML code is Off Forum Rules

All times are GMT -4. The time now is 01:30 PM.

 Archive - Top

AC3D Forum
(C) Inivis Limited 2020