Paper Modeller 01

Published July 09, 2011
Advertisement
I decided to make an entries about the progress with screenshots. So here it ising:
(a power out killed my well parsed literature masterpiece so I have to rewrite the post but in a simpler way):
  • window + menubar (only decoration yet)
  • openGL
  • 3D grid + basic camera control (rotate, zoom, pan, dolly)
  • coordinate system icon
  • wavefront .obj loading
    • vertex data
    • face data: with polygons, to preserve "edge flow" which is a very important thing in polygon modelling. But polygons are converted to triangle fans, polygon stuff will be maintained through the edges (selectable/non-selectable or visible/non-visible).
    • vertex normal calculation: I don't think I'll bother with smoothing groups, the mesh should be split accordingly. I use the angles between the incoming edges as the weights of the triangle normals, I think that gives the best results. The loader always recalculates vertex normals and ignores normal data in the .obj file.
  • smooth + vertex display of the mesh
  • The next things would be texture data loading, splitting the mesh according to the texture coordinates (so only one indexing, geez I don't speak English).

    Or not, I'm not sure yet. spliting the mesh would probably screw unfolding, and the user wouldn't know why. So maybe I should only split the mesh for render, if I ever implement vertex buffer whatevers.

    And of course loading the texture(s). *sigh*, I have to look for an image loader library for C. And atlas the textures *sigh*.

    Sorry for the crap language, the former version was better (...)

    screenie_01.JPG

    EDITED some typos...
    Next Entry Paper Modeller 02
    0 likes 3 comments

    Comments

    NineYearCycle
    There's code for a texture atlas here:
    [url="http://code.google.com/p/texture-atlas/"]http://code.google.com/p/texture-atlas/[/url]

    And you could take a look at DevIL for image loading
    [url="http://openil.sourceforge.net/"]http://openil.sourceforge.net/[/url]
    July 16, 2011 09:56 AM
    szecs
    Thanks for the suggestions, I'll take a look at them.
    July 16, 2011 01:52 PM
    zerotri
    Give SOIL a try
    [url="http://www.lonesock.net/soil.html"]http://www.lonesock.net/soil.html[/url]

    The name implies it is tied to OpenGL, but I found that relieving it of OpenGL dependencies and using it for loading images into memory isn't too bad.
    API is straightforward as well.

    EDIT: just saw that you were using OpenGL anyways, so no need to relieve OpenGL dependencies :D
    July 16, 2011 07:43 PM
    You must log in to join the conversation.
    Don't have a GameDev.net account? Sign up!
    Profile
    Author
    Advertisement
    Advertisement