[WIP] How to add a new model (blender > wurm)

Guides on how to mod, model, program, or other content of value for learning Wurm modding. But also any guides that can help in game.
axeblade346
Trollslayer
Trollslayer
Posts: 17
Joined: Mon Aug 31, 2020 7:42 am

[WIP] How to add a new model (blender > wurm)

Post by axeblade346 »

Goal of Guide:

To teach you how to use a photo editor, text editor, blender and BDew's .wom converter to add new objects/items to wurm.

Limits you must know about:

We can't do animations the normal way thus all newly added animals will not move. (Think T-Pose only)

As armor is part base object for players/animals like horses ANY change to the equipped version of them cant be done as it breaks animation and armor states. Ever seen a player with cloth, leather, chain , plate , drake , dragon on all over each other???
Mask are separate though.

Adding a seat point will cause the player stand on that point thus no horse riding / cart riding / chair leg folding. (And its hard to add more than 1 seat)

You can't from a .wom file back into something you can pull into Blender so MAKE BACKUPS

What parts makes a new item

The object file = ???.wom file defines the 3d look of an item, for a dice its the part that says its a cube. Made with blender and /bdews .wom converter.

The texture = ????.dds file (can be .png but better to use .dds) is the image file that gets used to change outside look of the object, for a dice its the white part with the numbering dots in. Made with an image editor like paint.net or gimp.

The mapping = mappings.txt links the game code name of an item to the object (.wom) file , the texture (.dds) file with a few possible extra's.

Optional files:
The Paint Mask file = ????_pm.dds file that is basically a copy of texture file with SPESIFIC coloring to specify what part is what for using dye (/paint) on texture. Think dye wood vs dye sails.

Properties file = properties.xml file is used to add custom stuff to a item like is there a paint mask file, should the item have a offset (mask is the only item that uses it alot), What animations to use when, when to change between different version of an item vs distance you are away from it (LOD) and a few other odd stuff.


Terms to know / what I use
Item = The end product that the player will see in game.
Object = The 3D look of an item, or the .wom file
Texture = The image applied over the object.
UV Map = How the texture gets cut and applied to the object. (makes it so that you can have 1 plank in the texture but 500 planks in the object)
Mapping = Refers to how to use mapping.txt and names in blender correctly.
Item version = Refers to mostly what material and item is made out of ...
Item state = Mostly refers to if the item is empty / full / alive / dead / corpse ...
Transparency vs opacity = wurm uses opacity but with a the way its coded it can see like transparency.
Transparency = How much light is allowed thru. TINTS the light. (tint = transparent)
Opacity = How much of what is behind the object can be seen. Not suppose to to tint the colors but Wurm does.
NOTE: you can't go totally 100% opacity in a texture, So make one pixel 99% and just exclude it in the UV map.
Last edited by axeblade346 on Mon Dec 12, 2022 7:55 pm, edited 7 times in total.

axeblade346
Trollslayer
Trollslayer
Posts: 17
Joined: Mon Aug 31, 2020 7:42 am

Re: [WIP] How to add a new model (blender > wurm)

Post by axeblade346 »

Understanding the mappings.txt file and what it can do.

Lets look at a custom one 1st

Code: Select all

model.magic.potion.favor = Potion3.wom?PotionLiquid.texture=PotionLiquidBlue.dds
model.magic.potion is the game code for a potion

.favor refers to a specific version of the potion (like sword.iron vs sword.steel)

Potion3.wom is the name for the .wom file to be used.
Then to change parts of it ? is used

PotionLiquid.texture refers to the name of a subpart (used in blender) texture

PotionLiquidBlue.dds is the new texture that should be used for that subpart.

In Blender you can link the to 1 textures and then use mappings to change the texture and end up with multiple looks for the same item and up with stuff like.

Code: Select all

