Drawing many triangles sounds slow and unattractive...
Needn't be. You can simply create a d3d model and draw that... the vertices are then stored in graphics memory (if you use GM8.1) which is about as fast as drawing a single quad. Remember that you won't need hundreds of triangles.
I don't know where to begin when it comes to attempting that on a sprite. Could you guide me to what functions I should be looking at?
I think you won't need to switch to 3D mode for this. You could start with something like this:
// setup perspective projection
d3d_set_projection_perspective(0, 0, room_width, room_height, 0); // change this to view_xview[] and family if necessary
// transform the sprite.
d3d_transform_set_rotation_x(/*...*/); // rotating about the x axis will make the top / bottom area become smaller
d3d_transform_add_rotation_y(/*...*/); // rotating about the y axis will do the same but with the sides
d3d_transform_add_translation(x, y, 0); // where you want the sprite to be drawn
draw_sprite(/*...*/, /*...*/, 0, 0); // always draw at (0, 0)
d3d_transform_set_identity(); // reset the transformation
d3d_set_projection_ortho(0, 0, room_width, room_height, 0); // reset normal projection. Again use view_* if necessary.
Remember that with perspective projection, the deformation will change depending on the position of the image relative to the camera. So if you draw the image in the middle of the screen, you will get another result than if you draw it, for instance, in a corner.