Issue 122777 - 3D Extrusion changes quality of Bitmap-texture
Summary: 3D Extrusion changes quality of Bitmap-texture
Status: CLOSED FIXED
Alias: None
Product: Draw
Classification: Application
Component: formatting (show other issues)
Version: 4.0.0-dev
Hardware: All All
: P3 Normal (vote)
Target Milestone: 4.1.0
Assignee: Armin Le Grand
QA Contact:
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-07-18 08:45 UTC by bugfinderx
Modified: 2017-05-20 10:35 UTC (History)
3 users (show)

See Also:
Issue Type: DEFECT
Latest Confirmation in: ---
Developer Difficulty: ---


Attachments
low qulaity of bitmaptexture in 3D-mode (143.33 KB, image/png)
2013-07-18 08:45 UTC, bugfinderx
no flags Details
Example with screenshot of AOO4.0 and OOo2.4.3 (364.90 KB, application/vnd.oasis.opendocument.graphics)
2013-09-06 18:06 UTC, Regina Henschel
no flags Details

Note You need to log in before you can comment on or make changes to this issue.
Description bugfinderx 2013-07-18 08:45:34 UTC
Created attachment 81099 [details]
low qulaity of bitmaptexture in 3D-mode

In all components (writer, calc, draw, impress) of AOO 4.0 RC1 i found a strange behavior while i worked with shapes and the 3D-extrusion-function.

Open Calc (or draw or writer),draw a star-shape

change the surface-texture to bitmap and choose e.g. mercury (dt: quecksilber)

Activate the 3D-extrusion for the shape

Now in 3D-Mode the quality of the surface-bitmap gets very low (see attachment)


this bug do not occur on every try with ever shape and every texture in all component. Mostly it occurs in calc with a star-shapes, but also other shapes and textures show this behavior (but not all constantly)

Testsystem:

Win XP SP2 (32-bit)

Debian 6.0 (32-bit)

AOO 4.0.0 RC1
Comment 1 bugfinderx 2013-07-18 09:09:39 UTC
It seems, that the texture get zoomed in after activating the extrusion-mode.
the bitmap get zoomed near , that you can see just every pixel.

I am not sure about the appearance of this bug...
I tried the flame-bitmap in calc with different shaps without the bug, but other bitmaps showed the bug. 
in another try (restarting AOO 4.0 RC1) the bug also occurs with the flame-bitmap...
Comment 2 Armin Le Grand 2013-07-18 09:29:13 UTC
ALG: Indeed, happens as described. Does not happen in AOO3.4.1, setting regression keyword.
It looks as if the texture attributes (see Area dialog when object is selected) change when extrusion is switched on, but they do not. Thus, the used original size of the used image (PrefSize) seems to change when the 3D objects for visualization get created.
As workaround, change these values to e.g. a fixed width/height in the dialog to get back the mapping you need.
Grepping...
Comment 3 bugfinderx 2013-07-18 10:36:18 UTC
I did a rightclick on an 3D-shape with a zommed bitmap-textur, selected "surface" (hope "surface is right, in german its "Fläche").
 on the tab "surface" you get a list of all bitmaps and under the topic "Size" (german: Größe) I found 2 Checkboxes, orginal and relativ.
the original checkbox was checked.

After removing this chekc mark on "original", the preview of the used bitmap changes and the bitmap-texture on the shape is shown correct (after pressing ok in the menu)

Its seems to be a correlation to another problem i could notice:

If i paste a bitmap in AOO and change the size to "original" than the graphic is shown much bigger (width and height) than the original *.bmp

i will check this behavior with the bmp today and will write another bugreport for than.
Comment 4 Armin Le Grand 2013-07-18 12:03:54 UTC
ALG: Hi bugfinderx, what do you mean with 'much bigger (width and height) than the original' ? The inserted pixel format has a pixel size, some formats have a logoc size (e.g. SVG has sizes direcly given in various units). For pixel images without that (most of the formats) the system's internal DPI is used to convert this to a logical size in 100/th mm.
E.g. with 1000x1000 pixels, 1000 at 96 dpi (dots per inch) -> 10.42 inch wide and high. As you see, the logical size depends on the system's DPI which you would need to figure out to check if the size shown is correct. Best is to take a bitmap with a known size, insert it and check the shown width/height, then calculate back the DPI and see if this makes sense.
Comment 5 Regina Henschel 2013-07-18 17:25:36 UTC
There are two errors:
(1) The 3D rendering has a setting "Filtering". For full 3D objects it is in on the tab "Textures" in the "3D Effects" dialog. This setting is no longer working. You can see how it should work in OOo2.4. It smooths the pixels, when the background picture is enlarged.
(2) For the extrusion of custom shapes the setting "Filtering" is off. OOo2.4 and AOO3.4.1 had no smoothing for rendering of background in 2D, so 2D and 3D looks the same way bad. But current version has smoothing of background in 2D and therefore "Filtering" should be enabled for extrusion of custom shapes. For full 3D objects it should be on as default.
Comment 6 bugfinderx 2013-07-27 17:58:15 UTC
Hello ALG,

Some older OpenOffice-Versions has shown this "zooming"-behavior with inserted selfmade Bitmaps, i remember (maybe OO 3.2 or 3.3 or both, cant remember).

I inserted a selfmade Bitmap and changed the size (width and high). But then i decided to bring size back to original. I choose "Graphik" (or "image?" in english? German: "Bild") in Contextmenu, Choose "Typ" and clicked on "orignal size (Originalgröße).

OO than scaled the image to a size bigger than the original, like it does now with the Bitmap-Textures in 3d extrusion-mode.

I have to say, i coundnt reproduce this problem with the inserted selfmade bitmaps with AOO 4.
Comment 7 Regina Henschel 2013-07-27 21:10:11 UTC
The wrong size is in case of "Original" and "Tile" are both checked. If "Original" is not checked but only "Tile", the size is OK.

This is already broken in r1348096, but it is OK in branch AOO3.4. Branch tag for AOO3.4 is at r1332934.
Commit r1336585 seems to be one, that has changed something in that part.
Comment 8 Armin Le Grand 2013-09-06 15:14:10 UTC
ALG: Checked again, same in 3.4.1, so removing regression again. Seems to have to do with the 3D object creation for customshapes; these seem to have a different logical size comared to the 3D objects created when using convert/to3d.
Comment 9 Regina Henschel 2013-09-06 18:06:28 UTC
Created attachment 81475 [details]
Example with screenshot of AOO4.0 and OOo2.4.3

Armin, you are right. It is wrong already in OOo3.4. It was OK in OOo2.4.3., see attached screenshots.
Comment 10 Armin Le Grand 2013-09-09 11:58:32 UTC
ALG: Problem found, it's some old adaption stuff from the beginnings of 3D engine in creation of coustumshape 3Dgeometry. Checking again...
Comment 11 Armin Le Grand 2013-09-09 12:24:28 UTC
ALG: Committed, done. Filtering is a separate item, dependent of the 3d renderer in place.
Comment 12 SVN Robot 2013-09-09 12:56:57 UTC
"alg" committed SVN revision 1521070 into trunk:
i122777 Corrected texture mapping for 3D CustomShapes