model.armour.head.wool.hat2			= player/helms/WollHat2.wom
model.armour.head.wool.hat2.dark		= player/helms/WollHat2.wom?Light_Brown.texture=WoolHat2Dark.dds
model.armour.head.wool.hat2.green		= player/helms/WollHat2.wom?Light_Brown.texture=WoolHat2Green.dds
model.armour.head.wool.hat2.blue		= player/helms/WollHat2.wom?Light_Brown.texture=WoolHat2Blue.dds
model.armour.head.wool.hat2.red			= player/helms/WollHat2.wom?Light_Brown.texture=WoolHat2Red.dds
model.armour.head.wool.hat2.lightbrown		= player/helms/WollHat2.wom?Light_Brown.texture=WoolHat2LightBrown.dds
Something to note is that the version of an item is not the same as its state. There is a difference between a item made from cherry vs oak (version) and a item that is empty vs near full (state).

For something I am working on I got 12 versions each with 5 states so that is 60 total items all using the same .wom file.

You can also "cheat" with the same .wom file by making parts of it transparent enough that they disappear.
Last edited by axeblade346 on Mon Dec 12, 2022 7:23 pm, edited 3 times in total.

axeblade346
Trollslayer
Trollslayer
Posts: 17
Joined: Mon Aug 31, 2020 7:42 am

Re: [WIP] How to add a new model (blender > wurm)

Post by axeblade346 »

Programs that I use (all are free)

Blender = Used to 3D model the object - https://www.blender.org/download/

Paint.net = Image editor for the texture , supports layers , opacity, exports to .dds - https://www.getpaint.net/download.html
GIMP = If you know GIMP use it (guide will only refer to piant.net) - https://www.gimp.org/downloads/

Notepad++ = A nice text editor for the mappings.txt and properies.xml - https://notepad-plus-plus.org/downloads/
You can use ANY text editor for this.

Bdew's .wom Converter = Change the .obj file from blender into a .wom file for Wurm use - https://github.com/bdew-wurm/WOM-Converter check middle right for the Latest Releases and get the .jar file.

.wom viewer = helps you check OUT of game how an items looks - https://forum.wurmonline.com/index.php? ... viewer-14/

7Zip = To make them all into a .zip and then rename them to a .jar for Wurm use. - https://www.7-zip.org/download.html

I ALSO Highly recommend getting the OLD .dae files from Wurm online as it can be pulled into blender for editing / scaling your stuff.
viewtopic.php?f=35&t=166
and do viewtopic.php?f=35&t=158

Also unzip the graphics.jar found in your wurm unlimited folder / packs. You are going to refer to the mappings.txt in there ALOT and sometimes need to copy files from there to edit.
Last edited by axeblade346 on Mon Dec 12, 2022 8:42 pm, edited 3 times in total.

axeblade346
Trollslayer
Trollslayer
Posts: 17
Joined: Mon Aug 31, 2020 7:42 am

Re: [WIP] How to add a new model (blender > wurm)

Post by axeblade346 »

Lets start with the "FUN" stuff. (I will, make a dedicated texture edit post)

How to make a new texture for a item already in game.

Step 1 . Find the item in the graphics.jar/mappings.txt and copy it away

It will take you a bit of time to learn how to look for an item but the are sort of sorted into groups.
Also note that quite a few items have more than one state and version.

Now carefully read the folder part of the mappings.txt
model.resource.plank.applewood = resources/Plank_Shafts/plank.wom?plankMat.texture=Plank_apple.dds
the folder part is resources/Plank_Shafts/ so look in the graphics.jar/resources/Plank_Shafts/ for the planks.
Also check if their is more than state like finished vs unfished.
If a mapping doesn`t state a texture file assume the .dds file in that folder is being used.
Some might have 1 texture for more than 1 thing. Like a wagon and a cart sharing the cart part.
Some items also have more than 1 texture linked to it. Like the wagon having 1 for the cart and another for the cloth covering.


Go to the folder and copy the needed parts over to a new folder.
Your are going to need the .wom files and 1 of the .dds files. With some time your will learn what files are needed.
Make a new mappings.txt and copy the line of "code" over.

Its is a good idea to also check the blender part on UV Maps to learn how each texture is used.
But here is a few examples
Libs scythe UV Map Image
Huge Axe UV Map Image
Small Axe UV Map Image


Now open the .dds file in paint.net and make the changes you will need.
in paint.net save it under a new name with the Direct Draw Surface .dds file extension.
Choose the BC3 (Linear,DXT5) and mark Generate Mip Maps.

Now edit the mappings.txt with a new version of the item like :
model.resource.plank.thorn = resources/Plank_Shafts/plank.wom?plankMat.texture=Plank_thorn.dds
And save the mappings.txt

Or replace a current version like
model.resource.plank.oak = resources/Plank_Shafts/plank.wom?plankMat.texture=Plank_my_new_oak.dds

Your going to need a modder to make a mod to add a brand new item version/state, but you can easily replace an existing item version/state.

Now .zip up the .wom(s), mappings.txt and .dds files (and any extra files) and rename the .zip to .jar.

To check it in game you can go via userpacks (Beta branch) but I recommend running a home server and going with serverpacks and the Model me Impressed mod https://forum.wurmonline.com/index.php? ... r-in-game/
Last edited by axeblade346 on Mon Dec 12, 2022 8:38 pm, edited 1 time in total.

axeblade346
Trollslayer
Trollslayer
Posts: 17
Joined: Mon Aug 31, 2020 7:42 am

Re: [WIP] How to add a new model (blender > wurm)

Post by axeblade346 »

Blender part 1 - Importing a .dae file.

As Blender uses different layouts some things may move depending on your layout.
At all times you can use the mouse wheel to zoom in and out and holding the middle mouse button / holding the mouse wheel and dragging you can rotate around the object


I highly recommend you watch a few Blender videos on youtube

Wurm over the years have used 3 file types for the 3d object files.

Very old small stuff uses Softimage .xsi , I am still trying to figure out how to import those into blender

The ones we can easily load are Maya exported .Dae files. With a small edit you can import them directly into blender and edit them. But Wurm moved over to .wom files. Read https://forum.wurm-unlimited.net/viewt ... f=35&t=166
and do viewtopic.php?f=35&t=158
to learn how to download the old .dae files from before the change and fix them for leading into blender.

Now a days they use .wom that is basicly a pre-encoded version that loads faster into wurm. We have no way atm to get .wom files back into blender so all stuff made after the .dae to .wom switch have to be remade by hand.

You can use BDew converted to files exported in .obj from blender to the .wom format https://github.com/bdew-wurm/WOM-Converter

PLEASE RE-READ THE LIMITS IN POST 1.

Lets import a .dae file as the 1st thing, we will get into making items from scratch later.

I recommend you make a folder just for Wurm. In it I got a copy of the .dae file downloads , the .wom converter, the .wom viewer and I am slowly working on exporting fixed .dea / .obj files for faster importing.
I also recommend to get a copy of unzip version of the current graphics.jar used in game located at <steam folder>\steamapps\common\Wurm Unlimited\WurmLauncher\packs as it contains a more up top date list of files in the mappings.txt and more image files to borrow.

Import a .dae file and edit it.
Check the mappings.txt and find the .dae files you need.
I am going to use a bucket and turn it into a bath for this example.
for the bucket the mapping is
model.container.bucket.small = tools/barrel/bucket.dae
So in need go look in the unzipped graphics.jar /tools/barrel for the bucket.dae and figure out what image is linked to it.

Something like the fruitpress will give you an idea of the image needed for it.
model.tool.fruitpress.cedarwood = tools/barrel/fruit-press.dae?barrelMat.texture=barrels_cedar.jpg
So look in the mapping.txt for other stuff in the same folder as it will give you hints.


Copy the .dae file and image files to a new folder.
In this case its all the barrel images as the bucket shares it with the barrel
Image
Open the .dae file in a text editor (like notepad++) and and delete everything between and including
<library_effects>
</library_effects>

It is also a good idea to convert all images from .jpg / .png to .dds now. by opening them in Paint.net or Gimp and exporting them to .dds and choosing Choose the BC3 (Linear,DXT5) and mark Generate Mip Maps.

You can now open Blender
You should see a welcome/open pop up. close it to see the blender starting cube.
Drag over and select the cube , light and Camara and delete them. (we wont need them)

Now choose file > import > Collida (default) .dae.
Navigate to your work folder (the main one) and click the + next to bookmarks to add it for easy acess later
Navigate to the folder containing the dae file / files you copied away
Make sure to change the scale X Y Z to 1.0 (some files has it as 0.010) under object Properties
For some files you might also have to edit the rotation X Y Z as some are 90 out.
After you got it correct press Ctrl+A and choose All transformations (just a safety steppe)
Go over to the Shading tab.
In the scene collection expand the subs till you see something ending in Mat (barrelMat in this case) and click on it.
In the bottom middle mark use nodes
Use the folder navigator to get to you folder and drag the image file to the area below the use nodes.
(barrels.jpg or barrels.dds)
Image
To confirm you did it correctly go over to the texture paint tab and you should see it with the texture (image) applied.
Repeat this section for EACH .dae file you need.

I also recommend you importing something you can use for scale
Right click in the top left on Scene collection and add a new collection (makes deleting it later faster)
Make 100% sure you stand on the new collection and follow the same steppes as above to import the .dae you are going to use for scale.
For this I am importing the male character located in
...\player\Male_1_04.dae
Set the scale X Y Z again to 1 1 1 and the edit the Location Y to ~1 m
You will see the box the player is in move
In the scene collection expand the "sideways y" Male and click on the eye of bounding box and picking box
You should now see the male player in a T pose. (and he got all the armors and beards and faces on top of each other so he will look odd)
As we don't really need the texture image added skip the whole shading and texture tab part.

I recommend you save now by going file save and giving it a name for easy reverting if you made mistake.
After saving go File save as and give the next part a name.
When I started a finished file had about 12 blender files saved and it made it easy for my to use the same base for a new item, so save as new files OFTEN as it has its future use

Image

Now we can start changing things
Last edited by axeblade346 on Sat Dec 31, 2022 1:57 pm, edited 4 times in total.

axeblade346
Trollslayer
Trollslayer
Posts: 17
Joined: Mon Aug 31, 2020 7:42 am

Re: [WIP] How to add a new model (blender > wurm)

Post by axeblade346 »

Blender part 2 - editing a .dae file

Go over to the texture paint or uv editing tab.
In the scene selector click on the item you want to edit (bucket in this case)
In the top middle change from object mode to edit mode
You should see black lines in triangles and black dots on the corners appear
Click on ANY black dot at the corners of the wireframe of the item and press A.
On the image on the left you should see lines appear, this will start to give you an idea of what part if the image file is used where.
You can also confirm it by selecting one dot and Shift clicking others connected to it (you need to mark 3 for it to show)
A lot of images has parts that are used upside down or top on the left.
They really crammed in as much as possible into 1 image like All axes sharing the same images.

Spend you time and STUDY what part goes where as it helps with later image editing and learning where you can make a split.
The planks of the bucket are upside down vs the barrel that use it right side up.

Image
While you here export the UV map for later use (helps your image editing)

Step 1 will be to delete the handlebar and and "flaps"
Select all the dots of the handle 1st (shift click).
You can sometimes get lucky by marking 1 and pressing L and it will select all linked dots. But don't rely on this

Go over to the UV edit tab.
Make sure its in edit mode and click a dot and press A to select all
Above the image click on UV > Export UV Layout and save the file in your folder with a name starting with UV layout.
Now we can start editing.
You can do this in the Modeling / UV or Texture tab.
I tend to switch between UV and Texture
Make sure tour in edit mode (middle top)

For this we are 1st going to remove the handle and "flaps"
Click on 1 dot of the handle and shift click on ALL other
You can sometimes get lucky by pressing L to mark linked parts but it doesn`t always work as you think it will.
(L = select link. A = select all, Shift click = mark 1 , Ctrl click = Mark shortest route between 1 points))

Once you got all the dots marked (yellowish lines vs black lines)...
Image
..press delete and choose edges.
For the flaps do 1 dot a a time (its a issue I know) and delete > vertices
You should now so a hole where the flaps where that we need to fix.
Image
Select dots on the the corners of the hole and press F to fill then in.
Select to corners across from each that matches the line across on the other parts other press J to join them (make the square a triangle that Wurm prefers)
Image

Do the same for the other hole.

Now go over to the UV editing tab if you ain't in it yet
Last edited by axeblade346 on Sat Dec 31, 2022 2:45 pm, edited 3 times in total.

axeblade346
Trollslayer
Trollslayer
Posts: 17
Joined: Mon Aug 31, 2020 7:42 am

Re: [WIP] How to add a new model (blender > wurm)

Post by axeblade346 »

In the UV editing
Select the corners of other part of the top and the ones of the whole you just filled in.
You should see something like this on the image file on the left.
Image
The dot I marked with a red circle needs to be move.
Click on the dot and press G and move your mouse till it correctly aligns with the to look something like this.
You can move it close , click the left mouse button, use the mouse well to zoom in and out, mouse wheel press + drag to move your view around, press g to move it close to the correct spot. Rinse and repeat till; its 100%.
Image
Image
Some things will have 1 dot incorrect other will have all of them in the the wrong spot.
Repeat the steppes for the other filled in hole.
You can check your work in the texture tab.
If done correctly all of them should look the same.

Now its time to resize it.
Mark the bucket in scene selection
Just below the scene collection click in object properties and change the Scale XYZ (keep them close to the same value as each other or stuff will look odd.
I make mine 2.00 as it looks ok height for a bath vs the player size.
Image

At this point file save as is a good option as we are gonna split the bucket into parts and I have messed this up my 1st few times.

<darn max image limit per post>
Last edited by axeblade346 on Sat Dec 31, 2022 3:11 pm, edited 1 time in total.

axeblade346
Trollslayer
Trollslayer
Posts: 17
Joined: Mon Aug 31, 2020 7:42 am

Re: [WIP] How to add a new model (blender > wurm)

Post by axeblade346 »

This part is best done in the modeling tab (better size to see what your doing)
We are going to split it into pieces.

This next part caused me mayor headaches the 1st time and writing this I forgot the solution till I went in a bit to far and had the reload a save.
A lot of the original files has this issue and its well know in Blender with the method Maya/Autodesk .dae files are stored.
So follow these steppes carefully.


We are 1st going to separate the inner section.
Switch over to wireframe mode as its the ONLY way to select the parts correctly.


If you do it solid mode you cant select it correctly.
Switch over to wireframe view
Carefully Shift + Mouse click drag box over one of inner bottom section dots.
Rotate the view with middle mouse (mouse wheel) hold and drag mouse and then.
Carefully Shift + Mouse click drag box over the next inner bottom section dots.
Repeat the last 3 steps till your done.
I should ONLY highlight the same section as I have.
Image
Image
Press P and choose selection

You just made your 1st piece now lets give it a better name move it of the way
If the player for scale gets in your way toggle it invisible with the eye next to Collection 2

In the Scene collection there is a new now part called Bucket.001.
Double click on it and rename it to InnerBucket
Click on the square infront of Bucket click on collection and then on InnerBucket to remark it.
Then in Object properties move it upwards by making Location Z 1.5m (my gif is 1 but 1.5 is more out of the way for now)
Image
Last edited by axeblade346 on Sat Dec 31, 2022 5:37 pm, edited 8 times in total.

axeblade346
Trollslayer
Trollslayer
Posts: 17
Joined: Mon Aug 31, 2020 7:42 am

Re: [WIP] How to add a new model (blender > wurm)

Post by axeblade346 »

Using the same Shift + Mouse selection method mark the bottom inner section
Image
And press P > selection. Rename the Bucket.001 to BottomBucket and change its Location Z to -1.5m
Image
Remember to reselect the bucket and witch to Edit mode if needed

Same for method for Left and Right sides.
LeftBucket > Location X -0.75M
RighBucket > Location X 0.75M

Till your left with
Image
Last edited by axeblade346 on Sat Dec 31, 2022 6:06 pm, edited 2 times in total.

axeblade346
Trollslayer
Trollslayer
Posts: 17
Joined: Mon Aug 31, 2020 7:42 am

Re: [WIP] How to add a new model (blender > wurm)

Post by axeblade346 »

Double Click on bucket and rename it to BucketMiddle in the Scene selection
Right click on it and Right click Paste.
A new one will be made called BucketMiddle.001 at the bottom.
Double click on it to rename it to BucketMiddleR1, mouse drag it onto Collection to move it into it.
Sets its Location X to 0.75 m
Repeat the process last steps on call it BucketMiddleL1 with Location X as -0.75m
Image

The sider ain't strait and will leave gaps / overhangs if we don't fix them
Get a ruler close and a 90degree angle...
Image
Mark BuctketMiddleL1
Last edited by axeblade346 on Sat Dec 31, 2022 7:42 pm, edited 4 times in total.

Post Reply