Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
105 changes: 105 additions & 0 deletions src/ansys/api/speos/experimental/sop/v1/sop.proto
Original file line number Diff line number Diff line change
@@ -0,0 +1,105 @@
// (c) 2026 ANSYS, Inc. Unauthorized use, distribution, or duplication is prohibited.
syntax = "proto3";

package ansys.api.speos.experimental.sop.v1;

// Actions available on a SOPTemplate
service SOPTemplateActions {

// Evaluate a custom selection of metrics with optional per-metric parameters. If config is not provided, all metrics are evaluated with default parameters.
rpc EvaluateMetrics(EvaluateMetrics_Request) returns (EvaluateMetrics_Response) {}
}

// Impact definition for a single evaluation of a metric, used for DirectionalRTA and BSDF slices.
message ImpactDefinition {
double theta_in = 1; // Incidence angle (degrees, default: 0)
double phi_in = 2; // Anisotropic angle (degrees, default: 0)
double theta_out = 3; // Outgoing angle (degrees, default: 0)
double phi_out = 4; // Outgoing anisotropic angle (degrees, default: 0)
optional double wavelength = 5; // Wavelength (nm, default: 550)
}

// Configuration for evaluating BSDF slices, each slice is defined by a fixed impact value and a variable to sweep.
// The swept variable initial value from the impact definition is ignored.
message BSDFSlicesConfig {
message SliceConfig {
ImpactDefinition fixed_values = 1; // Fixed impact values
string sweep_variable = 2; // Variable to sweep: "theta_in", "phi_in", "theta_out", "phi_out", "wavelength"
double sweep_start = 3; // Sweep start (degrees or nm)
double sweep_end = 4; // Sweep end (degrees or nm)
uint32 num_samples = 5; // Number of samples
}

repeated SliceConfig slices = 1; // List of slices to evaluate
}

// Configuration for evaluating global RTA (Reflectance, Transmittance, Absorbance), which is evaluated at a set of wavelengths.
// It's the quadruple integral of the BSDF over all incoming and outgoing directions, weighted by the cosine of the incidence angle.
message GlobalRTAConfig {
repeated double wavelengths = 1; // Wavelengths (nm)
}


// Configuration for evaluating directional RTA (Reflectance, Transmittance, Absorbance), which is evaluated at a set of impact definitions.
// It's the integral over the outgoing directions of the BSDF for a given incoming direction, weighted by the cosine of the incidence angle.
message DirectionalRTAConfig {
repeated ImpactDefinition impacts = 1; // Impact definitions to evaluate
}

// Configuration for evaluating metrics, which can include global RTA, directional RTA, and BSDF slices.
// Each config is optional, if not provided, the metric will not be evaluated.
message MetricsConfig {
GlobalRTAConfig global_rta = 1; // Evaluate global RTA
DirectionalRTAConfig directional_rta = 2; // Evaluate directional RTA
BSDFSlicesConfig bsdf_slices = 3; // Evaluate BSDF slices
}


// Request message for evaluating metrics on a SOP, providing the VOPs before and after surface interaction,
// and an optional configuration for which metrics to evaluate. If no configuration is provided, all metrics will be evaluated with default parameters.
message EvaluateMetrics_Request {
string sop_guid = 1; // SOPTemplate guid
string vop_before_guid = 2; // VOP before surface interaction
string vop_after_guid = 3; // VOP after surface interaction
MetricsConfig config = 4; // Metrics to evaluate (optional)
}

message GlobalRTAResult {
message Sample {
double wavelength = 1; // Wavelength (nm)
double reflectance = 2; // Reflectance [0,1]
double transmittance = 3; // Transmittance [0,1]
double absorbance = 4; // Absorbance [0,1]
}
repeated Sample samples = 1;
}

message DirectionalRTAResult {
message Sample {
ImpactDefinition inputs = 1; // Impact definition
double reflectance = 2; // Reflectance [0,1]
double transmittance = 3; // Transmittance [0,1]
double absorbance = 4; // Absorbance [0,1]
}
repeated Sample samples = 1;
}

message BSDFSlicesResult {
message Slice {
message Sample {
double swept_variable_value = 1; // Swept variable value
double bsdf_value = 2; // BSDF value
}
ImpactDefinition inputs = 1; // Fixed impact values
string swept_variable = 2; // Variable that was swept
repeated Sample samples = 3; // Samples along swept variable
}
repeated Slice slices = 1; // Evaluated slices
}


message EvaluateMetrics_Response {
GlobalRTAResult global_rta = 1; // Global RTA results
DirectionalRTAResult directional_rta = 2; // Directional RTA results
BSDFSlicesResult bsdf_slices = 3; // BSDF slice results
}
12 changes: 4 additions & 8 deletions src/ansys/api/speos/sop/v1/sop.proto
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,8 @@ message SOPTemplate {

message Image {
string bitmap_file_uri = 1; // Bitmap
bool repeat_along_u = 2; // Activate/deactivate the repeatability of the texture image on U axe.
bool repeat_along_v = 3; // Activate/deactivate the repeatability of the texture image on V axe.
bool repeat_along_u = 2; // Activate/deactivate the repeatability of the texture image on U axis.
bool repeat_along_v = 3; // Activate/deactivate the repeatability of the texture image on V axis.
}

message NormalMap {
Expand All @@ -52,8 +52,8 @@ message SOPTemplate {
FromNormalMap from_normal_map = 2;
}
float roughness = 5;
bool repeat_along_u = 6; // Activate/deactivate the repeatability of the texture normal map on U axe.
bool repeat_along_v = 7; // Activate/deactivate the repeatability of the texture normal map on V axe.
bool repeat_along_u = 6; // Activate/deactivate the repeatability of the texture normal map on U axis.
bool repeat_along_v = 7; // Activate/deactivate the repeatability of the texture normal map on V axis.

message FromImage {
string bitmap_file_uri = 1; // Bitmap used to build normal map.
Expand Down Expand Up @@ -111,7 +111,3 @@ message List_Request {}
message List_Response {
repeated string guids = 1; // Guids of the SOPTemplates in SOPTemplatesManager
}

// Actions available on a SOPTemplate
service SOPTemplateActions {
}
Loading