Page 2 of 2 FirstFirst 12
Results 11 to 17 of 17

Thread: please clarify <triangles> and <p>

  1. #11
    Junior Member
    Join Date
    Apr 2007
    Posts
    2
    Backing up a bit, I was incorrect on the "offset" in the

    array, so thanks for clearing this up for me. I was getting it confused with the "offset" in the accessor. We have been using an exporter that produces unified indices and had completely missed non-unified!

  2. #12
    Junior Member
    Join Date
    Sep 2007
    Posts
    13
    Oh i'm stuck with this duck(http://www.collada.org/owl/browse.ph...0&sortname=ASC)
    Vertices and normals play well, but not textures.
    I checked, texture is not corrupted.
    Here is how i create trianles, normals and texcoords(nvm cocoa :P):
    http://rafb.net/p/CvfbLX52.html

    DAEModelTexCoordsReconstructed is mutable array there texture coordinates are stored
    http://rafb.net/p/9mIVkH78.html
    A lot of stuff is hardcoded, it's because i'm just trying it out.
    Please point out if You can see some fundamental mistake.
    Big thanks for earlier help.


    [/url]

  3. #13
    Senior Member
    Join Date
    Jan 2006
    Location
    Foster City, CA
    Posts
    540
    I can't find anything obviously wrong with your code. One thing that might help is to make a test model with a single textured triangle and manually inspect all the texture coordinates before you send them to OpenGL.

  4. #14
    Junior Member
    Join Date
    Sep 2007
    Posts
    13
    Ok, thanks.
    I'll ask if somebody could write a small app to render duck.
    It i find what was wrong i'll inform about that.

  5. #15
    Junior Member
    Join Date
    Nov 2007
    Location
    Lima Perú
    Posts
    10

    SImple question

    The number of vertex is always bigger or equal than the number of any other attribute stream right?

  6. #16
    Junior Member
    Join Date
    Jan 2011
    Posts
    13

    Re:

    Quote Originally Posted by sthomas
    For example, using non-unified indices, a cube can be described with 8 positions and 6 normals, but with unified indices you need 24 positions and 24 normals.
    It is OK, 8 positions and 6 normals, but our guy have 8 positions and 12 normals. And I don`t understand what does you explain? Could you write a simple pseudo code about convertation? And when I use indecies , I also need just 8 positions and 6 normals for a cube (not 24 positions and 24 normals).

  7. #17
    Senior Member
    Join Date
    Aug 2004
    Location
    California
    Posts
    771

    Re: please clarify <triangles> and <p>

    A cube has eight unique positions and six face normals where each face is a quad. Each position belongs to three faces making a total of 24 unique vertices (8 positions x 3 face normals). If your data has more then six unique normals then at least one of the faces is not a flat (shaded) quad.

    Since you have 12 normals it might be a low resolution sphere as the number implies there are two normals per face.

Page 2 of 2 FirstFirst 12

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •