Jump to content


Photo

Few 3D problems !


  • Please log in to reply
14 replies to this topic

#1 The Scorpion

The Scorpion

    GMC Member

  • GMC Member
  • 421 posts
  • Version:GM8

Posted 18 February 2012 - 08:12 PM

Well, I'm creating a nice TombRaider Game ! And I'm taking it step by step! I really want it to be Nicely done!
Here is a pic already

Posted Image

1) Ok, the first problem is how can I make lara target her pistols to Camera direction while Moving around easily !!! I've been thinking of dividing 'lara' into 2 sub_models (head, hands alone)+(the rest of the body together) then create with the first model a 30 (or more) frames animation, of 180 degree targeting direction ! then according to the angle between the cam direction and the Movement direction I pick up the correct frame ! What do you think of it! Is there a better way to approach this !( I don't know if you got the idea, I don't seem to be clearer)
Note : I'm using 3D max to animate and exporting to G3D files ! (wich saves the animation frame by frame)

2) How can I make lara grab to the building edges and smoothly move left and right !! I've no idea how to begin O.o Seriously, I'm using p3dc DLL, for now I limited all the surface that can be 'reacted with' ! Then what ????? Please give any advice!!

3) Finally what's better, to make 2 modes (battle mode / normal mod ;) ) and switching between then to define possible actions ! like assassin Creed if you will :P or to keep with the oroginal playstation idea, and preserve the tradition :D

to finish, if anyone iterrested in coorporating with me !!! feel free to ask ! I'm having my baccalauriate this year, and I don't seem to progress that much ! Help is appreciated any way ;)
  • 0

#2 hit172

hit172

    GMC Member

  • New Member
  • 189 posts
  • Version:GM8

Posted 18 February 2012 - 09:45 PM

First of all, what you want to do is completely impossible by using animations the way you are. You need to use a system that exports bones/models in a way that you can edit the animation easily at run time. I suggest using SilentMove because it is open source and is pretty good already (although I would write my own exporter to the format instead of using the original program). Depending on how you want to do #1 and #2 you might want to add IK to the engine also.

1) just use p3dc to raycast from the camera position and find the intersection point and have the gun point where the intersection is.

2) you need to be able to tell the game engine where the edges are by possible adding things to the model format. Then you just need to make an animation where you have the model moving left and right (climbing) along the "edge" with the hands at the origin and simply draw the model along the edge you are climbing along. If you want to be able to climb up buildings then it gets more complicated and you need to add more edges and specific points and then use IK to place the hands and feet on those points when you are climbing.

3) define 2 different sets of animation and actions and then switch between them when you switch modes.
  • 0

#3 Buff-Robotix

Buff-Robotix

    Who Took My Pants!?!

  • GMC Member
  • 313 posts

Posted 19 February 2012 - 12:55 AM

First of all, what you want to do is completely impossible by using animations the way you are.

I wouldn't say so, It is true that bone based animation is the smoothest way of animating a character but it is very slow and very difficult. (I have never used SilentMove (I don't even know where to find it))
But animation based games can look fantastic if the right amount of work is put in it (Ratchet and Clank and God of War use only animations, no bones and no ragdoll physics.)
If you want the torso to move independently from the legs you should use two different sets of animation, the top half and the bottom half, this looks very nice when done right.

1) Hmm, I think I get what you are saying... Have you ever played Project Auora? The aiming system is pretty sweet, is this like how you want? In that case I would recommend splitting your animations in half and rotating the top half left and right according to the camera direction and up and down according to the pitch of the camera.
If you want to do independent movement of the character from the camera (like Ratchet and Clank or Uncharted) so you can turn the character around and see her face, then I would recommend this script for rotating your character toward the camera direction. Then shooting would occur from the front of the character and not the camera like in Ratchet and Clank.

2) Haha! I'm working on ledge hanging right now (without the p3dc.dll, just math) and it isn't easy, I'm not sure how the p3dc.dll works but I have my character stop falling if they are colliding with a ledge object at the proper height, and then check to see if the object is still next to it when moving.

3) I've never played Assassin's Creed so I'm not sure what you're talking about, but experiment and see which one is most fun and you like best.

RobotiX
  • 0

#4 hit172

hit172

    GMC Member

  • New Member
  • 189 posts
  • Version:GM8

Posted 19 February 2012 - 06:55 PM

He wants to be able to dynamically place the hands and feet of the player model. This is completely impossible if the animations are completely pre defined (he is saving the vertex positions for each and every frame of animation)

But animation based games can look fantastic if the right amount of work is put in it (Ratchet and Clank and God of War use only animations, no bones and no ragdoll physics.)

This is because they aren't doing anything dynamic with the models. Assassin's creed, which has the hands and feet dynamically placed to different parts of the mesh, uses bone animation heavily. I didn't say it doesn't look good. I just said that it would be completely impossible to try and use it to do what he wants to do.
  • 0

#5 Gamer3D

Gamer3D

    Human* me = this;

  • GMC Member
  • 1815 posts
  • Version:GM:Studio

Posted 19 February 2012 - 09:24 PM

He wants to be able to dynamically place the hands and feet of the player model. This is completely impossible if the animations are completely pre defined (he is saving the vertex positions for each and every frame of animation)

"You keep using that word. I do not think it means what you think it means."

This is because they aren't doing anything dynamic with the models. Assassin's creed, which has the hands and feet dynamically placed to different parts of the mesh, uses bone animation heavily. I didn't say it doesn't look good. I just said that it would be completely impossible to try and use it to do what he wants to do.


Bones would be easier, but by creating arm/shoulder/head models for the various vertical aim directions (or separate arm models for more careful placement, 4 leg animations for walking (forward, backward, left, and right), and models of the torso for various twists between -45 and 45 degrees, it is possible to create what he wants to do. Therefore, it is not impossible; it was merely something you couldn't find a solution to.

In general, given finite possible states (In the case that he's working on, I'd suggest limiting rotations to be in steps of no less than 1 degree), you can create a finite set of models to accompany them. By breaking the model down, you can reduce the number of required states. One last note: GM's numbers have a finite number of possibilities. It's a large number (a little less than 2^64, due to special values for the exponent and mantissa), but it's finite.
  • 0

#6 hit172

hit172

    GMC Member

  • New Member
  • 189 posts
  • Version:GM8

Posted 19 February 2012 - 09:56 PM

I am not saying make animation for each of those actions. I am saying he should use a combination of pre set animations and animations calculated at run time. This is only possible with bone animation. You keep twisting what I say or simply just can't understand it.

"You keep using that word. I do not think it means what you think it means."

How old are you? 3?
  • 0

#7 Buff-Robotix

Buff-Robotix

    Who Took My Pants!?!

  • GMC Member
  • 313 posts

Posted 19 February 2012 - 10:39 PM

How old are you? 3?

Hey that is a great movie, I don't even think a three year old would understand it's depth.

I simply saying that he has other options than just using the "dynamic" non-animation technique that you are suggesting, because both Ratchet and Clank and God of War have ledge hanging and traversal that only uses animations. And you don't need to do entirely separate hands for aiming as shown by Project Aurora. Not to mention that the bone based animation system is very difficult to code compared to model based animation.
I would still recommend a model based animation game.
  • 0

#8 hit172

hit172

    GMC Member

  • New Member
  • 189 posts
  • Version:GM8

Posted 19 February 2012 - 10:47 PM

How about this, if the OP wants to be able to have real climbing (assassin's creed) and not just moveing along edges then he should use bone animations. Otherwise, model animation is fine.
  • 0

#9 Gamer3D

Gamer3D

    Human* me = this;

  • GMC Member
  • 1815 posts
  • Version:GM:Studio

Posted 20 February 2012 - 03:49 AM

How about this, if the OP wants to be able to have real climbing (assassin's creed) and not just moveing along edges then he should use bone animations. Otherwise, model animation is fine.

What we are saying is that the OP can make a static model-based system to animate real climbing, walking, running, or anything else (This is an extension of what he was suggesting in the first post); the only restriction for this method (which can be fixed with polygon "skirts") is that he conform to a finite number of angles.

Bone animations would be slow in GM, because with the current GM graphics system, animating a skinned model would require calculating vertex positions and drawing trianglestrips or lists in GML. GML is slow. Probably too slow for this. He'd get better results (Yes, even for "real climbing") using a set of models.

First of all, what you want to do is completely impossible by using animations the way you are. You need to use a system that exports bones/models in a way that you can edit the animation easily at run time.

I don't see any interpretation other than "You can't do it with model animations. You MUST use bones." Thing is, he was on the right track when he suggested splitting lara into 2 models. Continuing these splits a bit more, he could place the hands/feet/etc. anywhere he wants, while using model animations. Thus, your "impossible" does not apply in context. In fact, because he could (technically) have a model for EVERY position (to within, say, 0.1 units), your "impossible" doesn't apply even taken out of the full context.

How old are you? 3?

I quote a comedy to bring some joy and laughter to this discussion, and you question my age/maturity.
  • 0

#10 The Scorpion

The Scorpion

    GMC Member

  • GMC Member
  • 421 posts
  • Version:GM8

Posted 20 February 2012 - 07:00 PM

Thank you people ! I'll take all you said in consideration :D


2) you need to be able to tell the game engine where the edges are by possible adding things to the model format. Then you just need to make an animation where you have the model moving left and right (climbing) along the "edge" with the hands at the origin and simply draw the model along the edge you are climbing along. If you want to be able to climb up buildings then it gets more complicated and you need to add more edges and specific points and then use IK to place the hands and feet on those points when you are climbing.


I hope I'll have a look on the concept !! Can you share ? :)
  • 0

#11 The Scorpion

The Scorpion

    GMC Member

  • GMC Member
  • 421 posts
  • Version:GM8

Posted 26 February 2012 - 08:24 AM

Hello again GMC! I made lara grab nicely to borders :D

http://www.images-ho...reenshot100.bmp



I contunied my project, and I'm having trouble again O.o
Shadows !! I need to create a nice shadow for Lara !
I don't want a fully casted Real Time shadow :P but enought realistic for Nice results :D

I'm thinking of using a sprite ( of course as texture for a 3D plan) stretched according to Lare Movement, and Height from the floor!
I Don't have any nice shadow image ! So please share if you got one!
And of course, if you've got better idea/exemple, share :)
  • 0

#12 Buff-Robotix

Buff-Robotix

    Who Took My Pants!?!

  • GMC Member
  • 313 posts

Posted 02 March 2012 - 10:30 AM

Hello again GMC! I made lara grab nicely to borders :D

http://www.images-ho...reenshot100.bmp

Neat, it looks good. Did you use animations?
For the shadows, if you want to do top down shadows that don't react to changes in direction but still match your model, the easiest thing to do is set the color to black a draw your character model again with a z scale of 1 or some other small number and draw it at the floor height such as 0. If you want it to stretch and rotate according to the position of a light source this will take some serious math. This will make the shadow look the same as the model but it will still only be able to be drawn on one plane.

Enjoy.
RobotiX
  • 0

#13 The Scorpion

The Scorpion

    GMC Member

  • GMC Member
  • 421 posts
  • Version:GM8

Posted 03 March 2012 - 09:39 PM

Hello again GMC! I made lara grab nicely to borders :D

http://www.images-ho...reenshot100.bmp

Neat, it looks good. Did you use animations?
For the shadows, if you want to do top down shadows that don't react to changes in direction but still match your model, the easiest thing to do is set the color to black a draw your character model again with a z scale of 1 or some other small number and draw it at the floor height such as 0. If you want it to stretch and rotate according to the position of a light source this will take some serious math. This will make the shadow look the same as the model but it will still only be able to be drawn on one plane.

Enjoy.
RobotiX


Sweet idea, I tested it, and it's not that bad :thumbsup: Yes I use animations ! I'm actually rebuilding the whole system! It won't look the same !
  • 0

#14 Buff-Robotix

Buff-Robotix

    Who Took My Pants!?!

  • GMC Member
  • 313 posts

Posted 05 March 2012 - 05:27 AM

Sweet idea, I tested it, and it's not that bad public/style_emoticons/default/thumbsup.gif Yes I use animations ! I'm actually rebuilding the whole system! It won't look the same !


Awesome. Now because it is drawing the model two times (one for the actual model and one for the shadow) the game could slow down so you might not be able to do it for every object in the game and you can make a setting for slower computers that turns shadows off.
  • 0

#15 ean

ean

    GMC Member

  • New Member
  • 190 posts
  • Version:GM8

Posted 24 March 2012 - 09:11 PM

Project Aurora uses frame based animations.
  • 0




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users