Show Posts
|
|
Pages: [1] 2 3
|
|
2
|
fragMOTION / General Discussion / Re: copy and paste?
|
on: October 26, 2012, 04:48:47 PM
|
| The copy and paste seems to work with bones and then in both 2D and 3D and in the window & pane - it works to a point with groups in the pane but when copying & pasting in a group it creates a new group but with nothing in it. It doesn't seem to work with objects. |
|
|
|
|
3
|
fragMOTION / Scripting / Re: Exporting Matrix3 Animation Per Object - Per Frame (Edited Title)
|
on: October 21, 2012, 04:03:02 AM
|
I thought I would change title as it was confusing to me nevermind anyone else - if thats OK . In my confusion I was mixing vertex animation up with the matrix for bones etc , which looking back was dim
The basic principal for the last part of the export file is that I need to export the matrix3 of the object per frame. If it is animated mesh like say an infantry mesh then I need to export the verts and normals per object - per frame aswell as the matrix. No matter what the first frame of the object always exports the matrix and then verts and normals.
Objects like tanks and buildings don't export the verts and normals except for the first frame, so you only get the matrix per object per frame for the animation length.
I had initially made some progrees picking the first vertex in each group, getting the first matrix index of that vertex and getting the bone it was linked to from which I was going to obtaining the matrix of that group.
I have been reading up on baking the matrix (blender and max collada export) to get one matrix for a mesh which my my case is an group - (but I haven't found any information on web on how to do this, or even how this would look), does anyone know if this is possible is this with Fragmotion.
Dave just to be completey sure in my own mind, can you confirm you cannot get any matrix info unless there is an bone present. So in my last post post when I said "then GetMatrix to get it for the group, etc ."IMatrix4x4::GetMatrix" " I would still require a bone in that group. |
|
|
|
|
4
|
fragMOTION / Scripting / Re: Exporting Vertex Animation Matrix
|
on: October 14, 2012, 02:46:14 PM
|
Thanks again for the feedback Dave,
Its the Matrix info that needs to be exported per group -per frame thats throwing a spanner in my works - the vertex's and normals are not a problem.
I'll definitely try the identity Matrix - I thought I needed the transform matrix of the object per frame, and the only way I could see I could get that was through the bones."BuildTransformListFrame"
I presume I use "matrix identity(matrix mtx) -- sets mtx to the identity matrix" and then GetMatrix to get it for the group, etc ."IMatrix4x4::GetMatrix"
Below is what I trying to get to export - per group - per frame (edited out the majority of v's and n's) for a turret on a tank. With the first frame it exports verts and normals as below, and then the matrix per frame unless there is an animation when it will export the matrix and then the verts and normals again. The below example does have the same matrix per frame, but other exports have matrix output that changes per frame.
[Turret__FRM1] trx (matrix3 [1,0,0] [0,1,0] [0,0,1] [1.42918,-1.2897,7.02455])
v [0.46577,1.05239,7.02455] v [2.39259,1.05239,6.17179] v [0.46577,1.05239,6.17179] v [2.39259,1.05239,7.02455] v [2.70635,-3.50182,6.17179] n 0.0 1.0 0.0 n 0.0 1.0 0.0 n 0.0 1.0 0.0 n 0.0 1.0 0.0
[Turret__FRM2] trx (matrix3 [1,0,0] [0,1,0] [0,0,1] [1.42918,-1.2897,7.02455])
[Turret__FRM3] trx (matrix3 [1,0,0] [0,1,0] [0,0,1] [1.42918,-1.2897,7.02455])
[Turret__FRM4] trx (matrix3 [1,0,0] [0,1,0] [0,0,1] [1.42918,-1.2897,7.02455])
|
|
|
|
|
5
|
fragMOTION / Announcements / Re: Dynamite! Fisherman Released
|
on: September 12, 2012, 01:50:45 AM
|
Hi Dave Sorry the story is there, see below. It was me, just trying to "sex up" the story other than just killing some fish in a guys pond. This is what I get for the story
With small screen size I wondered if it was android of iphone/pad.
With the ammo there didn't appear to be any at all for the dynamite in first played demo, which was Exterminate
|
|
|
|
|
6
|
fragMOTION / Announcements / Re: Dynamite! Fisherman Released
|
on: September 11, 2012, 02:35:11 AM
|
Hi Dave
Tried this morning, for a bit of lite relief from matices. 
It all seems to work but not had time to try every quick game yet.
Took me some time to find different ponds etc and the fact I could move around. The default game in demo does not let you use dynamite, which is odd as thats the games name. Found it later in quick games.
What's the story behind it are we being invader with zobbie fish - overtaking the world, or just killing fish in a blokes pond for money
The trees do tend to hide the figure in certain places but does not effect you as you point cursor @ fishes. Can you change cursor to cross hairs for guns, also there is water trace how about a normal few tracers.
Is the screen size small for a reason. Maybe have some ducks swimming around that if you hit take points away.
Any power up such a nets, or draining the pond.
Ever thought of a boat option and even at sea so you could have crabs, sharks squid and end game guardians etc Don't know about sounds as on the machine I used there is no sound. (CAd station).
(NB the site was down for some time last night - was that because of Go daddy problems?)
Cheers Rich |
|
|
|
|
7
|
fragMOTION / Scripting / Re: Exporting Vertex Animation Matrix
|
on: September 09, 2012, 04:39:08 AM
|
Hi Dave So having re-read your replies and read anything I could find and gone through the help SDK Interfaces numerous times I came to the following conclusion
I need a bone per group as I need a one matrix per group (as the overall mesh does not have one) and then I can get the verts and normals for mesh animation in order to get the file to export correctly. However the problem is say if I have a one infantryman mesh (i.e one group) with a full skeleton, then there are a lot of matrix's in one group.
The only way around this I can see at the moment is if I make the mesh as sub groups with a bone assigned to each group to get the matrix to export as I require eg I make the arm mesh a sub group with an arm bone to get the matrix. Then repeat the same for each part of skeleton.
Another thought so I don't have huge amounts of groups to export is can I have a fully rigged infantry man and then a separate bone act as like a bounding box bone that would give me the matrix for all the mesh?
Just thoughts any feedback back welcome.
Cheers Richcat
|
|
|
|
|
8
|
fragMOTION / Scripting / Re: Exporting Vertex Animation Matrix
|
on: September 08, 2012, 02:07:25 PM
|
Hi Dave I know what you mean , I really appreciate the help your giving as have and will others before someone writes it , edit (A dummies guide would be great for dummies like me )
I been reading up on the original max script to try to understand how and what it does for this part of the export. In 3dmax the matrix3 I need comes from the object matrix3[1,0,0][0,1,0][0,0,1][0,0,0] and I believe the first 3 fields are scale/rotation in XYZ. followed by movement in XYZ.
Do you think I can get this for a group ie object in fragmotion, per animation frame? Then it exports the verts and normals if there is an animation for each frame, to get the vertex animation.
Cheers Rich |
|
|
|
|
10
|
fragMOTION / Scripting / Exporting Matrix Per Object(mesh/group) - Per Frame (Edited Title)
|
on: September 04, 2012, 08:30:44 AM
|
Hi Having got the faces uvs and verts to export , with the great help here from Dave, I 've now the last bit to do to get the matrix3 to export per group, per frame. 
As I only need to export the vertex animation (no bones) does the Mesh have to have bones to get the 4x3 Matrix I require.
Can I get the info I need in the form "trx matrix3[0,0,0] [0,0,0] [0,0,0] [0,0,0]" per group per frame some how.
I have been looking at IAnimKeyList::GetTransformByFrame and IMatrix4x4::GetMatrix for along time and tried ways, but obviolsy do not want to take 8 months again 
Dave could you again point me in the right direction as all the posts I have read on the forum on the Matrix deal with the bones, I'cant find any on mesh animation and matrix, that might give me a clue accept this in the script Rex and Peglar published
local CurFrame = anim.CurrentFrame; --Get current animiation frame local AnimName = anim.Name; skel:BuildTransformListFrame(CurFrame, anim, mtxLocal, boneMap, 256); local WrldFrmX, WrldFrmY, WrldFrmZ = mtxLocal[BoneID].m[12], mtxLocal[BoneID].m[13], mtxLocal[BoneID].m[14]; WrldFrmX =string.format("%.4f", WrldFrmX); --change the 4 in %.4f to 5 if you want 5 decimal places, to 6 for 6 decimal places... WrldFrmY =string.format("%.4f", WrldFrmY); WrldFrmZ =string.format("%.4f", WrldFrmZ); print(BoneName.." Bone: "..AnimName.." Anim, Frame "..CurFrame..", World X = "..WrldFrmX.." Y = "..WrldFrmY.." Z = "..WrldFrmZ); Would this be a good starting point?
Cheers Rich |
|
|
|
|
11
|
fragMOTION / Scripting / Re: Faces, vertex and UVs
|
on: September 04, 2012, 08:14:21 AM
|
Thanks Dave
It seems I got the faces, uvs, and vertex exporting per group now, thanks to you showing me how find a way to select one group at atime . On ward and upward. Now to extract the Matrix per group, per frame, and whole new area, bones are not exported only vertex animation.
local vertx = 0; for i = 0, vert_count-1, 1 do if vertx+1 <= mesh2 then -- Compare on going vertex count with mesh2 - the GetSelVertexCount print("v".."["..verts[i].x..","..verts[i].y..","..verts[i].z.."]"); vertx = vertx + 1; end
Cheers Rich |
|
|
|
|
12
|
fragMOTION / Scripting / Re: Faces, vertex and UVs
|
on: September 01, 2012, 03:41:48 AM
|
Thanks for suggestions Dave I haven't tried welding vertices, or importing anything yet, just been using the create box in the tools menu so far.
Cheers Rich |
|
|
|
|
13
|
fragMOTION / Scripting / Re: Faces, vertex and UVs
|
on: August 31, 2012, 03:25:12 AM
|
Huge Thanks Dave - I don't know why I didn't ask sooner - just too stubborn and wanted to get to learn more about lua.
I'm not sure I understand why you want to use SelectGroup though, this is more for visual editing. To get the Selected Vertex Count per group, as looping through the groups with script below was giving me the correct verts for one group, but if I then introduced more groups it wouldn't. For example Create Box1 - run the script and I'd get 12 faces and 8 verts, but add another Box2 and I'd get 12 faces but 16 verts for Box1 and 12 Faces and 4 verts for Box 2.
Part of script were I'm having problems local vertc = 0; for i = 0, vert_count-1, 1 do if faces[i].groupID == currentGroup:GetID() then print("v".."["..verts[i].x..","..verts[i].y..","..verts[i].z.."]"); vertc = vertc + 1; end end if vertc > 0 then print("vertcount "..vertc); |
|
|
|
|
14
|
fragMOTION / Scripting / Re: Faces, vertex and UVs
|
on: August 30, 2012, 04:08:42 PM
|
Another try . but no luck.
editChar:ClearOutput(); local mesh4 = editChar:GetDefaultMesh(); local mainModel = editChar:GetModel(); local allGroups = mainModel:GetGroups(); local currentGroup = allGroups:GetFirstChild(); local nam = currentGroup.Name; print(nam);
local meshs = mesh4:SelectGroup(nam);
I would really like to get this working and can supply the a 3sf. file which basically is a simple txt file, that is read by the game, if anybody can help.
I have experience of adapting an 3dmax exporter to Gmax exporter for this particular game - which is getting very popular on the ipad, but most people there have asked for a Fragmotion one, and after buying it and using it I can see why. Having tried so long I'm just stuck on the way to get the right number of verts per group, which may be a very straight forward thing that I just can't see. I would dearly luv to get it done, or please tell me it can't so I can get on a build an M26 for the game. and import in Gmax
Dave is there any way to have numerous meshes that make the turret, body, gun etc in the one file, as Gmax, and then iterate through these (I know previously you have said there is one mesh). At the moment I'm using Groups the same way. Just a thought.
Cheers Rich |
|
|
|
|
15
|
fragMOTION / Scripting / Re: Faces, vertex and UVs
|
on: August 29, 2012, 03:36:19 AM
|
Hi still looking for help/inspiration/ pointers etc
8 months on and off and I'm still trying and trying to get a script to export a text file to import into Battle Academy. I'm basically stuck as I need to export the faces, verts, animation etc per group.
I'm still trying to iterate through a Mesh to extract the Faces and the Verts per group etc etc . The code below works perfectly for the faces and uvs but not the verts as I can't index these, and can't figure out a way to do it. For example in the code in the post below above (EDIT) extracting info as groups for 2 Boxes - 12 faces and 8 verts each- I get 12 faces as expected but 12 verts for Box and then 12 faces for Box1 and 4 verts. Is there any way to check the verts are not duplicates.
I have tried to used IMesh::SelectGroup, but what ever I have tried like
local mainModel = editChar:GetDefaultMesh(); local dmesh = mainModel:SelectGroup(Box);
or local mainModel = editChar:GetDefaultMesh(); local dmesh = mainModel.SelectGroup;
it will not still not select an individual Group - I'm totally stumped.
Cheers Rich |
|
|
|
|
|