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

#51
Redfender

Redfender
  • Members
  • 33 messages
th3_selectah

im not terribly familiar with fbx. do all the associated textures get packaged into the file? i.e. the diffuse nor and spec and whatever else the engine uses?

another question i have is the bounding box. we're using that for collision right? how do i need to set up its properties in blender for the engine to recognize it?

thanks

#52
th3_selectah

th3_selectah
  • Members
  • 43 messages
You can manually add diffuse, normal etc textures to the *.mao file later by just editing it with notepad. At least i did it that way.



The bounding box is automatically generated by blender, but thers still a error as the model is not in the box in toolset any more. Don`t know yet where the error is located, but it doesn`t seem to have an effect at least to my weapon model, which is perfectly well even with wrong bounding box.

#53
th3_selectah

th3_selectah
  • Members
  • 43 messages
@cw8



Yes the naming is right. Have you changed G2DA_Column_1 to a unique int (8 in longsword_variables) and set G2DA_Column_2 to a unique name?

#54
Redfender

Redfender
  • Members
  • 33 messages
'The bounding box is automatically generated by blender, but thers still a error as the model is not in the box in toolset any more. Don`t know yet where the error is located, but it doesn`t seem to have an effect at least to my weapon model, which is perfectly well even with wrong bounding box.'

I just noticed at some point in the tutorial one of the processors creates a phy file, that must be where the physics get created. The blender bounding box probably has no effect on the engine.

Modifié par Redfender, 02 décembre 2009 - 04:30 .


#55
cw8

cw8
  • Members
  • 63 messages

th3_selectah wrote...

@cw8

Yes the naming is right. Have you changed G2DA_Column_1 to a unique int (8 in longsword_variables) and set G2DA_Column_2 to a unique name?


I changed the variable to 8, and it appeared. Thanks for the help and lovely tutorial!

#56
th3_selectah

th3_selectah
  • Members
  • 43 messages
@redefender

The .phy states how to behave in case of a collusion, but seems not building the actual bounding box. As it doesn`t change anything on the box if i edit / replace the .phy file.

Edit: Iam positive that the bounding box is stated in the *.mmh file

Modifié par th3_selectah, 02 décembre 2009 - 05:02 .


#57
th3_selectah

th3_selectah
  • Members
  • 43 messages
@tapzn: I almost am sure now that you forgot to rotate the bounding box with the model. It would be nice if you find time sometimes to see into this, though i can change the box manually by editing the *.mmh file. But thats kind of try and error work, and quite timeconsuming for "Non-Box" bounding boxes.

#58
Adinos

Adinos
  • Members
  • 341 messages

th3_selectah wrote...
 But thats kind of try and error work, and quite timeconsuming for "Non-Box" bounding boxes.


Uhm... the bbox in the mmh file is just simple box - just the min/max x/y/z coordinates of the model.  The bounding "box" in the .phy file does not seem to be always just a "box".

#59
th3_selectah

th3_selectah
  • Members
  • 43 messages
True, the *.mmh box is always a simple box. That will remaking it not so time intensive ^^



But still would be pleased if it would create the box right from the beginning :)

#60
tazpn

tazpn
  • Members
  • 70 messages
The problem I believe is that the box needs to have the root transform applied when calculating the box. No big deal. (Also BrokenCrayon has found a bug or 2 that snuck into the latest release looks like 1.4.3 is safe but 1.5.0 and later had it).



If you use 3ds max Reset XForm the mesh before you export for better results. SoftImage/XSI/ModTool its Freeze All Transforms. This helps avoid some of those issues.

#61
th3_selectah

th3_selectah
  • Members
  • 43 messages
I wouldn`t mind a moderator making it sticky if possible :)

#62
ChewyGumball

ChewyGumball
  • Members
  • 282 messages
For anyone interested, I have uploaded a new version of my 3dsmax script which will create the xml and mao files without any extra hassle in the command line. It also works with GMax which is free.

#63
cw8

cw8
  • Members
  • 63 messages
Thanks for the tutorial, managed to come out with

This

I don't suppose there's a way to add a glow to it right? Also I noticed it replaces the Starfang model, is there a way to make it an exclusive model without it overriding the present ones?

Anyway, what is the G2DA_Column_1 integer for staves and 2H weapons?
Thanks!

#64
th3_selectah

th3_selectah
  • Members
  • 43 messages
