thankyou! what a time saver. i was thinking about making the octree with models, actual cubes in modeling software but that would be more of a hassle wouldn't it? i heard of a guy who made them like that. what do you think would be the simplest way? (kiss principle)
@mazdaplz I create a simplified model of my world and throw it's triangles into my octree, automatically generating it. Then I query the nodes and test against those surfaces.
my question was actually about what you used to partition the space into nodes in the first place, apparently you used boundingboxes.. yeah im THAT dumb xD
This is probably a really noobish question (never used XNA before, but want to start because I have some really interesting ideas for games), but what is an octree?
@TheFXGuy It's a useful way of dividing your world into cubes organizing those divisions in a tree structure.
Take the volume of your world and then cut it up in 8 sections. Now take one of those sections and cut it up in 8 again. Keep going until each section holds a very small number of elements from your world.
With this you can then test for objects in proximity by only looking at cube sections that are next to your player instead of testing the whole world.
Too neat-o. Is this something that will be released or are you just sharing the awesome? The only other decent octree implementation is the ziggyware one and it's kind of large, so I'm sure a lot of people would be interested.
thankyou! what a time saver. i was thinking about making the octree with models, actual cubes in modeling software but that would be more of a hassle wouldn't it? i heard of a guy who made them like that. what do you think would be the simplest way? (kiss principle)
mazdaplz 1 year ago
@mazdaplz I create a simplified model of my world and throw it's triangles into my octree, automatically generating it. Then I query the nodes and test against those surfaces.
handkor 1 year ago
@handkor
my question was actually about what you used to partition the space into nodes in the first place, apparently you used boundingboxes.. yeah im THAT dumb xD
mazdaplz 1 year ago
This is probably a really noobish question (never used XNA before, but want to start because I have some really interesting ideas for games), but what is an octree?
TheFXGuy 1 year ago
@TheFXGuy It's a useful way of dividing your world into cubes organizing those divisions in a tree structure.
Take the volume of your world and then cut it up in 8 sections. Now take one of those sections and cut it up in 8 again. Keep going until each section holds a very small number of elements from your world.
With this you can then test for objects in proximity by only looking at cube sections that are next to your player instead of testing the whole world.
handkor 1 year ago
Very interesting stuff, very complicated! But interesting. : )
MrCaravaggio 1 year ago
Too neat-o. Is this something that will be released or are you just sharing the awesome? The only other decent octree implementation is the ziggyware one and it's kind of large, so I'm sure a lot of people would be interested.
MrCaravaggio 1 year ago
@MrCaravaggio I was just showing my current progress. Once I clean it up I could post the octree class.
handkor 1 year ago
@MrCaravaggio Added link to my octree class in description.
handkor 1 year ago