Block-Based Collidable

Discuss any questions about BEPUphysics or problems encountered.
Post Reply
creator94
Posts: 3
Joined: Sun Feb 17, 2013 9:39 pm

Block-Based Collidable

Post by creator94 »

I know there have been questions about implementing a chunk-of-blocks based custom collidable; specifically: touch on the subject of creating a custom chunk-of-blocks based collidable. Has anyone actually created such a custom collidable, or got started on one? I would like to have the ability to refer to my existing chunks for both performance and simplicity purposes, and could obviously use such an exiting structure.

I've considered rolling my own, but I'm afraid my level of understanding of the engine and of the physics involved is a bit lacking.
Norbo
Site Admin
Posts: 4929
Joined: Tue Jul 04, 2006 4:45 am

Re: Block-Based Collidable

Post by Norbo »

I am not aware of any blockworld collidable implementations; that doesn't mean that they don't exist, but I haven't heard about them :)

Creating the a collidable which uses block data wouldn't be very difficult by itself. It would be primarily annoying- wading through the API to set up all the collision pairs for different types of objects would be a pain, though not conceptually challenging. That process is primarily what my second post in your first link tries to address. Most of the 'hard stuff' is taken care of within helpers or other reusable code.

However, there is a step beyond just contact generation. If the terrain is considered a bunch of separate blocks, trying to slide an object across the surface will hit 'bumps' at edges sometimes. If this behavior is acceptable, then you're done. Otherwise, some 'boundary smoothing' is needed.

Triangle meshes handle this using connectivity information from the indices list to smooth out internal edges. The logic required to achieve smooth, artifact-free behavior is actually more difficult than the mesh handling logic itself (not including the triangle-convex tests, which is a separate mess).

Blockworld terrains will tend to be a little easier in this respect than arbitrary meshes. Connectivity information is implicit in adjacency, and the axis aligned grid gives you a lot of guarantees. Still, implementing smoothing properly without negative side effects could still end up more complicated than the base collidable implementation.

[I should also mention that, while this collidable is not something I'd make under normal circumstances, its development might end up being externally sponsored; keep an eye on the development fork for the next couple of months. No guarantees, though :)]
creator94
Posts: 3
Joined: Sun Feb 17, 2013 9:39 pm

Re: Block-Based Collidable

Post by creator94 »

Out of curiosity, is this something you've had requested before?

How often are features externally sponsored and implemented? And what does "externally sponsored" usually entail?
Norbo
Site Admin
Posts: 4929
Joined: Tue Jul 04, 2006 4:45 am

Re: Block-Based Collidable

Post by Norbo »

Out of curiosity, is this something you've had requested before?
Yup.
And what does "externally sponsored" usually entail?
I offer paid support. It's not something I advertise too much or focus on as a big source of income, but it allows me to offset the costs associated with helping people who want me to do things which are too large of a distraction from my main work to do for free.

However, it can get really pricey. If it's completely private work that I can't share or reuse, it's usually way outside the realm of indie-affordable. I subsidize some kinds of development, though. For example, if I can release the work completely freely within BEPUphysics, there's a discount. If it's also frequently requested, there's probably more of a discount. If it's already on my personal to-do list and it's just a matter of changing the item's priority, it's likely heavily discounted (potentially free, depending on the circumstances).

A blockworld collidable is somewhere in the middle on the scale of subsidization- it's not something I would likely do otherwise, but I hear questions about it relatively often. So, not super cheap, but perhaps reasonable for a group of people who didn't want to wade through the murkiest depths of an unfamiliar API.
How often are features externally sponsored and implemented?
Very rarely. The vast majority of the features in the engine were implemented through a priority weighting of what was needed internally, what was requested publicly (without paid incentive), and what could be done expediently. Almost everyone just makes use of the free support on the forum. I can't dedicate unlimited time to forum support, but usually what I can provide is sufficient.
creator94
Posts: 3
Joined: Sun Feb 17, 2013 9:39 pm

Re: Block-Based Collidable

Post by creator94 »

So roughly how much would a "middle on the scale of subsidization" be?
Norbo
Site Admin
Posts: 4929
Joined: Tue Jul 04, 2006 4:45 am

Re: Block-Based Collidable

Post by Norbo »

I've sent a response to your e-mail regarding the price.
Post Reply