Anim8or Community

Please login or register.

Login with username, password and session length
Advanced search  

News:

Ian Ross has just released a book on Anim8or. It's perect for a beginner and a good reference for experienced users. It contains detailed chapters on every aspect, with many examples. Get your own copy here: "Anim8or Tutorial Book"

Author Topic: Texcoords incorrect  (Read 19044 times)

nospam

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

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: 2126
    • View Profile
Re: Texcoords incorrect
« Reply #1 on: December 01, 2014, 01: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, 01: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, 01:40:51 pm »


Logged

Steve

  • Administrator
  • Hero Member
  • *****
  • Posts: 2126
    • View Profile
Re: Texcoords incorrect
« Reply #4 on: December 01, 2014, 03: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, 11:04:26 am »

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: 2126
    • View Profile
Re: Texcoords incorrect
« Reply #6 on: December 02, 2014, 11:11:16 am »

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: 890
  • 3D Ignoramus 1988-2002, Anim8or User 2002-present.
    • View Profile
    • www.mattghc.com
Re: Texcoords incorrect
« Reply #7 on: December 02, 2014, 11:25:04 am »

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: 2126
    • View Profile
Re: Texcoords incorrect
« Reply #8 on: December 02, 2014, 12:03:03 pm »

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

thecolclough

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

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