Converting shapes, also - New User / Beginner forum?

chucksspencer
Posts: 35
Joined: Wed Jun 25, 2008 2:52 pm

Converting shapes, also - New User / Beginner forum?

Post by chucksspencer »

Is there a way to convert one of the primitive Collision Shapes (e.g. btSphereShape) to a convex hull? I know the btSphere is derived from the btConvexShape class - could this be achieved with some clever casting? I'm creating a tool and I'd like for my content authors to be able to apply non-uniform scaling to cylinders and spheres - seems like a solution would be to convert/collapse them to a convex hull.

Also - have the admins of this site considered setting up a Beginners forum for user with simpler questions that may just be considered clutter in the main SDK forum (like most of mine) and where beginners can go to find threads that might be more helpful to them?
mcan
Posts: 15
Joined: Tue Feb 03, 2009 10:04 am

Re: Converting shapes, also - New User / Beginner forum?

Post by mcan »

I don't have any help for you on your first question, however I'm also a beginner so I think that your second question is a good idea!

The question is if you/we would get more answers in such a forum... It's hard getting an answer to a q now, and if there is a beginners forum would there ever be any "non-beginners" there to answer the beginners questions?

/Markus
User avatar
kenshin
Posts: 36
Joined: Fri Oct 31, 2008 5:10 pm

Re: Converting shapes, also - New User / Beginner forum?

Post by kenshin »

mcan wrote:I don't have any help for you on your first question, however I'm also a beginner so I think that your second question is a good idea!

The question is if you/we would get more answers in such a forum... It's hard getting an answer to a q now, and if there is a beginners forum would there ever be any "non-beginners" there to answer the beginners questions?

/Markus
I seriously agree with Markus.
chucksspencer
Posts: 35
Joined: Wed Jun 25, 2008 2:52 pm

Re: Converting shapes, also - New User / Beginner forum?

Post by chucksspencer »

mcan wrote:I don't have any help for you on your first question, however I'm also a beginner so I think that your second question is a good idea!

The question is if you/we would get more answers in such a forum... It's hard getting an answer to a q now, and if there is a beginners forum would there ever be any "non-beginners" there to answer the beginners questions?

/Markus
Yeah I'd wondered the same thing. The questions is - would having the n00b questions in their own place make the more advanced users -more- or -less- likely to chime in. On one hand, they have no reason to visit the beginners section unless they feel like helping out. On the other hand, if they're in the regular section they're typically concerned with their own problems and may consider the simple questions clutter, and won't help out there anyway.
AlexSilverman
Posts: 141
Joined: Mon Jul 02, 2007 5:12 pm

Re: Converting shapes, also - New User / Beginner forum?

Post by AlexSilverman »

Going back to the OP for a moment, my understanding is that convex hulls are created by way of a point cloud. I'm not sure, but my guess is that it just creates a convex shape out of the outermost points in the cloud, but I could be wrong on that point. I don't believe there's a simple prefab way to convert from say a btBoxShape to a btConvexHullShape.

On the other topic, I've been hanging out here long enough to see that the vast majority of problems do get adequate attention. Of course, there are some that slip through when things are busy for everyone, such as when project milestones are coming due, the holidays, the run up to GDC, etc. More often than not though, questions posed here get resolved or a bug gets created in the database. As for creating a separate "Beginners" forum or folder, I think time spent further developing the Wiki is a better option. Right now it seems like there's a lot of information there, but it's not quite easy enough to navigate, and thus the areas it's lacking aren't quite clear enough to those inclined to fill them in. I'm sure this will only improve with time (and the addition of an index :) ) though.

- Alex
mcan
Posts: 15
Joined: Tue Feb 03, 2009 10:04 am

Re: Converting shapes, also - New User / Beginner forum?

Post by mcan »

On the other topic...
I have been a member here for about 3 weeks or so. I have asked some questions and I have replies on all of those. Sadly though the majority of the replies are made by my selves. When I don't get any answer I keep on working and if I make progress I try to fill in the answer my self so others can see.

Of course every question can't be answered! But to say that the majority of my q's has been answered would be to exaggerate.

What I think could be a great feature on this forum is a button "Solved!" that marks the thread as solved. That way it would be easier to see which q's really where answered and to form a better insight of how "good" the forum really are.
chucksspencer
Posts: 35
Joined: Wed Jun 25, 2008 2:52 pm

Re: Converting shapes, also - New User / Beginner forum?

Post by chucksspencer »

It's not my intent to complain about the lack of (free) advice and responses - I've gotten great help here on the forum. A beginner's section might make it easier both on the beginners and the non-beginners. The advanced section could focus on meatier problems and actual bugs, and the beginners could have an easier time getting and finding answers to the more trivial stuff in their own little section. Sometimes perhaps they (we) could even help one another without needing to pester the "adults" :wink:

On the other hand it would make the forum structure more complex (arguably needlessly) and it may become an echo-chamber of cluelessness. It was just a thought.

Thanks for the response!
mcan
Posts: 15
Joined: Tue Feb 03, 2009 10:04 am

Re: Converting shapes, also - New User / Beginner forum?

Post by mcan »

I'm sorry, reading the last inlay I see that it can sound bitterish :) again sorry for that. This is not my main language...

However the part with the "Solved!" button I still think could be a good idea.
And I still agree with chucksspencer that a beginners forum could be a good idea.
User avatar
Erwin Coumans
Site Admin
Posts: 4221
Joined: Sun Jun 26, 2005 6:43 pm
Location: California, USA

Re: Converting shapes, also - New User / Beginner forum?

Post by Erwin Coumans »

chucksspencer wrote:Is there a way to convert one of the primitive Collision Shapes (e.g. btSphereShape) to a convex hull? I know the btSphere is derived from the btConvexShape class - could this be achieved with some clever casting? I'm creating a tool and I'd like for my content authors to be able to apply non-uniform scaling to cylinders and spheres - seems like a solution would be to convert/collapse them to a convex hull.
Yes, there is a simple btShapeHull utility, that takes any convex shape and turns it into a point cloud, ready to be used for a btConvexHull. The good thing about btShapeHull is that it creates a maximum of 64 vertices, so it can also be used to simplify a complex btConvexHullShape. It is also used in the GL_ShapeDrawer, to generate triangle meshes to render convex shapes, such as the btCylinderShape.

Code: Select all

btShapeHull* hull = new btShapeHull(convexShape);
btScalar margin=0.01;//choose some small value here
hull->buildHull(margin);
int numverts = hull->numVertices ())
const btVector3* vtx = hull->getVertexPointer();
//create a new btConvexHull, using those points
btConvexHullShape* newHull = new btConvexHullShape(vtx,numverts);
Also, you can use the btMultiSphereShape to creating a non-uniform scalable sphere. the btSphereShape can only be uniformly scaled (same scaling in all directions), because of some optimizations, using the radius as margin. We probably should add a btNonuniformScalableSphere object.
Thanks,
Erwin
chucksspencer
Posts: 35
Joined: Wed Jun 25, 2008 2:52 pm

Re: Converting shapes, also - New User / Beginner forum?

Post by chucksspencer »

Perfect! Thanks as always Erwin.