# map_channels describe the UVW coordinates used to map a texture to the geometry surface.
geometry.map_channels = [
[
# channel index
1,
# List of UVW coordinates.
# The W coordinate has to be set (0.0 in this case) even when performing 2D texturing.
vray.VectorList(
vray.Vector(0.0, 0.0, 0.0),
vray.Vector(0.0, 1.0, 0.0),
vray.Vector(1.0, 0.0, 0.0),
vray.Vector(1.0, 1.0, 0.0)
),
# List of indices from the UVW list.
# Each three consecutive indices are used for a single triangle.
# They correspond directly to the vertex indices in the 'faces' array.
vray.IntList(
2, 0, 1,
1, 3, 2,
2, 0, 1,
1, 3, 2,
2, 0, 1,
1, 3, 2,
2, 0, 1,
1, 3, 2,
2, 0, 1,
1, 3, 2,
2, 0, 1,
1, 3, 2
)
]
] |
|
// The W coordinate has to be set (0.0 in this case) even when performing 2D texturing.
Vector uvwCoords[] = {
Vector(0.0, 0.0, 0.0),
Vector(0.0, 1.0, 0.0),
Vector(1.0, 0.0, 0.0),
Vector(1.0, 1.0, 0.0)
};
// Each three consecutive indices are used for one triangle.
// They correspond directly to the vertex indices in the 'faces' array.
int uvwIndices[] = {
2, 0, 1,
1, 3, 2,
2, 0, 1,
1, 3, 2,
2, 0, 1,
1, 3, 2,
2, 0, 1,
1, 3, 2,
2, 0, 1,
1, 3, 2,
2, 0, 1,
1, 3, 2
};
ValueList list;
list.push_back(Value(1)); // channel index
list.push_back(Value(uvwCoords)); // list of UVW coordinates
list.push_back(Value(uvwIndices)); // list of indices from the UVW list
// map_channels describe the UVW coordinates used to map a texture to the geometry surface
ValueList channels;
channels.push_back(Value(list));
geometry.set_map_channels(channels); |
|
List<object> channels = new List<object>();
channels.Add(new List<object> {
// Channel index.
1,
// List of UVW coordinates.
// The W coordinate has to be set (0.0 in this case) even when performing 2D texturing.
new Vector[] {
new Vector(0.0, 0.0, 0.0),
new Vector(0.0, 1.0, 0.0),
new Vector(1.0, 0.0, 0.0),
new Vector(1.0, 1.0, 0.0)
},
// List of indices from the UVW list.
// Each three consecutive indices are used for one triangle.
// They correspond directly to the vertex indices in the 'faces' array.
new int[] {
2, 0, 1,
1, 3, 2,
2, 0, 1,
1, 3, 2,
2, 0, 1,
1, 3, 2,
2, 0, 1,
1, 3, 2,
2, 0, 1,
1, 3, 2,
2, 0, 1,
1, 3, 2
}
});
// MapChannels describe the UVW coordinates used to map a texture to the geometry surface.
geometry.MapChannels = channels; |
|
// The W coordinate has to be set (0.0 in this case) even when performing 2D texturing.
var uvwCoords = vray.VectorList(
vray.Vector(0.0, 0.0, 0.0),
vray.Vector(0.0, 1.0, 0.0),
vray.Vector(1.0, 0.0, 0.0),
vray.Vector(1.0, 1.0, 0.0)
);
// Each three consecutive indices are used for one triangle.
// They correspond directly to the vertex indices in the 'faces' array.
var uvwIndices = vray.IntList(
2, 0, 1,
1, 3, 2,
2, 0, 1,
1, 3, 2,
2, 0, 1,
1, 3, 2,
2, 0, 1,
1, 3, 2,
2, 0, 1,
1, 3, 2,
2, 0, 1,
1, 3, 2
);
var map_channel = vray.List();
map_channel.push(1); // channel index
map_channel.push(uvwCoords); // list of UVW coordinates
map_channel.push(uvwIndices); // list of indices from the UVW list
// map_channels describe the UVW coordinates used to map a texture to the geometry surface.
var channels = vray.List();
channels.push(map_channel);
geometry.map_channels = channels; |
|
|