Changing uv tiling/stretching via particle data.
#1
Hello everyone!

I have been experimenting with the UV mapping on spline meshed ribbons but i am having some trouble. My scene has physics particles that are sliding down some geometry and leaving a trajectory spline behind. I am using the spline mesher to stretch a 2d plane over its length and i plan to apply a scrolling texture to the mesh for a waterfall effect.

My issue is the UV mapping is mapped to the 2d plane.Since its simply beind steetched along the spline length, shorter splines will compress the texture more and vis-versa. What i want to do is tie the V mapping to the particle velocity so when the particles are falling down, the V gets more stretched to simulate the velocity of the water. If the mesh is horizontal and slowly sliding over the surface the texture would be tiled more to achieve a slower scroll.

I have experimented with the mapping operator and set it to map based on velocity but i cant seem to achieve the result i want. I did get it to change the mapping based on its velocity by setting the timing to continuous on the mapping operator. However, it appears to be assigning the velocity vector value to all the verts of the mesh instead of correctly mapping it across the surface. I was also thinking about possibly using the distance between spline knots but i couldn't find a way to link that to the mapping.

Any insight would be greatly appreciated. Perhaps there is a different way to achieve a similar result?

Thanks!
Cool
  Reply
#2
Have you looked at the UVs rollout at the bottom of the tySplineMesher? Disabling 'normalize UVs' should stop them from being relative to the length of each spline.
  Reply
#3
(11-21-2021, 04:17 PM)tyFlow Wrote: Have you looked at the UVs rollout at the bottom of the tySplineMesher? Disabling 'normalize UVs' should stop them from being relative to the length of each spline.

Yes i have experimented a bit with however i have been unable to get any result when using it, regardless of the settings i choose. I am using the 3ds max checker texture but when i enable the UV in the spline mesher the texture turns grey. Changing the settings in the spline mesher UV has no effect. The only way i was able to achieve any result was by using the mapping by vector velocity in the mapping operator.

When i used the "tube" setting on the mesher it did seem to give me a result similar to the one i am expecting. I suspect the mapping is based off the distance between spline knots, but it doesnt work the same with the "mesh" mode and stretching a 2d plane along the spline.
  Reply
#4
Here is my test scene (max 2020)

I have gotten to the point where it appears to be changing the UV based on velocity but it seems to be assigning values uniformly across all the verts instead of correctly mapping from 0-1 across the length/width.

The result i am trying to achieve isnt to override the mapping but simply stretch or compress the V axis to increase/decrease the amount of tiling along its length, based on the particle speed. The faster the particle is traveling the more stretched out i want the texture to be. I don't want to adjust the mapping on the U axis at all. (width)

Thanks!

P.S. Completely un-releated but sometimes the particles dont collide and clip through the geo, any ideas?


Attached Files Thumbnail(s)
   

.max   cliff_waterfall_tyflow_ribbon.max (Size: 740 KB / Downloads: 144)
  Reply
#5
Update: If i use the tube mesh mode i can get close to the mapping i am going for. The problem is i would like to use an existing 2d mesh that already has some modifiers applied. Using a mesh also gives me more control over the amount of verts in the total ribbon. 

Is there a way to achieve this the result using the mesh option in the spline mesher instead of the tube option? The tube option is adjusting the mapping based on the distance between the knots but i didnt see any way to tie that in to the particle system.

Thanks!


Attached Files Thumbnail(s)
   
  Reply


Forum Jump: