Whether or not this is possible will be known through research. Particles in the Particle System move at different speeds. In order to transmit different distances to each trail of particles, it seems that the material for each trail is different or if the material is the same, distance information should be transmitted as Custom Data. It's an interesting topic, but I'm so busy these days that I don't have time to research it. The chances of success seem low.
The MoveToTrailUV function is simple enough to be used on mobile platforms, but the Trail is a heavy computation, so using it on mobile should be done with caution.
@@gamedevone When I want to edit the Tiling and offeset propery in the material, at first it work. If I enter 0.2 as a value it work too. But if I just click anywhere else and come back to the material or the trail, the value turn back to default which is one. Worse case : In prefab it won't even allow me to edit it.
@@TheStruckLemon I did what you described in the project on GitHub, but the problem doesn't reproduce. There seems to be something causing the problem. Could you please share your problem in a Unity package?
With further research, I found it is a common bug in Unity and seems it has nothing to do with your shader. Resetting the material simply resolved to issue. Thank you for your quick reply tho.
It seems possible to do physics calculations by applying a Rigidbody to the head of the effect. If you want the tail to do physics calculations, you'll probably need to do a Fluid simulation instead of using a Trail.
@@gamedevone thank you very much for your response. what i am trying to achieve is to get colissions (actually i need the trigger part only) on the whole length of the trail. i have been trying for days but i haven't found any solution and i didn't find anything on google either....
@@Andmos98 Probably looping throght every position of the TrailRenderer and checking if the distance between an X point and the i position of the trail is less than an R Radius is the best solution since TrailRenderer do not support collisions. If your trail is really long and with a low VertexDistance value in order to optimize you could reduce the loop by half and skipping 1 point everytime you loop a TrailPosition and approximate the skipped pos by calculating distance between the current i and i + 1 points. Also do not loop every frame to check collision, try to stick as much as possible as the FixedTimestep from Unity (or higher but never less than FixedTimestep for custom complex collisions like these). Another solution could be to have a shader for the trail that has a DepthOnly pass and making some kind of depthbuffer collision but it could not be perfect as the one above and also in some cases even worse (Idk i should test it). The best and optmized solution (also the complex) for you would probably be to create your own trail renderer from scratch with a set of objects that you want to collide with and then while you update the behaviour of the trail you also check new distances from these objects and call some appropiate events on trigger/on collision. In this case you wouldn't have to loop every frame the positions of the trails since you are already managing them internally.
@@filippoperlini8951 i was thinking to "drop" invisible objects that are connected and add triggers to them or something. i have no idea how to implement this as i only have a few weeks experience with unity
1. Download the project from the GitHub link in the video description. 2. Open the downloaded project in the Unity 3D editor. 3. Export the effect as a Unity package. 4. Import the unity package in your project.
What an amazing trail renderer script! I don't speak the slightest korean but the files and video are pretty easy to follow. Thanks!
정말감사합니다 딱 제가 원하는 개념영상이네요
감사합니다. 좋은 영상 덕에 또 하나 배워갑니다.
와.. 딱 제가 찾던 영상이네요ㅠㅠ 감사합니다
Gracias por compartir el archivo, es una buena forma de practicar y aprender con el proyecto funcionando.Exitos!
It looks awesome!!!
Thank you for this amazing effect. You just won a sub and a like
thx for sharing such awesome trail!!!
한수배우겠습니다.
무료강의를 이렇게 볼 수 있다니.. 감사합니다
Great job!
I'm blown away
Thanks dude!
thank you!
Muy bueno amigo!
캐릭터 움직일때 발자국남기기도 좋겠네요 ㄷㄷ...
Thanks for sharing
Incredible! Does it work in urp?
I remember creating this for Urp.
Hi again. This works like a charm! Do you think it could be achievable with trails applied to particles in the particle system?
Whether or not this is possible will be known through research.
Particles in the Particle System move at different speeds. In order to transmit different distances to each trail of particles, it seems that the material for each trail is different or if the material is the same, distance information should be transmitted as Custom Data.
It's an interesting topic, but I'm so busy these days that I don't have time to research it. The chances of success seem low.
@@gamedevone No problem. I was curious about your answer. Thanks!
Does this technique work with Built-in shaders?
좋은 영상 잘 봤습니다. 이거 상업용으로 써도 괜찮을까요?
네 자유롭게 사용하셔도 됩니다.
@@gamedevone 감사합니다^^
Useful, Tnx
안녕하세요 영상 정말 유용했습니다!! 혹시 urp 파일이 아닌 그냥 unity 파일에서는 나오지 않던데 혹시 해결방법있을까요?
래거시 렌더파이프라인이신가보네요. urp용 셰이더나 애셋을 래거시용으로 포팅하는건 불가능한건 아니지만 손이 좀 많이 갑니다.
@@gamedevone 헉 늦은 시간에 답변 감사합니다ㅜ shader 관련되어서 요즘 공부중인데 관련서적이나 따로 공부법이 있을까요?
요즘은 유튜브 검색하면 이것 저것 자료가 많이 나올거에요. 유니티 코리아 채널에도 좋은 자료들 많더군요.
혹시 이스크립트가 이펙트 시작 시간이랑 종료시간을 따로 설정해줄수 있는 방법이 있을까요??
시작과 종료를 해보진 않았으나, 셰이더와 재질에 오퍼시티 제어 기능을 넣는 방법도 있고, 트레일 컴포넌트에서 트레일 길이를 조정하는 방법도 있을 것 같습니다.
@@gamedevone 답변 감사합니다 업무를 하다보면 생각보다 트레일때문에 업무적 이슈가 많이 생기더라구요 말씀하신 방법으로 한번 연구해보겠습니다 감사합니다.
Ur a god.
Is this viable for a mobile game?what do you think?
The MoveToTrailUV function is simple enough to be used on mobile platforms, but the Trail is a heavy computation, so using it on mobile should be done with caution.
@@gamedevone oh ok.thanks for the quick reply!
The UV Tiling property keep reseting, even if it's not in a prefab. How to prevent this ?
Can you tell me more about when it resets?
@@gamedevone When I want to edit the Tiling and offeset propery in the material, at first it work. If I enter 0.2 as a value it work too. But if I just click anywhere else and come back to the material or the trail, the value turn back to default which is one. Worse case : In prefab it won't even allow me to edit it.
@@TheStruckLemon I did what you described in the project on GitHub, but the problem doesn't reproduce. There seems to be something causing the problem. Could you please share your problem in a Unity package?
With further research, I found it is a common bug in Unity and seems it has nothing to do with your shader. Resetting the material simply resolved to issue. Thank you for your quick reply tho.
@@TheStruckLemon I'm glad you found the cause of the problem.:)
Hello! they are amazing. do you know if i could add collisions to these ?
It seems possible to do physics calculations by applying a Rigidbody to the head of the effect. If you want the tail to do physics calculations, you'll probably need to do a Fluid simulation instead of using a Trail.
@@gamedevone thank you very much for your response. what i am trying to achieve is to get colissions (actually i need the trigger part only) on the whole length of the trail. i have been trying for days but i haven't found any solution and i didn't find anything on google either....
@@Andmos98 Probably looping throght every position of the TrailRenderer and checking if the distance between an X point and the i position of the trail is less than an R Radius is the best solution since TrailRenderer do not support collisions. If your trail is really long and with a low VertexDistance value in order to optimize you could reduce the loop by half and skipping 1 point everytime you loop a TrailPosition and approximate the skipped pos by calculating distance between the current i and i + 1 points. Also do not loop every frame to check collision, try to stick as much as possible as the FixedTimestep from Unity (or higher but never less than FixedTimestep for custom complex collisions like these).
Another solution could be to have a shader for the trail that has a DepthOnly pass and making some kind of depthbuffer collision but it could not be perfect as the one above and also in some cases even worse (Idk i should test it).
The best and optmized solution (also the complex) for you would probably be to create your own trail renderer from scratch with a set of objects that you want to collide with and then while you update the behaviour of the trail you also check new distances from these objects and call some appropiate events on trigger/on collision. In this case you wouldn't have to loop every frame the positions of the trails since you are already managing them internally.
@@filippoperlini8951 i was thinking to "drop" invisible objects that are connected and add triggers to them or something. i have no idea how to implement this as i only have a few weeks experience with unity
트레일을 이용하지않고 라인렌더러로 트레일 효과를 내려면 어떻게 해야하나요
라인렌더러는 정해진 위치에 선을 그리는 기능입니다. 라인렌더러로 트레일 효과를 내려면 지나간 경로를 일일이 지정해줘야하는데, 그러면 결국 트레인 렌더러가 됩니다. 그냥 트레일 렌더러 쓰는 것을 권합니다.
omaio shindaio
how to import this
1. Download the project from the GitHub link in the video description.
2. Open the downloaded project in the Unity 3D editor.
3. Export the effect as a Unity package.
4. Import the unity package in your project.
@@gamedevone thanks
@@gamedevone can i use this asset for HDRP?
@@GCEntertainment1603 I haven't tested it in HDRP, so I don't know if it's possible in HDRP.
@@gamedevone thanks you