Image Texturing Properties in Core Image Filters

Serious Cyrus's picture

I'm trying to replace something I do with a render in image with a core image filter akin the "Source Atop" filter.

The problem is to overlay one image on another, the final image size should be independent of either input image. It's a cinch using render in image and sprites, but I've been checking the performance of some of my comps, and the render in image seems to be a big hog, so I want to try to replace with other techniques core wherever possible.

My image uses image texturing properties, but when I put them through a core image filter, it seems only the original image is shown, is there a way to access the image defined by the texturing properties in the kernel? Do I have to crop and scale images first? If so, is there a way to get the texturing properites back from the image, as they may have been defined in another process.

Attached is a comp showing the problem.

PreviewAttachmentSize
Render in Image Problem.qtz46.48 KB

Serious Cyrus's picture
Re: Image Texturing Properties in Core Image Filters

No one? Is this one of the lmitiations of the ci filters?

It should be possible at least for filters to take the texturing properties into account. For example, the ColorInvert patch works on an image with texturing properties, and that's CI. Should it nbot be possible to do the same in a custom filter? I tried looking at ROI functions, which is probably what I need to define the working area, but no idea how to get the texturing properties associated to the image. I'd at least like that to work.

I'm reluctant to use image crop, as I've had performance issues, where image texturing properties work like a charm.

gtoledo3's picture
Re: Image Texturing Properties in Core Image Filters

Some tips to getting better/more responses:

  • sample composition(s) that illustrate what your problem is

  • less assertions mixed in about what you do/don't want to use or performance of stuff. It seriously doesn't make much sense to be insisting performance issues with crop, and I'd guess most people see that comment or the one about render in image being a hog and just move on.

Btw, image texturing properties kind of skips through the chain and happens on the renderer. It's as if the patch(sprite or whatever) is put in a kind of 3d transform that you don't see, and that effects texture, not verts.

Serious Cyrus's picture
Re: Image Texturing Properties in Core Image Filters

OK, no worries, was trying to define my problem more, but I'll admit I'm a relative newbie to the underlying mechanics of it all, so I'm quite likely to get it wrong, I don't mean to put people off.

I've worked further on my problem compositions, Render in Image seems much less of a problem now I've reworked many of them with a bit more thought, and it's no longer the hog (from what I can tell, of course). I'm using the instruments tools in xcode as best I can.

I'm still interested in just getting the scaled texture working in a CIFilter, I've been looking at other stuff as it was giving me a headache. I'll have another crack at it this week.

I did post a comp for this one, the left image is my desired result, the video image is scaled, the final image is of different dimensions to the inputs, and all images aligned. On the right, well, it's just not working, getting the images the right size I think I can handle, but getting the scaled texture eludes me.