Results 1 to 11 of 11

Thread: Making units with Blender 3D and preparing the bif plates[Tutorial]

  1. #1

    Default Making units with Blender 3D and preparing the bif plates[Tutorial]

    You can get the latest blender from here(free): https://www.blender.org/

    Download and open my blend file: http://www.mediafire.com/download/4v...tw_unit2.blend

    Rendering: Choose a folder for the images(red outline in the attached picture) then click "Run Script"(the green outline) to render all 336 frames(7 actions X 4 angles X 12 frames), it will take half an hour but you can see each of them being created in your specified folder.
    Click image for larger version. 

Name:	PTZCFaM.png 
Views:	108 
Size:	80.3 KB 
ID:	18780
    The frames are in png(it makes them anti-aliased), the script crops them enough so they can fit into the 512x512 plates. Don't crop them any further because their origins won't match in the bif animation. They use a naming system that start with the number of the plate they belong to, then the rotation(1,2,3 or 4) and last is the action, this way all 28 frames for the 1st plate start with 0 and are on top, so you can select them easier.

    SpriteSheets: I found 3 programs that make spritesheets: TexturePacker(limited trial version), Sprite Sheet Maker(simple GUI, you can't preview the images), darkFunction Editor(couldn't figure how to set the sheet size lower than 1024X1024).

    I managed to create them the way i wanted with TexturePacker(trial). Get it from here: https://www.codeandweb.com/texturepacker

    Drag and drop the first 28 frames and all weapons&shields in TexturePacker, turn off the options that need the Pro version(Trim, Algorithm, Png Optimization) because it will put a watermark on your sheet and you don't need them anyway. Then press "Publish Sprite Sheet" to save the bif frame, it will still be in png(more on that later). Rename it and do it 11 more times for the rest of the plates(if someone can think of a script to do it automatic, please let me know!).
    Click image for larger version. 

Name:	fOZHEAc.png 
Views:	97 
Size:	342.0 KB 
ID:	18781

    Convert to Palette: You need Photoshop or similar image editing software for converting the png plates.
    A correct 256 color palette, like this one from the ChainHlm textures: https://www.mediafire.com/?8g6ggd88t76n67b

    Open one of the plates in Photoshop, create an action(Window/Actions) and start recording.

    If you didn't before you can add the weapons&shields now too. Just need them in a png with the same size(512x512) in the correct position in the bottom and with transparent background. Drag it on top of the unit's spritesheet, then Layers->Merge Layers, if needed use the bucket to fill around them with R:0,G:255,B:255.

    Now go to Image/Mode/Indexed Color, then choose Palette->Custom and Load ChHlm.ACT(from the above download), in Options->Matte choose Custom again and give it R:0,G:255,B:255(teal, so it won't blend in with the player colors). Set Dither(beneath Matte) to None. Press ok and keep recording, go to File/Save As and save it as BMP.
    Click image for larger version. 

Name:	UeYeCwm.png 
Views:	106 
Size:	192.2 KB 
ID:	18782
    Now to run the recorded action go to File/Automate/Batch, choose the folder with the png plates, press OK and it will convert all of them.

    Use Readbif(run as administrator) to create the new bif.

    Photoshop have it's own bmp format and might give you an error, use XnConvert(it's free and can edit whole folders of images) or similar to open&save(convert) the bmps to bmp again https://www.xnview.com/en/xnconvert/

    Modeling: My model is free to use but you'd need some knowledge in blender to start editing it. Changing the clothes and colors wouldn't be hard but making new animations(like archer's shooting) or changing the setup/size of the render might be too advanced.

    If you have any questions, post in the comments and i'll answer them!
    Last edited by YanBG; 02-06-2019 at 18:18.

    Member thankful for this post:

    Stazi 


  2. #2
    Member Member dimitrios the samian's Avatar
    Join Date
    Feb 2004
    Location
    Hellas Down Under
    Posts
    637

    Default Re: Making units with Blender 3D and preparing the bif plates[Tutorial]

    Great effort Yan !
    Even just showing us how to change clothes & colors & perhaps textures will be valuable information .
    Please do when you are ready
    cheers

  3. #3

    Default Re: Making units with Blender 3D and preparing the bif plates[Tutorial]

    I started learning blender with this tutorial: https://wiki.blender.org/index.php/D...ingerbread_Man

    It will show you how to model small objects, you can use it to make weapons/shields for example. Down on the page look for Materials and Textures. Each color on the model is a separate material, they will look the same when rendered as in the editor, unless there is a texture on top, which will override the color. I used only 2 textures, one for the iron helmet and one for the mail sleeves.
    Click image for larger version. 

Name:	WjQ9Ikj.png 
Views:	79 
Size:	191.0 KB 
ID:	18783
    You need to be in 3D View mode, the white cude on the bottom left, change it from the text editor(the script). On the top right you can see the objects(the green outline shows the selected/active one). Toggle the eye and/or camera icons to hide the objects from the scene and the rendered images.

  4. #4
    Member Member dimitrios the samian's Avatar
    Join Date
    Feb 2004
    Location
    Hellas Down Under
    Posts
    637

    Default Re: Making units with Blender 3D and preparing the bif plates[Tutorial]

    thnx for the tutorial link ......
    So when I put soldier into Blender , can I just import a bif from MTW ?
    I like the idea of just doing simple things first to existing troops
    Last edited by dimitrios the samian; 08-08-2016 at 12:12.

  5. #5

    Default Re: Making units with Blender 3D and preparing the bif plates[Tutorial]

    You need a soldier's model, the MTW bifs are 2d frames and they can't be used in blender. CA rendered from 3D, but their models are not released.

  6. #6
    Member Member dimitrios the samian's Avatar
    Join Date
    Feb 2004
    Location
    Hellas Down Under
    Posts
    637

    Default Re: Making units with Blender 3D and preparing the bif plates[Tutorial]

    Quote Originally Posted by YanBG View Post
    You need a soldier's model, the MTW bifs are 2d frames and they can't be used in blender. CA rendered from 3D, but their models are not released.

    ahhh I thought so
    So the soldier you used ...
    He is specially made ?

  7. #7

    Default Re: Making units with Blender 3D and preparing the bif plates[Tutorial]

    I made it myself, but not specially for this game. I used it in previous projects and it's always good to know how the model was made, old games use low res graphics and you can get away with less detailed one, it would reduce the render time as well.

    Althouigh depending on the mod you need the model to follow specific proportions. MTW ones have tiny head, narrow shoulders and long skinny arms/legs.

  8. #8
    Member Member dimitrios the samian's Avatar
    Join Date
    Feb 2004
    Location
    Hellas Down Under
    Posts
    637

    Default Re: Making units with Blender 3D and preparing the bif plates[Tutorial]

    Nice work Yan , that model will enhance the Medieval Scenarios
    Yep , tiny heads !
    At least some of the Mods that followed they got it right
    Ohh well , back to Readbif & Photoshop for me .
    & still much to learn .
    thnx

  9. #9

    Default Re: Making units with Blender 3D and preparing the bif plates[Tutorial]

    Updated the download link for my model, now the textures are packed into the .blend file. I also cleaned unused data and the size dropped to 6mb.

  10. #10
    Member Member dimitrios the samian's Avatar
    Join Date
    Feb 2004
    Location
    Hellas Down Under
    Posts
    637

    Default Re: Making units with Blender 3D and preparing the bif plates[Tutorial]

    Valuable info .
    I like the parts about Photoshop & Palettes & converting/changing them .
    I need to learn this skill , so I can switch palettes between 2 different Bif Plates .

  11. #11

    Default Re: Making units with Blender 3D and preparing the bif plates[Tutorial]

    Updated the post about palette conversion(R:0,G:128,B:0 merges with some of the green player colors, similarly R:255,G:0,B:255 with the purple), how to add the weapons with the photoshop action and what to do if your new bmps give error when imported to BifReader.

    I'm creating the SpriteSheets in Blender while render now but that requires Python Imaging Library for the code to work and might be too much hassle for you.
    Last edited by YanBG; 02-06-2019 at 18:11.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Single Sign On provided by vBSSO