Giter VIP home page Giter VIP logo

Comments (4)

warenhuis avatar warenhuis commented on August 27, 2024

With what ease can these octrees be edited?

from crashedit.

ughman avatar ughman commented on August 27, 2024

Not really sure what the best way would be to do it, perhaps flatten the tree into a 3d bitmap and then replicate the kind of behavior you'd see in a voxel editor, whatever that looks like exactly I'm not sure. One thing to note is the octrees have a specified resolution in their headers, so you don't have to walk the tree first to find your target bitmap resolution.

from crashedit.

ughman avatar ughman commented on August 27, 2024

Also, I've been thinking about how to properly render this data recently, and I think the fastest way is probably to generate a bunch of 2d textures, one for every x value, one for every y, one for every z, and render them as double-sided quads. Like say you have a 128x64x256 collision area. That's 129 64x256 textures (one for every x value including 128 and 0) which you would render as 64x256 quads at the given x positions. Same thing with the y and z axis as well. The advantage to this setup is it's more in line with how GPU's deal with this kind of thing, plus it can be done in opengl 1.1 which means you get nearly universal support since windows will emulate 1.1 and mesa will emulate at least 2.0 I believe.

Downside is you don't really get the wireframe rendering like you see in crashutils, though that could be implemented as an optional mode for opengl 2.0 using shaders

from crashedit.

ManDude avatar ManDude commented on August 27, 2024

Implemented using shaders with okay-to-not-great performance (right now we upload around (1^x + 1) * (1^y + 1) * (1^z + 1) * 2 * 2 triangles for fill more and around ((1^x * 1^y) + (1^x * 1^z) + (1^y * 1^z)) * 4 lines for wireframe mode) and inability to render non-max-depth nodes correctly. Perfectly usable however.

from crashedit.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.