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

#126
catspajamas19

catspajamas19
  • Members
  • 25 messages
I have even gone as far as creating a module. It shows up in my inventory but when equipped nothing is there.

#127
Redfender

Redfender
  • Members
  • 33 messages

Dark_Ansem wrote...

.obj works better.

I have another question: the textures must be in .dds format?

and can you make more but clearer steps (like, explaining why the naming is important, where to place the textures and so on). more detail please. I succesfully imported a model but it had no texture on it. I wonder where I got wrong.

also, what to do when exporting a .obj file it creates also a .mtl file?


i'm not sure if they must be, but generally they are for compression.  the engine may in fact recognize something like tga.  i have heard of people using uncompressed file formats in oblivion because they didn't like the compression artifacts you get with dds.  in this game that probably wouldn't matter as much because theres no 1st person view.
i had a similar issue at first as well.  i believe the naming has to be consistent in all references (name every file for a particular resouce the same as the name of its msh file).  i would stick with the format you see in the stock resouces.
the mtl file stores the material data, useful if you were going to import the model into another 3d app.  its of no use for dao since your material is really defined by the texture files.  you can just ignore it.

#128
Redfender

Redfender
  • Members
  • 33 messages

catspajamas19 wrote...

I am exporting a model from Maya into an fbx file. All my textures were done in photoshop and saved as dds files. I then use tapzns GUI and get all my files and put in my override file and the model shows up in the toolset window viewer when i go to new>material>rightclick window>insert>new>model. I then open 2daerf and find something similar to my model and extract resource then edit the file. The tutorial I am going by says to create module>create new item. I do this and the name of my model shows up in the pull down list of weapon type but doesnt show up in the viewer. But it does show up when I create new material in the viewer. I pieced together from different tutorials and have gotten this.Please help. I plan on posting a tutorial when I am done to help others out. Modeling I have no problem. I have about seven swords to post 


this happened to me to.  i believe this is because the engine doesn't like how you named your files.  use the exact same name in all your files as the name of your msh and follow the format of stock resources, since we don't exactly know yet how the engine recognizes associated files.  its important that when you have to split the name into rows 3-5 of the array that it is acceptable to the engine.  again its best to follow the stock resource format and just change a few characters to make it yours.

#129
Fluix

Fluix
  • Members
  • 8 messages

catspajamas19 wrote...

I have even gone as far as creating a module. It shows up in my inventory but when equipped nothing is there.


