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 helps immensely. Thank you.
Available for freelance work—feel free to reach out.
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 helps immensely. Thank you.
Available for freelance work—feel free to reach out.
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
Information Questions regarding spline colliders and collisions with rigidbodies Spyboticer 7 51 01-20-2025, 12:25 PM
Last Post: _Aka_
  Extrude mesh along spline. New and confused user GhostStalker 3 14 01-02-2025, 09:58 AM
Last Post: _Aka_
  Newly created spline is invisible quickytools 7 26 12-21-2024, 10:14 AM
Last Post: _Aka_
  How to generate gameobject on the control point Yang Yi 1 8 12-10-2024, 10:14 PM
Last Post: _Aka_

Forum Jump: