Resolution of a photo can be limited by:
- The optical limits of the lens
- Number of pixels
- The viewing conditions of the image (display size/enlargement, viewing distance, visual acuity of the viewer)
The most restrictive factor of the three in a particular photo is what ultimately limits the resolution of an image as it is perceived by a viewer. By resolution we generally mean alternating black and white lines of the smallest width on a test chart that can be distinguished from each other when those lines are at the distance to which the lens is focused.
If the sensor can resolve finer details than the lens can project, then you are limited by the resolution of the lens. In that case a larger sensor will produce a sharper image using the same lens than a smaller sensor with the same number of pixels if both show the same FoV and you are viewing both at enough enlargement to be able to tell the difference.
The larger sensor with the same number of pixels as a smaller sensor will also have an advantage when the resolution limit of the lens is higher than the pixel pitch of the larger sensor but is not as high as the pixel pitch of the smaller sensor. The advantage will be greatest when the lens' resolution is almost the same as the pixel pitch of the larger sensor. The advantage will be least when the lens' resolution is almost the same as the pixel pitch of the smaller sensor. When the pixel pitch of a sensor exceeds the resolution limit of a lens, the greater pixel density only serves to capture more blur.
If the lens can project details that the sensor can't resolve then you are limited by the resolution of the sensor. If two sensors of different sizes have the same number of pixels and the resulting photos with the same FoV are displayed at the same size the amount of detail in the images will be the same.
If the viewing size is not large enough that the resolution limits of the lens and sensor are not perceptible to the viewer then those other limits do not matter at all. The limits of the display medium and the visual acuity of the viewer will be what limits the maximum detail that can be seen by the viewer regardless of the limits of the lens and sensor.
The question, as written, makes it difficult to understand exactly what you are asking.
Let's say I have a 90mm and an 135mm lens, and Nikon's 24mp full frame and 24mp APS-C DSLR.
Which lens is on which camera? The 90mm lens is listed first in the first clause, and the FX camera is listed first in the second clause. Normally this would mean 90mm lens + FX camera and 135mm lens + Dx camera. The 90mm lens on the FX camera will give a significantly wider field of view (FoV) than the 135mm lens on the Dx camera. If you reverse the order of either the lenses or the cameras, you will get an equivalent FoV with the 135mm lens on the FX camera and the 90mm lens on the Dx camera. Is that what you meant?
So, in terms of sharpness and details (I don't know their difference), will it be the same with an image taken with 135mm lens? How about when viewing on 100% size?
"...image taken with 135mm lens?" On which camera? The FX or the Dx?
"...viewing on 100% size?" On what size monitor with what pixel pitch?
From which lens on which camera do you wish to compare the photos? Or do you wish to compare a photo taken with the 135mm lens on the FX camera to a photo taken with the 90mm on the FX camera and then cropped to the same FoV as the photo taken with the 135mm lens on the FX camera? Surely you don't mean to compare a photo taken with the 90mm lens + FX camera and cropped to match the FoV of the 135mm lens + Dx camera taken from the same distance do you?
The enlargement ratio of an image viewed at 100% on a monitor depends on the pixel pitch of the monitor as well as the number of pixels in the image. If you have a monitor with a pitch of 96 pixels per inch then viewing a 4800x3200 pixel image at 100% will be the equivalent of viewing a section of a 50x33 inch print! If you view the same 4800x3200 pixel image on a 72 ppi monitor, you've enlarged to about 67x44 inches!
I find this confusing because, when you shoot further away, you will lose some tiny details, vs if you just shoot it with a longer lens. But that will mean APS-C inherently takes in less details than full frame, which doesn't sounds right. Or does using APS-C gives more details than doing a DX-crop on a full frame body? Is it because it gives more pixel?
If you shoot further away with the same lens you make the FoV larger and the size of objects within the FoV smaller. If you "...just shoot with a longer lens..." from the same distance you make the FoV smaller and the size of objects within the FoV larger. So of course shooting from further back with a wider lens will reveal fewer details of the same subject than shooting from closer with a longer lens.
Let us assume you want to compare the 135mm lens on the FX camera to the 90mm lens on the Dx camera. Also assume that both lenses can resolve the same number of lines on a test chart at the same aperture when they are at different distances to the chart so that the chart is the same size in the virtual image projected by each lens. This means that the test chart will fill the sensor when using the 90mm lens on the Dx sensor at, say, 10 feet. This also means with the 135mm lens the distance would need to be increased to 15 feet to fit the entire test chart on the same Dx sensor. If the chart is resolved to the same number of lines per inch (as displayed on the chart) with both lenses then we will say they have equal resolution.
Now we put the 135mm lens on the FX camera. To fill the frame with the test chart we have to move the 135mm lens + FX camera back to the same 10 feet we are using with the 90mm lens + DX camera.
What will be the difference in resolution between the 135mm lens + FX camera and the 90mm lens + Dx camera?
The difference will primarily be in the varying magnification ratios and how they interact with the resolution limits of the lenses.
To fill the frame with the same flat test chart at the same distance one needs to shoot with a 1.5X shorter focal length lens with the crop body than with the full frame body. If you use 135mm for the full frame body then you must shoot with a 90mm lens with the crop body. This makes the FoV equal. What hasn't remained equal, however, are the number of lines per inch on the test chart (as measured in the virtual image projected onto the sensor) that the 135mm lens is capable of resolving when it is moved from 15 feet to 10 feet away from the test chart. The virtual image of the test chart cast by the 90mm lens from 10 feet away is smaller (24mmx16mm) than the image of the test chart cast by the 135mm lens from 10 feet away (36mmx24mm). So the 90mm lens' resolution will be more limited (in terms of lines per inch on the test chart) than the 135mm lens when both are used from 10 feet.
Remember, the 135mm lens could project the same number of lines per inch from the test chart onto the 24x16mm sensor from 15 feet away that the 90mm lens could project onto the same 24x16mm sensor from 10 feet away. That means that from 10 feet those same lines on the test chart are now 1.5X as large in terms of angular size as viewed by the lens.
If both sensors can outresolve the lenses then the FX camera + 135mm lens will show finer details than the Dx camera + 90mm lens when both images are viewed at the same display size and the display size is large enough to see the resolution limits of the respective lenses. (Per the opening sentence of the question we're assuming the APS-C and FF sensor have the same number of pixels).
If both lenses can outresolve both sensors then the Dx camera + 90mm lens and the FX camera + 135mm lens will show the same level of detail. (Per the opening sentence of the question we're assuming the APS-C and FF sensor have the same number of pixels).
Remember, to get to the same display size the image from the Dx camera must be enlarged by 1.5X more than an image from the FX body. For a 24x16 inch display size the full frame image need only be magnified at about a factor of 16.9 compared to 25.4 for the crop body image. If both cameras have the same number of pixels then the difference in magnification will be offset by the difference in pixel pitch between the two sensors.
On the other hand, if both cameras have the same pixel pitch then the FX image will have 2.25X more pixels and will thus have finer detail. With the greater magnification needed to display the image from the Dx sensor you are also stretching the resolution limits of the lens to a greater degree. To put it another way: to get the same sharpness with the crop body when shooting the test chart from the same distance you would need a 90mm lens capable of resolving 1,200 lines per inch to equal the full frame camera with a 135mm lens capable of resolving 800 lines per inch!
The other way to look at this is to compare photos of the same flat test chart from both cameras taken using the exact same lens. The Dx camera will require 1.5X as much shooting distance as the FX camera to get the same framing.
For simplicity's sake the following theoretical illustration assumes an APS-C sensor that is 1.5X smaller than the FF sensor, both 24MP sensors can outresolve the lens, and that the resulting images will be viewed at enough magnification to see the resolution limits of the lens.
Imagine that you have a lens with theoretical resolution limit of 1000 line pairs per mm as measured in the virtual image projected by the lens. With a 24mm wide sensor it could project 24,000 line pairs onto the sensor. With a 36mm wide sensor it could project 36,000 line pairs onto the sensor. Now take a test chart with 36,000 line pairs that fills the frame of the FF camera at ten feet. If you back up to 15 feet to fill the frame of the crop body camera with the same test chart then the 36,000 line pairs on the test chart are going to exceed the resolution capability of the lens because the lens can't resolve 36,000 line pairs onto a 24mm wide sensor.
You don't back up because the lens magnifies more when attached to a crop body. The lens projects the same size image either way. The reason you back up is to allow the smaller sensor to capture the same framing. This reduces the angular size of the test chart by 1/1.5X in the virtual image actually projected by the lens. But you don't reduce the angular size of the resolution limit of the lens by 1/1.5X by backing up.
At 15 feet from the chart the angular difference between each line pair is 1/1.5X the angular size when the camera was 10 feet from the chart. But the lens still has the same resolution limit that is ultimately based on the angular size, as measured from the camera, of the line pairs on the test chart. Line pairs per mm on a chart can only be meaningful when the distance from the camera to the chart remains constant as well as when the magnification factor from the virtual image projected on the sensor to a particular display size remains constant.
By backing up you reduced the angular size of the test chart and have increased the width of the smallest lines on the test chart that the lens can resolve by a factor of 1.5.
You then enlarge the APS-C image 1.5X more than the FF image in order to view both images at the same display size. This means that with the image from the APS-C sensor we can perceive blur circles (as measured on the sensor prior to display magnification) that are 1/1.5X the size of blur circles at the limit of our perception on the FF image. Slightly blurred edges that would look sharp in the FF image can be seen as blurry due to the greater magnification of the APS-C image.
If the 1.5x crop body image of a 24K line pair chart taken from 15' is printed at 4x6 and the FF image of a 36K line pair chart taken at 10' is printed at 6x9, then the sharpness should be the same because the line pairs would be the same width on both prints. The larger print would have 1.5X as many line pairs of the same width, though, because the print is 1.5X as wide. But when you print the 1.5 crop body image at 6x9, the line pairs (which are at your lens' resolution limit) are now 1.5X wider. You don't gain any additional subject detail by enlarging more, because the lens didn't resolve those details smaller than the width of the line pairs. At that point you are only enlarging blur.
The two effects are multiplied when using the same lens with a smaller sensor: pulling back for the same framing reduces the angular size of subject details by 1.5X, then magnifying by 1.5X more to display at the same size decreases the acceptable Circle of Confusion by a factor of 1.5X.