Jump to content
You must now use your email address to sign in [click for more info] ×

Recommended Posts

  • Staff

Hi calerius,

Welcome to Affinity Forums :)

You can quickly generate slices for any layer (or group/object) in the Layers Panel in Export Persona. You just have to select them and press the Create Slice button on the bottom right on the same panel. Affinity will generate the slices for all layers selected automatically for you.

Link to comment
Share on other sites

Enclose each of your icons with an empty rectangle having a size of 32 by 32 pixels, and create the slice from that, using the method indicated by MEB … would that work? Maybe you will have to change the document structure though …   :)

Link to comment
Share on other sites

Hi Calerius

 

I read the post with interest as I have had to deploy a similar technique as described by MED and A_B_C. when working on my new set of brush nozzles (icons basically!)

 

The workflow I eventually used....

 

a. Create the grid as outlined in the linked video (pixels (icon dimension + subdivisions)+Gutter to suite)

 

b. Activate Snapping/force Pixel alignment/move by whole pixels

 

c. Add artboard if required (but not necessary)

 

d. Add layer, name it (for reference [slice Maker]). Then add rectangular shapes with just a neutral fill (no outline) to the exact dimensions of icons required (32x as described) and aligned according to pixel grid; when it came to sizing for me I used a larger size and scaled down using the export persona options (multiple output) once this is set up it saves a lot of time

 

e. Sorry Missed something: In pixel Persona navigate to layer/object/groups containing the base rectangles; select all and create slices (Hit create button) should make all in one hit

 

f. Go to Pixel Persona and select Layers Tab.Select all rectangle objects (Shift + Click); Click on Make Items Visible on Export' (small eye) to turn off/deactivate

 

g. Save you template

 

This should give you a working re-usable template but you can extend it by setting up the required export options and adding unique names (so files do not get overwritten)

 

Helpers:

Create objects on separate layer

 

A bit time consuming but if you create an icon on separate layers then name layer according to what is required you can create additional slices from those layers and/or control the naming convention for Persona Output

 

Once set up use continuous output in Pixel Persona to automatically update changes

 

You can change size of output/scaling with 0.5x or 0.25x as well as 1x , 2x  etc in export file size option beneath filetype options 

 

DPI can be changed in the popup dialogue box (Click on output filename button)... took me a while to find that one must have been asleep! :mellow:  

 

Hope this helps..and I haven't missed anything! :o

 

Affinity Version 1 (10.6) Affinity Version 2.4 All (Designer | Photo | Publisher)   Beta; 2.4 1.2344
OS:Windows 10 Pro 22H2 OS Build 19045.4046+ Windows Feature Experience Pack 1000.19053.1000.0
Rig:AMD FX 8350 and AMD Radeon (R9 380 Series) Settings Version 21.04.01 
Radeon Settings Version 2020
20.1.03) + Wacom Intuous 4M with driver 6.3.41-1

 

 

Link to comment
Share on other sites

Hi again,

 

So I have done as you suggested Stuart_R. But when I create the slices they have different sizes. Some are 64x64, but some are 65x64. Odd behaviour since all objects are copies of each other.. Any ideas?

Link to comment
Share on other sites

When I had an issue like this I manually adjusted the slice to fix.. it in my case making sure each one was 200x200px (Size of my brush nozzles) 

 

Do all the slices show the same size in Export Persona? i.e. 64x64;displaying on the 'blue bar' on top of slice.Before you export them

 

Do any have outlines? Are any of the graphics lying outside the slice area?

 

I know that I had to modify a few slices by zooming in and snapping to grid 

 

Affinity Version 1 (10.6) Affinity Version 2.4 All (Designer | Photo | Publisher)   Beta; 2.4 1.2344
OS:Windows 10 Pro 22H2 OS Build 19045.4046+ Windows Feature Experience Pack 1000.19053.1000.0
Rig:AMD FX 8350 and AMD Radeon (R9 380 Series) Settings Version 21.04.01 
Radeon Settings Version 2020
20.1.03) + Wacom Intuous 4M with driver 6.3.41-1

 

 

Link to comment
Share on other sites

and check in transform panel to make sure each is 64x64 not 64.1 or 64.5

 

Affinity Version 1 (10.6) Affinity Version 2.4 All (Designer | Photo | Publisher)   Beta; 2.4 1.2344
OS:Windows 10 Pro 22H2 OS Build 19045.4046+ Windows Feature Experience Pack 1000.19053.1000.0
Rig:AMD FX 8350 and AMD Radeon (R9 380 Series) Settings Version 21.04.01 
Radeon Settings Version 2020
20.1.03) + Wacom Intuous 4M with driver 6.3.41-1

 

 

Link to comment
Share on other sites

I made the following document by following this procedure:

  • Created a custom grid, spacing 32 px, divisions 1, gutter 40 px
  • Engaged Snap to Grid and disabled all other snapping options
  • Created a 32 by 32 pixels square on the grid
  • Duplicated to the next grid-square (Cmd)
  • Used Power Duplicate to fill the row
  • Selected the whole row of squares, duplicated it to the next row
  • Used Power Duplicate to complete the page
  • Locked all squares
  • Went to Export Persona > Layers List, created slices from my squares

My slices were perfectly aligned. Wouldn’t that work for you?  :)

Slices.afdesign

post-1198-0-92129000-1493831455_thumb.png

post-1198-0-30441800-1493832007_thumb.png

Link to comment
Share on other sites

Thanks A_B_C, tried that and snapping is not working the way I supposed.. Did this on my "first" document of the day and on that I have coordinates that are not pixel perfect... Also when I create the slices they have different sizes than the rectangles....

Link to comment
Share on other sites

As long as you enable Snap to Grid, you don’t need to engage pixel-perfect alignment, for the grid will be pixel-perfectly spaced on your canvas.

 

However, you will have to use pixels as document units … could that be the problem?  :unsure:

post-1198-0-34830400-1493832238_thumb.png

Link to comment
Share on other sites

@Stuart_R It is in Export Persona that I saw that the size differed. Some of the slices has the size od 65x64, but one has 75x65 which is very odd.

 

There are some icons that are strokes, but I have changed them to go on the inside and no part of the icons are outside of the rectangle (that I can see).

 

Since I will be converting all of our icons from Illustrator to AF (app. 2500 icons) I would love to minimise the manual work. :)

 

But I think that I have solved it with art boards now. Will test it our tonight.

 

Thanks for all input!

Link to comment
Share on other sites

Happy to try and help :)

 

Interesting Problem though ..I have been trying to recreate the issue and make the slices create odd sizes; but I couldn't ...without physically setting the slice size. maybe it's just a Mac issue

 

I did find another problem but not related to an extra px. :huh:

 

Been reading your bug report..MEB is one of the best living resources on the forum! I am sure he will get to the bottom of it

 

2500 icons ..that's a lot of work and must be frustrating being held up..hopefully only briefly

 

Affinity Version 1 (10.6) Affinity Version 2.4 All (Designer | Photo | Publisher)   Beta; 2.4 1.2344
OS:Windows 10 Pro 22H2 OS Build 19045.4046+ Windows Feature Experience Pack 1000.19053.1000.0
Rig:AMD FX 8350 and AMD Radeon (R9 380 Series) Settings Version 21.04.01 
Radeon Settings Version 2020
20.1.03) + Wacom Intuous 4M with driver 6.3.41-1

 

 

Link to comment
Share on other sites

Hi,

 

Yes, this is a big job. And I'm still struggling with it. :( 

 

I made a document and added just ten artboards with icons. Everything worked and the slices where correct. I then duplicated the artboards, with cmd and shift to keep the snapping. Tested again and everything is fine.

 

So I started adding more artboards and icons and now have approx. 100 artboards with icons, some of the icons will be exported twice due to different filenamnes. So far so good. But now I went to export persona and all icons suddenly has 1 pixel extra in width. After breathing a couple of times I went over with the artboard tool to change the position of them and they look like they are in the right place. So went back into E.P and nothing has changed. Back to the artboard tool and now not one of the artboards has the right position and i cannot change them. Despite my efforts, using both the transform panel and align tool they have the position of X 1000.817472.....

 

any tips or do I have to start over again? :(

Link to comment
Share on other sites

Hmm … it is very hard to give any advice without seeing your document. I just tried to reproduce the issue and created a document with 1025 artboards, and every slice had just the right dimensions, even after adding objects to the artboards. So this is really difficult to assess from so far …  :(

Link to comment
Share on other sites

So, I tried to reproduce this without luck. So I went back into my org. project and started aligning one art board at a time. I would love to at least be able to use the align tool, but if one of the artboard has the wrong position this fails. So I selected all artboards in a column and changed their position to X 456. The problem is that it's only the first artboard that gets this position, the others have the position of X457.634945. But then I can use the align tool.

 

Is this the correct way to do it or how is it supposed to work? In my world, if I select multiple object and set a position they should get that position. 

AllArtboards.png

One.png

Link to comment
Share on other sites

Whenever you select several artbords (or any other objects), the x- and y- values entered in the Tranformation panel will refer to the bounding box that encloses all the objects, not to each selected object individually. Witnessed by the fact, that you see that large blue bounding box with the transformation handles appear around your selection. So it is not possible to use the Transformation panel to position several objects individually at once.

Link to comment
Share on other sites

Well, the alignment toolset *should* work on artboards. Suppose you have a column where artboards have wrong x-values. Then move one artboard of the column so far to the left that you can assure its left side has a smaller, but pixel-perfect x-value than has the left side of any other artboard in the respective column. Now select all the artboards of the column with the Artboard Tool, switch back to the Move Tool, and click “Align Left” on the context toolbar … doesn’t that work?  :unsure:

Link to comment
Share on other sites

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...

Important Information

Terms of Use | Privacy Policy | Guidelines | We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.