Aller au contenu

Photo

[TUTORIAL] How to add custom model to Toolset and the Game


  • Veuillez vous connecter pour répondre
166 réponses à ce sujet

#26
th3_selectah

th3_selectah
  • Members
  • 43 messages
Wow, don`t ask me why, but it kind of works now... Same file can`t explain.

The model is still kind of cut in half though, as there are many parts missing...

I uploaded the file if you need it to test smth. Conversion works, but it kills half of the model by what seems like forgetting points :(

Normal

Ok, i tried to triangulate it before exporting to *.fbx. Same effects, model is still killed, but i get an critical error from fbxcmd now :)

Triangulated

Iam going to bed for today :)

Modifié par th3_selectah, 29 novembre 2009 - 10:34 .


#27
tazpn

tazpn
  • Members
  • 70 messages
Ok It works for me an my current agorithm does not seem to be dropping any points. I'll do some additional testing with it and may release the current code as a new beta if nothing is obviously broken more than the current build.

#28
Nattfodd

Nattfodd
  • Members
  • 321 messages
Impressive work.



Can you explain if there are some rules to follow in exporting to FBX format? There is a max number of polygons? There is a max number of bones? The scene needs a custom light? A texture must be mapped with some rules?



Just for newbies in 3D world.



thanks.

#29
th3_selectah

th3_selectah
  • Members
  • 43 messages
As far as i know, there isnt a max number of poly. Didn`t test bones so far, so i dont know if its working at all. No custom light. No rules at Texture mapping, at least none i recognized so far:)



@tapzn i would like to test your new beta asap :P

#30
tazpn

tazpn
  • Members
  • 70 messages
After more testing I found issues with how bones and skinned models were behaving that seems more broken that v1.4.3 so I was going to hold off releasing it but I've uploaded it any case if you want to do more testing. I think your static models should work with it.

#31
th3_selectah

th3_selectah
  • Members
  • 43 messages
 Ok, the tsuba is working with your new beta.

But i just had another issue where a rather simple model is crashing the fbxcmd. At least i thought that, but after just renaming the file from katana_schneide.fbx to cube_tria.fbx it worked wonders and it was compiled. Don`t ask me why, i got no clue at all...

Edit:

Ok seems it was just a fluke, cause this Model crashes the fbxcmd every time, even with renaming^^. Dont know whats causing it...

Modifié par th3_selectah, 30 novembre 2009 - 04:21 .


#32
Awildawn

Awildawn
  • Members
  • 225 messages
Maybe it has something to do with the number of characters ? (just chiming in don't pay attention)

#33
th3_selectah

th3_selectah
  • Members
  • 43 messages
Ok, i can try to find out whats causing the problem myself (though my c++ skills are a bit rusty) but i would like to have the source codes of the beta since you seem to have changed quite a bit.

#34
tazpn

tazpn
  • Members
  • 70 messages
Uploaded the source and found at least one bug that is bad. I'm still getting heap corruptions on exit which might be the failure you are encountering. I'll continue investigating.

Edit: The corruption occurs in an FBX routine called SplitPoints.  I've got my own version of this routine which expands vertices but I think the problems is that the mesh has no UVs and causes their code to fail.   I'll see what I can do about auto generating UVs or perhaps calling my code instead if UVs are not present.

Edit 2: Only release build crashes while debug build is ok. heap validations are failing in debug build only when I compile with the FBX release libraries. Sigh... I guess I'll use my routine which is more likely to overlook something in the expansion.

If you turn on the AllowSharedVertices flag in plugcfg/fbxdao.ini it will not try to split the vertices.

Edit 3:  Looks like calling BuildMeshEdgeArray() before SplitPoints() may resolve the issue.  It does in this case.  Sorry about the debug diagnostics on the forum.

Modifié par tazpn, 01 décembre 2009 - 04:23 .


#35
Bfler

Bfler
  • Members
  • 2 990 messages
Is there a specific output folder for the GraphicsProcessorMMH.exe. I tried to drag my mmh.xml file on it but there is no output.

#36
th3_selectah

th3_selectah
  • Members
  • 43 messages
How large is your mmh.xml file? If its 0 Kb theres obviously an error when converting fbx -> mmh.xml

#37
Sharpaz

Sharpaz
  • Members
  • 100 messages
Hi evryone, i have two littles questions please:



-In step 4 i can't find this 2da.erf, i just have my addins' 2da.erf wich cannot be read by the toolset.

Where can I find it the 2da.erf?



-When i tried to open my model ( made in maya exported in fbx) with Adinos' da tool it says Index out of range exception... Any idea of what it mind?



Thanks for this tuto and help.

#38
th3_selectah

th3_selectah
  • Members
  • 43 messages
@ Sharpaz:

- The 2da.erf is in your "Dragon Age\\pagages\\core\\data" folder

- As far as i know Adinos`Da Tool can only open *.mmh. Do you mean that you translated your model for *.fbx to *.mmh etc already and tried to open the *.mmh? If so try tapzn`s viewscene instead, as Adinos Tool has problems with my models too

@ Tapzn:

I made you a model for you to test your Code ^^
This time its a fully fledged Katana with UV-Textures. Its already Triangulated. But its not compiling on my end.
Let me know if it works for you, cant wait to see it ingame :P

Model

Modifié par th3_selectah, 01 décembre 2009 - 03:18 .


#39
tazpn

tazpn
  • Members
  • 70 messages
No time to really test fully got go to work. Here is the katana in toolset as a placeable. Obviously some rotation issues with the bounding box and the model itself at the root. Used 1.5.1 which fixes the crash you were seeing at least for me.



Posted Image

#40
th3_selectah

th3_selectah
  • Members
  • 43 messages
It works !! Did i say that you are a god :P



Nice work, thx 4 doing this

#41
Sharpaz

Sharpaz
  • Members
  • 100 messages
@ th3_selectah Thanks, works with tazpn's viewer (and yes it was mmh, msh, mao,phy files).

@ tazpn Congratulations!^^

#42
mutantspicy

mutantspicy
  • Members
  • 467 messages
Thanks for the tutorial I've gotten alot further with this than I have otherwise. 

I'm a total noob at this kinda thing, though I'm pretty good at blender.  So I've been making a new enchanter rob.  Which I think will look pretty good, but I can't for the life of me get a mmh file to compile with the graphics processor. 

I think my issue is I exported to .3ds imported to blender did my model, then exported to fbx.  The problem is the mmh file is coming out at like 2 kb, so I'm thinking something is wrong.  My exported fbx file opens up in the tazpns scene viewer.  The .msh file is fine.  But the mmh is very small 2kb and there is no mao. 

I'm guessing that I'm losing information in the mmh to .3ds to blender transfer.  That causes the mmh to not have enough info to process.

You had made mention of a fbx importer for blender, my version 2.49 doesn't have a fbx importer.  I've searched the web for fbx plugins for blender and can't find one.  So if you know of one please point me to it.

Also, my msh will update the model in game when I put it into the override, I know because I went ahead and used the existing mmh, mao, and phy file.  No animation and only parts of my mesh were changed, but I was able to see that my msh was indeed working.  So that drives the question how do you go about exporting the bones and animation info or applying a msh and mmh to an existing animation. 

Modifié par mutantspicy, 02 décembre 2009 - 02:43 .


#43
mutantspicy

mutantspicy
  • Members
  • 467 messages
The other thing I wonder is if there are other elements to the model I need to worry about. That will give the mmh enough info. My model is pretty much just a mesh after import into blender. So do I need to add weight, material, texture, etc. I feel like I'm either missing something in my blender model or when I import something is getting lost. Quite frankly, I don't understand what mmh is supposed to be.

#44
A1x2e3l

A1x2e3l
  • Members
  • 105 messages
For clothes/armor/body you have to use FBX because you need exactl structure of the game
skeleton (armature), mesh should be skinned before export. Tazpn has created
preliminary support of skin/bones. Tutorial is about static, not-skinned
meshes. However, the workflow should be the same, just import any skinned mesh e.g.
body and use it as template (delete body geometry before export). Only FBX
import/export supports skin with bones.

:)

#45
tazpn

tazpn
  • Members
  • 70 messages
MMH is hierarchical model information. Basically nodes, bones, collision, cameras, lights, materials.... Most static objects dont have much in the file but it is critical since its the starting reference for everything. You can create the MAO files manually if you really want to and I probably would suggest eventually learning whats in it since most exporters will probably put in anything but the bare minimum.

With skinned models its unlikely you could use the the existing MMH files. This is because of how bones are referenced by number. If the index is lost or changes then the MSH will have bad mappings back to the bones. I'm not sure how much of a problem changing the bone indices are as I've gone back to trying to get statics working in a more reliable way for people.

The 3ds import will certainly have lost the original bone indices. For me the 3ds conversion changes texture names to 8.3 format which could lead to blender not properly importing and reexporting the texture. Its likely that materials got dropped somewhere due to this which is why you dont have MAO files.

Max and ModTool do seem to retain some of the custom properties I set when exporting back after import but I'm trying to avoid depending on that if I can since blender and other may not.

Modifié par tazpn, 02 décembre 2009 - 02:57 .


#46
mutantspicy

mutantspicy
  • Members
  • 467 messages
Thanks that makes sense.



So I went and got the autodesk fbx convertor to see what that would do. Well I converted to OBJ and then imported into blender, I got a fully textured model, but still no armatures and bones. Which opened another can of worms in terms modeling and getting the textures to match with my modifications, I gave up after a bit simply because its pointless to create a model modification until I figure how to import the animation stuff into blender.



I know its possible to get the armatures and bones to import only because a dude at dragonage nexus just uploaded a override model hak made in blender of the nude models. The they have full animation. It sounded like he had to do some custom scripting.

#47
A1x2e3l

A1x2e3l
  • Members
  • 105 messages
obj format like 3ds does not have skin/bones data. At the
moment only FBX supports these features.

Skinned models do not have any animation data. They are NOT animated,
but their parts (e.g. arm) can be animated by the game engine with the help of animation
(ani) files that do contain animation data (e.g. roation keys for this arm).

Widely used on the Forum for game body/mesh/clothes sinned models
term “animated” is wrong and misleading. Particles effect are animated, but not there skinned meshes.


:)

#48
th3_selectah

th3_selectah
  • Members
  • 43 messages
Tapzn is it possible that you rotate the model, but dont rotate the bounding box the same way?

Cause in blender my bounding box is right (of course) but after converting it its wrong (rotated +90 degree to z i think)

#49
th3_selectah

th3_selectah
  • Members
  • 43 messages
Updatet the tutorial...

#50
cw8

cw8
  • Members
  • 63 messages
I got a problem, when I use new Material->Insert Model I see my 3D model. However, when I try to use the model on the items, the item variation simply shows the same default selections and no new selections. I've copied the required files into the override folder already including the .gda files.

In the gda file, the model files which I named the same as you, I put
G2DA_COLUMN_3: lsw
G2DA_COLUMN_4: ka01
G2DA_COLUMN_5: a

Is that right?

Modifié par cw8, 02 décembre 2009 - 03:07 .