-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Credit to @PlayWithFurcifer for the [sprite sheet][1] and [tutorial][2] that formed the basis of this explosion I've made minor tweaks compared to the settings they used in the tutorial, and had to work out how to translate the settings from the Godot 3 `Particles2D` node to the Godot 4 `CPUParticles2D` node. Working our how to add the texture was the trickiest part, but part of the problem there was working out that it wanted an SVG, not a PNG. I believe the Godot 3 `Particles2D` node is more equivalent to the Godot 4 `GPUParticles2D`, but [Godot crashes when trying to use this on a project using the compatibility renderer on macOS][3] [1]: https://github.com/PlayWithFurcifer/godot-particle-systems-guide/blob/main/Explosion_Sheet.png [2]: https://www.youtube.com/watch?v=F1Fyj3Lh_Pc&t=253s [3]: godotengine/godot#72469
- Loading branch information
Showing
4 changed files
with
79 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
[remap] | ||
|
||
importer="texture" | ||
type="CompressedTexture2D" | ||
uid="uid://bc1djcrvyx3dk" | ||
path="res://.godot/imported/explosion_sheet.svg-9bb92ba2f81415d87d1ef9bc9b9091f6.ctex" | ||
metadata={ | ||
"vram_texture": false | ||
} | ||
|
||
[deps] | ||
|
||
source_file="res://assets/images/sprites/explosion_sheet.svg" | ||
dest_files=["res://.godot/imported/explosion_sheet.svg-9bb92ba2f81415d87d1ef9bc9b9091f6.ctex"] | ||
|
||
[params] | ||
|
||
compress/mode=0 | ||
compress/high_quality=false | ||
compress/lossy_quality=0.7 | ||
compress/hdr_compression=1 | ||
compress/normal_map=0 | ||
compress/channel_pack=0 | ||
mipmaps/generate=false | ||
mipmaps/limit=-1 | ||
roughness/mode=0 | ||
roughness/src_normal="" | ||
process/fix_alpha_border=true | ||
process/premult_alpha=false | ||
process/normal_map_invert_y=false | ||
process/hdr_as_srgb=false | ||
process/hdr_clamp_exposure=false | ||
process/size_limit=0 | ||
detect_3d/compress_to=1 | ||
svg/scale=1.0 | ||
editor/scale_with_editor_scale=false | ||
editor/convert_colors_with_editor_theme=false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
[gd_scene load_steps=4 format=3 uid="uid://n3fd71xert8q"] | ||
|
||
[ext_resource type="Texture2D" uid="uid://bc1djcrvyx3dk" path="res://assets/images/sprites/explosion_sheet.svg" id="1_or2ic"] | ||
|
||
[sub_resource type="CanvasItemMaterial" id="CanvasItemMaterial_0noh1"] | ||
particles_animation = true | ||
particles_anim_h_frames = 5 | ||
particles_anim_v_frames = 1 | ||
particles_anim_loop = false | ||
|
||
[sub_resource type="Gradient" id="Gradient_xr1od"] | ||
interpolation_mode = 1 | ||
offsets = PackedFloat32Array(0, 0.0822086, 0.165563, 0.252761, 0.334969, 0.415951, 0.492025, 0.581595, 0.665031, 0.749693, 0.83681, 0.920245, 1) | ||
colors = PackedColorArray(1, 1, 1, 1, 0.937255, 0.607843, 0.737255, 1, 0.847059, 0, 0.0745098, 1, 0.505882, 0.262745, 0.0705882, 1, 0.92549, 0.458824, 0.0784314, 1, 0.988235, 0.823529, 0.0823529, 1, 0.921569, 0.890196, 0.113725, 1, 0.403922, 0.682353, 0.12549, 1, 0.419608, 0.756863, 0.87451, 1, 0.133333, 0.262745, 0.576471, 1, 0.321569, 0.12549, 0.470588, 1, 0.34902, 0.0666667, 0.427451, 1, 0.0862745, 0.0862745, 0.0823529, 1) | ||
|
||
[node name="CPUParticles2D" type="CPUParticles2D"] | ||
material = SubResource("CanvasItemMaterial_0noh1") | ||
lifetime = 0.5 | ||
one_shot = true | ||
speed_scale = 0.5 | ||
explosiveness = 1.0 | ||
lifetime_randomness = 0.5 | ||
texture = ExtResource("1_or2ic") | ||
emission_shape = 1 | ||
emission_sphere_radius = 128.0 | ||
gravity = Vector2(2.08165e-12, -50) | ||
angular_velocity_max = 5.0 | ||
angle_min = -720.0 | ||
angle_max = 720.0 | ||
scale_amount_min = 3.0 | ||
scale_amount_max = 5.0 | ||
color_ramp = SubResource("Gradient_xr1od") | ||
anim_speed_min = 1.0 | ||
anim_speed_max = 1.0 |