One or multiple octrees

Started by
6 comments, last by ongamex92 8 years, 8 months ago

Hey guys,

I want to implement octrees in my hard coded raycasting/raytracing algorithm (no OpenGL or DirectX). I'm also able to load Wavefront OBJ files. But with more and more triangle meshes involved rendering takes longer and longer.

I think octrees are a good data structure for storing surfaces. I don't know which form of octrees is better.

  • one octree for the whole rendering scene
  • multiple octrees, one for each object

What's your opinion?

PS: Visit my blog where I explain computer graphics

Link: http://computergraphicsguide.blogspot.com/

Advertisement

Both are needed usually.

http://opensource.imageworks.com/?p=alembic this is really popular format you can see what they are doing.

Both are needed usually.

You mean an object is within an octree, and that octree is within an octree surrounding the whole scene.

Scene octree consists of object octrees.

Yes.

Ok thx. After implementation I'll add that method in my blog.

You can always see what the professional raytraces are doing :
"Meshes are exported to a special .vrmesh file format. It contains all geometric information for a mesh - vertices and face topology as well as texture channels, face material IDs, smoothing groups, normals - in short, everything that is needed to render the mesh. In addition, the mesh is preprocessed and subdivided into chunks for easier access. "

I only analysed Wavefront OBJ/MTL files and partly 3DS Max files.I don't know how vrmesh will help me with that.

The purpose of my framework is to do everything with the support of high quality graphic libraries. It shall help students to understand render algorithms.

The idea is that the V-Ray guys, are creating a tree for every mesh(and ofc. a tree for the scene) Is to support fast instancing.

This topic is closed to new replies.

Advertisement