Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Generate Mesh Spline from GameObject
#1
Hi _Aka_,

I'm trying to generate a rainbow road using an existing GameObject. I have successfully generated the rainbow road but the problem is that the road is not smooth at the beginning and the end of each generated GameObject. Please find attached. If there is a better approach than mine please let me know.

I'm using version 7.0.0. Unity 2019.3

Thanks.


Attached Files Thumbnail(s)
       
Reply
#2
Hi,

If I have to make that road, I would not placed existing meshes next to each other, but I would have extruded the mesh. Your road has a simple shape (an extruded rectangle) and simple texture, so it is perfect for mesh extrusion.
In case you are not familiar with mesh extrusion, use the existing template (right click on an empty spot of the generator's graph) as a starting point. You can also see how it is done in example scene 51_InfiniteTrack

I hope this helped. If and when you feel like it, please leave a review for the asset, that helps a lot.

Have a nice day
Please consider leaving a review for Curvy. This will help a lot keeping Curvy relevant in the eyes of the Asset Store algorithm.
Reply
#3
I have tried mesh extrusion before but couldn't get the result of the rainbow because I can't use a texture alone to define the colors of the rainbow for the created extruded mesh. That's why I have created a rectangle in Blender and sliced it into 7 parts and mapped each part to a color. Now, how can I apply the same colors (with the same order) of my rectangle model to the extruded mesh? I want to get a road with the same rectangle I have created.
Reply
#4
This is the result I get when I use mesh extrusion with simple texture (which is not the result I want):


Attached Files Thumbnail(s)
       
Reply
#5
Hi,
Sorry I missed your answer.
You can solve your issue by using mesh extrusion and setting a UV scale value different than 1. See the Volume Mesh module, under the tab relative to the used material.
Mesh extrusion allows you to be very specific when it comes to defining the UV coordinates of the extrusion's cross section. An example is in example scene 26_CGExtrusionExtendedUV. This is done using the Meta CG Options and the UV and material related options in the Shape Extrusion module, under the cross tab.
Have a nice day
Please consider leaving a review for Curvy. This will help a lot keeping Curvy relevant in the eyes of the Asset Store algorithm.
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  How to get length starting from one spline to connected nth spline Dragon-3623 1 1 05-14-2024, 04:52 PM
Last Post: _Aka_
  Incorrect mesh alignment after extrusion on curved path Thinkurvy 10 21 04-17-2024, 10:57 AM
Last Post: _Aka_
  Curvy Line Renderer for UI Spline? gekido 3 6 04-04-2024, 12:56 PM
Last Post: _Aka_
  Get position of all control points for a spline gekido 1 6 03-28-2024, 10:08 PM
Last Post: _Aka_

Forum Jump: