I'm trying to make an object in blender that look like this:
I want to make the final render turn out 3D. Is this possible to do in Blender?
Is there some trick to making these objects?
The 3D shape of a impossible object (this one is called a Penrose square) isn't defined, so you will have a hard time recreating the mesh representation (i.e. exact vertex location and connectivity) of something that can't be described in the 3D space.
However, you can do the same thing that people do when photographing such objects: creating an object that looks like the Penrose drawing, but only from an angle. // Edit >> Note: this is more easily done with an ortographic camera, as MrTheRich's answer suggests! If you need/want to go perspective (for example, to composite it on a photo background), a higher focal length is advisable.
For example navigate this or this model on sketchfab: you will see that some of the edges that "look" connected, are actually separated.
There are also ways to use curved shapes that only look straight when seen from the camera. This allows to retain the connectivity.
You may notice that people who have tried that have often used shadeless scenes.
This is because the shadows introduce an extra complication, since the light "sees" the scene from a point of view that isn't tricked (the trick only works in the direction of the camera), so it tends to give the trick away! You can use a very soft light, close to the camera. It will probably look alright.
One possible shading, that requires using the "invisible curve" trick, which keeps the edges' proximity, is Ambient Occlusion: it only needs to be realistic around the edges.
Edit Nov 6 2020 – There is a wonderful example and write-up on the process in today's blog post on sketchfab
I have worked a lot with making impossible objects and 3D print them. The "trick" in your picture, is that it is something in 2D, but our brains try to interpret it as 3D. So to make this object in 3D, you would have to go the other way: "project" it back to 3D. This will only make it look this way from certain angles/distances, though.
Here are some examples I have made. They are based on ambiguous cylinders math by Kokichi Sugihara. Check out his papers for how to do this.
File on thingiverse - or try rotating it here
As you can see, it's really a curved shape, but from certain angles it looks like a star/flower, or from another angle it's a circle.
The trick to this is to use Orthographic mode in the camera instead of the default perspective mode. This makes objects in the distance appear as big as objects in the front which helps with building whatever illusion you make.
If you study the many impossible illusion effects available, you see that they are all orthographic and don't have perspective.
Further more, there are other tricks with lighting explained in the other answer. But orthographic vs perspective is one of the most important tricks.
People have already given brilliant answers, this is just a reminder that in some situations it's easier to cheat. Depending on your project you may be able to get away with using a 2d sprite on a plane and animate distortion effects on the plane in time with any camera movement to give the illusion of a 3d impossible object.
Not expecting this to be the optimal solution, but just a reminder that you only have to have your renders look real from the angles they're going to be seen from.
You CAN make this image but you have to make an optical illusion like an optical illusion. It will matter from prospective. The shape doesnt even need to be complete to be honest. So think outside the box and hide your fake shape sides. If you want to make it actual, then you cant.