Go Back   EQEmulator Home > EQEmulator Forums > Development > Development::Tools

Development::Tools 3rd Party Tools for EQEMu (DB management tools, front ends, etc...)

Reply
 
Thread Tools Display Modes
  #1  
Old 05-12-2014, 09:02 AM
Zaela_S
Hill Giant
 
Join Date: Jun 2012
Posts: 216
Default EQG Weapon Model Importer v0.1

A tool for importing (and exporting) weapon models into .eqg files, using any ID numbers you like.

Link

Forewarning 1: Currently, this tool only supports plain, non-animated geometry. It may support adding and working with particle animations in future versions -- a kindly forum-goer has already offered to share some particle know-how with me, so hopefully I'll be able to make some headway with that before long.

Forewarning 2: I know basically nothing about Blender and 3D modelling in general, so don't bother asking me anything about that! I've used Blender all of two times, both just to make sure this tool worked. Tutorials are not too hard to find -- I used this extremely basic one to find my way around enough to make the dumb example you'll see below.

Apparently posts are limited to 6 images, so I'm gonna have to split this up a bit...

Importing

1. First things first, you'll want to make your model and its texture in Blender (or another 3D modelling program, maybe).



2. Having that, you'll want to export it as a .ply file. This is the closest independent format to what the client expects, so we're going with it, at least for now.



3. Base export settings will not do! The client uses "left-handed" 3D coordinates internally, which basically means the coordinates you need are the ones that make the least sense. In particular, if your model is properly upright (as mine is) you'll want to export with positive X as the UP direction. Don't question it. Figuring out the Forward direction will be up to you.

Also, you should uncheck "Vertex Colors" and make sure everything else is checked.



4. Now it's time to fire up EQG Weapon Model Importer. It's not gonna win any UI design awards, but it has all the info we need for now. You can import your weapon model into one of the existing weapon model .eqgs (filtering for "equip" is a good idea), or you can make a new .eqg file of your own by right-clicking in the first column and selecting "New EQG Archive". I'm gonna do the second one for this example.



5. Either way, select your desired destination .eqg file from the first column, and then right-click in the second column to bring up your options. We're gonna want to "Import Model from .ply". Doing so will let you search for the .ply file you exported from Blender (or whatever). You'll also be prompted for the ID number you'll want your weapon model to have -- I picked 3333 since the 3000 range is nice and open. A .mod file will be made from the .ply's geometry data; its name will be in the format "it#####.mod".



[Continued in the next post...]
Reply With Quote
  #2  
Old 05-12-2014, 09:03 AM
Zaela_S
Hill Giant
 
Join Date: Jun 2012
Posts: 216
Default

