From: hgn Date: Tue, 6 Jun 2023 03:41:39 +0000 (+0100) Subject: fixed nan propogation error X-Git-Url: https://skaterift.com/git/?a=commitdiff_plain;h=aed3995840d5472275b7bf143efed7c4f9daa358;p=carveJwlIkooP6JGAAIwe30JlM.git fixed nan propogation error --- diff --git a/camera.h b/camera.h index 6fcd2fc..f028f82 100644 --- a/camera.h +++ b/camera.h @@ -16,8 +16,7 @@ struct camera m4x3f transform, transform_inverse; - struct camera_mtx - { + struct camera_mtx{ m4x4f p, v, pv; @@ -25,7 +24,7 @@ struct camera 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 ) { diff --git a/skeleton.h b/skeleton.h index 79e8017..0529752 100644 --- a/skeleton.h +++ b/skeleton.h @@ -437,6 +437,11 @@ VG_STATIC void skeleton_alloc_from( struct skeleton *skele, 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) diff --git a/web/board_spec.html b/web/board_spec.html deleted file mode 100644 index f86fc77..0000000 --- a/web/board_spec.html +++ /dev/null @@ -1,35 +0,0 @@ - - - - - - - -

Custom board specification

-

Refer to this page if you want to make a completely new board from scratch, - otherwise use the template file.
-
- The board system looks for marker entities. These can be applied using the - entity tab in the skaterift exporter panel.

-

The aliases used for the marker meshes:

-

- board
- truck (x2)
- wheel (x4)
-
- The scale of each part should be 1,1,1, and have no rotation.
- Origins should be correctly placed at the place where the items are joined to - eachother, refer to the diagram for the placement and size. -

- - diff --git a/web/guide.html b/web/guide.html deleted file mode 100644 index 4f1a907..0000000 --- a/web/guide.html +++ /dev/null @@ -1,93 +0,0 @@ - - - - - - - -

Workshop Guide - Custom boards

- -

Installing Blender

-

You can get the latest version of - blender from steam, this guide is for version - 3.4 and above.

- -

Installing exporter addon

-

Skaterift comes with the addon in its game files, we just need to install - it. This addon script gets updated between skaterift versions.
-
- To install, go to [TODO]options > preferences, then to the addons section.
- [TODO] Add image here
- [TODO]Now, select install from file, and browse to the skaterift game - files.
- If you don't know where to find those, you can go into [TODO]steam and - rightclick Skaterift, and browse game files.
- [TODO] Add image here
- Now just search for Skate rift in the addons panel, and enable the addon.
- [TODO] Add image here

-
- -

Configuring the addon

-

Open the [TODO] tools tab by pressing N, and click the SkateRift section -
- Next set the output directory to be the game folder
- [TODO] Add image here

-
- -

Open the template

-

Again in the tools folder, you will find a template .blend file for a - custom board. Open this to get started
- [TODO] Add image here
- An optional step here is to edit the board model, or create one from scratch. -
If you want to do this, take a look at the - detailed board specification for how to set it up. If its your first one, - you probably want to skip this step.

-
- -

Edit the texture

-

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 GNU Gimp, or a similar image editor.
- [TODO] Add image here
- Now you can change the texture on the material to your own file, and see how - it looks in Blender. -

-
- -

Compile the model

-

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.
-
- Now in the Skaterift tab in the viewport, we can compile the model. -

-
- -

Test it out in-game

-

If everything is good, you should be able to visit the board shop and it - will be loaded in there.
- [TODO] add image here -

-
- -

Upload via the Workshop tool

-

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.
- [TODO] Image of setting the path
- From here, just fill in the information like the title and description, and - press submit. -

- - diff --git a/web/workshop/board_spec.html b/web/workshop/board_spec.html new file mode 100644 index 0000000..f86fc77 --- /dev/null +++ b/web/workshop/board_spec.html @@ -0,0 +1,35 @@ + + + + + + + +

Custom board specification

+

Refer to this page if you want to make a completely new board from scratch, + otherwise use the template file.
+
+ The board system looks for marker entities. These can be applied using the + entity tab in the skaterift exporter panel.

+

The aliases used for the marker meshes:

+

+ board
+ truck (x2)
+ wheel (x4)
+
+ The scale of each part should be 1,1,1, and have no rotation.
+ Origins should be correctly placed at the place where the items are joined to + eachother, refer to the diagram for the placement and size. +

+ + diff --git a/web/workshop/custom_board.zip b/web/workshop/custom_board.zip new file mode 100644 index 0000000..a7db977 Binary files /dev/null and b/web/workshop/custom_board.zip differ diff --git a/web/workshop/guide.html b/web/workshop/guide.html new file mode 100644 index 0000000..1dfa39c --- /dev/null +++ b/web/workshop/guide.html @@ -0,0 +1,111 @@ + + + + + + + +

Workshop Guide - Custom boards

+

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 hgodden00@gmail.com for any help.

+ +

0. Things you need

+

- Skaterift content is made using Blender. You can get the latest version + of + Blender from steam, this guide is for version 3.4 and above.
+ - GNU Gimp or similar image editor.
+ - Download the custom_board.zip
+ - An installed copy of Skaterift of course.

+
+ +

1. Installing exporter addon

+

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:
+
+ Go to edit>preferences, and open the addons section.
+
+ Press the install... button at the top right, and browse to the + Skaterift game files. Inside the folder named tools is the script + blender_export.py to install.
+
+ If you don't know where it is, you can go into your Steam Library, and + rightclick Skaterift, selecting Manage>Browse local files.
+
+ Now just search for Skaterift .mdl exporter from the addons list, and enable + it.
+


+ +

2. Configuring the template

+

Firstly, Open the .blend file from the board_template zip.
+
+ Open the side panel in the 3D Viewport, and find the Skaterift tab, and in + that menu, the Export tab
+
+ Export Dir must be set to the game folder, which ends in + /steamapps/common/skaterift/
+ NOTE: the path must have a + / at the end, else things will break.
+
+ Wer're now setup to go, but an optional step here is to create one from + scratch. If you want to do this, take a look at the + detailed board specification for how to set it up. If its your first one, + you probably want to skip this step.

+
+ +

3. Edit the texture

+

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 GNU Gimp, or a similar image + editor.
+ + Now you can change the texture on the material to your own file, and see how + it looks in Blender. + +

+
+ +

4. Compile the model

+

In the Outliner panel in the top right, rename the collection name, + called boards/template/board.mdl. You should replace only the word + template. The collection name is the path it will export the + model, relative to the directory we set earlier.
+
+ Now in the Skaterift Export tab, press Compile This collection. NOTE: + Blender will freeze for a second or so, since the export script has to + compress the texture file.
+

+
+ +

5. Test it out in-game

+

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.
+

+
+ +

6. Upload via the Workshop tool

+

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.
+ +
+ 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. +

+ + diff --git a/web/workshop/guide1.jpg b/web/workshop/guide1.jpg new file mode 100644 index 0000000..acbfc7f Binary files /dev/null and b/web/workshop/guide1.jpg differ diff --git a/web/workshop/guide2.jpg b/web/workshop/guide2.jpg new file mode 100644 index 0000000..4e51f49 Binary files /dev/null and b/web/workshop/guide2.jpg differ diff --git a/web/workshop/guide3.jpg b/web/workshop/guide3.jpg new file mode 100644 index 0000000..06dc2d9 Binary files /dev/null and b/web/workshop/guide3.jpg differ