mlavik1 / UnityVolumeRendering

Volume rendering, implemented in Unity3D. Want to support the project? Donate a small sum to Save The Children(https://www.savethechildren.net/) or another charity, and send me a message, and I will be greatly motivated!
https://fosstodon.org/@unityvolrend
MIT License
448 stars 127 forks source link

Improve 1D transfer function #81

Open mlavik1 opened 2 years ago

mlavik1 commented 2 years ago

Implement different modes for editng the TF. Other software use a smoothstep interpolation between two points, which is much easier than to manually move a set of points to LERP between.

Also, it would be nice to support other ways of I terpolating between the points, and not only LERP.

mlavik1 commented 2 years ago

Suggestion: Two modes for editing 1D TF:

  1. Colour and alpha control points (existing solution)
  2. Edit curve for R, G, B and A separately (ImageVis3D) image

Internally, (2) can use the same internal representation as (1). We simply create N (100?) colour control points and alpha control points, evenly distributed from data value 0.0 to 1.0.

We can use the same TransferFunction class then, but two different editor windows (or one, with two modes?).