Advertisement
SnackersLC

Exporter Essentials

Dec 6th, 2020 (edited)
758
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.17 KB | None | 0 0
  1. - START/SAFESPOT coordinates are kinda messed up I don't know why. For now just try to make the beginning of the level start at 0, 0, 0 and don't worry about other respawn points
  2.  
  3. - The camera will always point down (-X, +Y, -Z) so design your level accordingly.
  4.  
  5. - In the images below I have the level extending the opposite direction so it is angled correctly in game
  6. https://imgur.com/a/wut2n3T
  7.  
  8. - In the scene collection, be sure to name BOTH the node and the actual mesh to the proper name. As you can see in the image I've named both the goal's node and mesh to "N:GOAL"
  9. https://imgur.com/a/Ok6p7Co
  10.  
  11. - The ball in game will be exactly 1 blender-unit in diameter. Here I've added a sphere with radius 0.5 units to fill the full square for demonstration purposes.
  12. https://imgur.com/a/xjObHxS
  13.  
  14. - As far as I am aware, the only special tags that work are:
  15.  
  16. "E:LIMIT" - naming an object with this will make it a kill plane
  17.  
  18. "N:GOAL" - naming an object with this will make it trigger the end of the level when touched by the ball
  19.  
  20. "START1-1" - this object doesn't require a mesh and is the location for the ball at the start.
  21.  
  22. "SAFESPOT" - also does not require a mesh and is the location for a respawn point. Required if you don't want the game to freeze when you fall/die. It seems that it just chooses whichever point is closest to the last place you were touching the ground, not counting a landing that breaks your ball.
  23.  
  24. Other names will just act as a regular mesh, there are some other funny tags you can put on the end of a mesh name to make it act different but I haven't experimented with them at all; Inakilbss is a bit more knowledgeable on those.
  25.  
  26. - To export, drop down File -> Export -> glTF 2.0 (this may only work in Blender 2.8+)
  27. https://imgur.com/a/GqFbFnF
  28.  
  29. - Make sure your export properties are set as follows, especially the +Y Up checkbox, otherwise your level wont be oriented correctly in game
  30. https://imgur.com/a/S0rKLev
  31.  
  32. - Next, just convert the exported .gltf file to the HamsterBall .MESHWORLD format using the conversion program posted at the end of this pastebin.
  33.  
  34. • Press "Load Mesh" and select the .gltf file
  35. • Select the ambient light/background colors for the level in game
  36. • Press export and choose where to export to
  37. • After that replace an existing level in the Hamsterball\Levels folder. Probably a good idea to make a backup of this folder so you can always get back the unmodified levels.
  38. • So for example I always replace Level1.MESHWORLD so I can then go into HamsterBall and load up the Warm Up time trial to test it out.
  39.  
  40. Download link for the conversion program -- will be updated periodically, so check back for any news:
  41. https://drive.google.com/file/d/11rpUs61-U7a318tVubk6pseHINRfE51_/view?usp=drivesdk
  42. ^^^ Old conversion program without texture functionality! Download the latest one at the bottom of this PasteBin! ^^^
  43.  
  44. Here is a basic example level with a single kill plane, one floor mesh, 2 respawn points, start point, and a goal mesh:
  45. https://drive.google.com/file/d/11tT5-RGM54pE0CgFsrtaa5xiIpdPo7Gw/view?usp=drivesdk
  46.  
  47. ==NEW EXPORTER==WITH TEXTURES==
  48. Separates .gltf/.glb file into .MESHWORLD and .png textures
  49.  
  50. Export the MeshWorld
  51. 1) Run HamsterMall.exe application
  52. 2) Click Load Mesh button and select the source file .gltf/.glb
  53. 3) Click Export MeshWorld button and output .MESHWORLD file along with textures generated in /textures folder
  54.  
  55. Play the level
  56. 1) Go to your Hamsterball directory C:\Program Files (x86)\Hamsterball
  57. 2) WARNING This will replace your first HB level - Warm Up race and potentially some textures WARNING
  58. 3) Rename your created .MESHWORLD to Level1.MESHWORLD
  59. 4) Copy Level1.MESHWORLD file to C:\Program Files (x86)\Hamsterball\Levels and replace the file
  60. 5) Copy the contents for the newly created /textures folder to C:\Program Files (x86)\Hamsterball\Levels\Textures
  61. 6) Delete the level cache file C:\Program Files (x86)\Hamsterball\Levels\level1.cached
  62.  
  63. https://drive.google.com/file/d/1tdUtnaqfRS6VfXopuh3__xvL2C0Ipm9A/view?usp=sharing
  64.  
  65. DO NOTE THAT HAVING TOO MANY TRIANGLES IN YOUR CUSTOM LEVEL WILL CRASH THE GAME. THE CAP IS THOUGHT TO BE 16384 (ie. 2^14)
  66.  
  67. - Written by Carsillas; Pastebinned by Snackers
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement