# Combining isolatedWithTarget and compositor

**URL:** <https://openrndr.discourse.group/t/combining-isolatedwithtarget-and-compositor/369>\
**Category:** How to?\
**Created:** [April 25, 2022, 6:03pm UTC](https://openrndr.discourse.group/t/combining-isolatedwithtarget-and-compositor/369 "2022-04-25T18:03:17Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![antdegouv](https://avatars.discourse-cdn.com/v4/letter/a/46a35a/32.png) [@antdegouv](https://openrndr.discourse.group/u/antdegouv)\
**Post date:** [April 25, 2022, 6:03pm UTC](https://openrndr.discourse.group/t/combining-isolatedwithtarget-and-compositor/369/1 "2022-04-25T18:03:17Z")

</div>

Hey there, very new to openRNDR coming from a Processing world!

Most of my work with generative art is based in generating large scale work in still images, i do collections by the hundreds based on seed numbers. So i prefer not to have a display window. because it seems to be very taxing.

i use, isolatedWithTarget (and renderTarget) and directly saveTofile(file("./img $seed . jpg"))

it’s been working out

Now i wanted to try to use compositor with my main interest being blend modes and maybe some filters like blur.

But i don’t know how to put them together or know how to think about this problem. would the composite be made inside the buffer or does the buffer somehow get the composite.

I have a lot of experience with processing but i don’t think i’m good enough of a programmer.

thanks a lot in advance  
Antonio

---

<div class="post-metadata">

**Author:** ![antdegouv](https://avatars.discourse-cdn.com/v4/letter/a/46a35a/32.png) [@antdegouv](https://openrndr.discourse.group/u/antdegouv)\
**Post date:** [April 27, 2022, 8:24pm UTC](https://openrndr.discourse.group/t/combining-isolatedwithtarget-and-compositor/369/2 "2022-04-27T20:24:49Z")

</div>

if anybody from the future is wondering i eventually came up with this.  
At this point i have no idea if this is the most effective way of doing it.

```auto
program{
    var renTar = renderTarget(someWidth, someHeight){
        colorBuffer()
    }

   var seed = 0

    val composite = compose{
         draw{ //draw things }
         layer{ // draw other things }
    }

  drawer.isolatedWithTarget(renTar) {
     ortho(renTar) // dont forget this like i did

     // draw the composite on the render target
     composite.draw(drawer)
  }

  extend{
            canvas.colorBuffer(0)
                .saveToFile(File("/fileDestination/$seed.jpg"))

            // control the loop

            seed += 1
            if (seed > 3) {
                exitProcess(0)
            }

  }

}

```
