Game Development Community

dev|Pro Game Development Curriculum

Merry Christmas, Community - Poly Soup

by Kyle Carter · 12/24/2006 (5:03 pm) · 143 comments

Wow - almost three months since my last .plan. I guess I should write these things more often. What have I been up to? Nothing that's quite ready to be talked about in depth, but in brief: developing ways for us to do more releases at a higher quality and with bigger feature sets.

And probably some smaller stuff that I'll be posting about in coming months, too. :)

Speaking of smaller stuff, I took a few days about a month ago and extended 3space and TSStatic in TSE to support more flexible collision scenarios. Or to speak more directly, polysoup collision. I've collaborated on this with Tom Spilman, who spent some time debugging it, integrating it into a project, and cleaning it up a bit, and the end result is a polysoup implementation that seems fairly usable.

So, here's a screenshot of an orc on a concave donut:

farm1.static.flickr.com/85/272842689_bb8f17c445_m.jpg

Now, some caveats: this is just the result of a few day's hacking, not an official announcement of GG support for polysoup in Torque. So while it's pretty easy to integrate, you do have to have some coding knowledge to use it.

It's also not bullet proof. We use OpCode, so it's pretty fast & efficient, but if you expect to drop ten orc models into a level and not have a performance hit when you run a buggy into them, you'll have to think again. But if you want to build a building in DTS, and don't go overboard in your model complexity, you should do just fine.

Finally, it collides against ALL the meshes in your model, including invisible ones. So if you want a model to work for polysoup you probably want to kill all your Col-1 meshes & so forth for proper results. Adding some sort of filtering rule wouldn't be hard but it was unclear the best way to do that so we left it a bit braindead.

You can get this at its page on TDN, if you're a TSE owner. Remember, you're on your own using it!

I figure I can't very well give you hearty Christmas cheer this holiday, so I may as well post up something nice and useful. :)
#21
12/25/2006 (8:52 pm)
Ben, and about to port it to TGE? Is it possible? If yes, how hard it should be?
#22
12/26/2006 (1:21 am)
@Ben: Got it working. no problems :) Thanks again!
#23
12/26/2006 (10:49 am)
@Gustavo: the same advice I gave to Alieforce applies to porting to TGE.
#24
12/26/2006 (12:33 pm)
Ben, how about making it accessible to TGE owners? Thank you for this by the way.
#25
12/26/2006 (6:58 pm)
I'll see about extending it to 1.5 owners. This may have to wait till I'm back in the office (shortly after New Year's) as I ran into some technical issues setting it up as a resource (which is why it's on TDN right now).
#26
12/27/2006 (5:14 pm)
What on my own? What's the phone # for the Polysoup Hotline?

:)
(scratches head.. note to self.. google Polysoup)
#27
12/27/2006 (5:28 pm)
Poly soup refers to supporting arbitrary polygon (well, triangle in this case) meshes, rather than requiring convex or manifold meshes.
#28
12/27/2006 (9:00 pm)
Thanks i'll have to read up on it. Looks like something good for cliffs, waterfalls etc?

Ok noted it's experimental at this point.
#29
12/31/2006 (2:37 pm)
@Ben Garney: I'm getting link errors trying to compile that on VS2005.

>tsStatic.obj : error LNK2019: unresolved external symbol "public: void __thiscall TSShapeInstance::prepCollision(void)" (?prepCollision@TSShapeInstance@@QAEXXZ) referenced in function "protected: void __thiscall TSStatic::prepCollision(void)" (?prepCollision@TSStatic@@IAEXXZ)
13>tsMesh.obj : error LNK2001: unresolved external symbol "public: static class SceneObject * TSStaticPolysoupConvex::smCurObject" (?smCurObject@TSStaticPolysoupConvex@@2PAVSceneObject@@A)
13>tsMesh.obj : error LNK2001: unresolved external symbol "public: virtual class Box3F __thiscall TSStaticPolysoupConvex::getBoundingBox(class MatrixF const &,class Point3F const &)const " (?getBoundingBox@TSStaticPolysoupConvex@@UBE?AVBox3F@@ABVMatrixF@@ABVPoint3F@@@Z)
13>tsMesh.obj : error LNK2001: unresolved external symbol "public: virtual class Box3F __thiscall TSStaticPolysoupConvex::getBoundingBox(void)const " (?getBoundingBox@TSStaticPolysoupConvex@@UBE?AVBox3F@@XZ)
13>tsMesh.obj : error LNK2001: unresolved external symbol "public: virtual class Point3F __thiscall TSStaticPolysoupConvex::support(class Point3F const &)const " (?support@TSStaticPolysoupConvex@@UBE?AVPoint3F@@ABV2@@Z)
13>tsMesh.obj : error LNK2001: unresolved external symbol "public: virtual void __thiscall TSStaticPolysoupConvex::getFeatures(class MatrixF const &,class Point3F const &,class ConvexFeature *)" (?getFeatures@TSStaticPolysoupConvex@@UAEXABVMatrixF@@ABVPoint3F@@PAVConvexFeature@@@Z)
13>tsMesh.obj : error LNK2001: unresolved external symbol "public: virtual void __thiscall TSStaticPolysoupConvex::getPolyList(class AbstractPolyList *)" (?getPolyList@TSStaticPolysoupConvex@@UAEXPAVAbstractPolyList@@@Z)
13>tsShapeInstance.obj : error LNK2001: unresolved external symbol "public: virtual bool __thiscall TSShapeInstance::ObjectInstance::buildPolyListOpcode(int,class AbstractPolyList *,unsigned int &)" (?buildPolyListOpcode@ObjectInstance@TSShapeInstance@@UAE_NHPAVAbstractPolyList@@AAI@Z)
13>tsShapeInstance.obj : error LNK2001: unresolved external symbol "public: virtual bool __thiscall TSShapeInstance::MeshObjectInstance::castRayOpcode(int,class Point3F const &,class Point3F const &,struct RayInfo *)" (?castRayOpcode@MeshObjectInstance@TSShapeInstance@@UAE_NHABVPoint3F@@0PAURayInfo@@@Z)
13>tsShapeInstance.obj : error LNK2001: unresolved external symbol "public: virtual bool __thiscall TSShapeInstance::MeshObjectInstance::buildConvexOpcode(class MatrixF &,int,class Box3F const &,class Convex *,class Convex *)" (?buildConvexOpcode@MeshObjectInstance@TSShapeInstance@@UAE_NAAVMatrixF@@HABVBox3F@@PAVConvex@@2@Z)
13>tsShapeInstance.obj : error LNK2001: unresolved external symbol "public: virtual bool __thiscall TSShapeInstance::ObjectInstance::castRayOpcode(int,class Point3F const &,class Point3F const &,struct RayInfo *)" (?castRayOpcode@ObjectInstance@TSShapeInstance@@UAE_NHABVPoint3F@@0PAURayInfo@@@Z)
13>tsShapeInstance.obj : error LNK2001: unresolved external symbol "public: virtual bool __thiscall TSShapeInstance::ObjectInstance::buildConvexOpcode(class MatrixF &,int,class Box3F const &,class Convex *,class Convex *)" (?buildConvexOpcode@ObjectInstance@TSShapeInstance@@UAE_NAAVMatrixF@@HABVBox3F@@PAVConvex@@2@Z)
13>../example/torqueDemo_DEBUG.exe : fatal error LNK1120: 12 unresolved externals

What's wrong?

Thanks
#30
12/31/2006 (6:50 pm)
You didn't properly apply the changes to TSStatic in the resource.
#31
01/01/2007 (11:44 am)
Thanks Ben, i got it working on TGE 1.5

Thanks for the help!
#32
01/01/2007 (12:12 pm)
My Player falls thrue the surface of the object and get stuck in the middle of the object.
No compiling issues.... Just the above problem.
#33
01/01/2007 (12:21 pm)
@Alienforce - Make sure the bounding box is set correctly when you export your DTS. I've heard one report that this can cause collision to partially work. Not sure why this is.
#34
01/01/2007 (1:42 pm)
@Ben: i got it working on TGE 1.5. Where can i upload the file?
#35
01/01/2007 (4:32 pm)
E-mail it to me - I'll post it up on TDN.
#36
01/02/2007 (7:50 am)
Arggghhhhhh..... I just found out that its the Max exporters messing up the export :( the same simple mesh works just fine when i use Milkshape for the export... Why is there so much trouble with the Max exporters ?? Its really depressing spending $3495 and have to use a shareware app to make the exporting.
I know iam going to get answears like this "You have the source go and fix it yourself!" :) and Yes i am really tired for all the troubles with Max exporters so does anyone have some directions for me where to start to "rework" the exporters ??? Any good threads to read etc....
#37
01/02/2007 (7:54 am)
Looks like the site is having having trouble with weird character codes.

Alienforce said... at least according to the email notification....
Quote:Arggghhhhhh..... Im going crazy... After many hours working in Max to figure out what i am doing wrong couse my dts export will not work with the Polysoup.. I thought, hey lets try the same export in Milkshape and guess .... It works ... soooooo... whats wrong with Max exporters it feels like there is ALOT of work that have to be done on the Max exporters..

I just removed what looked to be an apostrophe, but it was an ascii code 180.
#38
01/02/2007 (7:59 am)
Yes the post was not showing correct so i had to rewrite it above. :) But the questions are the same.
#39
01/02/2007 (8:00 am)
@Alienforce - Which Max exporter are you using? Is it the new ones?
#40
01/02/2007 (8:13 am)
Good question. I "think" the one i use generally is the "max2dtsExporter" from TGE 1.5 stock.
I have tried the "new ones" also from the TGE 1.5 but with the same result.