It's complicated to explain what the transformation I'm dealing with is but basically it is a transformation that takes a 3D model and maps it to the surface of one polygon on another model. The issue is that I'd prefer to not have to recompute the normal vectors of the post-transformation model at construction time (which are needed for lighting).
There are actually two versions of the transform. I'm not sure which I will pick so ways to convert normals for each will be needed.
First transform:
Given a point $v = (x,y,z)$ in space and the triangle $(p_1, p_2, p_3)$ in space with point normals $(N_1, N_2, N_3)$ the transformation is $\Omega v = p_1x + p_2y + p_3(1 - x - y) + z(N_1x + N_2y + N_3(1 - x - y))$.
Second transform:
Given a point $v = (x,y,z)$ in space and the triangle $(p_1, p_2, p_3)$ in space with point normals $(N_1, N_2, N_3)$ and triangle normal $N_t$ the transformation is $\Omega v = p_1x + p_2y + p_3(1 - x - y) + z(N_1x + N_2y + N_3(1 - x - y)) \frac {1}{<N_t,N_1x + N_2y + N_3(1 - x - y)>}$.
If $v$ has some normal vector associated with it, then what would it map to geometrically in the case of each transform?
Note: $<a,b>$ is the dot product between $a$ and $b$.
Another way to look at OP's problem, is to consider it a transformation from one triangular prism to another, or between triangular prism coordinates $(u, v, w)$ and Cartesian coordinates $(x, y, z)$:
Each prism is defined by the base triangle $T_1$ vertices $\vec{p}_1$, $\vec{p}_2$, $\vec{p}_3$, and three corresponding translation vectors $\vec{n}_1$, $\vec{n}_2$, $\vec{n}_3$, so that the other end triangle $T_2$ vertices are $(\vec{p}_1+\vec{n}_1)$, $(\vec{p}_2+\vec{n}_2)$, $(\vec{p}_3+\vec{n}_3)$, as shown in the above illustration: $T_1$ is the bottom triangle, and $T_2$ the top triangle, in both triangular prisms.
The triangular prism coordinate system $(u, v, w)$ is such that $$\begin{array}{ccc|c} u & v & w & \text{3D vector} \\ \hline 0 & 0 & 0 & \vec{p}_3 \\ 1 & 0 & 0 & \vec{p}_1 \\ 0 & 1 & 0 & \vec{p}_2 \\ 0 & 0 & 1 & \vec{p}_3 + \vec{n}_3 \\ 1 & 0 & 1 & \vec{p}_1 + \vec{n}_1 \\ 0 & 1 & 1 & \vec{p}_2 + \vec{n}_2 \\ \end{array} \quad \text{with} \quad \left\lbrace \; \begin{array}{rcl} 0 \le & u & \le 1 \\ 0 \le & v & \le 1 \\ 0 \le & u + v & \le 1 \\ 0 \le & w & \le 1 \\ \end{array}\right.$$ In the illustration, darker red lines are $u = 0$, darker green lines are $v = 0$, and the blue lines are $w = 0$. The gray lines are where $u + v = 1$.
The transformation from triangular prism coordinates $(u, v, w)$ to 3D Cartesian coordinates $\vec{v} = (x, y, z)$ is $$\bbox[#ffffef, 1em]{\Omega(u, v, w) = u \vec{p}_1 + v \vec{p}_2 + (1 - u - v) \vec{p}_3 + w \left ( u \vec{n}_1 + v \vec{n}_2 + (1 - u - v) \vec{n}_3 \right )}$$ which is equivalent to $$\begin{aligned} \Omega(u,v,w) & = (1-w)\Bigr( \vec{p}_3 + u (\vec{p}_1 - \vec{p}_3) + w (\vec{p}_2 - \vec{p}_3 ) \Bigr) \\ & + w\Bigr( (\vec{p}_3 + \vec{n}_3) + u \bigr((\vec{p}_1 + \vec{n}_1) - (\vec{p}-3 + \vec{n}_3)\bigr) + v \bigr((\vec{p}_2 + \vec{n}_2) - (\vec{p}_3 + \vec{n}_3)\bigr) \Bigr) \\ \end{aligned}$$ i.e. $(u, v)$ are barycentric coordinates in a triangle, and $w$ interpolates linearly between $T_1$ and $T_2$.
The one additional vector is $\hat{n}_T$, the unit normal vector of $T_1$: $$\hat{n}_T = \frac{\left(\vec{p}_1 - \vec{p}_3\right)\times\left(\vec{p}_1 - \vec{p}_3\right)}{\left\lVert\left(\vec{p}_1 - \vec{p}_3\right)\times\left(\vec{p}_1 - \vec{p}_3\right)\right\rVert}$$ Its direction depends on the order of the three vertices, but let's assume it points towards $T_2$. (If not, just negate all of its components, or swap $\vec{p}_1$ and $\vec{p}_2$ above to correct the ordering.)
OP noted that they desire $T_1$ and $T_2$ to be parallel, and $T_2$ at distance $L$ from $T_1$. This can be achieved by scaling $\vec{n}_1$, $\vec{n}_2$, and $\vec{n}_3$. If $\vec{N}_1$, $\vec{N}_2$, and $\vec{N}_3$ are the original vectors, then the scaled ones are $$\bbox[#ffffef, 1em]{ \vec{n}_1 = \vec{N}_1 \frac{L}{\hat{n}_T \cdot \vec{N}_1} }, \quad \bbox[#ffffef, 1em]{ \vec{n}_2 = \vec{N}_2 \frac{L}{\hat{n}_T \cdot \vec{N}_2} }, \quad \bbox[#ffffef, 1em]{ \vec{n}_3 = \vec{N}_3 \frac{L}{\hat{n}_T \cdot \vec{N}_3} }$$ because $\hat{n}_T \cdot \vec{N}_i$ yields the the length of $\vec{N}_i$ projected to unit vector $\hat{n}_T$, and $\hat{n}_T$ is perpendicular to triangle $T_1$.
If we use helper vectors $$\begin{aligned} \vec{b}_0 = ( x_0 , y_0 , z_0 ) &= \vec{p}_3 \\ \vec{b}_1 = ( x_1 , y_1 , z_1 ) &= \vec{p}_1 - \vec{p}_3 \\ \vec{b}_2 = ( x_2 , y_2 , z_2 ) &= \vec{p}_2 - \vec{p}_3 \\ \vec{b}_3 = ( x_3 , y_3 , z_3 ) &= \vec{n}_3 \\ \vec{b}_4 = ( x_4 , y_4 , z_4 ) &= \vec{n}_1 - \vec{n}_3 \\ \vec{b}_5 = ( x_5 , y_5 , z_5 ) &= \vec{n}_2 - \vec{n}_3 \\ \end{aligned}$$ then $$\bbox[#ffffef, 1em]{ \Omega(u,v,w) = \vec{b}_0 + u \vec{b}_1 + v \vec{b}_2 + w ( \vec{b}_3 + u \vec{b}_4 + v \vec{b}_5 )}$$ i.e. $$\Omega(u,v,w) = \begin{cases} x = x_0 + u x_1 + v x_2 + w ( x_3 + u x_4 + v x_5 ) \\ y = y_0 + u y_1 + v y_2 + w ( y_3 + u y_4 + v y_5 ) \\ z = z_0 + u z_1 + v z_2 + w ( z_3 + u z_4 + v z_5 ) \\ \end{cases}$$ A vector from $(u_1 , v_1 , w_1)$ to $(u_2 , v_2 , w_2)$ is $$\vec{\Delta} = \Omega(u_2 , v_2 , w_2 ) - \Omega(u_1 , v_1 , w_1)$$ i.e. $$\bbox[#ffffef, 1em]{ \vec{\Delta} = (u_2 - u_1) \vec{b}_1 + (v_2 - v_1) \vec{b}_2 + (w_2 - w_1) \vec{b}_3 + (u_2 w_2 - u_1 w_1) \vec{b}_4 + (v_2 w_2 - v_1 w_1) \vec{b}_5 }$$
If we examine the axis directions at $(u, v, w)$, we find that $$\begin{aligned} \vec{e}_u(u,v,w) = \frac{d \big( \Omega(u + d u, v, w) - \Omega(u , v , w) \big )}{d u} &= \vec{b}_1 + w \vec{b}_4 \\ \vec{e}_v(u,v,w) = \frac{d \big( \Omega(u, v + d v, w) - \Omega(u , v , w) \big )}{d v} &= \vec{b}_2 + w \vec{b}_5 \\ \vec{e}_w(u,v,w) = \frac{d \big( \Omega(u, v, w + d w) - \Omega(u , v , w) \big )}{d w} &= \vec{b}_3 + u \vec{b}_4 + v\vec{b}_5 \end{aligned}$$ therefore the instant $u$, $v$, $w$ unit axis vectors at $(u, v, w)$ are $$\bbox[#ffffef, 1em]{ \hat{e}_u (u,v,w) = \frac{\vec{b}_1 + w \vec{b}_4}{\left\lVert\vec{b}_1 + w \vec{b}_4\right\rVert} }, \quad \bbox[#ffffef, 1em]{ \hat{e}_v (u,v,w) = \frac{\vec{b}_2 + w \vec{b}_5}{\left\lVert\vec{b}_2 + w \vec{b}_5\right\rVert} }, \quad \bbox[#ffffef, 1em]{ \hat{e}_w (u,v,w) = \frac{\vec{b}_3 + u \vec{b}_4 + w \vec{b}_5}{\left\lVert \vec{b}_3 + u \vec{b}_4 + w \vec{b}_5 \right\rVert} }$$
There are three ways of specifying how a direction $(d u , d v , d w)$ at $(u , v , w)$ is transformed to Cartesian coordinates.
Note that $d u$, $d v$, and $d w$ are just the three variables (and not, say, a multiplication with some variable $d$). It is a common notation for differentials, and I used it here out of familiarity. In practice, it means that when you use $(d u , d v , d w)$ to denote a direction, their "length" ($du^2 + dv^2 + dw^2$) is irrelevant, as long as it is not zero; only the direction of that vector matters.
Based on $\vec{\Delta}$ above, i.e. picking a point along the desired direction at some distance, converting both that and the origin to 3D points, and using their difference, normalized to unit length, as the Cartesian unit direction vector:
$$\Omega(u, v, w ; d u , d v , d w) = \frac{\Omega(u + d u , v + d v , w + d w) - \Omega(u , v , w)}{\bigr\lVert \Omega(u + d u , v + d v , w + d w) - \Omega(u , v , w) \bigr\rVert}$$
This yields
$$\bbox[#ffffef, 1em]{\Omega(u, v, w ; d u , d v , d w) = \frac{ d u \, \vec{b}_1 + d v \, \vec{b}_2 + d w \, \vec{b}_3 + (u \, d w + w \, d u + d u \, d w) \vec{b}_4 + (v \, d w + w \, d v + d v \, d w) \vec{b}_5}{\bigr\lVert d u \, \vec{b}_1 + d v \, \vec{b}_2 + d w \, \vec{b}_3 + (u \, d w + w \, d u + d u \, d w) \vec{b}_4 + (v \, d w + w \, d v + d v \, d w) \vec{b}_5 \bigr\rVert}}$$
This is exactly correct only when the mapping is linear.
Using $(d u , d v , d w)$ as the weights for the unnormalized direction vectors $\vec{e}_u$, $\vec{e}_v$, $\vec{e}_w$:
$$\Omega(u, v, w ; d u , d v , d w) = \frac{ d u \, \vec{e}_u + d v \, \vec{e}_v + d w \, \vec{e}_w }{\bigr\lVert d u \, \vec{e}_u + d v \, \vec{e}_v + d w \, \vec{e}_w \bigr\rVert}$$
This yields
$$\bbox[#ffffef, 1em]{\Omega(u, v, w ; d u , d v , d w) = \frac{ \vec{b}_1 d u + \vec{b}_2 d v + \vec{b}_3 d w + \vec{b}_4 ( u \, dw + w \, du ) + \vec{b}_5 ( v \, dw + w \, dv ) }{\bigr\lVert \vec{b}_1 d u + \vec{b}_2 d v + \vec{b}_3 d w + \vec{b}_4 ( u \, dw + w \, du ) + \vec{b}_5 ( v \, dw + w \, dv ) \bigr\rVert}}$$
Using $(d u , d v , d w)$ as the weights for the normalized direction vectors $\hat{e}_u$, $\hat{e}_v$, $\hat{e}_w$:
$$\Omega(u, v, w ; d u , d v , d w) = \frac{ d u \, \vec{e}_u + d v \, \vec{e}_v + d w \, \vec{e}_w }{\bigr\lVert d u \, \vec{e}_u + d v \, \vec{e}_v + d w \, \vec{e}_w \bigr\rVert}$$
This yields
$$\bbox[#ffffef, 1em]{\Omega(u, v, w ; d u , d v , d w) = \frac{ du \frac{ \vec{b}_1 + w \vec{b}_4 }{\left\lVert \vec{b}_1 + w \vec{b}_4 \right\rVert} + dv \frac{ \vec{b}_2 + w \vec{b}_5 }{\left\lVert \vec{b}_2 + w \vec{b}_5 \right\rVert} + dw \frac{ \vec{b}_3 + u \vec{b}_4 + v \vec{b}{5} }{\left\lVert \vec{b}_3 + u \vec{b}_4 + v \vec{b}{5} \right\rVert} }{\left\lVert du \frac{ \vec{b}_1 + w \vec{b}_4 }{\left\lVert \vec{b}_1 + w \vec{b}_4 \right\rVert} + dv \frac{ \vec{b}_2 + w \vec{b}_5 }{\left\lVert \vec{b}_2 + w \vec{b}_5 \right\rVert} + dw \frac{ \vec{b}_3 + u \vec{b}_4 + v \vec{b}{5} }{\left\lVert \vec{b}_3 + u \vec{b}_4 + v \vec{b}{5} \right\rVert} \right\rVert}}$$
These three are all acceptable definitions. The $du^2 + dv^2 + dw^2 = R^2$ spherical shell centered at $(u , v , w)$ is not spherical in Cartesian coordinates, but some other shape resembling an ellipsoid. The definition of "direction" used here is that we essentially try to map that $du^2 + dv^2 + dw^2 = R^2$ shell into a spherical shell in 3D Cartesian coordinates with as little distortion as possible.
The first one provides the direction from $(u , v , w)$ to $(u + du , v + dv , w + dw)$, and is therefore the most versatile numerically, as it essentially maps the spherical shell $du^2 + dv^2 + dw^2 = R^2$ centered at $(u, v, w)$ to the surface of an unit sphere centered at $\Omega(u , v , w)$. This is optimal for those use cases where the direction is defined as pointing from $(u , v , w)$ to $(u + du , v + dv , w + dw)$.
The second and third provide the direction as viewed from $(u , v , w)$; that is, the direction $(du , dv , dw)$ considered relative to the point $(u , v , w)$. In particular, the second form is optimal for use cases such as reflection, where $(du , dv , dw)$ define the direction of the incoming ray. (It is possible to calculate the reflected direction in Cartesian coordinates directly, if we also know the surface normal at point $(u , v , w)$ in those same coordinates.)
In a sense, the second maps the spherical shell to an ellipsoid-like surface, then scales it back to an unit sphere; the third maps the shell to a spherical shell directly. The two only differ in how they map the distortion.
(If you take a balloon with regular dots or latitude and longitude lines, and then squeeze it, you'll see how in different directions angular differences vary. This is that exact effect here. You could think of the three definitions as analogous to three different balloon materials.)
I would personally use the second for lighting effects, when the direction of the incoming ray is in $(u , v , w)$ coordinates (since the reflection occurs at that point); and the first for e.g. target or camera direction calculations (when the direction points at something).
There is an inverse transformation $\Omega^{-1}(x, y, z) = (u , v, w)$ at least for the case when the triangles $T_1$ and $T_2$ are parallel (their respective planes at distance $L$ from each other). However, the solution is rather nasty, so I'll omit it. (I only bothered to solve it for the case where the orientation of the triangular prism was optimal, and even then it uses 15 precalculated constants depending on the 6 vectors defining the prism).