Anim8or Community

Please login or register.

Login with username, password and session length
Advanced search  

News:

An update to Anim8or, v1.00b, is available with a few bug fixes. Get your copy HERE. See the "ReadMe" file for details.

Author Topic: Texcoords incorrect  (Read 2060 times)

nospam

  • Newbie
  • *
  • Posts: 3
    • View Profile
Texcoords incorrect
« on: December 01, 2014, 04:45:02 pm »

From the front view, I created a cube, with a location of 0, 0, 0 x-div 3, y-div, 2 z-div 1, x-size 30, y-size 20, z-size 10.
Then I converted the cube to a mesh. Selected Points edit and drag selection.
Then go to top view
Then I selected all of the points for the back side and deleted them.
I went back to the front view and selected the 3 point on the right side and deleted them.
I then selected the 3 points on the bottom and deleted them.  This leaves me with two quads.
I used file->Save As and saved the file
If you open the saved file with a text editor you can see that the texcoords do not go from 0 to 1.
Textures do not map correctly on this mesh.
Logged

Steve

  • Administrator
  • Hero Member
  • *****
  • Posts: 1520
    • View Profile
Re: Texcoords incorrect
« Reply #1 on: December 01, 2014, 06:24:28 pm »

That's because you deleted the points with those coordinates. If you apply a texture to the original cube you can see what happens. For example, when you delete the 3 points in the right side you are deleting the right polygons as well and they are the ones with the right part of the texture.
Logged

nospam

  • Newbie
  • *
  • Posts: 3
    • View Profile
Re: Texcoords incorrect
« Reply #2 on: December 01, 2014, 06:37:35 pm »

But if I save the file and close Anim8or, then reopen the file in Anim8or, there are no previously deleted ploygons.
Logged

MvGulik

  • Full Member
  • ***
  • Posts: 107
  • [... Lost in Space ...]
    • View Profile
Re: Texcoords incorrect
« Reply #3 on: December 01, 2014, 06:40:51 pm »


Logged

Steve

  • Administrator
  • Hero Member
  • *****
  • Posts: 1520
    • View Profile
Re: Texcoords incorrect
« Reply #4 on: December 01, 2014, 08:54:12 pm »

Texture coordinates are assigned when you first make the cube. They don't change when you delete parts of it, as illustated by MvGulik's image above.
Logged

nospam

  • Newbie
  • *
  • Posts: 3
    • View Profile
Re: Texcoords incorrect
« Reply #5 on: December 02, 2014, 04:04:26 pm »

Thank you for the responses.  I have been using Anim8or for about 12 years, but this time I need to export the mesh for use in an opengl project and couldn't get the textures to fix correctly.  I have gone into my opengl project and added a function to recalculate the texcoords.
Logged

Steve

  • Administrator
  • Hero Member
  • *****
  • Posts: 1520
    • View Profile
Re: Texcoords incorrect
« Reply #6 on: December 02, 2014, 04:11:16 pm »

You can also regenerate texture coordinates using the UV tool.  In the main Object editor, select the mesh, then click on the UV button. You may have to slightly move the yellow UV coordinate tool to get the coordinates to recompute.
Logged

thecolclough

  • Sr. Member
  • ****
  • Posts: 820
  • 3D Ignoramus 1988-2002, Anim8or User 2002-present.
    • View Profile
    • www.mattghc.com
Re: Texcoords incorrect
« Reply #7 on: December 02, 2014, 04:25:04 pm »

You may have to slightly move the yellow UV coordinate tool to get the coordinates to recompute.
This is something that's niggled a bit when i've been texturing things over the last few years - it's possible to move the tool slightly as you say - one pixel will do - and then move it back again before you release the mouse button, to get the texture to land on a perfect on-axis projection, but it's darned fiddly to do.  would it be possible to have a button or menu command or something (e.g. Edit -> Recompute Coords for Selected Faces, maybe) that would get the coords to recompute without having to move the tool around?
Logged

Steve

  • Administrator
  • Hero Member
  • *****
  • Posts: 1520
    • View Profile
Re: Texcoords incorrect
« Reply #8 on: December 02, 2014, 05:03:03 pm »

That's on my to-do list :)
Logged

thecolclough

  • Sr. Member
  • ****
  • Posts: 820
  • 3D Ignoramus 1988-2002, Anim8or User 2002-present.
    • View Profile
    • www.mattghc.com
Re: Texcoords incorrect
« Reply #9 on: December 02, 2014, 10:07:35 pm »

That's on my to-do list :)
good good =)
Logged