TPham Posted September 15, 2018 Share Posted September 15, 2018 Help, I am a newbie with Affinity. I have a rendered picture and a a very precise mask picture generated by a render engine. Both are in .PNG format. I'd like to use the mask file to mask out the black background and make the background transparent on the picture image so that I can overlay the image onto a new scene file? Can someone help me with step by step procedures? Thank you very much for any help provided. Quote Link to comment Share on other sites More sharing options...
firstdefence Posted September 15, 2018 Share Posted September 15, 2018 Open the main image, and drag and drop the mask image into the main image, make the mask image a child of the main image and change the mask image layers blend mode to erase. Should look something like this in the Layers panel. Quote iMac 27" 2019 Sequoia 15.0 (24A335), iMac 27" Affinity Designer, Photo & Publisher V1 & V2, Adobe, Inkscape, Vectorstyler, Blender, C4D, Sketchup + more... XP-Pen Artist-22E, - iPad Pro 12.9 (Please refrain from licking the screen while using this forum) Affinity Help - Affinity Desktop Tutorials - Feedback - FAQ - most asked questions Link to comment Share on other sites More sharing options...
TPham Posted September 18, 2018 Author Share Posted September 18, 2018 firstdefence, Thank you for the reply. However, here's what I am trying to do. As part of my render objects, I have two files: the Image file (.png) with a black background and a mask file (.png). I'd like to use the mask file to mask off the black background of the image file. The mask area should be transparent so that I can save the masked off image as an object file then I can paste the object into a final scene file. Here's an example of the files: I am so frustrated for not being able to do such a simple operation! Thank you in advance for any assistance anyone can provide. Quote Link to comment Share on other sites More sharing options...
Staff Gabe Posted September 18, 2018 Staff Share Posted September 18, 2018 Hi @TPham, Welcome to the forums. That's pretty easy. Import both images, and arrange them with the mask on the top, and the beauty pass on the bottom. Select the mask image, go to Layer > Rasterise to Mask. Job done Thanks, Gabe. Quote Link to comment Share on other sites More sharing options...
TPham Posted September 18, 2018 Author Share Posted September 18, 2018 Thank for the reply. However, I am quite dense. Here are my step by step procedures and I am not getting the desired results. 1. Launch Aiffinity 2. from File menu> Open...Load image file 3. From Layer menu> New Mask Layer ( the mask layer appears BELOW the image layer) 4. From the mask layer (a white screen)...edit Mask Layer 5. From File menu>Place...load mask file 6. Paste across screen 7. From Layer..Rasterize... The net result is the same original image without masking...what did I do wrong? It seems so crude and cumbersome without the desired result. Can you provide the step by step instructions? I am quite dense when it comes to photo editing. Thank you in advance for any assistance provided. Quote Link to comment Share on other sites More sharing options...
walt.farrell Posted September 19, 2018 Share Posted September 19, 2018 20 minutes ago, TPham said: 7. From Layer..Rasterize... I think that GabrielM suggested Layer > Rasterize to Mask, not using Layer > Rasterize... or Rasterize... from the Layers panel Quote -- Walt Designer, Photo, and Publisher V1 and V2 at latest retail and beta releases PC: Desktop: Windows 11 Pro 23H2, 64GB memory, AMD Ryzen 9 5900 12-Core @ 3.00 GHz, NVIDIA GeForce RTX 3090 Laptop: Windows 11 Pro 23H2, 32GB memory, Intel Core i7-10750H @ 2.60GHz, Intel UHD Graphics Comet Lake GT2 and NVIDIA GeForce RTX 3070 Laptop GPU. Laptop 2: Windows 11 Pro 24H2, 16GB memory, Snapdragon(R) X Elite - X1E80100 - Qualcomm(R) Oryon(TM) 12 Core CPU 4.01 GHz, Qualcomm(R) Adreno(TM) X1-85 GPU iPad: iPad Pro M1, 12.9": iPadOS 18.1, Apple Pencil 2, Magic Keyboard Mac: 2023 M2 MacBook Air 15", 16GB memory, macOS Sequoia 15.0.1 Link to comment Share on other sites More sharing options...
toltec Posted September 19, 2018 Share Posted September 19, 2018 1 hour ago, TPham said: 1. Launch Aiffinity 2. from File menu> Open...Load image file 3. From Layer menu> New Mask Layer ( the mask layer appears BELOW the image layer) 4. From the mask layer (a white screen)...edit Mask Layer 5. From File menu>Place...load mask file 6. Paste across screen 7. From Layer..Rasterize... Far too many steps and some are wrong and why are you creating a new mask layer when you already have a mask image ? 1 Load Image 2 Load Mask Image (i.e. File > Place) 3 Position it. Use snapping (the magnet) to position it exactly. 4 Layer > Rasterise to Mask There is a big difference between Rasterise and Rasterise to Mask. Quote Windows PCs. Photo and Designer, latest non-beta versions. Link to comment Share on other sites More sharing options...
TPham Posted September 19, 2018 Author Share Posted September 19, 2018 Wow, sometimes things that are small trivial and obvious to you could be a big deal to others. Thank you, finally I can create a precise mask! May I ask how to save the object and past it onto another scene file? Quote Link to comment Share on other sites More sharing options...
firstdefence Posted September 19, 2018 Share Posted September 19, 2018 4 hours ago, TPham said: Wow, sometimes things that are small trivial and obvious to you could be a big deal to others. Thank you, finally I can create a precise mask! May I ask how to save the object and past it onto another scene file? You can export it, File > Export... (⌘+E) and export it to a file type that supports transparency i.e. PNG Do you want to crop to the object? If yes, you can Cmd+ click (Ctrl+Click on Win) on the Mask layer, this will show a selection and the marching ants, from here you can do copy cmd/ctrl + C and then File > New from clipboard which will create a new document that is neatly cropped to the object. As a side note, have you noticed you have a faint line on the left side of the object, I'm assuming from how bubbly and smooth the object is, that it isn't supposed to be there? Quote iMac 27" 2019 Sequoia 15.0 (24A335), iMac 27" Affinity Designer, Photo & Publisher V1 & V2, Adobe, Inkscape, Vectorstyler, Blender, C4D, Sketchup + more... XP-Pen Artist-22E, - iPad Pro 12.9 (Please refrain from licking the screen while using this forum) Affinity Help - Affinity Desktop Tutorials - Feedback - FAQ - most asked questions Link to comment Share on other sites More sharing options...
TPham Posted September 19, 2018 Author Share Posted September 19, 2018 firstdefence, toltec, et al., Thank you very much for your patience. As you already have seen, I am extremely novice at this. As far as the faint line goes, I think it is because of the shadow from the light casting from the right emitter? This is a paint test image so I did not run the render very long. The final production image will certain have a much better resolution, hopefully, won't have the same artifact. Would you believe that this is the first time that I've tried to edit a picture in earnest beside the basic cropping to fit using MS Paint? My next task is to create a new document of the cropped image then paste it onto the final scene image, so your advice above was spot on. Thank you again for talking to me like talking to a first grader, I am very grateful for the detail advises. You have certainly put me onto the right path with the new image editing skill set. Quote Link to comment Share on other sites More sharing options...
TPham Posted September 20, 2018 Author Share Posted September 20, 2018 firstdefence, Would you mind helping me again? I <Control>clicked of the mask layer and tried to create a selection but I did not see the fire ants! This is what I saw...no fire ants...no selection...sigh..what did I do wrong? Quote Link to comment Share on other sites More sharing options...
carl123 Posted September 20, 2018 Share Posted September 20, 2018 Try CTRL Clicking on the layer's Thumbnail not where the text is firstdefence 1 Quote To save time I am currently using an automated AI to reply to some posts on this forum. If any of "my" posts are wrong or appear to be total b*ll*cks they are the ones generated by the AI. If correct they were probably mine. I apologise for any mistakes made by my AI - I'm sure it will improve with time. Link to comment Share on other sites More sharing options...
toltec Posted September 20, 2018 Share Posted September 20, 2018 7 minutes ago, TPham said: firstdefence, Would you mind helping me again? I <Control>clicked of the mask layer and tried to create a selection but I did not see the fire ants! This is what I saw...no fire ants...no selection...sigh..what did I do wrong? Make sure you Ctrl + click on the Mask Layer thumbnail, not the name. firstdefence 1 Quote Windows PCs. Photo and Designer, latest non-beta versions. Link to comment Share on other sites More sharing options...
TPham Posted September 20, 2018 Author Share Posted September 20, 2018 <Ctrl>+ Mask Layer "thumbnail". Ok, that's a huge difference. One more question if you tolerate my ignorance, is there another way to overlay the mask file precisely instead of using <File>Place..> command? Despite my effort to set the snap settings in the magnet button, I am not able to snap the mask precisely onto the desired image area. Sometimes, it fit precisely often times, I would miss by a pixel or two, thus, having a thin black line one pixel wide at the edge boundary. If both of my image and mask files are generated by the render engine, I should just align at the top left edge then the overlay mask will be precisely applied onto the image. <File>Place...> command seems like a hit and miss approach...Is there a better way? Thank you in advance for your time. Quote Link to comment Share on other sites More sharing options...
Staff Gabe Posted September 22, 2018 Staff Share Posted September 22, 2018 Try this: File > Open. Select both files. This will create 2 windows/documents. Copy the image layer from one document. Move to the other document and Paste. This will place it in place - if they both have the same dimensions, they will be perfectly aligned. Arrange them in the layer stack with the mask on the top, and the beauty pass on the bottom. Select the mask image, go to Layer > Rasterise to Mask firstdefence 1 Quote Link to comment Share on other sites More sharing options...
toltec Posted September 22, 2018 Share Posted September 22, 2018 26 minutes ago, GabrielM said: Try this: File > Open. Select both files. This will create 2 windows/documents. Out of curiosity, is there any advantage to that over using Snapping and aligning the placed image to the page edges? Quote Windows PCs. Photo and Designer, latest non-beta versions. Link to comment Share on other sites More sharing options...
Staff Gabe Posted September 22, 2018 Staff Share Posted September 22, 2018 Technically, no. It just avoids any human error of accidentally unconstraining the image. On 9/20/2018 at 4:54 PM, TPham said: Sometimes, it fit precisely often times, I would miss by a pixel or two, I guess that's what might have happened here. toltec 1 Quote Link to comment Share on other sites More sharing options...
firstdefence Posted September 22, 2018 Share Posted September 22, 2018 Id just drag the mask in and adjust the position in the transform panel, you can't really get it wrong from there if the mask and image are the same size. Having just said all of that it would be wise to have Move by whole pixels turned off in snapping wouldn't it? toltec 1 Quote iMac 27" 2019 Sequoia 15.0 (24A335), iMac 27" Affinity Designer, Photo & Publisher V1 & V2, Adobe, Inkscape, Vectorstyler, Blender, C4D, Sketchup + more... XP-Pen Artist-22E, - iPad Pro 12.9 (Please refrain from licking the screen while using this forum) Affinity Help - Affinity Desktop Tutorials - Feedback - FAQ - most asked questions Link to comment Share on other sites More sharing options...
firstdefence Posted September 22, 2018 Share Posted September 22, 2018 If you having snapping on and in particular Snap to spread plus its sub option: Include spread mid points you can use the Place option: File > Place with perfect accuracy. A small tip is when placing an image press <Ctrl> down on Mac (it may be the same on windows) to see the image to be placed and also to snap to the document bounds. Just found this little tip while trying to get a screengrab. toltec 1 Quote iMac 27" 2019 Sequoia 15.0 (24A335), iMac 27" Affinity Designer, Photo & Publisher V1 & V2, Adobe, Inkscape, Vectorstyler, Blender, C4D, Sketchup + more... XP-Pen Artist-22E, - iPad Pro 12.9 (Please refrain from licking the screen while using this forum) Affinity Help - Affinity Desktop Tutorials - Feedback - FAQ - most asked questions Link to comment Share on other sites More sharing options...
TPham Posted September 23, 2018 Author Share Posted September 23, 2018 GabrielM and firstdefence, I would have posted the result sooner but I wanted to try out both approaches and on multiple files to see if I can repeatedly obtained the desired results. It seems like GabrielM's approach works very well: "Try this: File > Open. Select both files. This will create 2 windows/documents. Copy the image layer from one document. Move to the other document and Paste. This will place it in place - if they both have the same dimensions, they will be perfectly aligned. Arrange them in the layer stack with the mask on the top, and the beauty pass on the bottom. Select the mask image, go to Layer > Rasterise to Mask " Thank you all just the same for helping me. I consider this the very best of internet...a few peoples willing to spend time and patiently help a complete stranger! Thank you! I hope someday I will be able to do the same helping complete strangers with my meager skill set. Roger C 1 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.