Anteru's blog
  • Consulting
  • Research
    • Assisted environment probe placement
    • Assisted texture assignment
    • Edge-Friend: Fast and Deterministic Catmull-Clark Subdivision Surfaces
    • Error Metrics for Smart Image Refinement
    • High-Quality Shadows for Streaming Terrain Rendering
    • Hybrid Sample-based Surface Rendering
    • Interactive rendering of Giga-Particle Fluid Simulations
    • Quantitative Analysis of Voxel Raytracing Acceleration Structures
    • Real-time Hybrid Hair Rendering
    • Scalable rendering for very large meshes
    • Spatiotemporal Variance-Guided Filtering for Motion Blur
    • Subpixel Reconstruction Antialiasing
    • Tiled light trees
  • About
  • Archive

.obj import working

July 03, 2005
  • Graphics
  • Programming
approximately 1 minutes to read

Finally got the .obj import working. Here you can see it with a 88k poly test file. Check out the read more section for a closer look at .obj.

Screenshot showing a wireframe model of a monster.
Niven .obj Import Test

Today, I had finally some time to work on the .obj file import for Niven. Wavefront OBJ files are particularly well suited for mesh exchange with other tools as they’re extremely simple to parse/generate and supported by many popular 3D packages. OBj can be used to describe a variety of 3D primitives, from polygons over curves to NURBS surfaces, however, Niven does only support a small subset of those.

Currently, the parser just recognizes the v (vertex), vn (vertex normal) and f (face) statements. It does only handle triangular faces, but this does not seem like a big limitation to me. Eventually the faces have to be triangulated anyway, in order to be rendered properly (quads might create cases in which they’re renderer incorrectly under OpenGL). I might include an on-demand tessellator at a later stage so people could export at least quads, maybe even more sided polygons and not worry about tessellating.

Previous post
Next post

Recent posts

  • Effective meetings
    Posted on 2022-09-12
  • Advent 2021: Open source
    Posted on 2021-12-24
  • Advent 2021: Blender
    Posted on 2021-12-23
  • Advent 2021: Visual Studio Code
    Posted on 2021-12-22
  • Advent 2021: Thunderbird
    Posted on 2021-12-21
  • Older posts

Find me on the web

  • GitHub
  • GPU database
  • Projects

Follow me

Anteru NIV_Anteru
Contents © 2005-2023
Anteru
Imprint/Impressum
Privacy policy/Datenschutz
Made with Liara
Last updated February 05, 2023