![3D Mesh Trails for Gamemaker: LemonTrail [BETA]](https://img.itch.zone/aW1nLzIwNDU2MjcyLnBuZw==/original/xsCzd%2B.png)
3D Mesh Trails for Gamemaker: LemonTrail [BETA]
A downloadable asset pack
Introducing:
LemonTrail for GameMaker [BETA]
LemonTrail is a versatile system for creating dynamic and satisfying trail effects in your GameMaker projects, originally created for an upcoming Anime SHMUP from LemonToast games. With LemonTrail, you can define shapes manually through code, or in Blender with a custom extension, and render them easily. This asset is perfect for adding motion trails, VFX elements, and more to your games.
Works great with FoxyOfJungle’s Post Processing FX! (available on itch as well)
Features
- Easy Trail Creation: Create and manage trail shapes with customizable parameters easily.
- Realistic Inertial Physics: Implement realistic motion with spawning forces, momentum, and constant external forces (like gravity).
- Animation Curve Profiles: Utilize animation curves to shape the profile of your trails.
- Efficient Rendering: Optimized performance with efficient vertex buffer management. (to be improved in a future update)
- Import from Blender: Seamlessly Export trail data from Blender into Gamemaker in seconds.
How to Use
ATTENTION:
In order to use this asset, you must add the following local package to your game or LemonTrail will not function!
https://github.com/blueburncz/GMD3D11
Creating A LemonTrail
To create a new trail:
var myTrail = new LemonTrail(_age, _initial_force_vector, _initial_force_strength, _quad_interval);
Creating LemonTrail Shapes
Create shapes using the createShape
function inside of your trail. This allows you to define the radius, number of points, color, and the animation curve to use for the profile of your trail:
var shape = myTrail.createShape(radius, num_points, _color, _animCurve);
Updating and Drawing LemonTrail
Update the positions of the shapes and draw them using the updateTrail
and drawTrail
functions respectively:
Updating the Trail
// Update the trail
myTrail.updateTrail();
Drawing the Trail
// Draw the trail, Call this after setting the world matrix
myTrail.drawTrail(_tex, _shader);
Importing LemonTrail Data
Import LemonTrail data from a file using the LemonTrail_import
method. This method parses the JSON data and creates shapes accordingly:
// Import LemonTrail data from a file
var shapes = LemonTrail_import(myTrail, _file_path, _color, _animCurve);
With Blender, you can attach several trails to a single mesh!
LemonTrail Blender Extension
This included extension (lemontrail_exporter.zip) allows you to build and export custom LemonTrail data from mesh objects in Blender.
Installation
To install the LemonTrail Exporter extension:
- extract the LemontrailPackage.zip and find the file "lemontrail_exporter.zip".
- Open Blender and go to
Edit > Preferences
. - In the Preferences window, go to the
Add-ons
tab. - Click the V arrow in the top right, then
Install From Disk...
and select thelemontrail_exporter.zip file
.
Using the Extension
Once the LemonTrail Exporter extension is installed and enabled, you can access its features from the 3D Viewport.
1. Invert Radius
This is useful for instances where you want your trail's normals to face inwards instead of outwards, for various effeccts. To invert the selected vertices:
- Select the mesh object you want to modify.
- Enter Edit Mode by pressing
Tab,
- Select your desired faces.
- Go to the
LemonTrail
tab in the 3D Viewport sidebar. - Click
Invert On
to invert the radius of the selected vertices. - If you need to revert the inversion, click
Invert Off
.
2. Set and Clear Trail
To set an edge to be a trail spawner:
- Select the mesh object you want to modify.
- Enter Edit Mode by pressing
Tab
. - Select your desired faces.
- Go to the
LemonTrail
tab in the 3D Viewport sidebar. - Click
Set Trail
to mark the selected vertices for trail spawning. - Click
Clear Trail
to remove it.
3. Toggle Invert Preview
To toggle the visibility of the InvertRadius vertices:
- Select the mesh object you want to modify.
- Go to the
LemonTrail
tab in the 3D Viewport sidebar. - Click
Toggle Invert Preview
to preview which vertices are set to inverted. They will show up red. - Control Tab to exit this mode. (this will be improved in the future)
4. Export LemonTrail
To export the selected mesh trails for use in Gamemaker:
- Select the mesh object(s) you want to export. You can select multiple at a time.
- Go to the
LemonTrail
tab in the 3D Viewport sidebar. - Click
Export LemonTrail
. - Choose the file location and name, then click
Export
.
5. Controlling your profile
To control how your trail spawns, you need to define custom "normals". Rather than try to explain it to you, I'll show you the simplest way.
The blue edges are trail spawners, each of the lines coming off of it control the normal, and the length that the adjacent vertices will adhere to when creating the trail.
I'll go over this in more detail very soon, but a good rule of thumb is to extrude your edges, then merge them into the center. This will give you a clean, fully closing mesh trail.
Support
If you encounter any issues or have questions, please don't hesitate to comment below or reach out to me directly.
Published | 2 days ago |
Status | In development |
Category | Assets |
Author | LemonToast Games |
Tags | 3D, Effects, FPS, GameMaker, Shaders |
Purchase
In order to download this asset pack you must purchase it at or above the minimum price of $14.99 USD. You will get access to the following files:
Leave a comment
Log in with itch.io to leave a comment.