Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

World being reweaven animation tests - #2594

#2594
Draft
manuq wants to merge 6 commits into
mainendlessm/threadbare:mainfrom
world-reweavenendlessm/threadbare:world-reweavenCopy head branch name to clipboard
Draft

World being reweaven animation tests#2594
manuq wants to merge 6 commits into
mainendlessm/threadbare:mainfrom
world-reweavenendlessm/threadbare:world-reweavenCopy head branch name to clipboard

Conversation

@manuq

@manuq manuq commented Jul 24, 2026

Copy link
Copy Markdown
Collaborator

This is achieved with a couple effects:

  • Two layers, the broken world and the fixed world.
  • A shader that makes the fixed world layer appear using a textile pattern and with a "burn" effect.
  • Sparkle particles as it appears.
  • Modulate on water and clouds.
  • Camera shaker.
  • AnimationPlayer to control all of it.

For the sparkles, I reused the assets done by learners for collecting buttons.
I did this with existing assets. I realized that we lack assets for craating a "broken world". The tiles with tears are not enough, and they can't be used in borders. No animated tiles or props can be used, because everything feels so alive (I had to duplicate the foam and rocks just to slow down the animation). I made the broken world gray with a shader too.

I used clouds from tiny-swords to improve the composition. To avoid empty areas with a plane color (water).

I didn't spend too much time on the shader. At the current state it is a bit inflexible: the textile texture doesn't scale with the camera zoom, and it doesn't follow the camera (a cutscene with camera movement won't be possible). Also the effect depends on the size of the CanvasItem to which it's applied. So centering the radial effect, for instance, is done by updating the texture.

These visual effects would really welcome sound effects!

Helps #2547

@github-actions

Copy link
Copy Markdown

Play this branch at https://play.threadbare.game/branches/endlessm/world-reweaven/.

(This launches the game from the start, not directly at the change(s) in this pull request.)

@felixwalberg

Copy link
Copy Markdown
Contributor

This looks super cool! I like how the transition is not bound by 64x64 tiles, if that makes sense. So that, in situations where you have something like a rock, sheep, or other decoration that is not square, it can still smoothly reveal it.

Having the before and after views use separate tilemaps could even allow us to incorporate the swapping ability that the lore jam introduced. I don't know how this fares in a "live" scene with the player moving around and dynamically updating the before/after.

I am going to have to spend some time learning about shaders before I totally understand how this works and can give more helpful feedback... but this is great.

@manuq

manuq commented Jul 24, 2026

Copy link
Copy Markdown
Collaborator Author

@manuq

manuq commented Jul 24, 2026

Copy link
Copy Markdown
Collaborator Author

Thanks for your feedback @felixwalberg !

This looks super cool! I like how the transition is not bound by 64x64 tiles, if that makes sense. So that, in situations where you have something like a rock, sheep, or other decoration that is not square, it can still smoothly reveal it.

Yeah, I understand what you mean by not being bound to tiles.

Having the before and after views use separate tilemaps could even allow us to incorporate the swapping ability that the lore jam introduced. I don't know how this fares in a "live" scene with the player moving around and dynamically updating the before/after.

True! I haven't thought consciously about that, but certainly that effect of Team 11 might have been in the back of my mind! And it was probably done in a similar way.

@wjt

wjt commented Jul 27, 2026

Copy link
Copy Markdown
Member

I haven't looked at the implementation at all but, visually, I love it.

@wjt wjt left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I like the design of having two completely independent branches of the scene tree. Your examples show clearly why it is needed, rather than having some special knowledge of each prop that might need to be restored with a shader on each one or something.

I guess the downside is that it involves keeping two copies of the level in sync. An interesting exercise would be to try replacing the (bad!) animation in the void runner with this. (Doesn't block this cutscene work though!)

uniform float burn_size : hint_range(0.0, 1.0) = 0.15;
uniform vec4 burn_color : source_color = vec4(1.0, 1.0, 0.58, 1.0);

uniform float fabric_scale : hint_range(0.0, 10.0) = 4.0;

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was surprised that making this number bigger made the fabric effect in the burn smaller - it's the inverse of what I expected. (Not a problem as such, just a documentation thing.)

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah I actually been experimenting so far, I didn't care much about the code. This is a parameter I made for scaling the texture for now, because it is in screen coordinates, but it should be in world coordinates, should zoom with the camera/viewport. Right now is not:

image

Comment on lines +37 to +41
// Sample the main texture color of the node
vec4 main_color = textureLod(screen_texture, SCREEN_UV, 0.0);
if (main_color.a > 0.0001) {
main_color.rgb /= main_color.a;
}

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Interesting, I see that this (and render_mode unshaded) comes directly from the CanvasGroup documentation.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes! Otherwise I wouldn't be able to apply the shader to the CanvasGroup.

@manuq

manuq commented Jul 27, 2026

Copy link
Copy Markdown
Collaborator Author

I like the design of having two completely independent branches of the scene tree. Your examples show clearly why it is needed, rather than having some special knowledge of each prop that might need to be restored with a shader on each one or something.

I guess the downside is that it involves keeping two copies of the level in sync. An interesting exercise would be to try replacing the (bad!) animation in the void runner with this. (Doesn't block this cutscene work though!)

Yes honestly I focused on this as a cutscene. And because we don't have enough "sad world broken" assets, I had to fake a lot, making the "broken world" grayscale, unanimated, etc. I definitely see the downside, adding an effect like this to the world can be a lot of setup. So yes, next I will need to see how would this work for actual playable levels, and for #2282.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

Morty Proxy This is a proxified and sanitized view of the page, visit original site.