World space trail textures

Please use this thread to provide feedback on our world space trail texture feature!

Read about it, and grab the build from World space trail textures

5 Likes

Thanks for making this available!
I will test it out and let you know.

1 Like

Perhaps an idea for optionally making the trail project to a ground surface like decals do?
This way we can use it for car tracks on the road surface.

  • Line Renderer is missing World Space Texture Scale option
  • If Texture Scale has been implemented for the World Space texture mode I strongly believe texture tiling should be implemented for all the other modes as well so that we can adjust tiling without having to make a new material copy and modify texture tiling there
  • Texture Mode is called World Space and yet when I am scaling Line Renderer up/down texture tiling behaves as if it was generated in the local space of Line Renderer. I definitely think this is a good default behaviour but I also would like to see a param which defines how texture tiling behaves when object is scaled, similarly to Scaling Behaviour in the particle system. Should scaling affect positions of points only and keep the world space tiling or should it affect position of points but also keep the relative local space texture tiling, it could be an useful option to have. But it’s a very low priority, at least for me.
  • It’s probably due to it being an early build but line renderer with Loop enabled stretches the texture in some segments

All in all I think this works quite well. True test will come once it’s implemented for the Particle System but I am quite happy with how this early build works. Thanks!

1 Like

Thanks for this feedback I really appreciate it!

I’ve fixed 1,2 and 4. You’re absolutely right that the scaling can work for all modes.

For 3, i’m pondering whether it would be best to rename the new mode to Local Space, to clarify this, because you’re right - this is more accurate based on how it works. We could look at adding scaling options later, but I think that would delay shipping this initial version unnecessarily.

I’ll muse over the name a bit more (opinions welcome!), then get the particle version done and provide a new build.
Plus start some more thorough internal testing.

2 Likes

What if i called the new texture mode “Static”, instead, to mean “Hey it’s not going to move!” ?

1 Like

Just “Static” or “Local Space Static”? I think just “static” sounds as if it was not possible to animate it with a shader or something in that ballpark. World Space Static / Local Space Static might be a bit better?

I was suggesting “Static” it so i could get away from the world space/local space terminology, as it doesn’t seem intuitive, and is imprecise.

I’ll keep thinking. FYI I’m about to publish a new build for testing, and it does have the “Static” rename in it for now.

What about “pinned” or “fixed” ?
or maybe “solid”

1 Like

I’ve uploaded a new build and updated the information in World space trail textures about it.

It’ll take a few minutes for the build to appear publicly though… the link may not work for a bit…

1 Like

Oh God, you don’t even know how excited and grateful I am for adding Texture Scale to the particle system. THANK YOU! It’s such a massive workflow improvement!

Would it be too much of a stretch to have separate U and V texture scale parameters?

As for the Static texture functionality it works exactly as I imagined. I tested how it behaves with scale applied in the Transform and it also does behave as I’d expect. Great job!

2 Likes

Yes U/V separate will give more control, I would welcome this too

You’re welcome :slight_smile:

Yes it should be easy… depending on exactly how it should work :wink:

So right now we just map 0->1 across the line. Let’s say you set a V scale of 2, if i simply multiply that, we would be mapping 0->2 across the texture. And for a V scale of 0.5, we would map 0->0.5. Is it as simple as that?

Or, does it need to scale around the mid-point? I.e. the center of the texture is always the centre of the line. For the above examples, this would result in:
Scale 2: -0.5 → 1.5
Scale 0.5: 0.25 → 0.75

I would say for my use case center is most of the time center of the line.

For example here are some car tracks, I would cut one off them into a square and tile them on the line.

Ideally I would like to have a seperate alpha texture so I can create some variety and break up the texture a bit, but I can also do it in a single texture if I make a long texture that is tilable.


7215343--867361--B9BF5277-608F-4934-80FB-2A988222F6DE.jpeg

1 Like

Centre point makes the most sense for me as well although you know, having actual scale aaand transform (scale and offset) controls can never hurt! But I don’t know anything about cost implications so if this is too much then centre point would be the most reasonable thing to do I believe.

3 Likes

I’ve uploaded a new build here with U and V scaling: https://discussions.unity.com/t/840284

No strong need from my side for you to provide feedback on this - it’s pretty simple, works as you requested, and we are doing our own QA on it too :wink: But it’s there if you want to try it out!

Both good ideas… but I think I gotta close this one out and ship it :slight_smile: Perhaps we will look at adding some additional controls in a future update!

We are pretty close to shipping this - the only bad news is that it will be coming in 2022.1, which I know is a very “far in the future build” compared to what you are probably currently working with! but at least it’s coming :slight_smile:

Thanks for the feedback on this, it’s been super useful!

1 Like

Thanks for updating these tools!
Its been a welcome addition and yes you can ship it and iterate more after shipping.

I know it takes a while to land in a release build so I think it good to have it in there in 22.1 before the new features are locked.

1 Like

@richardkettlewell Thank you so much! Is this feature in the most recent versions of 2021.2 that we can download via the hub?
Thanks!

Hi, I forgot to say which version it landed in!
It’s coming in 2022.1.0a6!

I don’t think we have started public alphas of 2022 yet though.

@richardkettlewell While this is working great on the Trail Renderer system, I’ve tried working with the static trails on particle system trails without any luck. In both 2022.1.0a13 and the specifically mentioned 2021.2.0a20, I seem to get the same behavior as DistributePerSegment. The Texture Scale field also doesn’t seem to affect the scaling, no matter what texture Mode it is set to use.

I’ve attached a gif to illustrate the difference I’m seeing. Perhaps I am setting something up incorrectly?

Edit: I’ve figured out that this is a limitation of the ribbon type particle trail. This seems to function as expected with the particle type trail. If this is the expected/intended behavior you might consider hiding the static option, along with texture scale field when it’s set to the ribbon type?

7637101--951196--Static Particle Trail Issue.gif