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
  Adjust radius of generated mesh via script? Shackman 1 3 03-26-2024, 01:12 PM
Last Post: _Aka_
Bug Changing spline connection in inspector causes splines to revert to defaults lacota 3 6 03-18-2024, 07:55 PM
Last Post: _Aka_
  GO can't fit end of the spline GameDeveloperek4123 3 13 03-04-2024, 11:06 AM
Last Post: _Aka_
  Keeping a fixed spline length jh092 3 16 02-21-2024, 06:25 AM
Last Post: Primrose44

Forum Jump: