Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Material stretched on generated mesh
#1
Hi again,

I have extruded my mesh successfully, but as I try to give it a material, it gets all stretched out.
I have tried to change the UV scale in the Volume Mesh module, but it doesn't seem to fix the issue. My material is displayed normal on a 1*1*1 cube. If I apply another material to the mesh, the result is similar.
How can I fix this?

https://imgur.com/HlWnp9X

https://imgur.com/5zoHzcJ
Reply
#2
Hi,
Normally changing the value of the UV scale should resolve your problem. Please send me a copy of your scene so I can see what is wrong.
Also, what Curvy version do you use?
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
Sure thing, here you go:
XXXXXXXXXXXX

I have Curvy version 5.2.2.
Reply
#4
I edited your post to remove the link since Curvy is a public forum.
Please consider leaving a review for Curvy. This will help a lot keeping Curvy relevant in the eyes of the Asset Store algorithm.
Reply
#5
The UV generating code seems to have an issue with your open mesh. So to avoid the issue, close your open shappe, the spline named Rail. I will look deeper at that later.
Please consider leaving a review for Curvy. This will help a lot keeping Curvy relevant in the eyes of the Asset Store algorithm.
Reply
#6
Yes, that seems to fix it!
So two more related questions: if I extrude the mesh, the poles are neatly placed on the spline. However, the offset of the rail doesn't seem to be neatly in the middle. Instead, on the right side of a circle, the mesh is placed a bit right to the spline, and on the left side a bit to the left. The idea is that the mesh is always placed in the middle of the spline, so the poles aren't off. The occurs also in the scene I sent you.

Second thing is that I wish the rail to be invisible from above. This was achieved due to backface culling when it wasn't closed yet. Is the way to go here to create to sides of the rail and extrude those seperately?

Sorry for the huge amount of questions. I'm trying to grasp how this all works. Hope you don't mind.

Edit: screenshots for example: https://imgur.com/FwQFtKg and https://imgur.com/GwXo5m6
Reply
#7
Can you please tell me around which mesh or spline's control point that screenshot was taken?
Please consider leaving a review for Curvy. This will help a lot keeping Curvy relevant in the eyes of the Asset Store algorithm.
Reply
#8
About the second question, a solution I think of is to have different materials set to the outside and inside of the rails. One of those materials will be your usual material, the other will be a transparent one. Using different materials on the same extruded mesh is shown in some example scenes, 26_CGExtrusionExtendedUV.unity being one of them.

If you are not in a hurry, give me until next week to look deeper in the code and fix the issue the UV generation seems to have with your open shape.
Please consider leaving a review for Curvy. This will help a lot keeping Curvy relevant in the eyes of the Asset Store algorithm.
Reply
#9
(06-27-2019, 01:22 PM)_Aka_ Wrote: Can you please tell me around which mesh or spline's control point that screenshot was taken?
I figured out it has something to do with the orientation. I cannot reproduce it in the test scene I sent you, but in my real scene the orientation was dynamic, setting it to static fixed it. In the test scene it already was set to dynamic, but it doesn't seem to matter there. I need to ensure the orientation is static anyway, so I will make a check for that.

Quote:If you are not in a hurry, give me until next week to look deeper in the code and fix the issue the UV generation seems to have with your open shape.
This would be very convenient. Please give me a heads-up once you've fixed it.
I took a quick look at the example you mentioned. As I understand correctly, you change the material of the caps, not parts of your extrusion. The latter would be useful here, I think, but I'm not sure if it is possible. For example, you would give the bottom of the outline I used a transparent material.
Reply
#10
(06-27-2019, 03:04 PM)Tim1234 Wrote: I took a quick look at the example you mentioned. As I understand correctly, you change the material of the caps, not parts of your extrusion.
The scene do have different materials for different parts of the extrusion. Look at the Meta CG Options components on the control points of the extruded shape
https://curvyeditor.com/doclink/metacgoptions
Also, do not forget to set, if it is not done already, the corresponding options in the Shape Extrusion module, the Cross tab.
https://curvyeditor.com/documentation/generator/modules/shapeextrusion?redirect=1#cross
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_
  Not seeing mesh extended after following YT PaulM 1 3 02-02-2024, 12:01 PM
Last Post: _Aka_
  Trigger Zones along Spline Mesh dlees9191 1 5 01-05-2024, 10:18 AM
Last Post: _Aka_
  Get spline from generated mesh beartrox 1 5 11-27-2023, 12:30 PM
Last Post: _Aka_

Forum Jump: