Hi 3D guru's out there,
I'm developing a WPF application that uses 3D for vizualizing a pipe system. At a certain moment it must be possible to color those pipes according to a value on certain points. See the figure below. This shows a 2D cross section overview of an elbow and a pipe attached to each other.
On this pipe some points are defined (i.e. MP, VA, KW and Z0). Each point has a value attached that correspons to a color. The mapping can be found at the bottom of the picture. The resulting coloring (for the current shown values), walking from EL to Z0, is shown also (in the middle section).
One of the requirements is that these values can change vary rapidly, and that the 3D representation should follow as quickly as possible, even for large piping systems.
I can think of several ways to map these values to colors, but I do not know what's the best solution in order to be "almost realtime" with value updates. My solutions so far:
1) Every point must result in a seperation of geometry in order that texture coordinates can be defined. Trough matrial scaling/translation it's possible to use a subsection of the mapping color range. The scaling and translation will be updated when values change. This will result in more complex geometry and just a single material.
2) The geometry should be as simple as possible, with no additional "breaks". For every pipe a dedicated material must be constructed (for the current values). The material will be applied to elbow and pipe. Trough (fixed) scaling/translation the material will be layed out properly on the elbow and pipe. Disadvantage is that every value update results in creation of a new material.
So question are:
- Anyone having an other solutions to this challenge?
- I suppose option 1 will be fastest since geometry will be updated less frequently than values that result in re-coloring. Is this assumption right?
Best regards,
Jan