Search Home Members Contacts
About Us
Products
Downloads
Community
Support
Pages: [1]
  Print  
Author Topic: Cloth in VB6  (Read 9174 times)
beyonder
Moderator
Community Member
*****
Posts: 470


« on: December 17, 2010, 03:30:11 AM »

I finally sat down and wrote this monster. I'm using PhysX to power cloth in VB6.

It's still eartly in the development phase but I figured out the pipeline. Now I can have cloth meshes for skirts, hair, etc. In VB6!

Yep, I still use VB6 because it's just way too easy. (that's just me)

I will post my code when it's final. It's an ATL COM dll so I'm pretty sure you can use it in Net as well.

FPS is through the roof if you're wondering. The movie isn't right... look at the picture. FRAPS was hogging it most.

http://www.youtube.com/watch?v=Evx9z1I7yFE




Progress Log

Dec 18 2010 - Today I was able to add a collision object and move it from inside of VB6. I also switched to .SetGeometry to update my cloth which added some more FPS. Added movie number 2 to this message.

http://www.youtube.com/watch?v=HwNnqgB4o98

Dec 20, 2010

I've been able to attach cloth to objects and move them around from within my application. A few more short steps and I'll be able to get skirts on my 3d girls.  Tongue

http://www.youtube.com/watch?v=jgHB-P3J0-o
« Last Edit: December 20, 2010, 04:25:34 AM by beyonder » Logged

"And what I saw scared me to the depths of my miserable soul. It was true, it was all a sham, it ain't real." - The Thirteenth Floor
PaulTheAxeman
Community Member
*
Posts: 37


« Reply #1 on: December 17, 2010, 02:23:11 PM »

 Shocked Looks good.
Logged
arnienet
Customers
Community Member
*****
Posts: 267


WWW
« Reply #2 on: December 17, 2010, 02:52:50 PM »

That's pretty good work. I've just applied to nVidia for a PhysX account / sdk to see performance and features. Looks like it's quite fast, are you sing nVidia HW or is it the SW version on ATI? Did it take long to get approved?
« Last Edit: December 17, 2010, 08:23:08 PM by arnienet » Logged

Total Dev time = 50% to code, 50% to test, 50% to find errors, 50% to fix, that's why it takes twice as long.

Dawn World MMO
beyonder
Moderator
Community Member
*****
Posts: 470


« Reply #3 on: December 17, 2010, 11:50:55 PM »

Well... I just grabbed the SDK off the net. Didn't sign up for PhysX dev yet.  Tongue

The interface is very simple. I encountered like zero behavior problems. You just initialize PhysX, load in your verts into the right class (cloth, rigid, etc.) and just call the updateSimulation(TimeElapsed) function once in a while. You don't do it every loop because it will chug. You call it every 1/30 of a second or something and you get a smooth simulation without the FPS crunch.

I don't have a PhysX card. I am using sofware run PhysX which is faster compared to hardware (when I switch the flags). I do have a 460GTX and it still runs faster on software. (I think!) Have to more closely check.

I'm gonna keep working on this for awhile yet. It's not too hard to add rigid and soft bodies too. Might just end up with a very good alternative to Newton. I'll definately share.

laters 
« Last Edit: December 17, 2010, 11:55:30 PM by beyonder » Logged

"And what I saw scared me to the depths of my miserable soul. It was true, it was all a sham, it ain't real." - The Thirteenth Floor
arnienet
Customers
Community Member
*****
Posts: 267


WWW
« Reply #4 on: December 18, 2010, 11:02:28 AM »

Thanks for the info. I opted for a straight download off the net eventually, still waiting for an account approval! I have a GTS450 and tried the physX demos. They ran faster on HW than on SW, but I suspect this because they update every frame rather than once every 1/30th second as you suggest (even the blank demo runs relatively slowly). I've got TV3D Newtonian physics running with no noticeable fps drop, but it's good to know a 3rd party module can be used for additional features like cloth, soft bodies and perhaps even vehicle physics. It's also cool to see it running at such a cool fps in TV3D, so thanks again and I look forward to seeing more advancements Smiley
Logged

Total Dev time = 50% to code, 50% to test, 50% to find errors, 50% to fix, that's why it takes twice as long.

Dawn World MMO
Toaster
Community Member
*
Posts: 378


WWW
« Reply #5 on: December 18, 2010, 12:41:17 PM »

You guys are going to want to follow this for your time step:

http://gafferongames.com/game-physics/fix-your-timestep/

Hope it helps you guys out.

-Toaster
Logged

Visit my site at: Unknown Abstraction
beyonder
Moderator
Community Member
*****
Posts: 470


« Reply #6 on: December 18, 2010, 05:06:35 PM »

Yea, Newton works great. I'm really only needing PhysX for cloth and softbodies. Good luck with your explorations. This is just way too much fun!  Cheesy

I'll be updating the top post with my progress. Today I figured out how to move collision objects (Kinematic Actors) I'm adding methods to the dll daily and hope to have a complete PhysX solution soon. Added a new movie too showing me moving a collision object from within VB6.

Ok... I'll keep you guys updated.

Thanks Toaster... I'm definately going to take a look!  Smiley


Logged

"And what I saw scared me to the depths of my miserable soul. It was true, it was all a sham, it ain't real." - The Thirteenth Floor
beyonder
Moderator
Community Member
*****
Posts: 470


« Reply #7 on: December 20, 2010, 04:26:44 AM »

Success. I was able to attach cloth to moveable meshes.

http://www.youtube.com/watch?v=jgHB-P3J0-o

The cloth functions are almost done. I might be able to release a first version in a few days.  Smiley
Logged

"And what I saw scared me to the depths of my miserable soul. It was true, it was all a sham, it ain't real." - The Thirteenth Floor
keriuonlesmar
Community Member
*
Posts: 1

All is well


« Reply #8 on: April 04, 2011, 11:48:49 PM »

cloth function are very useful.
Logged

Pages: [1]
  Print  
 
Jump to:  

Powered by SMF 1.1.3 | SMF © 2006-2007, Simple Machines LLC
Seo4Smf v0.2 © Webmaster's Talks