Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How to properly set UV for extruded spline texture
#1
Hi,
I am trying to setup a simple extruded mesh with custom material and texture in Curvy 6.
I did some textture baking in Blender 2.80 (image included) and edited U values in every spline point.

The problem is: I can't find how to set up the V coordinates of the extruded vertices. Generator is using all texture area resulting in black unwanted holes in my object.

How to fix this?

   

The texture is square. Should I make the UV's to cover all the texture area and do not try to limit mapping?
But then I will loose the object aspect ratio.
Or maybe I miss some settings?

Regards,
Piotr
Reply
#2
Hi,

The mesh extrusion will use the whole texture's V coordinates. The Volume Mesh CG module has UV Offset and UV Scale parameters, but I fear that this is not enough for your need (I a guessing that you want tiling to work with your sub-texture)

This being said, you can modify the code of existing module, or create a new module, to define a subset of the V values to be used.
If you want to modify the existing code, the code that defines the UV of the extruded mesh is in BuildVolumeMesh.createMaterialGroupUV method. Take a look at this line:
float v = mat.UVOffset.y + vol.F[sample] * mat.UVScale.y * grpAspectCorrection;
You can introduce a new parameter to the Volume Mesh module defining the valid values of V, and use that parameter in the v coordinate computation above.

If you need more help please let me know
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
Thank You for explanation. I just made the new texture covering all the Vertical area and it works fine.
Reply
#4
You are welcome
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
  Curvy Line Renderer for UI Spline? gekido 1 1 2 hours ago
Last Post: _Aka_
  Get position of all control points for a spline gekido 1 2 2 hours ago
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_

Forum Jump: