Jump to content

Loading your model in the editor for use?


Eagle
 Share

Recommended Posts

Ok, I have my model made and converted to the Leadwerks format and it looks beautiful in the model viewer Josh made! Now I want to put it in the editor so I can use it. I don't really get the instructions on the wiki, so I thought I would ask you guys how its done. Like which file do I need to edit to make my model list? There are so many! Do I need to write a separate loading program or something? LOL! and if so how do I attach the loading program to the engine?

 

any help would be most appreciated ~

 

Always~

Link to comment
Share on other sites

Just place your gmf, dds's, and mat's in the Leadwerks directory and they'll show up. The name of the file will be listed on the right. To make subfolders in the editor you use underscores in your file name. The actual folders in your Leadwerks directory have nothing to do with the folder layout in the editor. So for example if you had 3 tress you'd probably want to group them so you might name them.

 

tree_Eagle.gmf

tree_Rick.gmf

tree_Blah.gmf

 

Note that you have to restart the editor each time you copy new gmf's to the Leadwerks dir for them to show up in the editor.

Link to comment
Share on other sites

The "ideal" way for the editor is to give each model a lua file. The lua file needs to be the same name as the model and the editor will automatically associate the 2 together.

 

Look at Scripts/Template.lua. This is a template file for your models. You can uncomment what you need. Look at some of the lua files in the Models directory to get example of how this should look. When you have a lua file with your model you can now bring up the properties to that model in the editor by dbl clicking it or right click properties on the tree view. The base lua script adds some default settings for you. Collision being one of these settings I believe.

Link to comment
Share on other sites

You can also use phygen to put a pheics body around an object so that if you set the mass of the object to anything other than 0.0 it will be movable when colliding with another object.

For example if you have a crate you can put a box body around it. Make it a tight fit and give it a mass of about 4.0 and it should move when a body of greater mass collides with it.

When using phygen you can test the resilts either in the editor or in your main program using debugphysics(1) command.

amd quad core 4 ghz / geforce 660 ti 2gb / win 10

Blender,gimp,silo2,ac3d,,audacity,Hexagon / using c++

Link to comment
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.
Note: Your post will require moderator approval before it will be visible.

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.

 Share

×
×
  • Create New...