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 Image(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 Image(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
  Mesh Lines - Horizontal and Vertical Edges Krypton 14 485 09-23-2020, 02:16 AM
Last Post: Krypton
  Generated mesh using bezier spline is not following the path accurately processor 3 277 08-25-2020, 04:39 PM
Last Post: _Aka_
  Best practice when Instantiating game object with spline GenericJoe 1 237 08-22-2020, 02:40 PM
Last Post: _Aka_
  To dynamic generate the connection between paths Canis 4 494 08-07-2020, 07:33 PM
Last Post: _Aka_

Forum Jump: