They do not calculate the same thing. When x and y are the distances on x-axis and y-axis, then:
distance is sqrt(x*x + y*y)
distance squared is just x*x + y*y, without calculating the square root, which is obviously faster.
Sometimes you need the actual distance. Then you cannot skip the square root calculation and you have to use the distance_to() function.
But when you are just comparing two distances, it doesn’t matter whether you compare the actual distance, or just the “squared” distance x*x + y*y.
1 Like
Ah. I’m sorry for missing this bit.
opened 11:51AM - 04 Jul 26 UTC
See:
https://forum.godotengine.org/t/scalable-vector-shapes-2d-on-discord/13798… 5/19?u=renevanderark
The more issues raised, the better it gets.
2 Likes
Updated Ballpark roadmap :
implement leaner version of DynamicOutline2D with a toggle to stop merging the outlines: still very useful to draw behind solids
finish rigging + drawing video (“Rigoberto”), include a recording of the new DynamicOutline2D mode and publish
record testimonial video and YouTube short with all your contributions in it
Rationale
I have decided that, even though my SVSPolygonCacher will improve performance significantly (see profiler results below), it will not do as a general purpose plugin feature because it’s not that easy to use and it does not fit enough generalizable use cases.
In stead, when I find time and energy (and an actual demand), I will add another example scene so anyone interested can get the code this way. I will leave the draft pull request with the code open as well, just in case anyone finds this and is interested:
master ← 317-optimize-animations-by-recording-polygon-shapes-in-a-cache
opened 09:16PM - 02 Jul 26 UTC
Profiler results
Release 2.26.1 - SubViewport Support
Is being reviewed for the asset library and -store. This release finally solves a long standing issue so you can now create and edit shapes inside a transformed SubViewportContainer > SubViewport .
This makes it a lot easier to do fun stuff like this (animated curve as ViewportTexture on your 3D mesh):
Get it early on github.
1 Like
New in 2.27.0, add and reverse a Path2D.
Try it out early from github:
2 Likes
Also Coming up this Summer
This summer Jacques (pron.: “Syaahk”) finds himself lost in a beautiful forest!
Forest Art from: 2d Platformer Forest Kit | OpenGameArt.org
CC by 4.0 Licensed to ArtByte | OpenGameArt.org
A new update containing all the new features
Current progress..
flip buttons (2.17)
glue map (2.17)
basic antialiased lines (2.18)
merge points (2.19)
double click on shape to subdivide (2.20)
alt+click on line segment to subdivide (2.20)
the pencil tool! (2.21)
the brush tool! (2.21)
width curve editor (2.23)
ScalableVectorShape2D.fill_color sets the polygon color on multiple selected shapes at the same time (2.23)
Skeleton rigging deform curve (2.24)
Rigging entire shape (2.24)
Inkscape label attribute over id attribute (2.24)
DynamicOutline2D (2.25)
Subviewport Support (2.26)
Managable Path2D node (2.27)
Work in Progress
Youtube Short
What did you make with Scalable Vector Shapes 2D?
This weekend I started my work on the testimonials people were so kind to share with me. At first I wanted to put them all in one big video, but I decided it’d be better to do a separate one for each.
First up: A Relaxing Island by Lodugh
Check out their work at https://lodugh.itch.io
More testimonials coming up!
Next up: Captain Dasia and the Viper’s Bane Boss
Make sure you try out this high paced NES-style godot game by Cubellia:
And learn how they used Scalable Vector Shapes 2D to animate the boss!
Three more testimonials
2D Active ragdolls by https://www.youtube.com/@nedeey
And some early cartoon work by https://sonicfactory.co.uk
And spring ball by Permotion:
Playt it here: Spring Ball by Permotion
This may become a thing… I’m averaging 4 releases per week.
Actual:
Expected:
1 Like
I have tried following your guide for curves but end-up with multicolored leaf
the sprite sheet baked as white long rectangle.
Short video what I did
Errors from Output:
ERROR: servers/rendering/renderer_rd/storage_rd/texture_storage.cpp:1884 - Parameter "tex" is null.
ERROR: Attempting to use an uninitialized RID
ERROR: Texture dimensions exceed device maximum.
ERROR: servers/rendering/renderer_rd/storage_rd/texture_storage.cpp:967 - Parameter "t" is null.
ERROR: Texture dimensions exceed device maximum.
ERROR: servers/rendering/renderer_rd/storage_rd/texture_storage.cpp:1042 - Condition "texture.rd_texture.is_null()" is true.
Yes, there is a maximum size to raster textures you can use in godot
If you scale it down a lot, or reduce the frame rate, or make a shorter animation, it may fit.
Making sprite sheets is not the main feature I wanted to build, though.
I made a new ticket to fix it:
opened 05:53AM - 12 Aug 26 UTC
enhancement
Because there is a maximum size Godot sets to raster images, the sprite sheet ex… porter should:
- [ ] start a new row when exceeding max width
- [ ] start a new image when exceeding maximum height
1 Like
Those are the colors of a CollisionPolygon2D, which you can turn off.
Apparently you have generating collision with Area2D turned on in the draw settings .
1 Like
I thought that wouldn’t get baked to frames.
Will try walk through a bit more tutorials to get use it.
Good one.If you use the eye toggle to hide them they shouldn’t. But I will add that as an extra check to the Github issue.
1 Like
Coming Soon!
This knife tool wil cut up all your precious polygons and beautiful béziers.
1 Like
Release 2.32.0 - early access on github
As you can read in this screenshot I was forced to master git revert last night, which is actually really cool.
This release brings back, after being purged yesterday:
knife tool
extract curve from Polygon2D, CollisionPolygon2D or Line2D
undo/redo bugfixes while dragging
pencil tool bugfixes
extrusion direction for strokes (inward, middle, outward)
I will ship this release to the asset store and asset library a.s.a.p.
1 Like
Release 2.33.0 - Early access on github
Finally! With release 2.33.0 you can import SVG files as godot nodes programmatically in your own gdscript runtime.
That’ll pack your shipped game a lot more tightly.
Report bugs here !!
1 Like
In the works, hot reloads for svg imports:
Must be my lucky day. This video is 7.777 kB:
Who would like to review the draft pull request ?
1 Like