I have the same problem.
The item shows up in the toolset but not in the game :(
No Idea why...

#130
ChewyGumball

ChewyGumball
  • Members
  • 282 messages
after you convert your object to an mmh.xml file, try adding GROUP_MASK_ITEMS="true" to the shape tag in the collision object. If you don't have a collision object make one up.

#131
Fluix

Fluix
  • Members
  • 8 messages
there is a collision object in the mmh.xml file with the tag group_mask_items="true"...

i don´t understand why the textured model work in the toolset but not in the game?

i created a new item like in the tutorial with the new item variation and it shows up in the toolset.

In the game added to the inventory but if i equip it there is no model... :(


#132
Fluix

Fluix
  • Members
  • 8 messages

Modifié par Fluix, 13 janvier 2010 - 11:24 .


#133
Ambaryerno

Ambaryerno
  • Members
  • 532 messages

Fluix wrote...

i don´t understand why the textured model work in the toolset but not in the game?
i created a new item like in the tutorial with the new item variation and it shows up in the toolset.
In the game added to the inventory but if i equip it there is no model... :(


Same thing happening to me.

#134
Dark_Ansem

Dark_Ansem
  • Members
  • 638 messages
have you checked the .mao file? maybe it has the wrong file for textures.

#135
ChewyGumball

ChewyGumball
  • Members
  • 282 messages
It wouldn't show up in the editor with a bad mao file. Its something in making an item, not the model itself.

#136
catspajamas19

catspajamas19
  • Members
  • 25 messages
I got it to work. Just made sure the file names were all named with the same extension and made sure my mao files were naming the correct textures

#137
Fluix

Fluix
  • Members
  • 8 messages
I use textures from the toolset... plc_dwmetal01 and plc_mirrorbronze_01 ... hmmm. maybe thats the problem?

Modifié par Fluix, 14 janvier 2010 - 06:58 .


#138
catspajamas19

catspajamas19
  • Members
  • 25 messages
I did all my textures in PS and saved them as dds files with the same extension example-
w_gsw_ch01a_0 then what kind of map like n for normal and the number
w_gsw_ch01a_0_n1.dds Then in Maya create my file textures and name the file name the same then load the dds file with the same name. After i export the fbx file(can be done in Maya,at least Maya7) I run it through the GUI and get my xml files and mao files one for each texture I used.The mao files should be named the same as your dds files with Material after them
w_gsw_ch01a_0_n1_ddsMaterial.Then open the xml file and make sure after Material object it has this same name as your mao file. So when you are all done you should have 1(mmh.xml),1(msh.xml),1(msh),1(mmh),1(phy), and an mao file for each texture you have on your model I also copy my dds files into the same folder. Then send all this to your override folder wher you have DAO installed. It should open in the model viewer in the toolset. Then just edit and save a 2da file wiith your item variation and name. For weapons you must have the (w_gsw_),two letters of your choice,(_01a_0). w is for weapon,gsw for great sword,etc. Your model file name has to group in with the like items subset. When you change the item variation your model should show up in the viewer. Thanks to tazpn and th3_selectah for all there help. As long as you write your module right it will show up in the game. If anyone is interested I can write up a tutorial using Maya step by step. Let me know

Modifié par catspajamas19, 14 janvier 2010 - 04:47 .


#139
Fluix

Fluix
  • Members
  • 8 messages

catspajamas19 wrote...

I did all my textures in PS and saved them as dds files with the same extension example-
w_gsw_ch01a_0 then what kind of map like n for normal and the number
w_gsw_ch01a_0_n1.dds Then in Maya create my file textures and name the file name the same then load the dds file with the same name. After i export the fbx file(can be done in Maya,at least Maya7) I run it through the GUI and get my xml files and mao files one for each texture I used.The mao files should be named the same as your dds files with Material after them
w_gsw_ch01a_0_n1_ddsMaterial.Then open the xml file and make sure after Material object it has this same name as your mao file. So when you are all done you should have 1(mmh.xml),1(msh.xml),1(msh),1(mmh),1(phy), and an mao file for each texture you have on your model I also copy my dds files into the same folder. Then send all this to your override folder wher you have DAO installed. It should open in the model viewer in the toolset. Then just edit and save a 2da file wiith your item variation and name. For weapons you must have the (w_gsw_),two letters of your choice,(_01a_0). w is for weapon,gsw for great sword,etc. Your model file name has to group in with the like items subset. When you change the item variation your model should show up in the viewer. Thanks to tazpn and th3_selectah for all there help. As long as you write your module right it will show up in the game. If anyone is interested I can write up a tutorial using Maya step by step. Let me know


Thx for the help, i did all the step u did, but the model only shows up in the toolset but not in the game...
Maybe the problem is the mao.file....

<?xml version="1.0" ?>
<!-- MAO file exported using the Dragon Age: Origins Model Exporter version:v0.9.0 written by Ben Dunkin aka Chewy Gumball 2010 -->
<MaterialObject Name="W_AXE_SC01a_0">
    <Material Name="Weapon.mat"/>
    <Texture Name="mml_tDiffuse" ResName="w_axe_sc01a_0d.dds"/>
    <Texture Name="mml_tSpecularMask" ResName="w_axe_sc01a_0n.dds"/>
    <Float Name="mmlfSpecularReflectionMult" value="0.8"></Float>
</MaterialObject>

i think the line:
dc:source=file: ......
is missing but i have no idea how to set it....:huh:

#140
catspajamas19

catspajamas19
  • Members
  • 25 messages
I use the GUI for tazpn and my mao files come out perfect. You have to name them exactly as what your fbx file is. I made a longsword,Drizzt's Twinkle scimitar. I modeled it in Maya and did all my textures.

My model name- w_lsw_tw01a_0.fbx

My texture for steel- w_lsw_tw01a_0_n1.dds

My texture for hilt- w_lsw_tw01a_0_n2.dds

When you apply the textures in Maya you have to make sure that your file name is the same as your texture file for each one. When you export to fbx everything is in there. Then I open up the GUI and convert fbx. I get the files-

w_lsw_tw01a_0.mmh.xml

w_lsw_tw01a_0.msh.xml

w_lsw_tw01a_0_n1_ddsMaterial.mao

w_lsw_tw01a_0_n2_ddsMaterial.mao



When I open my mmh.xml file I check and make sure behind my Material Object has the name of my mao files Since i have two textures both should be in there. If you open up your mao files and look your dds files should be called out in there. I then convert my mmh and msh xml files and copy all of them into my override file.Then edit my 2da longsword variation and close the toolset.Open toolset and create a new module,create new item.,create new script then export item module without dependents,export script without dependents,export module xml and manifest xml.Make sure you set the script to your new one in your module properties before exporting.

#141
ChewyGumball

ChewyGumball
  • Members
  • 282 messages
the "missing" line is just a comment in the xml file. It is not used by the game.

#142
AlarisT

AlarisT
  • Members
  • 54 messages
Firstly - thanks for the tut! I've created a custom model, and I've placed all the files in the override folder--now I'm following the linked tutorial to get the object to show up in game, but that tut does not show how to use a custom model w/ a new item. I'm guessing my model should show up in the "Item Variation" drop-down, but I'm not sure if the toolset is even aware of my custom model at this point (I did create the *.gda file and placed it in the \\Dragon Age\\packages\\core\\override folder along with the dds, mao, mmh, msh, & phy files.) I appreciate the help! :)

[Edit: My model isn't showing the texture when I drag the *.mmh onto the viewscene.exe.  I have the dds file in the same directory, and it's 512 x 512.  I checked the xml references, and they are correct.  I don't know if this would somehow prevent my model from being listed, but it looks like I have at least two major problems.  I am using Milkshape3D to export my model.  I've tried .3ds and .fbx and neither's *.mmh show's the texture after following the tut.  My brain is FRIED.]:wizard:

Modifié par AlarisT, 15 janvier 2010 - 07:10 .


#143
cw8

cw8
  • Members
  • 63 messages
If your texture paths are wrong, the model should still show up in-game without the textures, it'll appear totally white. Is your custom model correctly sized? Coz I had a sword that was so huge it filled the whole screen and you appeared to have no weapon equipped coz you were staring through the mesh. Until I sized it to fit within a 2metre bounding box in my 3D application.

#144
AlarisT

AlarisT
  • Members
  • 54 messages
I appreciate the response - I imported an existing sword and scaled my sword accordingly. However, like I said in my last post, I'm not sure how to use the following tutorial to get a custom model in game as the tutorial only covers using existing material:



http://dragonagemodd...player-an-item/



Thanks :)


#145
Fluix

Fluix
  • Members
  • 8 messages
Damn... i tried it, renamed all file like the model... export from max works fine... shows up in the toolset ... but not in the game ... i have no idea why...

Could someone help me, if i send my files and get it back... :unsure:

#146
cw8

cw8
  • Members
  • 63 messages

AlarisT wrote...

I appreciate the response - I imported an existing sword and scaled my sword accordingly. However, like I said in my last post, I'm not sure how to use the following tutorial to get a custom model in game as the tutorial only covers using existing material:

http://dragonagemodd...player-an-item/

Thanks :)


You use that exact tutorial to get your item in-game. The thing is that your custom item model should appear in the "Item Variation" option.

Like what was mentioned in the tutorial on the first page:
Go to your toolkit: File -> New -> Material
Right click -> Insert -> Insert Model -> choose your model
if it shows, means your model is good.

Also you need to use Refresh or Refresh Override inside the toolset
for the changes to appear. And you need to keep refreshing everytime
you make any change at all. It's under the "View" menubar.

Anyway, quote from another forumer in Private Messaging:, Megaman2Freeseus who had problems:
The issue with the blade not showing up was because the format of the
jpg was greyscale. Not idea why photoshop saved it greyscale. Anywho,
RGB is a must.




#147
catspajamas19

catspajamas19
  • Members
  • 25 messages
 If your fbx,mao,mmh,etc. files are all good Open your toolset and File>New>material. Right click in the viewer Insert>Insert model. A window will open with all the the models.Using the example I used before I look under w for weapons and lsw for longsword (this is why you name your files like this to group them in the subset of said item) click your model and it should be in the toolset viewer. Next goto
File>Open file>(your data folder in your Dragon Age>packages>core should open) click on 2da.erf. This will open the 2daerf list of models. Look for longsword(or whatever you are adding) longsword_variations>right click>extract resource to your override folder
Open you override file and change the name of the gda file to greatsword_variation(the number of the variation. If you click the sword icon in the palette window of your toolset expand global>expand weapons melee>expand longswords>expand unique. There are 19 longsword variations so I am adding a 20th so my gda file is renamed to londsword_variation20.gda. Save and drag and drop it in your toolset. The window should show a G2DA_COLUMN_LIST and a G2DA_ROW_LIST. Expand the G2DA_ROW_LIST there should be 7. Delete 2 through 7.Expand number one. It should say
INT       1
STRING Longsword1
STRING lsw
STRING ls01
STRING a
STRING(blank)
INT     2
In the first INT change the one to match your gda number(20 in this case)
Change STRING longsword1 to the name of your item (Twinkle in my example from before) 
Leave the STRING lsw alone
Change STRING ls01 to your abbreviation that matches all your file names( tw01)
Leave STRING a alone(a is called out in our files)
Leave 6 empty
Leave 7 as 2
Save in override
Thats it to get you model in the variation list
Close your toolset and reopen, Goto manage modules. A window will open click New
under name enter the name you want to show up in your downloadable content(Drizzt Twinkle). Under UID enter something that you will recognize I use (spi) so i will enter(spi_tw).Under info in the same window you want to change the content module to Single Player. Click OK then open. Goto File>manage modules again make sure yours is highlighted(Drizzt Twinkle) and click hierarchy. Make sure the single player box is checked. Click OK then close. 
In the palette window right click in the gray box in an empty spot New>Item.A Create New Resource window will open.In the resource name box type in your item but use something you will recognize like before(spi)I used (spi_twinkle). Under Module  and Owner Module it will have your Module name(Drizzt Twinkle) change the Module one to Core Game Resources
The viewer should open (the tab above should read your i(spi_twinkle.uti)And all the properties should be on the left.This is where you define your item.
I will change these using my example

Base Item Type- i made a longsword so i will leave it at Weapon-Longsword
Comments- Twinkle Scimitar
Crafting recipe type-Leave as is(not sure on this one yet)
Description-Drizzt D'Urdens scimitar
DescriptionRequiresTranslation-Leave as is again
Icon- click line and click the 3 dots(as before Icons all have the ico abbreviation. I pick ico_longswords.dds)
Inventory Subgroup- expand globals>weapons melee>longswords and click one in the drop down. It should open in the viewer with a tab seperate from spi_tw.uti. You notice this file has a red bar at top.This is because this folder isn't checked out. You can't edit it unless you check it out. All we want is the number in the Inventory Subgroup  which for longswords is 204000.Right click on the tab for this and close. Enter 204000 in the Inventory Subgroup.
Item Variation- click and a list of longswords should be in a pull down.Choose the one you created.It will have the name you put in the 2da variation file ROW_LIST>G2DA_COLUMN_2  I click Twinkle and my model shows up in the viewer.
Material Progression and Material Type-choose what you want.This will determine the tier(Tier explanations can be found in the Collectors Edition Strategy Guide,I'm not sure if its in the standard edition.They explain the tiers for each weapon and armor material variations)
Name- same as Item Variation (Twinkle)
NameRequiresTranslation- Leave as is
Tag- should be the same as your .uti file (spi_twinkle.uti)
Body Tint and Body Tint mask- none
Cost- enter how much
Damaged-leave
Item Properties-click then click 3 dots to open properties menu. You can choose up to 5 and change the power for each. (Again explained in CE strategy Guide)
When your all done SAVE.
In the palette window on the right,the name of your .uti file should be at the bottom with a green check mark.This means it is checked out and can be edited. Right click it and Choose check in. There should be no check mark.
Now go to the palette window and click the 3rd icon on the bottom from the right(the piece of paper with the lines).
Right click in the bottom of the palette window New>Script. The Create New Resource window will open
Under Resource Name pick a name I used( module_spi_twink)Leave Module and Owner Module at your module name.
I copied the script from th3_selectah tutorial social.bioware.com/forum/1/topic/72/index/320619/1
and pasted it. Wherever he has (aga_bowathena) You change it to you .uti file name (spi_twinkle)
SAVE and check out just like the item one 
goto FILE>manage modules>Your module(Drizzt Twinkle) and click properties
The third line down is Script,click this and click the 3 dots.A Resource Open/Save window will open.Scroll down to find your script(module_spi_twink)and click it.Your script should be in the window next to script.Close the Object Inspector and Properties windows. Make sure both your uti(item)and mss(script) are checked out.
Goto the pallete window and click the sword icon(item) Find your item(it should be on the bottom spi_twinkle)
Right click on the file Export>Export without dependent resources.
Click on the script in the palette window find yours at the bottom of the list (module_spi_twink)
Right click on the file Export>Export without dependent resources
Goto Tools pulldown on the top of the toolset Tools>Export>Generate Module XML
Goto Tools pulldown again Tools>Export>Generate Manifest  XML
Close the toolset and start up your game and your item should show up in your inventory.

Again thanks to th3_selectah and tzpn for leading me in the right direction

Modifié par catspajamas19, 15 janvier 2010 - 06:37 .


#148
AlarisT

AlarisT
  • Members
  • 54 messages
Thanks to everyone for their time they dedicated to help--I am making progress. The sword shows up texture and all in the toolset--now I just need to find where I misplaced a semi-colon or what I did wrong as the longsword does not yet show up in game.

[Edit:  Aha!  The sword is in game and has slain its first creeps!  Here's what I did wrong: I had accidentally set the module's "Content Module" to "Single Player" instead of the "Extended Module" - ah details details.  I have a very rough copy of the sword in-game, and I will post screenies once I make it pretty.  Perhaps I can use this model for a lower LOD - are there tuts on doing Levels Of Detail?  THANKS AGAIN EVERYONE :D]

Modifié par AlarisT, 16 janvier 2010 - 06:41 .


#149
AlarisT

AlarisT
  • Members
  • 54 messages
Posted Image

Here it is - this was a quick / rough model of only 86 triangles (I didn't want to spend a ton of time on a pretty model until I was sure I could get it in-game.)  I'll post further progress in the LOTR weapons thread.[/b][b]

Modifié par AlarisT, 16 janvier 2010 - 07:15 .


#150
BioSpirit

BioSpirit
  • Members
  • 261 messages
When using custom models in a Level Editor. The TEXCOORD section must appear twice in a *.msh.xml file. Otherwice textures won't show up. Also, those sections seems to appear twice in a sample xml's provided by BioWare. Can't think of any reason why ?

Here is an example:
<Data ElementCount="1216" Semantic="TEXCOORD" Type="Float2">
<![CDATA[ 0.875183 0.392578
0.000107 0.392578
....
0.000107 0.335937
</Data>

<Data ElementCount="1216" Semantic="TEXCOORD" Type="Float2">
<![CDATA[ 0.875183 0.392578
0.000107 0.392578
....
0.000107 0.335937
</Data>

Modifié par BioSpirit, 18 janvier 2010 - 02:24 .