PDF Sprite problem

I think that the background of your PDF is rendering as partially transparent. I don’t know if that is your PDF or the renderer.

Any idea why commenting out background causes it to not show up?

changing the background color solves the darkness – I suspect the problem is the renderer (which makes sense if the main use is for games)

@Andrew_Stacey the rendered output is the same to me regardless of batching — I have fixed one other batching issue so that might have been it.

I will submit a bug-fix update to address this and the Xcode export issue shortly, hopefully that will resolve any inconsistencies in rendering.

@Simeon if the transparency is a renderer issue would it be possible to make it optional? There are times when you don’t want transparency

I’m glad to see this is showing some positive results now.



Would it render the background transparent if your PDF had an image for its background? I currently don’t have the software available to test this, but am curious to know how it works out.

When I look at the PDF in the sprite picker then it has a transparent background. With a PDF where I’ve explicitly set the background colour then I get that actual colour.

I’ve just looked at two PDFs, one with an explicit white page colour and one with nothing. There is a definite difference between the two. So Codea is translating an empty background to transparent.

Personally, I view this as a feature not a bug. To work around it, simply render your PDF to a white image first. Or run it through a shader that converts transparent pixels to white.

One change that could be made would be to set the colour of the transparent pixels to white instead of black. Then you could use a blend mode to render a white background. As it is, they are black which means that (as far as I can tell), blend modes don’t help (since we don’t have the ability to specify constant colours in blends).

@akiva we simply use the internal iOS renderer to render the PDF into a texture that can be used on your geometry. If you would like to customise the background colour, then you can render a white (or other colour) background behind your PDF. This should be more flexible for you.