11-11-2022, 09:08 PM
(11-01-2022, 10:38 AM)_Aka_ Wrote: About the UV calculation: the value to set to UVOffset.Y is the following:
yourBuildVolumeMesh.groupsByMatID[theRightIndex].AspectCorrectionV
Knowing that groupsByMatIDis defined as follow:
private List<SamplePointsMaterialGroupCollection> groupsByMatID;
Two things to solve to be able to use the code above:
1- theRightIndex: either 0 if you use only one material, or you find the index that indexes the SamplePointsMaterialGroupCollection instance with the right material ID.
2- groupsByMatID: it is a private field, you can make it public or add a getter to access it for example.
I believe this answers your UV related question
I only have one material.
What exactly IS AspectCorrectionV. I need the value of the ending V of a previously generated segment ?
If I understand what you are saying, here is my attempt at it:
Code:
var bvmA = genOfSegmentA.GetModule<BuildVolumeMesh>( "Track Vol Mesh", true );
var bvmAplus1 = genOfSegmentAplus1.GetModule<BuildVolumeMesh>( "Track Vol Mesh", true );
bvmAplus1.MaterialSetttings[ 0 ].UVOffset.y = bvmA.GroupByMatID[0].AspectCorrectionV;
The problem is that in the debugger, BuildVolumeMesh.groupsByMatID is always null !!
No array is set :-(