Advertisement

interface for an adult game...

Started by March 07, 2002 01:50 AM
14 comments, last by DmGoober 22 years, 9 months ago
+ MODERATOR -- this is a serious post. Please read before contemplating removing. (it is actually part of an ongoing game project -- you can see the demo @ www.societygames.com) The Problem: Imagine that you are programming a game with a skinned mesh of a person -- but unlike most games that use skinned meshes (halflife, quake III, etc.) in this game you can move the individual limbs and joints of the character. So the idea is you want to be able to say, move your hand and touch a light switch as easily as possible, but without any pre-recorded motions (in other words, you are not allowed to say, "well, we go into milkshape and set keyframes to turn on the light... you can''t do this because the game is designed to be very very open ended and pre-recorded stuff removes the freedom of choice.) The interface would preferably only involve the mouse, it''s buttons, and maybe the buttons of the keyboard. The character can be viewed from any angle. What I have so far: So, in my demo, i have a very clunky camera movement system (ignore the camera interface for now, just know that the camera can be anywhere). You can click on limbs and the program will correctly select them. If you left click and drag up and down, the joint will rotate on one axis. if you move left and right while left clicking, it will rotate along another axis. holding the right mouse button and moving will rotate along the 3rd axis. In other words, control is reminiscent of a 3D modeling program (where you can rotate around joints on each axis individually.) Unfortunately, this interface is currently very counter intuitive -- 1) people have problems thinking in three independent axis 2) its very slow -- to say, reach and arm and turn a door know requires moving the elbow, shoulder, and wrist individually. I have thought about adding IK but am unsure whether it will actually help how to proceed (IK will only help solve problem 2, the slow speed of adjusting -- you can just say, rotate the forearm as far as it can go, which will then rotate the elbow, etc. which is much more efficient than having to choose one at a time.) (see the demo at www.societygames.com. You have to sit through a little bit of dialogue and you have to get the zipper down before you can interact with her joints -- i will put a new version up that does not require sitting through dialogue.) Does anyone have any good ideas or can anyone cite any other games/modelling packages that allow for easy manipulation of jointed meshes? For example, does anyone have any experience with Poser? If you do, can you tell me how that interface works for posing ppl? Thanks in advance. DmGoober
Alexander "DmGoober" Jhinalexjh@online.microsoft.com[Warning! This email account is not attended. All comments are the opinions of an individual employee and are not representative of Microsoft Corporation.]
I believe what you are looking for is Inverse Kinematics. If im not mistaken IK will be built into DX 9 (if it''s not allready in 8)
Advertisement
quote: Original post by DmGoober
+ MODERATOR -- this is a serious post. Please read before contemplating removing.


Done, and no prob as long as you keep it clean. (Fair warning, anyone who doesn''t will just get the ole delete button...)

quote:
For example, does anyone have any experience with Poser? If you do, can you tell me how that interface works for posing ppl?


I have some experience with Poser, but I don''t think their interface will be all that useful for what you''re looking for. Posing a model does use IK (I think), but it''s still a bit clumsy: For example, although you can move a character''s body forward, causing their upper body to bend and turn, just by dragging their hand forward, it doesn''t automatically make for a non-awkward pose. Poser basically lets you select each body part, and shows a graphical line (usually arcs and circles) indicating constraints.

I don''t know what solution would work for you. I can''t imagine a solution that takes into consideration context that doesn''t involve a TON of prescripted motions.

I can see a couple of possible approaches, though they''re very left field: First, divide user actions into goal oriented and motion oriented actions. Goal oriented actions are things like making a character open a door knob. Motion oriented actions would be things like making the character dance with a particular style.

In terms of goal oriented actions, you might be able to simply use pre-scripted motions. There are only so many ways, for example, that you can open a door. Maybe you can get away with chains of pre-scripted actions that can be combined in a combinatorial fashion, I don''t know.

For motion oriented behavior, you may want to simply provide a set of interface options that indicate constraints. For instance, in terms of dancing you could provide constraints for how high and far a character moves his feet. I can imagine that something like this being variable inputs to a script, but again we''re talking scripting.

I can''t really see how you can get around this short of motion sensors. The mouse seems to be a poor input device for detailed, free-form actions. Everything we get in games today , from leaning around corners to laying on the floor and reaching down a hole, (AFAIK) are all pre-scripted tricks.

--------------------
Just waiting for the mothership...
--------------------Just waiting for the mothership...
Should the user really need all that much detail in control. I mean, if you want to move the hand to a point in space there''s only one combination of elbo and shoulder movements that will get it there (in terms of bending the joints, rather than rotating). So the user should just drag the hand from one place to another and the program will calculate the elbo and shoulder motions needed to make the move. The problem is with the whole mouse-being-2d thing. What you could is when the you are using the mouse to move a limb you can move it freely in a single plane of motion, and you can use the keyboard to make that plane rotate around its axes so you can effectively move freely in 3 dimensions. You could also have other keys for rotating the limb (keyboard would be better for rotations, mouse just for moving things along planes).
You can probably get a wheelmouse to simulate the 3rd dimension by having the wheel handle depth... not sure though.
The mousewheel is very imprecise. You''d either have to scroll ye little fingers off or have to cope with a very rough coordination.
Advertisement
If/when you make your IK system, for each joint store info about constraints (what it can physically do), and also preferences. In a (relatively) simple system, each joint should have a "favourite" position, and be more and more "uncomfortable" the further away it gets from this position. The IK system then tries to minimize how uncomfortable each joint is.
Also, for people, they prefer not to have their limbs sticking out/up, because it's tiring, if a lower position can be found that is just as comfortable for the joints, then it should be used in preference to a higher position for the limb.

You might want to look at:
http://freespace.virgin.net/hugo.elias/models/m_ik.htm
That has some info on an IK system like the above (guess where I got the info from?? )

John B

Edited by - JohnBSmall on March 7, 2002 4:00:14 PM
The best thing about the internet is the way people with no experience or qualifications can pretend to be completely superior to other people who have no experience or qualifications.
Of course a big problem would be ... in adult situations the normal uncomfortable positions (which are normally chosen so that the model will be less inclined to look unnatural) do not apply. The types of things people do in sexual situations defy normal rules about feeling prone, or looking silly, so it gets very complicated to model well.

Also, the person who said their is only one combination of movements that will place the hand in the desired position - that is incorrect. There are an infinite number of variations, as evidenced by the strange walking styles that so many people have. I mean if I want to reach down and pick up a pen on the floor, I can bend at so many differenct points ... and I can decend different amounts before reaching for the pen, or reach first then decend ... here''s a reminder / example. Think how different you move when you have sore muscles, or a headache ... completely different, because the feedback from your body about what is "comfortable" is different.

Best of luck ... but this is a REALLY hard problem.
Thanks to everyone who has posted -- your responses have given me a lot to think about and approaches to try. I''ll be giving some of these ideas a shot -- but as Xai says, what I need now is luck, cause this is a really hard problem!

Thank you!

DmGoober
Alexander "DmGoober" Jhinalexjh@online.microsoft.com[Warning! This email account is not attended. All comments are the opinions of an individual employee and are not representative of Microsoft Corporation.]
I was finally able to look at the demo (busy day). This will be somewhat of a complex solution (to one of your issues). IK aside, what if the motion around joints was controlled by not the joint itself but a 3D style manipulator (this might be considered splitting hairs, but hang on).

Programatically, a joint/object has constraints (angles, extension, etc...) ~ basically numbers. When a joint is selected, a 3D manipulator would appear in 3-space that directly pertains to the action that can be perfomed (OpenInventor by SGI [OI is now owned by TGS] had an excellent array of 3D manipulators that helped users to bridge the conceptural gap between 2D motion of a mouse and 3D motion in a scene). For example: on a closed door, the handle would use a rotation manipulator (which is really all that can be done without breaking anything) so a rotation manipulator will appear. When the door is open, a translation manipulator would appear.

With more complex objects (like joints) that can be both translated and rotated, a more complex (or a choice between different) manipulator would be used. All manipulators will operate within the constraints given by the object (e.g. elbow: 0 deg(straight) to 80 degrees(fully bent). Also, you would need to define what type of manipulator each object could use.

Like I said, this would not be a simple solution, but it is one approach.

This topic is closed to new replies.

Advertisement