Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Code Snippets / Bone deformation control?

Author
Message
Danmatsuma
21
Years of Service
User Offline
Joined: 2nd Mar 2003
Location: Australia
Posted: 18th May 2003 14:44 Edited at: 20th May 2003 20:54
[edit] updated code below

ZX Spectrum 48k Issue 3, Radio shack Tape drive, Rank arena 12" T.V. set.
Danmatsuma
21
Years of Service
User Offline
Joined: 2nd Mar 2003
Location: Australia
Posted: 19th May 2003 14:45 Edited at: 20th May 2003 20:55
[edit] Next one

ZX Spectrum 48k Issue 3, Radio shack Tape drive, Rank arena 12" T.V. set.
Danmatsuma
21
Years of Service
User Offline
Joined: 2nd Mar 2003
Location: Australia
Posted: 20th May 2003 18:06 Edited at: 20th May 2003 18:25
Updated it to make it simpler to use, just save this code in a directory with some rigged models without animation:



I'd really appreciate it if someone would try this in patch 4.1 and let me know if the mesh deforms around the bones

and here's a rigged model to test it with if you don't have one, so there's no excuse!!
http://www.freewebs.com/danmatsuma/testc.x
Just save the stoopid cylinder in the same directory as the project, start the program type:

testc

or the name of an .x model of your own which has no animation data

then try scrolling through the joints/limbs/bones whatever you want to call them (rightclick) and then leftclick/drag the mouse to attempt realtime deformation of the mesh.

Move the mouse left/right without clicking to rotate the model.
Press space to move the model.

Please take note if the limbs move with the model (I know bone 0 does, but I'm interested in the others)

Of course you can always just use it as a stoopid model viewer too

ZX Spectrum 48k Issue 3, Radio shack Tape drive, Rank arena 12" T.V. set.
Soyuz
21
Years of Service
User Offline
Joined: 17th Dec 2002
Location:
Posted: 20th May 2003 21:46
Works for me.

Tested it on a fairly complex chopper model I made and each limb rotates independantly of the main model - is that what you wanted to know?
Danmatsuma
21
Years of Service
User Offline
Joined: 2nd Mar 2003
Location: Australia
Posted: 21st May 2003 11:16
No I want to know if it works on a static mesh, with bones. I posted one for download if you could try it with that in patch 4.1, I can't as I'm still waiting for my full version of pro to arrive, so this was coded in the demo.

I'm assuming your helicopter is made of seperate pieces, and so it's not really the test I was looking for, It'll definitely work on seperately limbed models even in db 1.13 I imagine... But thanks for tryin' anyhow

What I'm trying to find out is if I can develop with patch 4.1 in mind, as the demo has a rather horrid bug which stops rotate limb commands from deforming the mesh the limbs are attached to, and also stops the skeleton from moving with the model. Lee assured me this is fixed in 4.1 and so I'm asking people to test it while I wait for pro(You can't patch the demo)

ZX Spectrum 48k Issue 3, Radio shack Tape drive, Rank arena 12" T.V. set.
Soyuz
21
Years of Service
User Offline
Joined: 17th Dec 2002
Location:
Posted: 21st May 2003 14:41
I tested your .x model (using 1.41). I get a cube and whichever limb is selected it is always the same cube that rotates. Don't know if this is good or bad.
Danmatsuma
21
Years of Service
User Offline
Joined: 2nd Mar 2003
Location: Australia
Posted: 22nd May 2003 07:40
I'm confsed as to which version of Darkbasic you're using, The test is for DarkBASIC Professional patched to 4.1 and the test is to see whether the mesh deforms with the little cube's rotation. If you used this in pro the cube would move to the axis of each bone(or limb) in the list each time you click the right mouse button.

If the test worked, you would see the cylinder deform quite dramatically as you leftclick/dragged the mouse, the little cube is just to reveal the location of the invisible bone(or limb) and acts as a kind of 3d cursor.

If it failed, you are either using DarkBASIC 1.xx(classic) or the demo, or at worst, software control of mesh deformation using limb commands is impossible (that's kind of what I'm trying to test here, wether patch 4.1 fixes this bug)

ZX Spectrum 48k Issue 3, Radio shack Tape drive, Rank arena 12" T.V. set.
Soyuz
21
Years of Service
User Offline
Joined: 17th Dec 2002
Location:
Posted: 22nd May 2003 15:18
lol sorry I'm getting my numbers mixed up with all the other countless patched programmes that I use!

4.1 is what I used. All I saw was a cube that would spin around in the same manner no matter what limb was selected. You say the "cylinder" would deform - I didn't even see a cylinder! You also say "little cube" - the cube practically fills the entire screen!

Ok so you know I'm not going mad, here's a screenshot...

Soyuz
21
Years of Service
User Offline
Joined: 17th Dec 2002
Location:
Posted: 22nd May 2003 15:37
I did try it on another boned model of my own, although it didn't consist of one single mesh. For the record this is what it showed (note i removed the text as the number of lines was overflowing off end of screen and causing problems)



It's quite small but you can just make out by his groin, the little white cube. So this cube spins away happily depending on the selected limb but i get no deformations. Maybe this is expected since the model is not a single mesh.
Danmatsuma
21
Years of Service
User Offline
Joined: 2nd Mar 2003
Location: Australia
Posted: 24th May 2003 13:58
Sounds like the camera got too close to the cube, and was inside the cylinder, See I have a load object command, the camera should automatically move/adjust fov for that model. Now I set autocam off and create the cube. I don't know why but I'm guessing those commands also work differently in patch 4.1.
Which is upsetting! But the cylinder model (testc.x)really should work

The mesh should only deform if it's a static (one-piece) mesh, which has had bones added (joints in milkshape) and been rigged before being loaded into DBpro. Also, the object should have no animation data. If you use a model with seperate linked limbs, the program wasn't really designed for that, but it should still rotate whatever body part is selected. But if that's all I needed I would have stuck with DB 1.13/enhanced. It's really the mesh deformation I need to know about, for a project I'm working on

Your testing does tell me one thing though, the cube moves to where it should. Did you press the spacebar to move it around and rotate the model by dragging without clicking? If you did, and the cube still moves to the correct places for the model's bones/lims then at least one thing has been fixed in 4.1

ZX Spectrum 48k Issue 3, Radio shack Tape drive, Rank arena 12" T.V. set.

Login to post a reply

Server time is: 2024-11-24 04:27:57
Your offset time is: 2024-11-24 04:27:57