Jump to content
Sign in to follow this  
Ketu

How to add model to game

Recommended Posts

 

i would make some tests with terrain editor and i have no experiences with editor, so i follow my first tutorial here

http://trac.wildfiregames.com/wiki/Basic3DImplementation but i cant add model to editor, i says some xml error

i use 3ds max 2014 with collada include, i export model to C:\0ADSVN\data\mods\public\art\meshes\props

as wrld_create_test.dae

and texture to
C:\0ADSVN\data\mods\public\art\textures\skins\props

as crate_test.png

model is cube 4x4 generic units

Where can i find instructions for 3ds max?

 

 

Share this post


Link to post
Share on other sites

Can you share the error ? I have been using 3Dsmax quite a bit for this game so I might be able to help you.

Share this post


Link to post
Share on other sites

go to binaries/system/ActorEditor.exe

This program will make creating and editing actor files much easier. It may freeze if you open up the 'browse' option inside any of the input boxes, so for reliability save often, and paste file locations rather than use the browse function.

Share this post


Link to post
Share on other sites

Do what @LordGood says. Also, look at the xml files directly  in a program like Notepad++. A very simple actor to start with can be thise one:

binaries/data/mods/public/art/actors/props/temp/l_sheath.xml

 

Here is the xml for that file:

 

<?xml version="1.0" encoding="UTF-8" standalone="no" ?>
<actor version="1">
  <castshadow/>
  <group>
    <variant frequency="100" name="Base">
      <mesh>temp/l_sheath.dae</mesh>
      <textures><texture file="props/wrld_wood_3.dds" name="baseTex"/></textures>
    </variant>
  </group>
</actor>

Just paste your file names into that. It's the most basic of actor files: mesh + texture. Can't get more basic than that one friend. This is how it would look:

 

<?xml version="1.0" encoding="UTF-8" standalone="no" ?>
<actor version="1">
  <castshadow/>
  <group>
    <variant frequency="100" name="Base">
      <mesh>props/wrld_create_test.dae</mesh>
      <textures><texture file="props/crate_test.png" name="baseTex"/></textures>
    </variant>
  </group>
</actor>

 

 

A lot of modding is about looking at the game's existing files and just editing and resaving from those. :D

Edited by wowgetoffyourcellphone

Share this post


Link to post
Share on other sites

ok, my 3ds max export wont work, but blender very well

other questions: how to load png with alpha?

how to add 2 meshes on the same anchor?

Screenshot 2016-11-07 12.18.42.png

  • Like 2

Share this post


Link to post
Share on other sites

Somewhere in your actor file there is a <material> tag. That should be this:

<material>player_trans.xml</material>

(this is with only transparency, with AO, normal and specular you need something else)

 

For the second question:

<props>
  <prop actor="props/structures/athenians/barracks_struct_b.xml" attachpoint="root"/>
</props>

Make a prop tag inside the <variant> tag and set the attachpoint to root (note that you need to make a second actor file for the second mesh)

  • Like 2

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this  

×
×
  • Create New...