(I am aware using windows forms for this kind of project is stupid and inefficient but it is a requirement for the college course I'm doing so I'm stuck using this)
in windows forms you can draw an image with 3 vertices specified for bottom left, top left and top right vertices, which allows you to skew the image in a slanted or stretched way, but it doesn't allow for the 4th vertex to be specified, so it ends up looking like this 3d cube but side textures have edges of same length, so it does not conform to the shape correctly
I can use a texture brush and a matrix transformation to make it fill the cube side properly but the issue there is that the texture is still the same size for all the "z distance", so it tiles instead of conforming to the "3d" shape as seen here 3d cube side texture fills the polygon correctly and is "squished" but is not "squeezed" so does not give the 3d effect
so I'm just wondering if there's any way to "correctly" transform the texture or image so that it fits the polygon shape correctly and to give a "3d" effect without an extremely ridiculous, tedious and performance taxing method like modifying a texture instance directly before rendering on runtime
i have tried to use graphics.drawImage({image file}, {3 vertex points to conform to}); to draw the image to roughly fill the gap, and I have also converted the faces from quads to triangles to placed them that way but the texture ends up stretched and rotated incorrectly with that method, unless there is a way I can transform the drawimage so that rendering with triangles doesn't squish the texture being rendered.
I have tried to use a texture brush and graphics.fillpolygon({texture brush}, {all 4 vertex points of face}); with a matrix transformation applied to it although it is slightly more taxing than draw image it does fill the polygon completely but it also doesn't get the desired "pinched" effect on the image texture, windows forms matrix transformations have scale x, rotation x, rotation y, scale y, translate x and translate y for reference
Edit: "true 3d" is kind of unreasonable to achieve in winforms without external libraries or hosting directX/WPF in forms, so i've settled for isometric 3d for now based on the answer by dr.null,
i am calculating the positions for the vertices with the following isometric projection equation
public PointF CalculateIsometricProjection(double[] Position)
{
return new PointF(Globals.width / 2 + (float)(((Globals.CameraX + X + Position[0]) * 0.5) + ((Globals.CameraZ + Z + Position[1]) * -0.5)),
Globals.height / 2 + (float)(((Globals.CameraX + X + Position[0]) * 0.25f) + ((Globals.CameraZ + Z + Position[1]) * 0.25f) - (((Globals.CameraY + Position[2]) + (Y / 3) * 2))));
}
where X, Y and Z are vertex coordinates relative to the model, Position is a double array containing X Z and Y positions relative to the world and globals.height/globals.width is the height and width of the form window and globals.camera is the camera transform
Y is height in this instance, as long as each face is a rectangle or parallelogram of some kind the 3d models can be rendered isometrically with textures, otherwise they will need flat colours to be filled as the textures can't transform to non parallelogram shapes