The column_1 integer is a flag which (and implicated) how many varations there are. If - for example - in variation_staff.gda in the last row is a "4" (means this is the 4th different variation) you have to make it 5 in your own variation. If you build 2 variations make one "5" and one "6" and so on.



Iam not sure if glow is supported in the game, but iam working on that matter (see my other tut for that matter)



To not replace the starfang model, make an new item with your new model and add it to your invertory via script.

#65
ChewyGumball

ChewyGumball
  • Members
  • 282 messages
this line in the mao should give you glow. I haven't tested it so I don't know how it works yet:

<Texture Name="mml_tEmissiveMask" ResName="Default_Black.dds"></Texture>


Modifié par ChewyGumball, 04 décembre 2009 - 05:09 .


#66
A1x2e3l

A1x2e3l
  • Members
  • 105 messages
I have performed some experiments with your great tools (I used the latest releases of all of them).
In my tests I used hm_arm_nuda_0.mmh (highres LOD of human
female torso), Max2010, SP1, 32, latest FBX plugin (FBX 2010.2 update).

1. Extraction with DATool by Adinos. Unfortunately, not all model related textures were
extracted, only the diffuse one.
2. Convert to FBX with Tazpn’s CLTool. Flip the V setting (I have used 0 or 1) in
fbxdao.INI did not make any difference in Max, and had to flip UVs with UV
wrap modifier.
3. Import in Max2010. I have used null objects instead of Max bones: the sizes of
imported bones are not that handy. My Max scripting skills are limited and
mainly restricted to CS biped animations. ChewyGumball, could you write a
script to make bone sizes more user-friendly? Skin was OK. I had to change
view transparency to “none” otherwise the mesh was semitransparent, as
well as flip UVs in vertical direction (modifier below skin in the stack).
Unhide all, unfreeze all: no “bounding box” was not imported (I guess
“bounding box” is a collision structure. Right?).
4. I tried export scripts by ChewyGumball: a). Set
materials. ChewyGumball could you be more detailed in the readme for you
scripts. e.g. with examples - file names with game syntax (game dds
texture file names have certain not that clear suffixes) with
corresponding names of Max maps, e.g. “n” suffix corresponds to bump map
in Blinn shader. Correct? At the moment I used only Blinn shader and only
diffuse map.What shader do you recommend and what settings should be
used?). B). Bounding box . I have created a simple box mesh, named it
“Collision” and linked to the scene root node. c). I introduced no other
changes to the model, skin, etc.
5. Export. MCR was nicely loaded. I have selected all scene objects and tried to
export MSH.xml, MMH.xml, and mao. My attempts resulted in several errors,
script crush, and empty export files. Errors: too many objects selected,
no collision, wrong root node.

IMHO armor/clothes/body geometry modifications could be one
of the most popular and it is reasonable to elaborated a robust and
straightforward workflow for this model type.

Please, help, what I am doing wrong? I see potential
problems with null objects instead of bones. ChewyGumball, could you check the
same DA:O model?

 Next step: use GUI for Tazpn's Command Line Tools by Allstar92 with the same model.

It is very difficult to track your projects I think that
information about them should be somehow summarized and promoted. I have simply
missed Allstar92’s nice work, I am apologizing.

And a very general hamble request: please write explanations in a
very simple clear way using terms from corresponding software (e.g. ToolSet,
Max). “GUI”, “emissive mask”….. Your “customers” have very variable and
divergent professional background, modding skills, knowledge of English
language…
I understand that you are doing for free and having not all
information the job that is usually done by highly paid professional team (e.g.
from BioWare). I am very grateful to you for whatever tools you are
programming.

 Thank you
:)

Modifié par A1x2e3l, 05 décembre 2009 - 01:14 .


#67
ChewyGumball

ChewyGumball
  • Members
  • 282 messages
I will try and make a detailed walk through for my script, however it will probably have to wait till at least thursday, possibly later. In the mean time, hopefully I can answer some of your questions.



The bounding box is calculated automatically, you do not need to make a box for this purpose. I don't think the bounding box is used for collision, only visibility and as such is not really a true collision object. Any other collision geometry must be hand created though. Once you have everything linked to the root, you only select this one root node, if you select more than one thing my algorithm doesn't work so I print the too many objects selected error.



In the materials, only the material type matters, the shader type can be anything. It does not pull any settings from the shader except for the names of the maps, so you can set up your shader however you like as long as the names of the maps are correct. I do not know if those prefixs/suffixs are required by the game, I'll look into it and definitely include them in that walkthrough.



From the models I imported using tzpan's tools, I found they were very very small. I think if you just select everything and do a uniform scale up to a more reasonable size, everything should still work properly. I didn't have problems with the imported bones being too big. My version is 2010 sp1, however I don't know if I have the latest fbx plugin. I specifically added code to allow for helper objects to be exported as well as normal bones, so don't worry about those null objects not exporting properly. In fact, I believe the only geometry type that can't be exported as a bone is a biped object (LOL I know, but I can't get a pivot from them so it screws up everything :( ) and I am looking into those for a later version.

#68
A1x2e3l

A1x2e3l
  • Members
  • 105 messages
I tried again selecting the root node: I am able to export
“something” – mmh.xml and msh.xml but not dao (diffuse texture is applied). Mmh
export was without errors, msh export with: “No Objects Selected” (root node
was selected), “Export finished” (not empty file was generated).

Then I tried GUI for Tazpn's Command Line Tools by
Allstar92: MHH.XML -> MHH conversion worked, MSH.XML -> MSH not.

I tried different several variants but was not able to find
the working solution.

Bones (FBX exporter setting), without view transparency
modification (1).



Bones (FBX exporter setting), view transparency is set to
“None” (2).

Null objects instead of bones (FBX exporter setting), view
transparency is set to “None” (3).

Result in Tazpn’s viewer after MHH.XML -> MHH conversion.
No mesh and nonsense in the game.(4)

 Posted Image



 As you can see Bone Parameters Bone Object (Width, Height,
Taper) and, may be, Fins, etc. are very odd and difficult to manipulate.



I will wait for your tutorial.

Thank you.
:crying:

Modifié par A1x2e3l, 05 décembre 2009 - 07:23 .


#69
cw8

cw8
  • Members
  • 63 messages
My 2nd project:
Posted Image

Btw, anyone know why the custom weapon models don't have special effects unlike the normal weapons? Like if I cast Flaming Weapons it doesn't light up or when I use Frost Weapons it doesn't appear Chilled. Is there something I must do?

Modifié par cw8, 06 décembre 2009 - 06:18 .


#70
ChewyGumball

ChewyGumball
  • Members
  • 282 messages
I think that has to do with nodes. I'm not sure exactly how to set those up though.

#71
mikemike37

mikemike37
  • Members
  • 669 messages
tried to create a placeable object, which I was able to get into the toolset togetherwith diffuse and, i think, normal and spec maps. However, when I render lights (a single ambient baked light), I get the following messages:



Could not find complete meta data for plc_ellrm_04

Model [plc_ellrm_04] excluded from scene because it does not have renderable parts



(plc_ellrm_04 is the name of my placeable)



these errors prevent the placeable from being lit. any ideas? what have i missed?

#72
Ambaryerno

Ambaryerno
  • Members
  • 532 messages
I'm running into a problem where it's not loading my main texture. It appears to see the materials (diffuse, normal, and specular maps) but it's not seeing the actual texture.



I'm using AC3D, and have to export to OBJ and then convert to FBX with Autodesk's tool, so it may be losing the texture reference somewhere in between.

#73
mikemike37

mikemike37
  • Members
  • 669 messages
checking the obvious here, but cant harm... does your .mmh.xml file reference your .mao file and does your .mao contain lines similar to the following:

Texture Name="mml_tDiffuse" ResName="plc_ellrm_03d.dds"/
Texture Name="mml_tNormalMap" ResName="plc_ellrm_03n.dds"/
Texture Name="mml_tSpecularMask" ResName="plc_ellrm_03s.dds"/

and have you included the dds files in the override?

Modifié par mikemike37, 06 décembre 2009 - 11:05 .


#74
Ambaryerno

Ambaryerno
  • Members
  • 532 messages
I have four texture files altogether:



w_lsw_fama_0.dds - Basic texture file

w_lsw_fama_0d.dds - Diffuse

w_lsw_fama_0n.dds - Normal

w_lsw_fama_0s.dds - Specular



And yes, the files are in the override and the mmh.xml is pointing to the right MAO.



The Diffuse, Normal and Specular maps APPEAR to be working. However the basic texture itself does NOT work.




#75
ChewyGumball

ChewyGumball
  • Members
  • 282 messages
What are you talking about? The diffuse is the basic texture. How can it be working but not be working?