6. A material will also be made for us, named "Custom" (the name doesn't matter). When we select that, we will be able to edit this material's opacity setting(?) (currently a string with an unknown range of possible values), and its properties. Properties control the material's texture as well as things like shininess. Our model will just be a pure black blob if we don't at least include the "e_TextureDiffuse0" (main texture) property, so we click the "Add Property" button and select that from the list.



7. Having done that, we'll be able to select our new property from the property list and set its value. In this case, it's the name of the texture to look for in the same .eqg file.

EQG Weapon Model Importer currently only works with .mod files; to import new images, you'll probably want to use EQGExport.

Furthermore, it's worth noting that although pretty much everything in the .eqg files use .dds or perhaps .bmp for their textures, .png textures will work just as well. It makes sense that the client would use a generalized image loader. This is good, because not many programs support writing .dds files, and .bmp files are huge. Sticking with .png is both convenient and worthwhile, so we might as well do that.

In any case, type in the name of the image file and then hit Enter or press the "Commit Change" button to save your changes.



8. If you're putting your model into one of the main weapon model .eqg's, this won't matter, but if you made your own .eqg file like I did, you'll want to make sure the client actually loads it by adding it to the /Resources/GlobalLoad.txt file in your EQ folder.



9. Now you're set! You might want to make an item using your new model's ID, but if you have a server you can use the #wc command in, that'll be enough for a quick test.



And, hopefully, that's it!



[Continued in the next post...]
Reply With Quote
  #3  
Old 05-12-2014, 09:04 AM
Zaela_S
Hill Giant
 
Join Date: Jun 2012
Posts: 216
Default

Exporting

EQG Weapon Model Importer can also export existing weapon model data to the .ply format. This may be useful if you want to use an existing model as the basis for a new one, or just to muck with something you're familiar with.

1. In EQG Weapon Model Importer, select your desired .mod file and right-click to bring up the "Export Selected Model to .ply" option. It'll ask you for the folder you want to export to. The exported file will have the same name, just with .ply instead of .mod.



2. Then, go into Blender (or whatever), and find the option to import from .ply...



3. Note that, in Blender at least, we aren't given the option to specify which way is up when importing. So the models will generally be on their sides. Rotating the Y axis by 270 degrees in Blender will get it back upright.





Annndddd... that's it. The program is not thoroughly tested so there could be bugs etc. Also there are probably Material Property types that I missed (I didn't look very hard) as well as the mysterious Opacity options, so if anyone feels like figuring out all of those I'll be sure to include them. Also, some pre-existing weapon models have multiple Materials to allow e.g. different shininess values for different parts of the model, but currently this tool supports only one material for new models. Materials are applied on a triangle-by-triangle basis... I'm not sure of any good, non-tedious way of selecting particular triangles (especially since I'm not likely to produce anything like a complicated 3D interface). Here's hoping particles are a bit easier...
Reply With Quote
  #4  
Old 05-12-2014, 09:52 AM
Zaela_S
Hill Giant
 
Join Date: Jun 2012
Posts: 216
Default

Few points I forgot to make:

* Weapon attachment points (where they go in your hand) are assumed to be at 0,0,0 on the model.
* Be mindful of units. Models use the same units as /loc -- the tube in the above example is 2 units long.
* The client expects non-.bmp images to be upside down (flipped, not rotated). It just does!
Reply With Quote
  #5  
Old 05-12-2014, 10:55 AM
vsab's Avatar
vsab
Discordant
 
Join Date: Apr 2014
Location: United Kingdom
Posts: 276
Default

That looks simply awesome! What language/toolset do you write these apps in?
Reply With Quote
  #6  
Old 05-12-2014, 08:14 PM
knowom's Avatar
knowom
Discordant
 
Join Date: Jun 2006
Posts: 371
Default

This is awesome work Zaela_S I've been learning a bit about how blender works last few months casually just for the fun of it. I'm still not great with it, but I know understand a lot more about it now than I did not to long ago. It's a fun program to learn and play around with you can do really amazing stuff with it if your good enough at it.

Anyway this site here is called BlendSwap.
http://www.blendswap.com/blends

It has tons and tons of freely distributed 3D models people have submitted. It should be possible to load them up in blender and export them over into EQG files!

You can obviously design your own 3D models as well to export, but this is a big break through tool in this area of EQemu development in my eyes.

This is like a fairly modular 3Diminsional stairway labyrinth design I made in it back in February for the hell of it.



Anyway this is exciting news the possibility of a abundance of copyright free player made content being possible is awesome to think about this opens up the doors a lot to true player made customization.

Here's a example of a texture made from scratch in GIMP as well. It kind of reminds me of lava and steam vapor.
__________________
"We are all on the same team, and I think not enough people realize this."
- Leetsauce
Reply With Quote
  #7  
Old 05-12-2014, 11:11 PM
Zaela_S
Hill Giant
 
Join Date: Jun 2012
Posts: 216
Default

Quote:
Originally Posted by vsab View Post
What language/toolset do you write these apps in?
Mostly Lua, with some C++ to handle low level stuff like reading and writing the binary files. I use a non-mainstream GUI library called IUP. It's made by the designers of Lua so it makes good use of the features of the language, more so than typical bindings. The documentation can be a bit confusing (it's translated from portuguese) and it takes a bit to get used to, but it's pretty simple and quick to work with once you get the hang of it. Well, provided you're comfortable with Lua.

