AcademySoftwareFoundation / AcademySoftwareFoundation/OpenRV
Add support for per-point opacity in (RVPaint) strokes
- Dominant language
- C++
- Stars
- 764
- Forks
- 246
- Avg merge
- 6d 12h
- Merged PRs (30d)
- 13
Description
OpenRV currently supports variable stroke width in RVPaint nodes, where each point in a stroke can have a distinct width value. It would be very useful to extend this capability to include per-point opacity, allowing artists or tools to create strokes with varying transparency along their length.
### Current Behavior
A stroke definition such as the following allows different widths per point, but opacity (alpha) must currently be uniform for the entire stroke via the color’s alpha channel:
```
sourceGroup000000_paint : RVPaint (3)
{
paint
{
int nextId = 1
}
"frame:1001"
{
string order = "pen:1:1001:pjurkas"
}
"pen:1:1001:pjurkas"
{
int mode = 0
string brush = "circle"
float[4] color = [ [ 0 1 0 1 ] ]
float width = [ 0.01 0.02 0.03 ]
float[2] points = [ [ -0.25 -0.25 ] [ 0.25 -0.25 ] [ 0.25 0.25 ] ]
}
}
```
### Proposed Enhancement
Introduce an additional opacity parameter similar to width parameter. The opacity parameter could be handled similarly to width, interpolated between stroke points and multiplied with the alpha component of the base color at render time. For example:
```
float opacity = [ 0.5 0.8 1.0 ]
```
Contributor guide
Research direction
The issue names no files, tests, or entry points. Start by tracing how RVPaint stores and renders per-point stroke width, then determine where opacity data would be represented and interpolated. Done means strokes can use per-point opacity multiplied by the base color alpha without changing existing uniform-opacity behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- computer-graphics
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100