Deleted
Deleted Member
Posts: 0
|
Post by Deleted on Jul 8, 2015 21:44:27 GMT
I have these models that are rigged and animated from Mixamo (they're in various formats), and I really want to create a small little game of sorts where you control a third person character and the animations play at the appropriate times (with a custom terrain, as well). How do I import animations, and how would I go about doing this? And, is there any possible way to control the camera using keys instead of using the mouse? Thanks all.
|
|
|
Post by heatadvisory on Jul 9, 2015 2:39:28 GMT
Well, welcome to the 3d rad community! The animations would need to be direct x format. And yes you could probably use keys instead of mouse However it may need scripting. I hope someone can guide you further.
|
|
Deleted
Deleted Member
Posts: 0
|
Post by Deleted on Jul 9, 2015 2:51:37 GMT
Thanks for the welcome! But, how would I put multiple animations in the .X format? Mixamo lets me download individual animations, which I can then convert to .X (I've tried it just now and it played the animation just fine).
|
|
|
Post by heatadvisory on Jul 9, 2015 2:58:10 GMT
I'm not familiar with that program, or animations in general, I'm more of an art guy and still models, I will be learning animations soon.
|
|
Deleted
Deleted Member
Posts: 0
|
Post by Deleted on Jul 9, 2015 3:05:12 GMT
Oh, ok. I'll try and figure it out tonight.
|
|
|
Post by BorekS on Jul 9, 2015 7:31:19 GMT
welcome frogz2007 I am glad somebody would like to bother with animated 3drad characters again as said, first you will need to import your rigged model into 3drad, using the proper .X file. if Mixamo cant export models directly into such format (or is such .X file unreadable for 3DRad), you could try to use fragMOTION (eg. convert Mixamos FBX file into fragMotions .X file). when this is done, the real pain starts. you probably will need to create some scripts, to be able to control your character in the 3drad game project anyway, 3drad includes a few SkinMeshBone related demo projects... ... good luck!
|
|
Deleted
Deleted Member
Posts: 0
|
Post by Deleted on Jul 9, 2015 7:46:18 GMT
Thanks for informing me of those example projects! I will look into them. I tried importing the FBX file into fragMOTION but it wouldn't read it. Gave an error.
|
|
|
Post by Thunder on Jul 9, 2015 11:22:38 GMT
Welcome to our community frogz2007! As BorekS said this for fragMOTION I was trying to make an animation. I opened a file from SketchUp8 and it didn't show an error. Do you use SketchUp for 3D modelling?
|
|
Deleted
Deleted Member
Posts: 0
|
Post by Deleted on Jul 9, 2015 17:01:02 GMT
Actually, what I do is I have these models ripped from a PS2 game, I rig them with Mixamo's auto-rigger, and I can either export it to DAE, FBX, or BVH. Thing is, if I export it as a BVH, and import it into fragMOTION it only imports the skeleton with the animations applied. And if I export it as DAE, and import it into fragMOTION, only the model gets imported. Confusing me.
|
|
|
Post by Thunder on Jul 9, 2015 19:30:53 GMT
I can't help you now. Only can say that DirectX is needed (object exported as DirectX file).
|
|
|
Post by Power Supersport on Jul 9, 2015 20:01:59 GMT
You have to find plugin that exports to directX (.x) format in order to do this...
Because if you use sketchup, it's a piece of cake... but in order that you use another software you have to find a compatible plugin for this...
|
|
|
Post by BorekS on Jul 9, 2015 20:35:07 GMT
if I export it as a BVH, and import it into fragMOTION it only imports the skeleton with the animations applied. And if I export it as DAE, and import it into fragMOTION, only the model gets imported. its shame... ok, to be honest, I didnt expected it will be easy work. but things are not completely lost yet, maybe: fragMOTIOM (FM) allows to merge the animations with mesh, so you could merge your skeleton / animations with the 3d model back. still this probably isnt so easy like it sounds as to the X file exported from FM, it can include more then one animation event (pose). the 3drad default skinmesh human figure contents two or three aimations "inside"... note: even if you have a nice rigged model in FM, it takes some time to find the proper X file export settings, to get the needed stuff readable for 3drad.
|
|
Deleted
Deleted Member
Posts: 0
|
Post by Deleted on Jul 9, 2015 21:04:53 GMT
There. Figured out how to do it. I just need to find a script that removes the mouselook, and it'll be great.
|
|
|
Post by BorekS on Jul 9, 2015 22:39:36 GMT
something like this? Full script code: // ENHANCED ORBIT CAM
// Based on a previous orbit cam
// Controls
// LEFT, RIGHT = Rotate left, right
// UP, DOWn = Rotate up, down
// PgUp, PGDn = Zoom in, out
// Home, End = Pan up, down
// < , > = Pan left, right
// INS = Move forward
int TARGET = OBJ_44;
int CAMERA = OBJ_22;
int TERRAIN = OBJ_0;
Vector3 cameraLocation;
Vector3 targetLocation;
Vector3 moveLocation;
Vector3 boneLocation;
float angle=300;
float yangle=5;
float cameraDistance = 10;
Quaternion q;
///---------------------------------------------------------------------------
//Returns a lookat quaternion from a to b
///---------------------------------------------------------------------------
Quaternion QuatGetLookAt(Vector3 a, Vector3 b){
Quaternion orientation;
Vector3 up = Vector3(0,1,0);
Vector3 direction = b - a;
iQuaternionLookAt(orientation,direction,up);
return orientation;
}
///---------------------------------------------------------------------------
//MoveTo
///---------------------------------------------------------------------------
Vector3 moveTo(Vector3 v1, Vector3 v2, float speed)
{
Vector3 Vresult,vv;
vv = v2-v1;
iVectorLengthSet(Vresult,vv,speed);
Vresult += v1;
return Vresult;
}
///==============================================================================
//Main
///==============================================================================
void Main()
{
//rotate up, down, left, right
iObjectLocation(TARGET,targetLocation);
targetLocation.x+=cameraDistance*iFloatCos(angle);
targetLocation.y+=cameraDistance*iFloatSin(yangle);
targetLocation.z+=cameraDistance*iFloatSin(angle);
iObjectLocationSet(CAMERA,targetLocation);
iObjectLocation(TARGET,targetLocation);
iObjectLocation(CAMERA,cameraLocation);
iObjectOrientationSet(CAMERA,QuatGetLookAt(cameraLocation,targetLocation));
if(iKeyDown(iKeyCode("DIK_D")))angle+=1;
if(iKeyDown(iKeyCode("DIK_A")))angle-=1;
if(iKeyDown(iKeyCode("DIK_W")) && yangle <90)yangle+=1;
if(iKeyDown(iKeyCode("DIK_S")) && yangle >5)yangle-=1;
//zoom in
if(iKeyDown(iKeyCode("DIK_Q"))) cameraDistance *= 0.98;
//zoom out
if(iKeyDown(iKeyCode("DIK_E"))) cameraDistance *= 1.02;
if(cameraDistance > 5.5) cameraDistance = 5.5;
if(angle>359)angle=0;
}
Attachments:PCarDemo_OrbitCam.3dr (151.21 KB)
|
|
Deleted
Deleted Member
Posts: 0
|
Post by Deleted on Jul 10, 2015 18:02:10 GMT
Thanks for the script. I'll try and get it into the game. Oh, and in case anyone wants to know how I put animations in from Mixamo, here:
I ended up using Mixamo to animate, download it in the FBX format, and then import it into Blender, and scale it (the scale was too small). Then, install a B3D exporter plugin, and then export it to that format, and then import it into fragMOTION and combine all of the animations into one file, and then finally put it into 3D Rad.
|
|
|
Post by Thunder on Jul 10, 2015 19:02:40 GMT
Wow, you used so many programs to achieve this!
|
|
Deleted
Deleted Member
Posts: 0
|
Post by Deleted on Jul 10, 2015 19:29:04 GMT
For sure! It's a bit tedious, but it works. I need to find out if jumping, and attacks could be done somehow, though. I'll look around for an addon of some sort.
|
|
|
Post by Power Supersport on Jul 10, 2015 20:34:16 GMT
If you stuck on it, feel free to open up a new question...
|
|