m4x3f transform,
transform_inverse;
- struct camera_mtx
- {
+ struct camera_mtx{
m4x4f p,
v,
pv;
mtx,
mtx_prev;
}
-VG_STATIC main_camera, gate_camera;
+static main_camera, gate_camera;
VG_STATIC void camera_lerp_angles( v3f a, v3f b, float t, v3f d )
{
skele->ik = vg_linear_alloc( lin_alloc, ik_size );
skele->final_mtx = vg_linear_alloc( lin_alloc, mtx_size );
skele->anims = vg_linear_alloc( lin_alloc, anim_size );
+
+ memset( skele->bones, 0, bone_size );
+ memset( skele->ik, 0, ik_size );
+ memset( skele->final_mtx, 0, mtx_size );
+ memset( skele->anims, 0, anim_size );
}
VG_STATIC void skeleton_fatal_err(void)
+++ /dev/null
-<!DOCTYPE html>
-<html>
- <head>
- <style type="text/css">
- body{
- margin:40px auto;
- max-width:650px;
- line-height:1.6;
- font-size:18px;
- color:#444;
- padding:0 10px
- }
- h1,h2,h3{line-height:1.2}
- </style>
- </head>
-
- <body>
- <h1>Custom board specification</h1>
- <p>Refer to this page if you want to make a completely new board from scratch,
- otherwise use the template file.<br>
- <br>
- The board system looks for marker entities. These can be applied using the
- entity tab in the skaterift exporter panel.</p>
- <h3>The aliases used for the marker meshes:</h3>
- <p>
- <b>board</b><br>
- <b>truck</b> (x2)<br>
- <b>wheel</b> (x4)<br>
- <br>
- The scale of each part should be 1,1,1, and have no rotation.<br>
- Origins should be correctly placed at the place where the items are joined to
- eachother, refer to the diagram for the placement and size.
- </p>
- </body>
-</html>
+++ /dev/null
-<!DOCTYPE html>
-<html>
- <head>
- <style type="text/css">
- body{
- margin:40px auto;
- max-width:650px;
- line-height:1.6;
- font-size:18px;
- color:#444;
- padding:0 10px
- }
- h1,h2,h3{line-height:1.2}
- </style>
- </head>
-
- <body>
- <h1>Workshop Guide - Custom boards</h1>
-
- <h2>Installing Blender</h2>
- <p>You can get the latest version of
- <a href="link to blender">blender from steam</a>, this guide is for version
- 3.4 and above.</p>
-
- <h2>Installing exporter addon</h2>
- <p>Skaterift comes with the addon in its game files, we just need to install
- it. This addon script gets updated between skaterift versions.<br>
- <br>
- To install, go to [TODO]options > preferences, then to the addons section.<br>
- [TODO] Add image here<br>
- [TODO]Now, select install from file, and browse to the skaterift game
- files.<br>
- If you don't know where to find those, you can go into [TODO]steam and
- rightclick Skaterift, and browse game files.<br>
- [TODO] Add image here<br>
- Now just search for Skate rift in the addons panel, and enable the addon.<br>
- [TODO] Add image here</p>
- <hr>
-
- <h2>Configuring the addon</h2>
- <p>Open the [TODO] tools tab by pressing N, and click the SkateRift section
- <br>
- Next set the output directory to be the game folder<br>
- [TODO] Add image here</p>
- <hr>
-
- <h2>Open the template</h2>
- <p>Again in the tools folder, you will find a template .blend file for a
- custom board. Open this to get started<br>
- [TODO] Add image here<br>
- An optional step here is to edit the board model, or create one from scratch.
- <br>If you want to do this, <a href="board_spec.html">take a look at the
- detailed board specification</a> for how to set it up. If its your first one,
- you probably want to skip this step.</p>
- <hr>
-
- <h2>Edit the texture</h2>
- <p>Next step is to customize the artwork, in the template folder there is a
- texture which you can edit. There is also the original .xcf file which you can
- open using <a href="Link to gimp">GNU Gimp</a>, or a similar image editor.<br>
- [TODO] Add image here</br>
- Now you can change the texture on the material to your own file, and see how
- it looks in Blender.
- </p>
- <hr>
-
- <h2>Compile the model</h2>
- <p>Rename the collection name, called boards/[template]/board.mdl, to
- whatever you would like. The collection name is the path it will export the
- model, relative to the directory we set earlier.<br>
- <br>
- Now in the Skaterift tab in the viewport, we can compile the model.
- </p>
- <hr>
-
- <h2>Test it out in-game</h2>
- <p>If everything is good, you should be able to visit the board shop and it
- will be loaded in there.<br>
- [TODO] add image here
- </p>
- <hr>
-
- <h2>Upload via the Workshop tool</h2>
- <p>From the menu of Skaterift, you can open the
- workshop tool. From here, fill in the folder name which houses the board. This
- is relative to the game folder just like the export tool. You will know its
- correct when you see your board after pressing the load button.<br>
- [TODO] Image of setting the path<br>
- From here, just fill in the information like the title and description, and
- press submit.
- </p>
- </body>
-</html>
--- /dev/null
+<!DOCTYPE html>
+<html>
+ <head>
+ <style type="text/css">
+ body{
+ margin:40px auto;
+ max-width:650px;
+ line-height:1.6;
+ font-size:18px;
+ color:#444;
+ padding:0 10px
+ }
+ h1,h2,h3{line-height:1.2}
+ </style>
+ </head>
+
+ <body>
+ <h1>Custom board specification</h1>
+ <p>Refer to this page if you want to make a completely new board from scratch,
+ otherwise use the template file.<br>
+ <br>
+ The board system looks for marker entities. These can be applied using the
+ entity tab in the skaterift exporter panel.</p>
+ <h3>The aliases used for the marker meshes:</h3>
+ <p>
+ <b>board</b><br>
+ <b>truck</b> (x2)<br>
+ <b>wheel</b> (x4)<br>
+ <br>
+ The scale of each part should be 1,1,1, and have no rotation.<br>
+ Origins should be correctly placed at the place where the items are joined to
+ eachother, refer to the diagram for the placement and size.
+ </p>
+ </body>
+</html>
--- /dev/null
+<!DOCTYPE html>
+<html>
+ <head>
+ <style type="text/css">
+ body{
+ margin:40px auto;
+ max-width:650px;
+ line-height:1.6;
+ font-size:18px;
+ color:#444;
+ padding:0 10px
+ }
+ h1,h2,h3{line-height:1.2}
+ </style>
+ </head>
+
+ <body>
+ <h1>Workshop Guide - Custom boards</h1>
+ <p>This guide covers creating a custom board model using blender and an image
+ editor. Since theres not many of us here at the moment, feel free to contact
+ me at <i>hgodden00@gmail.com</i> for any help.</p>
+
+ <h2>0. Things you need</h2>
+ <p>- Skaterift content is made using Blender. You can get the latest version
+ of <a href="https://store.steampowered.com/app/365670/Blender/">
+ Blender from steam</a>, this guide is for version 3.4 and above.<br>
+ - <a href="https://www.gimp.org/">GNU Gimp</a> or similar image editor.<br>
+ - Download the <a href="custom_board.zip">custom_board.zip</a><br>
+ - An installed copy of Skaterift of course.</p>
+ <hr>
+
+ <h2>1. Installing exporter addon</h2>
+ <p>Skaterift comes with the addon in its game files, we just need to install
+ it. This addon script gets updated between skaterift versions. Here are the
+ steps to install it into Blender:<br>
+ <br>
+ Go to <b>edit>preferences</b>, and open the <b>addons section.</b><br>
+ <br>
+ Press the <b>install...</b> button at the top right, and browse to the
+ Skaterift game files. Inside the folder named <b>tools</b> is the script
+ <b>blender_export.py</b> to install.<br>
+ <br>
+ If you don't know where it is, you can go into your Steam Library, and
+ rightclick Skaterift, selecting <b>Manage>Browse local files.</b><br>
+ <br>
+ Now just search for Skaterift .mdl exporter from the addons list, and enable
+ it.<br>
+ <hr>
+
+ <h2>2. Configuring the template</h2>
+ <p>Firstly, Open the .blend file from the board_template zip.<br>
+ <br>
+ Open the side panel in the 3D Viewport, and find the Skaterift tab, and in
+ that menu, the <b>Export tab</b><br>
+ <br>
+ <b>Export Dir</b> must be set to the game folder, which ends in
+ <i>/steamapps/common/skaterift<b>/</b></i><br>
+ <b>NOTE:</b> the path must have a
+ <b>/</b> at the end, else things will break.<br>
+ <br>
+ Wer're now setup to go, but an optional step here is to create one from
+ scratch. If you want to do this, <a href="board_spec.html">take a look at the
+ detailed board specification</a> for how to set it up. If its your first one,
+ you probably want to skip this step.</p>
+ <hr>
+
+ <h2>3. Edit the texture</h2>
+ <p>Next step is to customize the artwork, in the template folder there is a
+ texture which you can edit. There is also the original .xcf file which you can
+ open using <a href="https://www.gimp.org/">GNU Gimp</a>, or a similar image
+ editor.<br>
+ <img src="guide2.jpg" width="100%"/>
+ Now you can change the texture on the material to your own file, and see how
+ it looks in Blender.
+ <img src="guide1.jpg" width="100%"/>
+ </p>
+ <hr>
+
+ <h2>4. Compile the model</h2>
+ <p>In the <b>Outliner</b> panel in the top right, rename the collection name,
+ called <i>boards/template/board.mdl</i>. You should replace only the word
+ <b></i>template</i></b>. The collection name is the path it will export the
+ model, relative to the directory we set earlier.<br>
+ <br>
+ Now in the Skaterift Export tab, press Compile This collection. <b>NOTE:
+ Blender will freeze for a second or so, since the export script has to
+ compress the texture file.</b><br>
+ </p>
+ <hr>
+
+ <h2>5. Test it out in-game</h2>
+ <p>If everything is good, you should be able to visit the board shop and it
+ will be loaded in there. If not, try reopen it. If still not not, then
+ something broke, and there is no contingency plan here, sorry.<br>
+ </p>
+ <hr>
+
+ <h2>6. Upload via the Workshop tool</h2>
+ <p>From the menu of Skaterift, you can open the
+ workshop tool. From here, fill in the folder name which houses the board. This
+ is relative to the game folder just like the export tool. You will know its
+ correct when you see your board after pressing the load button.<br>
+ <img src="guide3.jpg" width="100%"/>
+ <br>
+ You can customize the preview by dragging around the image, left, right and
+ middle mouse buttons do different controls.
+ From here, just fill in the information like the title and description, and
+ press submit.
+ </p>
+ </body>
+</html>