so I'm trying to create this image, but in 3D. Does anyone know how to go about doing this? I'd like the object to be shown vertically at a 45 degree angle, ideally.
I would agree with both Jooja and Vincent that the "3D Tools" in Illustrator scarcely deserve that nomenclature, and any decent 3D DCC (Digital Content Creation) is a far better bet for this task. Illustrator's "3D" tools are a fake, plain and simple.
That said, it's not impossible - merely annoying, clunky and cludgey, and vastly inaccurate.
Don't ask for a lot more than that, becaue Illustrator's "3D" tools can't deliver more than this really.
If you've a lot more illustrations like this to develop, look into any decent 3D DCC (Digital Content Creation) tool:
In my case, my DCC tool-of-choice is Modo - and though in fact there are literally dozens of way I could approach modeling a pipe like this, here are two super-quick ways - one using procedural meshes and MeshFusion, and one doing the simple, old-fashioned direct modeling - which in Modo is pretty darn easy and fast too.
The advantage to the procedural appraoch is ongoing flexibility - you define a curve, and the procedural sweeps the chosen profile along that curve - both remain live-editable after the geometry is derived, which is pretty helpful.
The advantage to the direct modeling approach is sheer simplicity: you create a circle of polys (I cheat and use the cylinder primitive for that) and then extrude - or in my case polygon bevel. You rotate your view to be orthogonal to the object, and then rotate a row of polys, and then extrude those; rinse and repeat to make your elbows. Duplicate / mirror to get the obverse portions of the dog-legged bends - then duplicate / mirror the whole assembly to get the other end - select the ending edges on each separated end and bridge those - hey presto!
Oh - of course one thing I like about the direct modeling approach is then you can select a couple of polys and hit "L" for loop and it selects all the connected polys forming a loop, and you can then expand that selection with the outer square bracket, scale those with a local origin, and hey presto - you have PVC-style pipe connectors between the straights and the elbows - easy-peasy!
And then of course getting a nice render out with PBR materials and nice lighting is always a solid plus in my book.
Or you might even want 3D engineering tools - similar to what @user287001 shows in their excellent answer - these are a couple of alternative to Design Spark Mechanical - each has their area of core strength:
Hope that helps.
Drawing it in 2D is a solution, but one must have learned basic drawing skills to get it right with no reference. If it must be done in Illustrator or other 2D vector drawing program you can make a reference in a 3D program and draw a simple enough copy.
Of course it would be ideal if the rendered 3D model could be imported to Illustrator and completed to a proper vector drawing with minimal effort.
Illustrator's own 3D effects are a poor help because a shape even this simple must be made in pieces which are virtually impossible to make to fit and have consistent lights & shadows.
Pro level 3D design and engineering programs are complex if you haven't already learned one. But there exists also entry level programs which are easy to use and can substantially help getting the Illustrator drawing done.
Creating the 3D model is done in CAD programs generally like this: 1) Draw a sketch of the pipe axis 2) Round sharp corners and draw the pipe cross-section profile:
Rotate the profile perpendicular with the axis, pull the profile along the axis to get solid 3D piece:
The result is shown as wireframe and the axis curve isn't removed nor hidden already. This can be generally exported and opened in illustrator as vector (as vector PDF in this case).
Changing rendering mode to "shaded" gives this:
Here pro level programs make a difference. Entry level programs have only solid colors and fixed light, there's no photorealistic materials nor light environment.
But this result and also pro quality renderings can be exported only as bitmap images. It can be used in Illustrator as is or as color overlay of the wireframe version if one can accept bitmap elements.
Or it can be used as drawing model for gradient mesh shading. Often much simplified glosses can do the trick and drawing them with a reference is easy. The shaded image suggests to insert black and white like this to otherwise grey fill color:
These shadings are quite coarse. They are drawn manually over the shaded image. But it's unnecessary. As well one could separate the areas with Illustrator's tracing or Photoshop's Artistic > Cutout filter and the result would be better.
One advantage of a 3D program is the possibility to get different views with zero effort. In 2D every view must be started from the beginning
The used 3D CAD program = DesignSpark Mechanical. It's a simplified but free version of SpaceClaim.
Here's another case which a little resembles your problem. It's very difficult in Illustrator only, but quite easy with 3D CAD help: