Tracesets handling proposal
Los mantenedores suelen responder en 1 día
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 5/5
- Tiempo estimado
- Más de una semana
- Aptitud para principiantes
- 25/100
- Tipo de issue
- Nueva funcionalidad
- Claridad
- Necesita aclaración
- Estado de actividad
- Activo
- Área
- compilers
Línea de trabajo
Comienza con la documentación actual de OSL trace y la sintaxis de traceset existente descrita en el issue. Compara las listas de inclusión/exclusión propuestas, los argumentos de tupla, los conjuntos implícitos y la sintaxis de expresiones antes de elegir una dirección concreta. Se considera terminado cuando haya una especificación acordada y un plan de implementación y validación definido.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Motivation
The OSL, in its current state, doesn't specify technical details or syntax, other than this line in the docs:
An optional named set of objects to ray trace (if preceded by a - character, it means to exclude that set).
So technically it can only pass an inclusion or exclusion list of predefined sets (not an expression) to the renderer.
Simple logical operations unavailable, e.g.: "Character -Hair"
Sometimes we want to trace only against the object itself, or exclude the currently shaded object from tracing without creating hundreds of tracesets for all instances.
We can employ string features of OSL to implement desired behaviour, but it's inefficient.
Workarounds
Exclude itself ( taken from LaSh )
// Assign unique tracesets to all objects in DCC ahead of rendertime. (RfK should do it for you)
string traceset;
getattribute( "identifier:name", traceset );
traceset = concat( "-", traceset ); // String concatination isn't efficient
int hit = trace( P, dir,
"traceset", traceset );
Allow user to format string. User is free to set the userDefined parameter to "%s" or "-%s" or "%s ground"
// Assign unique tracesets to all objects in DCC ahead of rendertime.
string self, resultingTraceset;
getattribute( "grouping:membership", self);
resultingTraceset = format(userDefined, self); // Performance warning about rendertime formatting
int hit = trace( P, dir,
"traceset", resultingTraceset );
Inspiration
VEX - SideFX Houdini language allows you to:
use wildcards
"Object*"
use complex expressions"Object*,^*left"
refer to implicit sets using special keywords like"scope:self"
Pixar RenderMan texture system allows you to do complex string substitutions to define texture paths.
<primstr:primvarname>- will substitute the value of the named constant string primitive variable, such as the name of an asset; for example,"/assets/<primstr:model>/diffuse.tex"on an apple with "const string model" ["apple"] would be expanded to"/assets/apple/diffuse.tex"
Seems Arnold renderer also has an implicit self traceset assignment, but I didn't find it in the documentation.
Adopting these ideas and syntax in the language might be very helpful in solving current problems. However, I understand the complexity of this solution.
Simpler solution
Even without introducing a complex evaluation system, we can achieve more flexibility and robustness by:
Separating the inclusion list from the exclusion list in the trace signature will allow simple constructions (e.g. include Character, but not its Hair) and prevent preceding "-" concatenation.
int trace (point pos, vector dir,
"tracesetInclude", string includeList,
"tracesetExclude, string excludeList)
Accepting tracesets as tuples (not as a single string) will also help to avoid runtime string concatenations and potentially parsing at render time.
int trace (point pos, vector dir,
"tracesetInclude", string[] includeList,
"tracesetExclude, string[] excludeList)
Having OSL opinion about implicit tracesets (like current object or objects with current material assigned (Thanks, Chriss) ) in the specification will help write efficient and transferable shaders.
- Lenguaje dominante
- C++
- Estrellas
- 2.3k
- Forks
- 415
- Merge medio
- 2 d 10 h
- PR fusionados (30 d)
- 14
Preparar el entorno
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de AcademySoftwareFoundation/OpenShadingLanguage
-
build / testing / port / CI
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
AcademySoftwareFoundation/OpenShadingLanguage#2148 · 5 comentarios ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
AcademySoftwareFoundation/OpenShadingLanguage#2109 · 1 reacción ·
Los mantenedores suelen responder en 1 día
-
Dificultad 5/5 Más de una semana Aptitud para principiantes 38/100
AcademySoftwareFoundation/OpenShadingLanguage#2175 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 4/5 3-5 días Aptitud para principiantes 45/100
AcademySoftwareFoundation/OpenShadingLanguage#2135 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 3/5 1-2 días Aptitud para principiantes 52/100
AcademySoftwareFoundation/OpenShadingLanguage#2132 · 6 comentarios ·
Los mantenedores suelen responder en 1 día
Todos los issues de AcademySoftwareFoundation/OpenShadingLanguage
Issues similares
-
WaterHeaterManagement: tank_percent feature reports wrong feature id (FeatureMap corruption)Abierto
Dificultad 1/5 Menos de una hora Aptitud para principiantes 92/100
espressif/esp-matter#1867 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
Los mantenedores suelen responder en 1 día
-
cuAmpcorParameter.cpp (CPU pycuampcor) does not compile with libc++: EXIT_FAILURE is undeclaredAbierto
Dificultad 1/5 Menos de una hora Aptitud para principiantes 92/100
isce-framework/isce3#387 ·
-
[request] opencv/5.0.0Abiertoupstream update
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
conan-io/conan-center-index#31055 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 88/100
Los mantenedores suelen responder en 1 día