Trailmesh vfx demo

With the latest improvements to trailmesh class, you can now make vfx trails with shader in the PG.

There are params from the shader not exposed in the gui, you get the idea. You should be able to build a similar one for sword slashes. Hope it helps, enjoy!

26 Likes

OMG! You can do that with the trail mesh :astonished: This is huge!

1 Like

It would be nice to have the link to the PG :slight_smile:

This is so cool !!! please doc doc doc :slight_smile: I want to try :slight_smile:

1 Like

The demo is using proprietary textures, so no saved pg. Plus I just barely started.

Initially I used whatever was in the texture library (a saved pg would have been best), unfortunately it looked horrible. Give me urls to CC0 trail textures + noise tex for erosion and I can update the doc. Even better if someone from core team has it, no need to bloat the repo uploading a full vfx texture set.

1 Like

for the noise you can use Procedural textures: Babylon.js docs

Otherwise I have a perlin laying around here: https://raw.githubusercontent.com/BarthPaleologue/CosmosJourneyer/main/src/asset/perlin.png

Probably not. Done some googling on vfx trails.


Does this work?

CC0 from here: Material Maker

Oh yeah, you are right! One texture less then, booyah!

Heh, no. That would have worked for 2d spritesheets with particle systems. For uv trickery, vfx textures are usually manually authored as grayscale 256x256/power of 2 textures with alphas. Black and white doesn’t even cut it. Some pipelines go up to 5 layer textures just for trails, not counting the bells and whistles. The demo uses 1 texture in a 2 layer shader which I think is sufficiently entry-level.

1 Like

could you provide a link to an image that fulfills all the requirements? I have a hard time visualizing this description of the texture.

Maybe there is a way to make a shader to generate it procedurally as well, which would solve the CC0 issue :thinking:

You can search on yt? I got it on the first hit with vfx trails hand painted textures. Scrub thru and you can see how its done. To get the blending to work in bjs, the texture should preferably be png with alpha, not black and white.

That looks so cool! A simple PG would be really nice, I was looking for a solution like this.

I made this small shadertoy to generate trail vfx textures:

I will send you a sample with an alpha channel so that you can get the blending working :wink:

1 Like

There you go @phaselock

Here is the associated playground for anyone that wants to tweaks the settings:

Here is an improved version without the mirorring artefact:

Hey, this is how your trail will look and its good!

trail_procedural

You can go ahead and submit a PR to add the texture to the Playground? The png is 2048, you can resize it down to 256x256 or 512x512. I’m not sure about the doc, @sebavan, which section under textures should this belong to? Opacity?

Time for me to hit the sack, cheers! :slight_smile:

2 Likes

Looking good! Here is the associated PR:

1 Like

The texture has been added to the assets but we still can’t use it in the PG right now :thinking:

This texture is hosted by the assets server:

1 Like

@phaselock I think there is nothing blocking you from sharing your awesome playground now :wink: I am eager to see it!

1 Like

So am I!! :eyes: