collapse

Author [EN] [PL] [ES] [PT] [IT] [DE] [FR] [NL] [TR] [SR] [AR] [RU] Topic: VtMB Models - Everything About Model & Texture Changing  (Read 13405 times)

Offline Icicle

  • Methuselah
  • ****
  • Posts: 461
  • Reputation: +19/-3
VtMB Models - Everything About Model & Texture Changing
« on: January 26, 2017, 05:34:43 AM »
So, I was going through my huge stash of "How To" .txts I wrote for myself, and found it WAY too confusing to use all the little bits and pieces I had made for model editing, and texture changing.

I took the time to rewrite them all into one file, which I now share with the VtMB community.

This document is a product of a lot of tedious, frustrating effort to make this work. Good luck figuring it out yourself without this guide...

I am attaching it as a .txt to download, and putting it in this post.

This DOES include info on how to bumpmap and spec map, at the bottom!

--------------------------------------------------------------------------------------------

VtMB MODELS - Everything About Model & Texture Changing
written by Icicle, Jan 26 2017

-----------------------------------------------------------

So you want fresh-looking characters in your VtMB mod?

This takes time, practice, determination, willingness to learn and above all PATIENCE.
An artist's eye and touch wouldn't hurt either, but you can learn that if you apply yourself!
   
0. Pick a model you want to work on.
   If it's a static prop, you will have less difficulty in some ways.
   But if it's a character, you must pick a model that already has qualities
   you want in your new character, and the one that looks visually closest.
   If you want your character to talk, pick a character that can talk.
   Big muscles, pick someone with big muscles.
   Big boobs, pick big boobs.
   More special animations, pick someone with those animations.
   Don't expect to radically alter an existing character's body, it WILL fail.

1. First you need to extract the model.
   Whether you're just making a new texture,
   or editing the model too, you need to do this to get it right.

MODEL EXTRACTION:

-=-=-=-=-=-=-

!!! TOOLS NEEDED:

* VampEd 0.92 - from the Unofficial Patch
  (Get the patch at:
    http://www.patches-scrolls.de/patch/4647/7/74085/download
   VampEd is found in VtMB folder\Patch_Extras\Developer Tools\Model Tools\
   [requires you to install the developer patch extras in Unofficial Patch))
* PackFileExplorer - from the Bloodlines SDK
  (Get the SDK at:
    https://legacy.planetvampire.com/modules/files/view.php?id=823
    )

-=-=-=-=-=-=-
   
Both of these tools require you to navigate to:
  VtMB folder\Vampire\
and then you must expand the .VPK files one by one until you find
exactly what you're looking for.
   
To extract the .mdl of CHARACTERS, use VampEd 0.92.
Why? PackFileExplorer messes up the vertices when it makes the .x,
     so all your hard work changing the model in sculpt/edit mode
     will be lost when you use your character in game.
     They will morph/melt into a monstrous looking thing, unuseable.
In VampEd, click the Menu menu > Set Directory.
     Browse to your VtMB folder\Vampire\ and open a .VPK.
     Expand the models folder in the list.
     If there isn't one, click the drop down list, select the next .VPK,
     and try again.
     Go deeper into models and try to find the one you want.
     If it's not there, try the next .VPK.
     One of them will have it, so look carefully.
     When you find it,
     first right-click the folder the mdl is in,
     and choose Extract files (Binary).
     This extracts the files for your model.
     Next, right-click on the .mdl in the VampEd list,
     and choose Extract Model (D3d.x).
     This makes a .x you can import into Blender,
       as you can't import the .mdl directly,
       but you DO still need the .mdl and associated files.
     You will have to find where VampEd put these files..
     on my system it defaulted to E:\Vampire Extracted\ !
     I don't know why.
     
But for .mdl of PROPS, use PackFileExplorer.
Why? Prop models extracted as .x from VampEd just won't load in Blender.
     Who knows why? Just use PackFileExplorer.
     Run Bloodline SDK as administrator, launch PackFileExplorer from its menu.
     In the top-right corner, navigate to your VtMB folder\Vampire\
     and expand a .VPK in this list.
     Expand the models folder in the list.
     If there isn't one, click the drop down list, select the next .VPK,
     and try again.
     Go deeper into models and try to find the one you want.
     If it's not there, try the next .VPK.
     One of them will have it, so look carefully.
     When you find it,
     first right-click the folder the mdl is in,
     choose Copy,
     navigate to where you want the files to go,
     and choose Paste.
     Now right-click the destination folder again,
     and choose Paste as D3d.x.

2. Now you should have a directory somewhere with
     .x, the .mdl / .phy / .dx7_2bone.vtx / .dx80.vtx files.

     (Sometimes there is no need for .phy, and the .vtx, but if they are there,
      you need them.)
   Also there should be .TGA of all the textures used on the model there too.

3. Now to work with these models, for model editing OR texture editing,
   first you need to open them in old Blender.

   
-=-=-=-=-=-=-

!!! TOOLS NEEDED:

* Blender 2.48 SPECIFICALLY THIS VERSION.
  (Get it here:
    32-bit: http://download.blender.org/release/Blender2.48/blender-2.48-windows.zip
    64-bit: http://download.blender.org/release/Blender2.48/blender-2.48-windows64.zip   
  )
  Before running Blender you also need this version of Python:
* Python 2.5.2 SPECIFICALLY THIS VERSION.
  (Get it here:
    32-bit: https://www.python.org/ftp/python/2.5.2/python-2.5.2.msi
    64-bit: https://www.python.org/ftp/python/2.5.2/python-2.5.2.amd64.msi
  )
* The VtMB Import/Export Scripts OR YOU CAN'T DO ANYTHING WITH VtMB .MDL IN BLENDER.
  https://legacy.planetvampire.com/modules/files/view.php?id=482
  YES THERE ARE OTHER SCRIPTS BY DL LULLU ON PLANETVAMPIRE!
  If you can get them working, go nuts!!!
  But if you want the ease of this guide, do what I'm telling you!
  THESE SCRIPTS ONLY WORK IN THE OLD BLENDER WITH THIS OLD PYTHON!
 
Step 1. Install Blender.
Step 2. Install Python.
Step 3. Put the Import/Export scripts Full_Vamped_import.py and VampEd_mdl.py
        in your Blender folder\.blender\scripts\
-=-=-=-=-=-=-

Start Blender. Before doing anything, you must correct the default scene.
By default Blender loads three objects in your 3D view.
One at a time, right-click one, press the Delete key, and click the button on screen to confirm.
Once they are deleted, choose File > Save Default Settings or press CTRL U.
Now Blender will load an empty scene each time - you need that.

Choose File > Import > Vamp_Ed242(.x)...
Browse with crappy old Blender's file navigator to where your .x is.
Click the .x so it is highlighted.
Then click the Import VampEd.X in the top right corner.

IMMEDIATELY save what you have as a .blend file, at the same directory as your .x.
When you do a Save As to a .blend file, you may need to click Save As twice,
because old Blender is pretty crappy.
Be CAREFUL, old Blender remembers your directory weirdly, so make sure you are in
  the right directory (same as your .x file and not somewhere else).

---
(This current step applicable ONLY if you are making a new .mdl, NOT when duplicating a character's .mdl,
 SKIP IT if duplicating, or if you are only making textures!)
NOW you must TEST to see if the model will even export, or your work will be for nothing!
   To make this blender model become a VtMB model,
   go to File > Export > Bloodlines_mod(.mdlx)...
   Click on the .MDL (not the .x! not the .blend! not a .mdlx!)
   Click the Modifies Bloodlines MDL button in the top right.
   If it screwed up, it will say Error, and the python console will show an error too.
   If it worked, it will say something worked Successfully.
   Not everything will work.
   Try different scripts/combinations of VampEd or PackFileExplorer
     until you get a combo that works for your current desired operation.
   More scripts:
     https://legacy.planetvampire.com/modules/files/view.php?id=820   
     These are "newer", but I have tested them and they don't seem ANY
     better than the existing scripts I have already told you to use.
     But to each his own, so here they are.
   If your export was SUCCESSFUL, you know you can work on this model safely!
---
   
   Here are some Blender shortcuts to make it easier to use:

   MOST IMPORTANT:
   Ctrl+Z - UNDO.
   Ctrl+Y - REDO.
   Z - if you hit Z by accident instead of CTRL-Z, your model might change to white.
       If this happens, just hit Z again (with mouse over the 3D view).
   
   HIDING
   Alt+B - Clip view; after press Alt+B, click and drag your mouse across parts of the model.
       Anything you didn't cover in the box will be hidden temporarily.
       Press Alt+B again to unhide everything you hid.

   MOVING THE OBJECT AROUND
   Hold Mousewheel - rotate the object in 3D view.
   SHIFT + hold Mousewheel - drag 3D view up/down/left/right.
   Scroll Mousewheel - zoom in and out in 3D view.
   SHIFT + scroll Mousewheel - drag 3D view up/down only.
   CTRL + scroll Mousewheel - drag 3D view left/right only.
   SHIFT + ALT + scroll Mousewheel - flip 3D view up/down around the object.
   Numpad 1 - Align 3D view to face you perfectly ('front', but model might not agree).
                    Fixes weird rotations from using the above.
   Numpad 3 - Align 3D view to face you perfectly ('side', but model might not agree).
                    Fixes weird rotations from using the above.
   Numpad 7/9 - Align 3D view to face you perectly ('top', but model might not agree).
                    Fixes weird rotations from using the above.
   Numpad 4 and 6 - Systematic sideways rotation left/right.
                    Use this if after Numpad 1, the object is not facing you the right way.
   Numpad 8 and 2 - Systematic vertical rotation up/down.
                    Use this if after Numpad 1, the object is not facing you the right way.
   Numpad 5 - Correct entire View to Orthographic. This aligns the 3D object's face to perfectly match your view, flat.
              Press again to toggle to User Perspective, and again to go back to Ortho once more.
   
4. Now here is a fork in the road.
   Do you want to edit a model's shape, or do you want to repaint its texture?

   You can only do one at a time.
   If you want to do both, start with the model's shape FIRST before painting.
   Read here for model editing or skip ahead to #5 for texture painting.

   CHANGING THE MODEL'S SHAPE:
   If you want to edit the model's shape, you can do it here right now.
   As you work, SAVE OFTEN to NEW .blend files -
   make DIFFERENT SAVES at each step, so if you screw up, you can recover SOME work.
   
   ---
   The safest way is in Sculpt Mode.
   By Default the middle/bottom bar will have Object Mode in its dropdown selected.
   Click this and choose Sculpt Mode.

   To change the brush size, press F and then drag your mouse around, then click to accept.
   Big brush = more affect when you click, but you can mess things up easier.
               Better for broad changes.
   Small brush = more precise, but more tedious work. Better for small details like in the face.
   To change the brush strength, press Shift-F and then drag your mouse around, then click to accept.
     
   Now by clicking and dragging across the surface of the model, you can make it bulge out.
   By holding SHIFT and clicking and dragging across it, you can make it shrink inwards.
   
   For CHARACTER models:
   DO NOT make drastic changes to models. You will get broken results and have to start over.
   If you move a character's limbs too much, or make them bulge or shrink too much,
   they WILL melt all weirdly in-game and be unusable.
   Also simple animations like rag doll will FAIL so they will just freeze in the air.
   The MOST USEFUL purpose for this is changing FACIAL FEATURES and HAIR,
   but watch out! Changing the character's face too much will mess up their expressions if
   they can talk!
   
   For STATIC PROP models:
   These models don't have animation, so if you mess them up a lot, they shouldn't melt.
   If you make a model that is way too big for its original space, it might be messed up.
   I don't know, but you are safer making radical changes to static props.
   One thing to bear in mind is that the UV map (the way the texture file is wrapped onto the 3D model mesh)
   of the textures used for the static prop, are mapped weird sometimes onto a model.
   So you may find an area you stretched out only uses a tiny portion of a texture's space,
   making the surface seem very pixelated and blurry.
   So once again, don't do anything too drastic!!!!!
   Sometimes, the same part of a texture are mapped multiple times onto multiple parts,
   which we'll discuss later in the Texture Painting section.
   ---
   
   ---
   The most powerful way - though the easiest way to screw up - is in Edit Mode.
   Instead of sculpting the exterior of the model as in Sculpt Mode,
   in Edit Mode you can move vertices (dots) of the model directly.
   
   By Default the middle/bottom bar will have Object Mode in its dropdown selected.
   Click this and choose Edit Mode.

   There are some more hot keys good only for Edit Mode:
   
   SELECTION
   Right-Click - right-click a vertex (a dot in the mesh) to select it.
   SHIFT + Right-Click - add another vertex to your selection.
                         You may need to SHIFT+Right-Click a dot several times,
                         before all the connecting edges between it and other
                         selected vertices become highlighted.
                         If you don't, when you move vertices, edges will be screwed up.
                         Experiment.
   A - Selects All when none selected, or Deselects All when anything is selected.
   
   HIDING (hide things to reduce confusion, and to avoid editing things you don't want to).
   H - Anything Selected will be Hidden.
   Shift+H - Anything Selected will be Unhidden (Hiding deselects, use Alt+H to unhide).
   Alt+H - Unhide Everything.
   
   Okay, so when you select all the Vertices you want to move, and all the proper edges
     are also highlighted in gold, you are ready to move them.
   
   Two ways to do this:
   Use the colored arrows. Click and hold down on the tip of an arrow, and drag your mouse.
   Red Arrow: X dimension.
   Green Arrow: Y dimension.
   Blue Arrow: Z dimension.
   
   But let's say you want really fine tuned manipulation,
     or you want a vertex to be exactly lined up with another
   (DON'T put them at exactly the same spot in all X/Y/Z, only some!)
   For this, you press N.
   A display will pop up with coordinates.
   If you have one vertex, just for that vertex.
   If you have more, it will be a "Median" for ALL of them;
      any shift you make here will affect them ALL the same.
   
   NOTE: EDIT MODE ALLOWS YOU TO ADD OR DELETE VERTICES (DOTS).
         DO NOT DO THIS. The models are compiled to be exactly as they are,
         so if you add or delete vertices, the model will break in-game.
         You have been warned!
   
   That's it! You can edit models.
   Save as a .blend file when you are done.
   Now use the instructions earlier in this file
   to export it to a .mdlx.
   Once it's a .mdlx, you can copy this file and the
   related .phy, .dx7_2bone.vtx, .dx80.vtx files (if there) to your project directory,
   somewhere in your VtMB directory\your project\models\.
   Rename the .mdlx in its new folder to .mdl instead.
   
   Now open up VPKTool in Bloodlines SDK,
-=-=-=-=-=-=-

!!! TOOLS NEEDED:

* VPK Tool. (You'll already have it, because you already have Bloodlines SDK!
             Run Bloodlines SDK as Admin and open it from the list.)

-=-=-=-=-=-=-
  choose the "Model tools" tab at the top.
  Click the Open File button and open your new .mdl.
  Edit the path in the "Model name" field to match your .mdl.
  (The path starts after your project/models/, don't include this part.
   For example custom_models/npc/mynpc/npc.mdl).
   
  IF you aren't just using the original textures (you shouldn't be?), then...
  Change Texture search paths to the textures of your model.
  If you haven't made the textures yet, or you're leaving them the same (?)
   then skip this part for now.
   You will need to edit this .mdl if you make new textures.
  Right-click a path in the list and change it to the right place.
  (These paths will auto-start with your VtMB folder/your project/materials/, don't include this part.)
  For the texture names, you don't need a path,
  but if you changed the name of the textures, you will need to change the names here.
  Use the existing names as a clue as to what goes to what.
  ADVICE: Don't name your texture files very differently from the original!
          If you start with a texture like "female_body" then make yours "mynpc_body".
          Or you will probably get confused!
  Once you are finished, hit the COMMIT ALL CHANGES button.
  It will say it saved it in the tiny log window at the bottom.
  Unless you need new textures, now you can use the model in your map!
  If you need new textures, come back to this part about the VPK Tool later.
  (These instructions will be repeated in #6, so don't worry.)
 
5. TEXTURE PAINTING!
   So you want to make a new look for your model.
   Whether you edited it, or just used an existing model, you want a new look for it.
   Here's how you use PICTURE FILES to paint details onto a model.
   These can be pictures you downloaded, or pictures you made yourself.
   What you DON'T want to do is edit the texture directly in an image editor.
   That is only useful for making tough touch-ups that aren't working out in 3D.
   2D-edited textures usually look BAD because the model stretches the texture over
     the surface of the 3D model.
   The only way to get it to look RIGHT is to paint ONTO THE 3D MODEL.
   
   But you can't paint onto the 3D Model well in old Blender. It sucks.
   If you can figure it out, have fun, but you can't do what I'm about to tell you!
   
   No, for this, you need some tools again.
   
-=-=-=-=-=-=-

!!! TOOLS NEEDED:

* PAINTING WITH PICTURE FILES: Blender 2.67 SPECIFICALLY THIS VERSION.
  (Get it here:
    32-bit: http://download.blender.org/release/Blender2.67/blender-2.67-windows32.zip
    64-bit: http://download.blender.org/release/Blender2.67/blender-2.67-windows64.zip
  )
  Why? This version of Blender has working TEXTURE STENCIL.
       Newer versions have broken Texture Stencil !!!!!!
 
* FOR MORE ADVANCED PAINT BLENDING MODES: Blender 2.78a SPECIFICALLY THIS VERSION.
  (Get it here:
    32-bit: http://download.blender.org/release/Blender2.78/blender-2.78a-windows32.zip
    64-bit: http://download.blender.org/release/Blender2.78/blender-2.78a-windows64.zip
  )
  Why? This version of Blender has more PAINT BLENDING MODES.
       These allow you to repair problems between miscolored pieces of a model,
       such as between head and body texture, without destroying shading details
       in the texture!
       The Blender 2.67 doesn't have nearly as many paint blending modes!

DO NOT INSTALL THESE BLENDER VERSIONS ALL TO THE SAME DIRECTORY.
INSTALL THEM TO DIFFERENT DIRECTORIES.
RENAME THE SHORTCUTS THEY MAKE FOR YOU SO YOU CAN TELL THEM APART.
i.e. Blender 2.48 - Model Editing shortcut
     Blender 2.67 - Texture Stencil shortcut
     Blender 2.78a - Paint Blending shortcut

-=-=-=-=-=-=-

   Since you're good at following instructions,
   you already imported the .x file into old Blender 2.48,
   and saved it as a .blend file.
   Good for you! Now you're ready to texture paint.
   Open new Blender. Skip ahead to PART B if you want to fix existing texture problems,
   like bad color difference between head texture and body texture.
   
   For making new textures, read this part.
   
PART A: TEXTURE STENCIL of pictures to make new textures for models!
   Start Blender 2.67 specifically this version!!!
   Now open your .blend file!!!

   You will see the model now, but it will just be grey, only showing the 3D but not textures.
   First check and see if the model automatically loaded its textures.
   Some do, and some don't.
   
   The drop down on the middle/bottom bar starts at Object Mode.
   Click it and change to Texture Paint.

   Get setup:
   Just below the middle/bottom bar where you switched to Texture Paint is another bar,
     hugging it from below.
   Sometimes, this bar will be at the very bottom of the Blender window instead.
   Click the button on that below bar at the very far left.
   Choose UV/Image Editor.
   
   Does the model look painted like it should already right now? Great.
     In that case, skip this next part to LET'S GET PAINTING!
   
   For models that won't show their textures, getting the textures to appear is easy,
     if you have a guide...
   
   Instead of changing it to Texture Paint, change it to Edit Mode instead.
   
   At the top it will say 2-Model with a button to the left of this text.
     Click the button, and choose 3-Material.

   In the bottom-right of Blender, there is a row of little square buttons,
     each with its own icon.
     If you mouseover them for a second, it shows their name.
     Click the round shaded orange circle with the name Materials.
     
   This changes the side view to a materials list, which you need right now.
     Look at the top of this side view.
     There is a list of materials with generic names,
     Material_1, Material_2, etc.
     These are parts of your model.
     Each part gets a texture applied to it, wrapped around it, in a unique way.
     
   Click on Material_1, and then click the Select button beneath the list.
     Part of the model should become highlighted in orange in the 3D view.
     If you screw up or want to experiment, after clicking Select,
     move the mouse over the 3D view and press A to deselect,
     so you can select another material again.
     Otherwise it will mix your selections, which you don't want.
     
   Now, with the selection in orange on your 3D view,
     go to the bottom pane where you turned it into UV/Image Editor.
     
   First check if your images are already loaded.
     Usually, for models that aren't showing their textures already,
     the images won't be there.
     
   To do this, click the little picture icon button to the left of where it says "+     New" on a dropdown.
     If there are pictures here, select the appropriate picture to wrap over this part of the model.
     Don't worry, if you choose the wrong one, you can just pick it again.
     
   If there are no images listed (which is probably the case),
     choose the Image menu down on this bottom bar > Open Image.
     Choose the .tga of the texture that should match this part of the model.
     If you get it wrong, try again.
     NOTE that once you have loaded an image once, it's already in Blender,
     so you can just pick it from the little picture icon button menu,
     instead of having to go Image > Open again.
   
   To preview what the texture/image looks like on the model,
     switch from Edit Mode to Texture Paint, have a look, then switch back to Edit Mode.
   
   When you find the right picture for this part of the model,
     move your mouse over the 3D view, and press A to deselect all.
   
   Now click on the next Material in the list, such as Material_2,
     and go up to where I said "Click on Material_1" and just repeat this process.
     
   Once you are done going through the Material list,
     your model will have all the textures showing on it!
     
   SAVE YOUR .BLEND FILE HERE! If Blender crashes, or you screw up,
     you'd have to do this all over again! So save!
   
***LET'S GET PAINTING!
   
   First make sure you decide on your images you want to paint onto your model.
   I recommend you edit these images and remove any parts you don't want,
     cutting them out so there is a transparent background around what you DO want.
     Painting an image with a solid color background can be messy and cause problems,
     but it can be done. So this is up to you!
   Overall, .PNG is the best to use for this part, but other images work too,
     like .tga or .jpg for example.
     
   Now, take your images in your image editor and FLIP them horizontally,
     and save them with a slightly different name like "myimage-flipped".
     This gets around a headache with Blender not flipping images for you
     when you need it!
   
   Next we must get these images into blender.
     But first, just make sure the middle bar is set to Texture Paint.
     Makes life easier.
     
   If you haven't done this already:
   At the top it will say 2-Model with a button to the left of this text.
     Click the button, and choose 3-Material.
   
   Now do this:
   In the bottom-right of Blender, there is a row of little square buttons,
     each with its own icon.
     If you mouseover them for a second, it shows their name.
     Click the white and red checkerboard square with the name Textures.
     
   For each image you are bringing into Blender, repeat this step:
     Select the first empty spot in the list above where it says "+    New".
     It might already be selected, just make sure it is.
     Now click on the "+    New" button.
     When you do this, the side view changes below where you clicked.
     Change the Type: from 'Clouds' to 'Image or Movie'.
     Scroll down a bit.
     The section that says Image should be expanded,
       but if it isn't, expand it.
     Click the Open button, browse to your image, and open it.
     Now your image is loaded as a texture.
   Now repeat these steps for each other image you need.
   
   Okay, now Blender knows what pictures you want to paint with,
     and it's time to start painting them.
     
   You probably have three split views open in the top left/center regions of Blender.
   You only really need one.
   In the corner of each split view, is a little corner with lines across it.
   In the right split view of these three,
     left-click on these lines and hold the button down,
   and drag it left - a big arrow should appear over the left split view.
   Release the mouse button, and the right split view will merge over them,
     removing the left view.
   Now that this upper view is sized right, do the same thing with its bottom corner,
     only drag it down over the last split view.
   Do NOT repeat this again over the bottom view. You need your UV/Image Editor at the bottom.
   
   Ok, we got our view to paint in nice and big.
     With mouse over this view, press T.
     This opens Brush options so we can paint.
   
   SAVE YOUR .BLEND FILE HERE.
   All teh changes you have made, all the views you have switched around,
   will be lost if you don't save to a .blend file.
   If you save now, when you load the .blend again, Blender will be exactly as it is now,
   views, textures, images, everything. EXCEPT... (read the following warning)
   
   ***** WARNING *****
   
   Blender does NOT save your painting changes to textures automatically.
   If you save .blend file, it does NOT keep the texture changes.
   If you close Blender, it will NOT complain about changes and ask you to save.
   You will lose EVERYTHING you have done to your texture images,
     if you don't save them yourself.
   
   How do you save them then?
     In the UV/Image editor pane at the bottom of Blender,
     click the little Image button and select the image you want to save.
     You can keep choosing through them until you can see it's the one you want,
     as you'll see your changes on it (though they might look weird - it's a 2D image,
     and if you've been painting in 3D, it wraps so in 2D it looks strange.)
     CLICK IMAGE menu > "Save a Copy", and save it as a DIFFERENT picture file.
     If you save it as the same file as the original, that file will be lost
     so if you screw up and don't have enough Undo to get rid of it,
     you'll have to re-extract the original texture again!
     So just save it as a new name.
     
   SAVE OFTEN. DO NOT FORGET.
   Preferably, save it as a new name each time, so you have a "hard undo" feature of your own making.
   
   ***** END OF WARNING *****
   
   TO PAINT ONTO 3D MODELS (superior method, use this as much as possible):
   
   By default, we can paint with solid colors here, but this sucks.
   Unless you are a fantastic artist with the mouse, and have tons of time,
     you don't want this.
     
   With mouse over the 3D view, press 5 on the Numpad key until the top left corner text on it
     says "User Ortho".
   If the 3D model isn't facing the right direction you need, use the shortcuts I put at the
     top of these instructions to rotate it until it is facing you as you need.
     
   Now in the left-side Brush options, there are some options you need here.
     I will explain them in order, from top to bottom.
   
   1. The brightness slider. This is a vertical bar beside the circle palette of colors.
      You need this slider. Changing it affects how light/dark the image paints onto your model.
     
   2. The radius slider. You don't need to adjust this yourself, because you can just
        press F over the 3D view and adjust your brush size that way.
      But if you want you can click here and edit it, or click, hold and drag to change it.
   
   3. The strength slider. This affects the opacity of your paint job.
      Generally you want to max this out; only in small touches do you want to tone it down.
      So click on it, hold the button down, and slide it to the very right, 1.000 strength.
     
   4. The blend mode dropdown. Generally Mix is what you want, but sometimes you want more brushes.
      The reason you got another version of new blender is because this one doesn't have many blend modes.
      But this one DOES have Texture Stencil (explained soon), which you need.
        (The other newer blender's Texture Stencil is broken and does not function as we need.)
   
   5. The next part we need is under the Texture section.
        It should already be expanded, but if it's not, expand it.
       
   6. Here you will see a much larger version of the Texture icon you already saw before.
      Click on it, and select the first image you want to paint with from the dropdown that appears.
     
   7. MOST IMPORTANT. The Brush Mapping drop down.
      Change to Stencil!
      Now, when you move your mouse over the 3D view, a nice 2D stencil of your image appears.
      You can see through it, and as you move your 3D model around, you can click where the image is,
      and it will be painted onto that surface of the model!
      Shortcut keys for Stencil:
        Right-click on Stencil - hold down and drag the Stencil where you need it to be.
        SHIFT + Right-click on Stencil - Zoom stencil in/out with your mouse while holding the button.
        CTRL + Right-click on Stencil - Rotate stencil clockwise/counterclockwise with your mouse while holding the button.
      If you screw up your Stencil placing and want to reset it,
        just click the Reset Transform button on the left brush options under the Texture section.
       
   8. Overlay. The Alpha slider.
      This controls how opaque or see-through your stencil is.
      Click where it says Alpha: % and hold down, drag the bar until it's how you want it.
     
   OK! Now using these tips, you are all set to paint your images onto your model.

   Oh no! Sometimes painting onto a 3D model just isn't working.
   Maybe the mesh is just really annoying, or maybe it's just not looking how you want.
   Ok, time to try something else, but ONLY when it's necessary!
   
   HOW TO STENCIL ONTO THE 2D IMAGE (inferior method, use superior when possible!):

   Since you have switched to UV/Image Editor at the bottom,
     a new bottom bar has appeared.
   Click the dropdown there that says View, and change it to Paint view.
   
   Any changes you make to the Brush in the upper 3D view will also work down here.
     So you can also stencil directly onto the 2D texture.
     
   Beware! When you do this, look at the 3D model. It wraps weird.
     So this is only useful for very specific things, otherwise it's crap!
     
     
   SAVE! YOUR! EDITED! TEXTURE IMAGE FILES! Image > Save a Copy...
   
   NOTE: About weird drawing!
         Sometimes you draw onto the model, and it draws where you are drawing,
         but ALSO draws somewhere else at the same time!
         This is because different parts of the model share the same part of the texture image!
         You cannot make them different!
         That's just the way the UV map is and you can't change that!
         For example this happens with character model's legs often.
   
   NOTE 2: Some models have a really messed up UV map, their mesh is just crazy.
           One example is Nines Rodriguez's head.
           Try painting on his face with the brush...
           This is one of the cases where 2D might be better, experiment if you run into this.
   
PART B: PAINT BLEND MODES.
   
   (You will need to read parts of A to understand this,
     I just don't want to repeat a huge set of instructions twice.
     This file is already enormous!)
     
   I won't get much into this as it's very simple.
   Instead of all that Texture Stencil stuff I just talked about in Part A,
   what you can do in the other new version of blender,
   is fix up a model using advanced paint blend modes.
   
   This is useful if you download someone else's badly done texture job,
     but there is something you like about the texture so you want to
     "rescue" it from its horrid mediocrity.
     
   Everything I said about the Brush menu that appears when you press T in 3D view applies,
     (except for the Texture part)
     however also consider this:
     
   1. The color wheel palette. Choose a color here. Generally you don't do this.
      Instead, click on the Foreground color (left color) beneath it.
      There is a little Color Dropper tool here you can use to sample a color from your model's texture.
      (SHORTCUT: Just hold S key and left click on texture, don't need to click on the Brush menu.)
      Click on the texture (3D view or 2D view below) where you want to suck the color from.
      Now your current color is that color.
      You will want this to fix problems where two textures meet but the color doesn't match,
        which ends up showing a seam between them on the model. (ugly, amateur looking)
   
   2. Now the major difference between this new Blender and the other new Blender,
      are the Blend Modes.
      Click where it says Blend: and the dropdown says Mix,
      here you can choose a variety of Blend Modes.
     
      I'm not getting into all of them, but the most useful I've found are:
      Color - applies color to target without destroying the shading.
              This is not like Mix, it doesn't just blotch on the color like a paintbrush.
             
      Saturation - after applying Color, you might need this. Experiment.
     
      Darken/Lighten - these are obvious, but they help a lot. Use them for shading problems.
     
      And so forth... you can experiment. 

     
6. So! You have new textures.
   Did you make a new model for these textures?
   Or, are you just reskinning an existing character?
   Or, are you duplicating an existing character?
   These will all be covered in the part after this.
   
   FIRST, let's put our textures into VtMB.
   
   Navigate to your VtMB directory\your project\materials\
   
   Now, either make a folder for your new textures,
     or put them into an existing one.
     
   If you are just reskinning an existing character,
     go to the folder with their existing textures!
     If it doesn't exist, make it.
     If you don't know the path,
       browse to your VtMB directory\SDKContent\VPKContent\materials\
       and find it with a search.
       (You should have extracted the VPKs when running Bloodlines SDK the first time!
        If you didn't, run SDK as admin, scroll down near the bottom of the list and
          choose ReExtract VPK Content.)
   
   When you are in the folder for your textures,
     copy in your texture files.
     If you are only reskinning part of an existing character,
       such as their body but not their head,
       then you only need the body texture.
   
   But if you're making a new model or duplicating an existing model,
     you will need all the textures.
   
   For each .tga file here, right-click > Convert to .ttz/.tth.
     The Bloodlines SDK handles this automatically, and silently.
     
   In a moment, some .ttz/.ttz files will appear with the same names as your .tga.
     They will also have .VMT files.
     If you are just reskinning an existing character, delete these new VMT files,
     and the game will default to the original VMT files, but it will use these
     textures because you're smart enough to name them the same names as the originals, right?
     
   But if you're making a new model, or duplicating an existing model,
     .VMT is a text file you can edit in Notepad.
     You should duplicate the .VMTs of the model you used to make these textures,
     so find it in your VtMB Folder\SDKContent\VPKContent\materials\
     Open the original .VMTs from there, copy and paste them into your new VMTs.
     Now edit the path of the new VMTs so it is right.
     Pay close attention to how the VMTs are written,
     especially the path and how the filename doesn't need an extension.
     Other than that, don't change anything for now,
       unless you know what you are doing.
       
   There! Your textures are ready.
   If you are just reskinning an existing character,
     your texture names should be identical to the original ones in VPKContent\materials\
     and you can open the game and the VtMB character you reskinned will now look how you made it look.
     
   But if you're making a new model or duplicating a character just with a new look,
     you need to edit the .mdl file.
     
   If you made a new model, you already followed my instructions to move the .mdl into your
     VtMB folder\your project\models\ somewhere.
   
   If you're duplicating an existing model without changing it and saving it to .mdlx,
     copy that model's files from the original into your project's /models/ folder,
     but put it in your own custom place.
     Don't override the original by putting it in the same place!
     Again, your VtMB folder\your project\models\ somewhere.
         
-=-=-=-=-=-=-

!!! TOOLS NEEDED:

* VPK Tool. (You'll already have it, because you already have Bloodlines SDK!
             Run Bloodlines SDK as Admin and open it from the list.)

-=-=-=-=-=-=-
  choose the "Model tools" tab at the top.
  Click the Open File button and open your new .mdl.
  Edit the path in the "Model name" field to match your .mdl.
  (The path starts after your project/models/, don't include this part.
   For example custom_models/npc/mynpc/npc.mdl).
  Change Texture search paths to the textures of your model,
    in your VtMB directory\your project\textures\, wherever you put the .ttz/.tth/.vmt files.
  If you're leaving them the same (?) skip this part, don't change the texture search paths/names.
  So right-click a path in the list and change it to the right place.
  (These paths will auto-start with your VtMB folder/your project/materials/, so don't include this part.)
  For the texture names, you don't need a path,
  but if you changed the name of the textures, you will need to change the names here.
  Use the existing names as a clue as to what goes to what.
  ADVICE: Don't name your texture files very differently from the original!
          If you start with a texture like "female_body" then make yours "mynpc_body".
          Or you will probably get confused!
  Once you are finished, hit the COMMIT ALL CHANGES button.
  It will say it saved it in the tiny log window at the bottom.

7. DRUM ROLL!
   Now, if you followed my steps EXACTLY and didn't screw up,
   open Hammer, make an NPC or edit an existing one,
   open its properties with Alt+Enter, choose Model from the left list,
   and browse to your new .mdl file!
   
   If you did it all right, when you click Apply, your new model will be there,
   waiting to be compiled into the map and available in your VtMB game!
   
   If you messed up the .mdl editing in VPKTool somehow, such as the paths, it will be broken and not appear at all. So open it again, fix the info, and save over it.
   
   If the model still won't load, make sure you included all .vtx and .phy files that were unpacked with the original model. These MUST have the same filename as the .mdl too!
   
   If you messed up the .VMT for the textures, your model will be there, but it will have pink/black checkers all over the parts that couldn't load their texture. So go back and fix your .VMTs! If that isn't the problem, you probably misspelled the texture names in VPK Tool when editing the .mdl.

   
   
   
   
8. MORE THINGS YOU CAN DO TO IMPROVE YOUR TEXTURES.

DO YOU WANT BUMPMAPPING ON YOUR TEXTURE?
Bumpmapping adds more detail, it's an illusion but it really makes things look cooler.

If you only want to add SHINE, but not a bump map, skip below to the SPECMAP ONLY section!




HOW TO BUMPMAP

Ready your texture for mapping through Bloodlines SDK in Windows file explorer:
1. Choose your texture, right-click the .ttz and convert it to .tga.

First we create the normal map...

Normal/bump map through https://www.gimp.org/downloads/ GIMP 2.8 free image editor: (<< this creates the bumps on your model)
2. Open the .tga in GIMP.
3. Choose menu Filter > Map > Normalmap.
4. Click the 3D Preview button and, as you adjust settings, keep rotating the square to get an idea of how your texture is going to pop up when rendered in-game.
5. Select from the Filter drop down, try them all until you see one that looks best...it can vary depending on the image.
6. Minimum Z: min 0 max 1.0, this is the lowest height on your normal map (increasing this seems to make things pop less, useful if the bumps are good but seem to pop out too much).
7. Scale: min -100 max 100, changes the overall direction of bump and how strong the results are. Results vary depending on the filter you used. In general it also changes how high/low things get. Adjust it up and down and observe the results, pick what looks good.
8. Conversion: Sometimes you won't use this, but using it changes how the normal map is made by targeting different groups of pixels, such as by their color for example. If your normal map seems too crazy or you only want to isolate certain details of the image this can be useful.
9. (only for map textures, not for models): Wrap. Check this and it will pattern seamlessly.
10. (only if your normal map seems to be upside down): Invert X/Y. Check this to flip the map.
11. Click OK.
12. Gimp considers RGB 127,127,255 flat, but Source engine considers 128,128,255 as flat. So to adjust our image do the following:
12a. There should only be one layer. Make sure it is selected in the Layers list.
12b. Now click the Channels tab above the layer. Hold CTRL and click the blue channel so it is DESELECTED. Every other channel should be selected now except for blue.
12c. Choose menu Colors > Color Balance.
12d. Leave the settings on "Midtones" and adjust the Red and Green values both to 1, but leave Blue at 0.
13. If you want to edit your normal map, you can remove any bumps/divets you don't want by choosing the Brush tool (hotkey P). Set the hardness to 100 (you don't have to but it's easier to clean up stuff if you do). Now make sure the color is set to RGB 128,128,255... draw over anything you don't like. To quickly and easily change your brush size, use the [ and ] keys.
14. For safekeeping, Export this image as a .tga. (CTRL-Shift-E.) After you click Export, make sure the RLE Compression checkbox is UNCHECKED. You don't want compression. Then just click Export again.

Second we create the specular map or "envmapmask"...

Spec/env map through https://www.gimp.org/downloads/ GIMP 2.8 free image editor: (<< this creates the shininess on your model)
15. Open the original .tga file of your texture again (not the normal map you just made).
16. Choose menu Colors > Desaturate.
17. Choose Lightness, Luminosity, or Average ... it previews it for you. Note, black is not shiny, white is totally shiny, and grey is in-between (depending on its brightness). So if your image isn't mostly black, pretty much everything is going to look shiny (usually this is bad).
18. Choose the brush tool again, set your color to black (RGB 0 0 0, make sure). Now paint over anything you don't want to be shiny until all those areas are black. To quickly and easily change your brush size, use the [ and ] keys. If you're having trouble with the darkness causing lack of detail in the image, open the original .TGA file, Select All (CTRL-A), Copy (CTRL-C), switch back to your greyscale image and choose menu Edit > Paste As > New Layer. Now go over to the layers in list in the right, click on the new layer you just pasted in (it will have color in it), then move the opacity slider down (50% should be OK, but put it as you like). Now make sure you click back on the layer of your greyscale image so it is selected (that's the one it will draw into when you are using the brush tool). This way, you'll be able to see your original colored texture as a ghostly transparent image over top your grayscale, but you'll only be painting on the grayscale. Helps a ton...
19. Optional but helpful: You can use Brightness/Contrast to make things shinier or duller, but if you already have black areas you probably don't want to change them.
19a.  Choose menu Select > By Color (Shift-O). In the left side, make sure Threshhold is 0 (you can set it higher but you probably shouldn't). Now click on a black part (truly black, as in RGB 0 0 0). Now all the black parts should be selected.
19b. Choose menu Select > Invert (CTRL-I). Now everything except the black parts will be selected.
19c. Choose menu Colors > Brightness-Contrast, tweak the brightness/contrast until you have things as you like.
20. Now look at your surfaces. For example a character's coat. For consistency and a good look, you should make the shininess the same over the whole coat. If you don't, only parts of it will shine the most, and the rest will shine less. Would you buy a coat that was half shiny and half dull? I don't think so bub. So press O (the shortcut key for Color Picker Tool) and choose a shade of gray you will use for the whole coat in this case. Now choose brush tool again and paint over the coat carefully. Start with the edges and make sure it doesn't bleed into anything else that isn't supposed to shine etc. To quickly and easily change your brush size, use the [ and ] keys. Hardness 100 is also good here, anything less will leave artifacts in its wake. Once you have those tricky edges painted over, just increase your brush size and zip around the inner parts filling them in.
21. You should have a fairly black image with areas that are smeared with grey and maybe white for anything super lustrous and shiny. This is good. You don't need lots of detail in an envmask.
22. If you made an extra layer using the original texture as a guide, click on that layer, then right-click it and Delete it.
23. For safekeeping, Export this image as a .tga (CTRL-Shift-E.) After you click Export, make sure the RLE Compression checkbox is UNCHECKED. You don't want compression. Then just click Export again.

Third we must combine our normal map and specular/envmapmask images into a single image file, like so:

Combined normal/bump map and env/spec map in one image through https://www.gimp.org/downloads/ GIMP 2.8 free image editor:
24. Now open up your Normal map .tga again, select it all (CTRL-A) and copy it (CTRL-C), and paste it into a new image. (CTRL-Shift-V.)
25. Go to the layers list on the right side again. Click on your layer (should only be one) so it is selected, then right-click it and choose Add Layer Mask. It doesn't matter what you choose in this list because we're going to paste over it, so just click the Add button.
26. By default this creates a layer mask and selects it, you'll notice the thumbnail for your layer has gotten smaller and a new thumbnail is beside it that looks solid white or black. It may be hard to notice but the new white/black part is also selected automatically, and has a white border around it. Leave this as it is. (Just click on it if you deselected it, make sure it has the white border.)
27. Now click on the Channels tab above the layers again.
28. Click the eyeball symbols beside Red Green and Blue so they disappear. You only want to have the eyeball beside Alpha channel showing.
29. Now open your Spec/env map .tga up, select all (CTRL-A), copy (CTRL-C).
30. Go back to the new image we are working on, and paste (CTRL-V). The alpha channel should change immediately. You will see a ghostly transparent image of your env/spec map.
31. Now you can click where the eyeballs of Red/Green/Blue are to bring them back. Notice your normal map image in this file is now also ghostly and transparent. Good!
32. Go back to the Layers list. You will see a Floating Selection listed above your only Layer. Right click this Floating Selection and choose Anchor Layer. The Floating Selection will disappear, as it has now merged with your only Layer.
33. Export this image as a .tga (CTRL-Shift-E) - make sure it is named the same as the original texture but with "_normal" at the end of its name. For example if you used "tor0female.ttz/tth/vmt" as your texture then your normal/env map texture file should be "tor0female_normal.tga".  After you click Export, make sure the RLE Compression checkbox is UNCHECKED. You don't want compression. Then just click Export again.

Lastly we need some finishing touches so our maps will affect their texture in-game:

Finish creating your normal/env mapped texture through Bloodlines SDK in Windows file explorer:
34. Now go to the .tga file you just saved.
35. This new file needs to be paired with the texture you started with to be used in-game. If it's not in the place where it's going to be used in-game, move it there now. (For example, if it's a character put it in /VtMB Folder/YourProjectDir/materials/models/character/npc/blahblahwherever/).
36. Right-click the .tga and use the Bloodlines SDK to convert it to .ttz. This also generates a .VMT file - good, we need that.
37. Now you have the original texture in this folder, and your new map texture you just created.
38. Right-click the original texture's .VMT file and edit it in Notepad (or whatever you use).
39. Though you may make adjusments to this template in some cases, in general it needs to be like this:
VertexLitGeneric
{
   "$basetexture"   "models\character\pc\female\toreador\armor0\torf0body"
   "$bumpmap"   "models\character\pc\female\toreador\armor0\torf0body_normal"
   "$envmap"   "env_cubemap"
   "$normalmapalphaenvmapmask" "1"
   (optional>>) "$envmaptint" "[0.2 0.2 0.2]" (changes how shiny it is by tinting the shine darkly, or with color; values are 0 completely black/shut off, to 1.0, completely white/turned on, if you put [1.0 0 0] for example you'd have completely red shine, this is RGB.)
}
(Obviously change the path/filename to your texture from my example.)
40. Save and exit.
41. Now right-click your new texture (the _normal one)'s .VMT file and edit it too:
VertexLitGeneric
{
   "$basetexture"  "models/character/pc/female/toreador/armor0/torf0body_normal"
   "$normalmapalphaenvmapmask" "1"
}
(Obviously change the path/filename to your texture from my example.)
42. Save and exit.
43. You'll need a .mdl that references this texture to see it in-game. If you're just changing something already in the game, then it should work right now. If you are making something new, you'll need to make changes to a copy of a .mdl and point it to this file (outside the scope of this tutorial).
44. Now your model in-game should look shiny in places that are well lit, also if you look closely there should be areas that seem to pop out (or stick in) better thanks to the normal map.

NOTE: If your bumpmapping doesn't seem to work in VtMB, it might be because Wesp recently started disabling Bumpmapping in his Unofficial Patch. He has his own reasons for that, but it does NOT need to be off, as it doesn't reduce performance, and it makes the game look a whole lot better on anything that has its bumpmapping done! (Not much does since Troika rushed to release this game, but still! It's better on.) If you don't see a bumpmapping option in your Video options, go into your VtMB folder/<your project folder, or if not that then Unofficial_Patch>/resource/ and open the file "optionssubvideo.res" in Notepad. The second section in the file is titled "Bumpmapping". Change the "visible" to "1" and the "enabled" to "1". There, once you run the game again, you have bumpmapping!

All done.




HOW TO SPECMAP

Ready your texture for mapping through Bloodlines SDK in Windows file explorer:
1. Choose your texture, right-click the .ttz and convert it to .tga.

Now we create the specular map or "envmapmask"...

Spec/env map through https://www.gimp.org/downloads/ GIMP 2.8 free image editor: (<< this creates the shininess on your model)
2. Open the original .tga file of your texture again (not the normal map you just made).
3. Choose menu Colors > Desaturate.
4. Choose Lightness, Luminosity, or Average ... it previews it for you. Note, black is not shiny, white is totally shiny, and grey is in-between (depending on its brightness). So if your image isn't mostly black, pretty much everything is going to look shiny (usually this is bad).
5. Choose the brush tool (hotkey P), set your color to black (RGB 0 0 0, make sure). Now paint over anything you don't want to be shiny until all those areas are black. To quickly and easily change your brush size, use the [ and ] keys. If you're having trouble with the darkness causing lack of detail in the image, open the original .TGA file, Select All (CTRL-A), Copy (CTRL-C), switch back to your greyscale image and choose menu Edit > Paste As > New Layer. Now go over to the layers in list in the right, click on the new layer you just pasted in (it will have color in it), then move the opacity slider down (50% should be OK, but put it as you like). Now make sure you click back on the layer of your greyscale image so it is selected (that's the one it will draw into when you are using the brush tool). This way, you'll be able to see your original colored texture as a ghostly transparent image over top your grayscale, but you'll only be painting on the grayscale. Helps a ton...
6. Optional but helpful: You can use Brightness/Contrast to make things shinier or duller, but if you already have black areas you probably don't want to change them.
6a.  Choose menu Select > By Color (Shift-O). In the left side, make sure Threshhold is 0 (you can set it higher but you probably shouldn't). Now click on a black part (truly black, as in RGB 0 0 0). Now all the black parts should be selected.
6b. Choose menu Select > Invert (CTRL-I). Now everything except the black parts will be selected.
6c. Choose menu Colors > Brightness-Contrast, tweak the brightness/contrast until you have things as you like.
7. Now look at your surfaces. For example a character's coat. For consistency and a good look, you should make the shininess the same over the whole coat. If you don't, only parts of it will shine the most, and the rest will shine less. Would you buy a coat that was half shiny and half dull? I don't think so bub. So press O (the shortcut key for Color Picker Tool) and choose a shade of gray you will use for the whole coat in this case. Now choose brush tool again and paint over the coat carefully. Start with the edges and make sure it doesn't bleed into anything else that isn't supposed to shine etc. To quickly and easily change your brush size, use the [ and ] keys. Hardness 100 is also good here, anything less will leave artifacts in its wake. Once you have those tricky edges painted over, just increase your brush size and zip around the inner parts filling them in.
8. You should have a fairly black image with areas that are smeared with grey and maybe white for anything super lustrous and shiny. This is good. You don't need lots of detail in an envmask.
9. If you made an extra layer using the original texture as a guide, click on that layer, then right-click it and Delete it.
10. For safekeeping, Export this image as a .tga (CTRL-Shift-E.) After you click Export, make sure the RLE Compression checkbox is UNCHECKED. You don't want compression. Then just click Export again.

Lastly we need some finishing touches so our spec map will affect its texture in-game:

Finish creating your env mapped texture through Bloodlines SDK in Windows file explorer:
11. Now go to the .tga file you just saved. Make sure its name matches the texture you are pairing it with, with _ref on the end of the filename.
12. This new file needs to be paired with the texture you started with to be used in-game. If it's not in the place where it's going to be used in-game, move it there now. (For example, if it's a character put it in /VtMB Folder/YourProjectDir/materials/models/character/npc/blahblahwherever/).
13. Right-click the .tga and use the Bloodlines SDK to convert it to .ttz. This also generates a .VMT file; we don't need one for _ref, so delete it.
14. Now you have the original texture in this folder, and your new _ref texture you just created.
15. Right-click the original texture's .VMT file and edit it in Notepad (or whatever you use).
16. Though you may make adjusments to this template in some cases, in general it needs to have this:
(ADD THESE LINES INTO THE VMT, DON'T REPLACE THE EXISTING LINES WITH THESE)
   "$envmap" "env_cubemap"
   "$envmapmask" "yourmaterialfolder/yourmaterial_ref"
   (optional>>) "$envmaptint" "[0.2 0.2 0.2]" (changes how shiny it is by tinting the shine darkly, or with color; values are 0 completely black/shut off, to 1.0, completely white/turned on, if you put [1.0 0 0] for example you'd have completely red shine, this is RGB.)
(Obviously change the path/filename to your texture from my example.)
17. Save and exit.
18. You'll need a .mdl that references this texture to see it in-game. If you're just changing something already in the game, then it should work right now. If you are making something new, you'll need to make changes to a copy of a .mdl and point it to this file (outside the scope of this tutorial).
19. Now your model in-game should look shiny in places that are well lit!

All done.



THIS CONCLUDES HOW TO DO STUFF WITH VtMB MODELS!
« Last Edit: January 30, 2017, 07:55:33 AM by Icicle »

Offline Icicle

  • Methuselah
  • ****
  • Posts: 461
  • Reputation: +19/-3
Re: VtMB Models - Everything About Model & Texture Changing
« Reply #1 on: January 26, 2017, 10:17:05 AM »
Made a couple corrections to the end of this post/file in the bumpmap/envmap parts, reuploaded the file as a new attachment

Offline Wesp5

  • Administratrix
  • Antediluvian
  • *****
  • Posts: 6675
  • Reputation: +886/-28
  • Unofficial Patcher
Re: VtMB Models - Everything About Model & Texture Changing
« Reply #2 on: January 26, 2017, 01:38:18 PM »
Maybe you should consider attaching your modding infos to Dheu's modding guide which is included in the Patch_Extras folder?

Offline Icicle

  • Methuselah
  • ****
  • Posts: 461
  • Reputation: +19/-3
Re: VtMB Models - Everything About Model & Texture Changing
« Reply #3 on: January 26, 2017, 04:21:06 PM »
Yeah the thing is, if I touch that guide, I'd start touching up all the areas that are lacking and/or need updating cuz of the tools Psycho-A recently released...

ahhhhhhhhhhhhhhh...............

I dunno, I just wrote this damn thing and it's 1000 lines so.

I got mod work to do right now.

Offline Signothorn

  • Administratrix
  • Antediluvian
  • *****
  • Posts: 15192
  • Reputation: +1149/-3
Re: VtMB Models - Everything About Model & Texture Changing
« Reply #4 on: January 26, 2017, 04:27:48 PM »
I promoted it on our fb and twitter pages

Offline Icicle

  • Methuselah
  • ****
  • Posts: 461
  • Reputation: +19/-3
Re: VtMB Models - Everything About Model & Texture Changing
« Reply #5 on: January 30, 2017, 02:49:55 AM »
Updated with some missing critical pointers about .vtx and .phy, whole process could fail for someone without knowing this. Also fixed a couple typos.

Reuploaded the .txt attachment too, see original post

Offline DiamondBorne

  • Ancillus
  • ***
  • Posts: 125
  • Reputation: +14/-12
Re: VtMB Models - Everything About Model & Texture Changing
« Reply #6 on: January 30, 2017, 07:33:19 AM »
Great guide!  :smile:

Offline Icicle

  • Methuselah
  • ****
  • Posts: 461
  • Reputation: +19/-3
Re: VtMB Models - Everything About Model & Texture Changing
« Reply #7 on: January 30, 2017, 07:58:45 AM »
SIGH, ok well this is called "Everything About" so it sort of does need to have all the info.

Post changed and attachment re-uploaded AGAIN, see original post. Sorry! I don't think this needs any more changes.

I changed:
1. Added warning about not adding/deleting vertices (dots) in Blender.
2. Added Brush tool hotkey for Gimp.
3. Added instructions on how to re-enable bumpmapping in VtMB if it appears to be off.
4. Fixed a bad line in the Spec map section - before I changed it for Specmap-only, it was a paste of the bumpmap section so it was talking about bumpmapping stuff, removed.
« Last Edit: January 30, 2017, 08:24:15 AM by Icicle »

Offline Wesp5

  • Administratrix
  • Antediluvian
  • *****
  • Posts: 6675
  • Reputation: +886/-28
  • Unofficial Patcher
Re: VtMB Models - Everything About Model & Texture Changing
« Reply #8 on: January 30, 2017, 09:04:46 AM »
Post changed and attachment re-uploaded AGAIN, see original post.

Would you mind if I included that with the UP in the Model Tools folder?

Offline Icicle

  • Methuselah
  • ****
  • Posts: 461
  • Reputation: +19/-3
Re: VtMB Models - Everything About Model & Texture Changing
« Reply #9 on: January 30, 2017, 09:23:59 AM »
Post changed and attachment re-uploaded AGAIN, see original post.

Would you mind if I included that with the UP in the Model Tools folder?

go right ahead :)

Offline Wesp5

  • Administratrix
  • Antediluvian
  • *****
  • Posts: 6675
  • Reputation: +886/-28
  • Unofficial Patcher
Re: VtMB Models - Everything About Model & Texture Changing
« Reply #10 on: January 30, 2017, 03:07:02 PM »
Post changed and attachment re-uploaded AGAIN, see original post.

Would you mind if I included that with the UP in the Model Tools folder?

go right ahead :)

Thanks!

Offline Icicle

  • Methuselah
  • ****
  • Posts: 461
  • Reputation: +19/-3
Re: VtMB Models - Everything About Model & Texture Changing
« Reply #11 on: February 01, 2017, 08:31:49 AM »
Well, no script I've tried can export ANY prop model from Blender.

I did some tests a while back, and I thought something worked, but tonight I'm hunting for signs I can edit - and nothing will export.

I can't get any props to export, which means no new props.

That DDLullu guy never replied to the message I sent him weeks ago, he's dead here I think...

Wish someone could get ahold of him, get him to fix his scripts and make some that work properly. He released some back in 2015, which don't seem to be any better than the ones he put out in ~2005 or 2006...

I mean it's nice I can export characters, sure, but this still kind of sucks since you could do more with static props (since it avoids the vertices-causing-melting issue in animated models like characters).

He also wrote a script that can export to "VampEd .x" as he put it, but I tested it and it makes .x that are significantly smaller .x files than the ones VampEd generates, and if you try to re-import them as a test they fail, so I have no idea why he would write something like that.

His scripts completely fail to import any props from VampEd, and the props imported from PackFileExplorer just won't export - Python error, console whines like this every time:

Quote
filename1:  e:\Vampire Extracted\models\scenery\signs\confession02x.mdl

modifying MDL...
vert mdl:   2005
vertice:    2005
addr vert:  1824
Traceback (most recent call last):
  File "C:\Blender248\.blender\scripts\VampEd_mdl.py", line 184, in my_callback
    xexport.Export()
  File "C:\Blender248\.blender\scripts\VampEd_mdl.py", line 148, in Export
    data = struct.unpack('<3BB4h3f3f2f',temp_data)
  File "C:\Python25\Lib\struct.py", line 87, in unpack
    return o.unpack(s)
struct.error: unpack requires a string argument of length 44
(This is from extracting the Confession sign -> importing the .x -> immediately trying to export as .mdlx ... no changes were made to it)

I am an experienced programmer (not my job, just something I've done for many years from home) so I could look into modifying the script...I already started converting them for use with new Blender but never continued with it since I was more interested in moding. This would require learning how the .x format works, and that depends on there being reliable documentation about it. I mean, if it were Direct3D's .x format, why is there a special script for VtMB models .x to import with? Something must be different but what? And where would I find this out?

For knowing how the import part works, I'd have to understand the .x. The .x is a text file, inside I see a comment in the FileVersion part saying "Created With XFile IO Library Copyright (c) 2004 - 2008 By Dave Gaunt.".  So I could look up this Dave Gaunt guy's .x stuff, might be useful, unless the .x for VtMB have something different and they just used his work and modified it.  I don't have any information to work with, is my problem, so this will be like searching for a needle in a very large haystack.

For the export .mdl part, I'd have to know if there are any differences with VtMB .mdl files and other kinds of .mdl files from other things. Since DDLullu's scripts are broken, I could only guess what the heck is going on. Especially since his script doesn't make new .mdl files, it just rewrites parts of the existing .mdl file. So even less info to go off of, even if I reverse engineer what his script is doing. .MDL is not a text file, so reading its contents would have to be done in Hex, and it's format specific so there's no way I can understand whatever is in there on my own.

Like if I had to guess, from that error, the string he's feeding it <3BB4h3f3f2f is too short, or temp_data is a string and that's too short, since the following errors complain about a string argument being below length 44...

But I'd rather track this guy down and just get him to fix what he has done. I don't care about using old Blender for model editing, that's fine.

Anyone have some ideas? Any info? Any contacts to share? Anything. I am prepared to do some work here but read the above, I need more info.
« Last Edit: February 01, 2017, 09:09:05 AM by Icicle »

Offline Wesp5

  • Administratrix
  • Antediluvian
  • *****
  • Posts: 6675
  • Reputation: +886/-28
  • Unofficial Patcher
Re: VtMB Models - Everything About Model & Texture Changing
« Reply #12 on: February 01, 2017, 09:16:48 AM »
If DLLullu can't be reached, you might want to try to contact Lenuska on the ModDB where she has her Bloodlines Arsenal mod. She is the best Bloodlines modeler we have right now and maybe she knows some other tricks...

Offline Icicle

  • Methuselah
  • ****
  • Posts: 461
  • Reputation: +19/-3
Re: VtMB Models - Everything About Model & Texture Changing
« Reply #13 on: February 01, 2017, 09:27:32 AM »
If DLLullu can't be reached, you might want to try to contact Lenuska on the ModDB where she has her Bloodlines Arsenal mod. She is the best Bloodlines modeler we have right now and maybe she knows some other tricks...

Yeah, good idea, I've been talking to her already but didn't think to ask her about this issue yet. Just sent her a message...

Offline Icicle

  • Methuselah
  • ****
  • Posts: 461
  • Reputation: +19/-3
Re: VtMB Models - Everything About Model & Texture Changing
« Reply #14 on: February 04, 2017, 10:01:37 AM »
Ok, some models do work, and even when exported with VampEd. It's really random what works and what doesn't, have to test things out.

Export with VampEd, import, if it works, try exporting immediately, it does, great, you can edit the model, if you can't, you can still use the imported model for editing texture skins by saving it as a .blend file for new Blender.

If VampEd's .x won't import then resort to PackFileExplorer, but that hasn't given me much luck yet really. And if I'm not mistaken, PackFileExplorer doesn't automatically extract the .phy and .vtx files, which you need, so I usually always export with VampEd first and then if I need to, overwrite any files PackFileExplorer exports into the same dir that VampEd put them...
« Last Edit: February 04, 2017, 10:06:58 AM by Icicle »

 

SimplePortal 2.3.7 © 2008-2020, SimplePortal