Transparent picture / PNG - some edges are visible

Ok, some more testing and thinking done after some good sleep, instead of trying to do that on a Sunday night…

The problem here is that images imported as a picture (drag on Rhino, select picture) creates a material with a texture that is a Simple Bitmap Texture. This means that that texture is going to repeat. This is what causes the lines on edges, since the interpolation will see the next repetition on the edge.

To get around that you need to import the image as a Bitmap Texture instead of Simple Bitmap Texture. Then also ensure that the No Repeat box is checked (the one I highlighted in my previous reply).

There is still a bug in Rendered mode where you still see edges like in this - I have updated my original report to reflect this problem instead (RH-53289

image

But Raytraced will show the texture correctly (no extra edges through interpolation).

Did you make sure the sides of the textures had different colors? The ring texture you show has alpha all around, so you won’t see the interpolation artifact.

But if you use for instance the texture I attached earlier

You should see the problem.

Edit:

Here a screenshot with the fixed bitmap settings - left Raytraced, right Rendered

and the texture settings:

I did some testing where I scaled the image 99% but it turned out the same, then I checked the different PNG compressions and it turned out the same, but then when I scaled the content (Ctrl-A Ctrl-T) and saved THEN it works as expected:

EDIT:
@nathanletwory is of course right, it is repeating the edges. It becomes apparent when I rotate the content:
image

1 Like

@Holo, this is what I meant with

So to sum up the problem:

Importing an image as Picture creates a Simple Bitmap Texture. This has repeat on, and that cannot be changed. With non-seamless texture images you are going to see what gets interpolated at the surface edges. Since edges and such are not going to be on the middle of pixels but rather all around your image you are going to see interpolation results from the repeat.

Therefor, to get a correct result you should have a Bitmap Texture with No Repeat checked. This will ensure no interpolation with the texture repeat will happen on edges.

This is assuming you have a plane that also has its entire surface set as the UV domain.

So, even though annoying, and probably unexpected, it isn’t really a bug. And you can ensure your images do get rendered correctly.

That said, there is a bug for Rendered mode of a no-repeat texture, so that is what the bug report is now about, and @DavidEranen is looking into it soon.

edit, to illustrate two more captures, first with repeat, second no repeat:


I see that this can not be changed by us users, and changing from “Simple Bitmap Texture” to “Bitmap Texture” and toggling off the repeat does “fix” it just as you say.

BUT it is most certainly a bug for us users that Rhino chooses to use the Simple Bitmap for Picture objects, when it doesn’t render the edges correctly, so even if it isn’t a software calculation bug per say, it is still a bug that Rhino uses “repeat on” for picture planes and should be fixed IMO. The bugfix would simply be to change the Picture command to use “Bitmap Texture” with repeat off, don’t you agree?

1 Like

don’t quite get what you mean to say?

Mmh I’m still having the issue. Setting up a new material applied to a simple surface results in near the same issue. When i check “no repeat” then the upper repeated edge changes to a faint white line allround the surface, visible in rendered mode.

When I export the file to simlab, it is visible, too.

I think if you check ‘Kacheln abwechselnd spiegelen’ you won’t see this

Yes, that is what I mentioned several times in my previous reply. This is something the YT item RH-53289 is for, and it is on the list of @DavidEranen .

I don’t know about Simlab. You may have to ask the creators there, too.

That would be only because the mirroring part would be sampled instead of the bottom of a repeat…

I know, but if @bodzguard wants to get his work done it’s a fast workaround in the meantime

True enough :slight_smile:

just to add, i am actually experiencing this in the command pictureframe, not that this gets forgotten when fixed.

When I check “‘Kacheln abwechselnd spiegelnd” wich is in english “mirror alternate tiles” gives me a good result within rhino, but when I export it, it somehow flips the textures in simab. I use the rhino plugin of simlab composer, so it is very quick exporting the geometry to simlab, because it just takes the rhino render mesh.

I stay with the “trim the top of the surface” option within my workflow. :slight_smile:


I’ve added RH-53296 to the list.
-wim

1 Like

another workaround: slightly change (enlarge) the scale of the mapping

Hi Wim,

I’m sorry about the More Types problem. It’s an oversight. I am fixing this right now but you won’t get the fix until the next Rhino 6 Service Release. Until then you should be able to work around the problem by changing the Picture material to a Custom material. That will let you choose any texture type you like.

John

PS: I am filing this bug myself so I can commit the fix right now.

https://mcneel.myjetbrains.com/youtrack/issue/RH-53302

2 Likes

Thanks for looking into this, @johnc.
I suppose that for a material of type “Picture”, the only applicable texture types are “Simple Bitmap Texture”, and “Bitmap Texture”, is that correct?

At any rate, I was first playing with this in the RH7 WIP and only later tried in Rhino 6. I noticed a difference between the two and I’m not sure if that is intentional or not (i.e. fixed in 7 and not in 6).
In Rhino 7, when you add a picture object to the scene, the Texture panel will show the texture of that object in its list. In Rhino 6, that texture is not in the list.

I think that is intentional. Rhino should’ve done that since the inception of textures and texture panel. V7 will finally rectify that.

1 Like

@wim Yes, those two bitmap types are the only choices for Picture materials. Nathan is right that the V7 feature is intentional. All first-level textures now appear in the Texture Palette even if they are children of materials or environments.

John

1 Like