I might put the project up on github if there's any desire for that. Most of the code already comes with the program though in the form of the Lua scripts.


Also, I answered my own question of how to handle multiple materials: start with the model to import split into separate pieces and files, then combine them in the importer; each separate piece would get its own material entry. Shouldn't be too hard to put together for a future version.
Reply With Quote
  #8  
Old 05-16-2014, 03:10 PM
Zaela_S
Hill Giant
 
Join Date: Jun 2012
Posts: 216
Default



Work on particles begins...
Reply With Quote
  #9  
Old 05-16-2014, 04:35 PM
Weldarr
Sarnak
 
Join Date: Oct 2005
Posts: 45
Default

Soon as I have the ActorEmmitters more decoded I'll send it your way Zaela, that will open up the door for the custom particles

- Vaion
Reply With Quote
  #10  
Old 05-16-2014, 04:57 PM
Akkadius's Avatar
Akkadius
Administrator
 
Join Date: Feb 2009
Location: MN
Posts: 2,071
Default

Quote:
Originally Posted by Weldarr View Post
Soon as I have the ActorEmmitters more decoded I'll send it your way Zaela, that will open up the door for the custom particles

- Vaion
Vaion, feel free to document on the new Wiki. It is super easy to use. Send me a PM if you want an account
Reply With Quote
  #11  
Old 05-19-2014, 10:47 PM
Cassieze
Sarnak
 
Join Date: Aug 2005
Posts: 34
Default

When I try to add
a property i get the following error
Code:
.\gui/display.lua:56: attempt to index local 'set' (a nil value)
stack traceback:
	.\gui/display.lua:56: in function 'UpdateDisplay'
	.\gui/display.lua:143: in function 'SaveNewProperty'
	.\gui/property.lua:44: in function <.\gui/property.lua:13>
	(tail call): ?
	[C]: in function 'MainLoop'
	gui/main.lua:74: in main chunk
I'm trying to put them into Dodequip.... I did go in game to see that the number is working - got a black model.

Using underfoot

Any thoughts?
Reply With Quote
  #12  
Old 05-19-2014, 11:00 PM
Zaela_S
Hill Giant
 
Join Date: Jun 2012
Posts: 216
Default

Ah, I forgot about properties when I changed how some things were arranged.

Re-download, should be fixed.
Reply With Quote
  #13  
Old 05-19-2014, 11:33 PM
Cassieze
Sarnak
 
Join Date: Aug 2005
Posts: 34
Default

This worked thank you
Reply With Quote
  #14  
Old 05-22-2014, 10:06 PM
Zaela_S
Hill Giant
 
Join Date: Jun 2012
Posts: 216
Default

Cliche as hell example of the kind of thing an uncreative total newb (me -- my first model more complicated than an auto-generated cylinder) can slap together in a couple hours (most of it grappling with Blender's UI and skimming tutorials) with a little effort.





Getting started is not as hard as it might seem! Although, making the texture and normal map (the e_TextureNormal0 property) decent is probably harder than making a workable static model... (The sharp edge of the blade looked more distinct before I put that noisy metal texture on, for one thing.)

Better than a cardboard tube, at least. Feel free to post your own~

(Oh, and for reference: with the blade facing the positive Y axis in Blender, I had to export with negative Z as the forward direction to make it face the right way in game).
Reply With Quote
  #15  
Old 05-23-2014, 03:39 AM
knowom's Avatar
knowom
Discordant
 
Join Date: Jun 2006
Posts: 371
Default

Cloud Strife's Buster Sword...in all it's EQ glory! Looks pretty decent for just a few hours work. Sword looks a little to heavy for you though Zaela!

__________________
"We are all on the same team, and I think not enough people realize this."
- Leetsauce
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

   

All times are GMT -4. The time now is 10:24 AM.


 

Everquest is a registered trademark of Daybreak Game Company LLC.
EQEmulator is not associated or affiliated in any way with Daybreak Game Company LLC.
Except where otherwise noted, this site is licensed under a Creative Commons License.
       
Powered by vBulletin®, Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Template by Bluepearl Design and vBulletin Templates - Ver3.3