09-04-2019, 01:56 PM
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
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.