SourceOps: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
m (Added displacement export cause that's a thing now)
(Updated wiki to be up to date with v0.5.1.6)
Line 25: Line 25:


'''Panel 1: Games'''
'''Panel 1: Games'''
# Add a '''Display Name''' to your game. This isn't necessary for any element, but it is there to make it easier for you to organize. You select the game you wish to export to.
# Add a '''Display Name''' to your game. The only purpose it serves it to make it easier for you to organize. You select the game you wish to export to.
# Add the '''Gameinfo path'''. This should point to the "gameinfo.txt" file from the game you wish to export to. ''Example: <code>C:\Program Files\Steam\steamapps\common\Counter-Strike Global Offensive\csgo\gameinfo.txt</code>''
# Add the '''Gameinfo path'''. This should point to the "gameinfo.txt" file for the game you wish to export to. ''Example: <code>C:\Program Files\Steam\steamapps\common\Counter-Strike Global Offensive\csgo\gameinfo.txt</code>''
# If you wish to save a copy of your compiled model somewhere else, you can add an '''Additional path'''.
# If you wish to save a copy of your compiled model somewhere else, you can add an '''Additional path'''.
# "Maps Path" is the path to the folder where you save your maps. ''Example: <code>C:\Program Files\Steam\steamapps\common\Counter-Strike Global Offensive\sdk_content\maps</code>''


'''Panel 2: Models'''
'''Panel 2: Models'''
# '''Display Name''' will not be the name of your model. You can add as many as you want. Select the one you want to compile.
# '''Display Name''' will not be the name of your model. Select the one you want to compile.
# '''Model Name''' is both the path and the name for your model. This is the path from the root\models folder for the game. Anything after the last "\" in the path will be the name of your model. ''Example: <code>props\de_inferno\arch_stones02</code>''. In this case, the name of the model will be "arch_stones02".
# '''Model Name''' is both the path and the name for your model. This is the path from the root\models folder for the game. Anything after the last "\" in the path will be the name of your model. ''Example: <code>props\de_inferno\arch_stones02</code>''. In this case, the name of the model will be "arch_stones02".
# The '''Reference''' is the visible model. You put everything you want to be visible into one collection in Blender. That's the collection you put into '''Reference'''.
# The '''Reference''' is the visible model. You put everything you want to be visible into one collection in Blender. That's the collection you put into '''Reference'''.
# '''Collision''' is what it sounds like. It's the model that is solid to the player, this model has to be shaded smooth. There can't be any concave parts to it. If you wish to use a concave shape, you can do that by separating the model into parts and as long as all of the parts are in the same collection it will combine them into one collision-model when you compile.
# '''Collision''' is what it sounds like. It's the model that is solid to the player, this model has to be shaded smooth. There can't be any concave parts to it. If you wish to use a concave shape, you can do that by separating the model into parts and, as long as all of the parts are in the same collection it will combine them into one collision-model when you compile.


'''Panel 3: Model Options'''
'''Panel 3: Model Options'''
# Give your model a '''surface prop''' by selecting one from the dropdown list. If you set it to wood it's going to leave decals for wood when you shoot it, and bullets will travel through it easier than if it was concrete. It will also sound like wood if you interact with it.
# Give your model a '''Surface Property''' by selecting one from the dropdown list. If you set it to wood it's going to leave decals for wood when you shoot it, and bullets will travel through it easier than if it was for example concrete. It will also sound like wood if you interact with it.
# '''Model scale''' is how much you want to scale the model. 1m in Blender is 1unit in Source, so as long as you make it the right scale for the getgo you don't need to change this.
# If you don't intend to use your model in any dynamic way (animation for example) make your model a '''Static Prop'''
# If you don't intend to animate your model, use '''Static Prop'''
# '''Model Scale''' is how much you want to scale the model. 1m in Blender is 1unit in Source, so as long as you make it the right scale for the getgo you don't need to change this.
# '''Has glass''' makes source use improved depth sorting. This should be used if your model has transparent materials.
# '''Has Glass''' makes source use improved depth sorting. This should be used if your model has transparent materials.
# '''Material Folder'''
## '''Display Name''' is ones again just to make it easier for you to keep track of the different materials. You select the one you want to use.
## '''Folder Path''' is the path to the folder that contains the materials you used for your models, the .vmt has to be ''VertexLitGeneric''. The path is from the root\materials folder for the game. ''Example: <code>models\props\de_inferno</code>''
# You also have to assign the name of the .vmt to your model. If the name of your .vmt is "infwllh", you have to set the material name to that in Blender. You can do this in the material tab.


'''Panel 4: Sequence'''
 
# '''Display Name''' is not the name of the animations, but you add one per animation.
'''Panel 4: Material'''
# The '''Sequence Name''' will be the name of the animation.
# The Material '''Folder Path''' is the path to the folder that contains the materials you used for your models. The path is from the root\materials folder for the game. ''Example: <code>models\props\de_inferno</code>''. The .vmt should usually be ''VertexLitGeneric'' or ''UnlitGeneric''.
# '''Start Frame''' is the frame on your timeline where the animation begins.
# You also have to assign the name of the .vmt to your model. If the name of your .vmt is "infwllh", you have to set the material name to that in Blender. You can do this in the material properties.
# '''End Frame''' is the last frame of your animation. This makes it so you can have multiple animations on one timeline.
# If your model is using '''Skins''' you can add them by adding a skin to the list and putting the '''VMT Name''' to the name of the .vmt you want to use. On SourceOps v0.5.1.6 if your model has more than one material per skin you have to write the skins like this: '''<code>vmt01" "vmt02" "vmt03</code>'''
# '''Activity''' is mostly used for view models.
 
'''Panel 5: Sequence'''
# The '''Sequence Name''' will be the name of the sequence.
# By default a sequence will use the global framerate for your blend file. By using '''Framerate Override''' you can manually choose what framerate you want to use.
# '''Start Frame''' is the first frame of your sequence in the timeline.
# '''End Frame''' is the last frame of your sequence. This makes it so you can have multiple sequences on one timeline.
# '''Activity''' is what triggers the sequence. You can read more about it [https://developer.valvesoftware.com/wiki/Category:QC_Commands here].
# If you have multiple sequences with the same activity '''Weight''' tells the game how likely it is to use this one.
# If you have multiple sequences with the same activity '''Weight''' tells the game how likely it is to use this one.
# '''Snap''' instantly starts the sequence from the first keyframe when its called.
# '''Snap''' instantly starts the sequence from the first keyframe when its called.
# '''Loop''' makes a looping sequence look more smooth
# '''Loop''' makes a looping sequence look more smooth.


'''Panel 5: Event'''
'''Panel 6: Event'''
# '''Display Name''' is there for you to keep track of your different events.
# '''Display Name''' is there for you to keep track of your different events.
# '''Event Type''' is what you want to happen when the event is called.
# '''Event Type''' is what you want to happen when the event is called.
# Relative to the start of the sequence, you can set what '''Frame''' you want the event to start at.
# Relative to the start of the sequence, you can set what '''Frame''' you want the event to start at.
# '''Value''' is the value used by the event type. For example what sound to use from the weapon script.
# '''Value''' is the value used by the event type. For example what sound to use from the weapon script.
'''Panel 7: Displacements'''
# The '''Map Name''' is the name of the .vmf file you want to put the displacement in to.
# In '''Collection''' You choose the collection containing the mesh you want to make into a displacement.
# '''Align to grid''' is on by default, turning it off is possible, but not recommended.
# '''Brush Scale''' is how much the brush will be scaled when exported, if set to 128 the displacement will be 128 times bigger in hammer than in Blender
# '''Geometry Scale''' is how much the geometry will be scaled to allow for more convenient modeling.
# '''Lightmap Scale''' is how big you want each lightmap to be. A small value gives you a better result, but it also takes way longer to compile. A lightmap scale of 32 is recommended, but if there are any artifacts on it you can turn it down to 16.
# When you want to export the displacement you press the ''' VMF''' button in the export tab at the bottom. This tab is only visible when you are in the Displacements Panel.


'''Exporting/Compiling'''
'''Exporting/Compiling'''
*When you are ready to export your model, move over to the export section found at the bottom of all the panels. Here there are six different buttons.
*When you are ready to export your model, move over to the export section found at the bottom of all the panels. Here there are six different buttons.
# The first one '''SMD''' simply exports all the different files as .smd files. If you wish to have a look at these files you can find them in ''root/game/modelsrc''. The files are sorted in the same way as your models. For the example model I have been using the path would be ''Counter-Strike Global Offensive\csgo\modelsrc\props\de_inferno''.
# The first one '''SMD''' simply exports all the different files as .smd files. If you wish to have a look at these files you can find them in ''root/game/modelsrc''. The files are sorted in the same way as your models. For the example-model I have been using the path would be ''Counter-Strike Global Offensive\csgo\modelsrc\props\de_inferno''.
# Next one over is '''QC''' this simply generates a .qc file from your previous selections.
# Next one over is '''QC''' this simply generates a .qc file from your previous selections.
# If you wish to preview this file, or manually change it you can open Blender's built-in text editor. After doing that you can press the third button and you able to edit the file as much as you want.
# If you wish to preview this file, or manually change it you can open Blender's built-in text editor. After doing that you can press the third button and you able to edit the file as much as you want.
Line 74: Line 86:
* [https://github.com/bonjorno7/SourceOps SourceOps GitHub]
* [https://github.com/bonjorno7/SourceOps SourceOps GitHub]
* [https://discord.gg/N35zhHm SourceOps Discord]
* [https://discord.gg/N35zhHm SourceOps Discord]
* [https://developer.valvesoftware.com/wiki/Category:QC_Commands QC Commands Page]


[[Category:Blender]][[Category:Modeling]][[Category:Third Party Tools]]
[[Category:Blender]][[Category:Modeling]][[Category:Third Party Tools]]

Revision as of 06:34, 23 April 2020

SourceOps UI

Blender SourceOps allows Blender to export Studiomdl Data and generate QC files.

Features

  • Export SMD files with animation
  • Generate QC files based on parameters
  • Buttons to compile and view models
  • Export multiple objects to one body
  • Export displacements to a VMF

Installation

  1. Install Blender 2.80 or later. Or Install from Steam (AppID: 365670)
  2. Download SourceOps. Don’t unzip.
  3. In Blender:
    1. Select Edit > Preferences
    2. Move to the Add-ons tab
    3. Click Install... at the top-right of the window
    4. Find the downloaded zip file and select it (Double click)
    5. SourceOps should be the only add-on shown if installed correctly. Check the box to the left and wait a moment for activation to complete.

User Guide

Panel 1: Games

  1. Add a Display Name to your game. The only purpose it serves it to make it easier for you to organize. You select the game you wish to export to.
  2. Add the Gameinfo path. This should point to the "gameinfo.txt" file for the game you wish to export to. Example: C:\Program Files\Steam\steamapps\common\Counter-Strike Global Offensive\csgo\gameinfo.txt
  3. If you wish to save a copy of your compiled model somewhere else, you can add an Additional path.
  4. "Maps Path" is the path to the folder where you save your maps. Example: C:\Program Files\Steam\steamapps\common\Counter-Strike Global Offensive\sdk_content\maps

Panel 2: Models

  1. Display Name will not be the name of your model. Select the one you want to compile.
  2. Model Name is both the path and the name for your model. This is the path from the root\models folder for the game. Anything after the last "\" in the path will be the name of your model. Example: props\de_inferno\arch_stones02. In this case, the name of the model will be "arch_stones02".
  3. The Reference is the visible model. You put everything you want to be visible into one collection in Blender. That's the collection you put into Reference.
  4. Collision is what it sounds like. It's the model that is solid to the player, this model has to be shaded smooth. There can't be any concave parts to it. If you wish to use a concave shape, you can do that by separating the model into parts and, as long as all of the parts are in the same collection it will combine them into one collision-model when you compile.

Panel 3: Model Options

  1. Give your model a Surface Property by selecting one from the dropdown list. If you set it to wood it's going to leave decals for wood when you shoot it, and bullets will travel through it easier than if it was for example concrete. It will also sound like wood if you interact with it.
  2. If you don't intend to use your model in any dynamic way (animation for example) make your model a Static Prop
  3. Model Scale is how much you want to scale the model. 1m in Blender is 1unit in Source, so as long as you make it the right scale for the getgo you don't need to change this.
  4. Has Glass makes source use improved depth sorting. This should be used if your model has transparent materials.


Panel 4: Material

  1. The Material Folder Path is the path to the folder that contains the materials you used for your models. The path is from the root\materials folder for the game. Example: models\props\de_inferno. The .vmt should usually be VertexLitGeneric or UnlitGeneric.
  2. You also have to assign the name of the .vmt to your model. If the name of your .vmt is "infwllh", you have to set the material name to that in Blender. You can do this in the material properties.
  3. If your model is using Skins you can add them by adding a skin to the list and putting the VMT Name to the name of the .vmt you want to use. On SourceOps v0.5.1.6 if your model has more than one material per skin you have to write the skins like this: vmt01" "vmt02" "vmt03

Panel 5: Sequence

  1. The Sequence Name will be the name of the sequence.
  2. By default a sequence will use the global framerate for your blend file. By using Framerate Override you can manually choose what framerate you want to use.
  3. Start Frame is the first frame of your sequence in the timeline.
  4. End Frame is the last frame of your sequence. This makes it so you can have multiple sequences on one timeline.
  5. Activity is what triggers the sequence. You can read more about it here.
  6. If you have multiple sequences with the same activity Weight tells the game how likely it is to use this one.
  7. Snap instantly starts the sequence from the first keyframe when its called.
  8. Loop makes a looping sequence look more smooth.

Panel 6: Event

  1. Display Name is there for you to keep track of your different events.
  2. Event Type is what you want to happen when the event is called.
  3. Relative to the start of the sequence, you can set what Frame you want the event to start at.
  4. Value is the value used by the event type. For example what sound to use from the weapon script.

Panel 7: Displacements

  1. The Map Name is the name of the .vmf file you want to put the displacement in to.
  2. In Collection You choose the collection containing the mesh you want to make into a displacement.
  3. Align to grid is on by default, turning it off is possible, but not recommended.
  4. Brush Scale is how much the brush will be scaled when exported, if set to 128 the displacement will be 128 times bigger in hammer than in Blender
  5. Geometry Scale is how much the geometry will be scaled to allow for more convenient modeling.
  6. Lightmap Scale is how big you want each lightmap to be. A small value gives you a better result, but it also takes way longer to compile. A lightmap scale of 32 is recommended, but if there are any artifacts on it you can turn it down to 16.
  7. When you want to export the displacement you press the VMF button in the export tab at the bottom. This tab is only visible when you are in the Displacements Panel.

Exporting/Compiling

  • When you are ready to export your model, move over to the export section found at the bottom of all the panels. Here there are six different buttons.
  1. The first one SMD simply exports all the different files as .smd files. If you wish to have a look at these files you can find them in root/game/modelsrc. The files are sorted in the same way as your models. For the example-model I have been using the path would be Counter-Strike Global Offensive\csgo\modelsrc\props\de_inferno.
  2. Next one over is QC this simply generates a .qc file from your previous selections.
  3. If you wish to preview this file, or manually change it you can open Blender's built-in text editor. After doing that you can press the third button and you able to edit the file as much as you want.
  4. The MDL button is the button you press when you are ready to compile your model. This converts the .smd files using the properties from the .qc file into the model file type using in Source (.mld).
  5. You can preview your model by pressing the Headcrab symbol, this opens the Half-life model viewer.
  6. If the model doesn't load or there is something wrong with it, you can look at the compile log. You open that the same way as you opened the .qc file, but this time you press the last button. If the compile crashed at some point you can find out what caused it by reading there.

Links