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
    • Real-Time Procedural Generation with GPU Work Graphs
    • Scalable rendering for very large meshes
    • Spatiotemporal Variance-Guided Filtering for Motion Blur
    • Subpixel Reconstruction Antialiasing
    • Tiled light trees
    • Towards Practical Meshlet Compression
  • 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

  • Data formats: Why CSV and JSON aren't the best
    Posted on 2024-12-29
  • Replacing cron with systemd-timers
    Posted on 2024-04-21
  • Open Source Maintenance
    Posted on 2024-04-02
  • Angular, Caddy, Gunicorn and Django
    Posted on 2023-10-21
  • Effective meetings
    Posted on 2022-09-12
  • Older posts

Find me on the web

  • GitHub
  • GPU database
  • Projects

Follow me

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