Photoshop Help! GIFs into SL - SLUniverse Forums
Navigation » SLUniverse Forums > Virtual World Discussion > Technical Help » Photoshop Help! GIFs into SL


Technical Help Discuss technical support issues here.

 
Reply
 
LinkBack Thread Tools Display Modes
Old 10-12-2017, 09:17 AM   #1 (permalink)
Fuzzlebugs Finkmellon
 
Anouk's Avatar
haz dem bodacious ta-tas
 
Join Date: May 2012
Location: UK
Posts: 2,861
My Mood:
SL Join Date: September 2009
Client: Singularity

Awards: 1
SLU Creepy Avatar Competition 2014 Participant 
Photoshop Help! GIFs into SL

Hi guys - I know there are super smart bods out there who know a ton more about Photoshop than the tiny bit I've managed to self-teach myself.

I have been battling for YEARS with this problem and I'm hoping that there is a simple way to do this that I just haven't found.

I'm trying to figure out how to automatically get Photoshop to arrange a bunch of layers into a grid so that I can upload the final texture into SL to make animated textures.

I know how to deconstruct a GIF and so far, I've been only making real simple stuff with just a few frames which I've manually arranged onto a single grid. But of course this is a huge pain in the ass, even with small grids. And now I want to make more complex ones I cannot for the life of me find how to do it. I have searched and searched for how to arrange frames into a grid, but just can't find anything, and I can't believe this isn't something Photoshop should be able to do with just a couple of button clicks.

What am I missing? Please save my sanity someone!
__________________
Quote:
Caffeine Nights group blog, with pics and stories and stuff: http://caffeinenights.net/
Quote:
Cristiano
The first rule of Pope Club is you don't talk about Pope Club.
Quote:
Originally Posted by OrinB View Post
Anouk: "Proudly shackling the genie-arses of abnormal men!"
Anouk is offline   Reply With Quote
Old 10-12-2017, 10:45 AM   #2 (permalink)
Senior Discount
 
Casey Pelous's Avatar
Jesus is coming. Look busy!
 
Join Date: Feb 2011
Location: USA, Upper Left
Posts: 10,068
My Mood:
SL Join Date: August 21, 2007
Client: Anything But 2
I are not a PS expert, but -- I play one in front of my computer!

I couldn't find anything about doing this with layers, but maybe there's a clue buried in this video about creating panoramas. (Which I found rather amazing, anyway ....) This starts from Adobe Bridge, using the Photomerge command with separate images -- so there might be some tedious saving to do, and I don't know if PS can automate any of that.

https://helpx.adobe.com/photoshop/us...hotomerge.html

On the pull-down that has the Photomerge command there's also a "contact sheet" command. Maybe that??
__________________
"I am not more than a lossy Human being, and think that we all are equals..." - Wasted Engineer


U.S. Only
Casey Pelous is offline   Reply With Quote
1 User Said Thanks:
Old 10-12-2017, 11:21 AM   #3 (permalink)
Fuzzlebugs Finkmellon
 
Anouk's Avatar
haz dem bodacious ta-tas
 
Join Date: May 2012
Location: UK
Posts: 2,861
My Mood:
SL Join Date: September 2009
Client: Singularity

Awards: 1
SLU Creepy Avatar Competition 2014 Participant 
Quote:
Originally Posted by Casey Pelous View Post
I are not a PS expert, but -- I play one in front of my computer!

I couldn't find anything about doing this with layers, but maybe there's a clue buried in this video about creating panoramas. (Which I found rather amazing, anyway ....) This starts from Adobe Bridge, using the Photomerge command with separate images -- so there might be some tedious saving to do, and I don't know if PS can automate any of that.

https://helpx.adobe.com/photoshop/us...hotomerge.html

On the pull-down that has the Photomerge command there's also a "contact sheet" command. Maybe that??

Thanks Casey. I was hoping that the contact sheet option would work but it doesn't align the frames in a close fit grid - it leaves a big white border between columns which I can't see how to get rid of, so I'm thinking that's something to do with the actual contact sheet style layout.

I took a look at the panorama option but that only seems to want to stitch together frames in a long line, rather than a grid.

I'm really surprised that I'm having such trouble finding out how to do this. I would have thought something like 'align frames in grid' would be a really simple and obvious option
Anouk is offline   Reply With Quote
1 User Agreed:
Old 10-12-2017, 12:08 PM   #4 (permalink)
Senior Member
 
Wanda Belinda's Avatar
 
Join Date: Oct 2016
Posts: 2,578
Is this maybe what you're looking for?

Peregrine Salon: GIF 89a to Second Life TARGA Automated Conversion Tool
Wanda Belinda is offline   Reply With Quote
Old 10-12-2017, 12:16 PM   #5 (permalink)
Senior Member
 
Cat Fratica's Avatar
Wondering...
 
Join Date: Sep 2009
Posts: 1,327
My Mood:
I use Photoshop to make a grid(below) and in SL a script (below)

Adjust gCellsAcross/Down to correspond with grid texture - put texture and script in prim. Contact me in world sometime if you need assistance

Re-reading your post - you probably know all this. But maybe somebody else will find it useful!? I will be interested if PS can make the grid from a GIF automatically.



integer gCellsAcross = 4;
integer gCellsDown = 3;
// seconds between cells
float gSwitchTime = 0.000;
float gOffsetU;
float gOffsetV;
float gScaleU;
float gScaleV;

key gKey;
vector gScale;

default
{
//this state will allow colors to be set
state_entry()
{

gScaleU = 1/(float)gCellsAcross;
gScaleV = 1/(float)gCellsDown;
// U range is -0.5 to 0.5 left to right
// V range is 0.5 to -0.5 top to bottom
// divided by 2 to put focus at the center of the cell
gOffsetU = -0.5 + gScaleU / 2;
gOffsetV = 0.5 - gScaleV / 2;
// next line automatically scales the texture
// llScaleTexture(gScaleU, gScaleV, -1);

// next line focuses the texture on the last cell - for use if this is a click-started animation
// llOffsetTexture(0.5-gScaleU/2, -0.5+gScaleV/2, -1);

state Movie;
}

}

state Movie
{
state_entry()
{
integer i;
integer j;
integer k;
float OffsetU;
float OffsetV;
@Loophere;
// set local offset variables equal to global offset constants
OffsetU = gOffsetU;
OffsetV = gOffsetV;

for (i=0; i<gCellsDown; i++)
{

for (j=0; j<gCellsAcross; j++)
{

llOffsetTexture(OffsetU, OffsetV, -1);
llSleep(gSwitchTime);
OffsetU = OffsetU + gScaleU;
}
OffsetU = OffsetU - 1.0;
OffsetV = OffsetV - gScaleV;

}

jump Loophere;
}

}
__________________
We’ve heard that a million monkeys at a million keyboards could produce the complete works of Shakespeare; now, thanks to the Internet, we know that is not true.
—Robert Wilensky

Last edited by Cat Fratica; 10-12-2017 at 12:22 PM.
Cat Fratica is offline   Reply With Quote
Old 10-12-2017, 12:24 PM   #6 (permalink)
Senior Member
 
Cat Fratica's Avatar
Wondering...
 
Join Date: Sep 2009
Posts: 1,327
My Mood:
Quote:
Originally Posted by Wanda Belinda View Post
I posted that then removed it - doesn't seem to work anymore - sadly...
Cat Fratica is offline   Reply With Quote
Old 10-12-2017, 12:27 PM   #7 (permalink)
Fuzzlebugs Finkmellon
 
Anouk's Avatar
haz dem bodacious ta-tas
 
Join Date: May 2012
Location: UK
Posts: 2,861
My Mood:
SL Join Date: September 2009
Client: Singularity

Awards: 1
SLU Creepy Avatar Competition 2014 Participant 
Quote:
Originally Posted by Cat Fratica View Post
I posted that then removed it - doesn't seem to work anymore - sadly...
Yup - I used to use Peregrine's page and it was brilliant. It would beautifully break down a gif into a prearranged grid, ready to import into SL but his page has been offline for a long time now.

Last edited by Anouk; 10-12-2017 at 12:33 PM.
Anouk is offline   Reply With Quote
Old 10-12-2017, 12:32 PM   #8 (permalink)
Fuzzlebugs Finkmellon
 
Anouk's Avatar
haz dem bodacious ta-tas
 
Join Date: May 2012
Location: UK
Posts: 2,861
My Mood:
SL Join Date: September 2009
Client: Singularity

Awards: 1
SLU Creepy Avatar Competition 2014 Participant 
Quote:
Originally Posted by Cat Fratica View Post
I use Photoshop to make a grid(below) and in SL a script (below)

Adjust gCellsAcross/Down to correspond with grid texture - put texture and script in prim. Contact me in world sometime if you need assistance

Re-reading your post - you probably know all this. But maybe somebody else will find it useful!? I will be interested if PS can make the grid from a GIF automatically.



integer gCellsAcross = 4;
integer gCellsDown = 3;
// seconds between cells
float gSwitchTime = 0.000;
float gOffsetU;
float gOffsetV;
float gScaleU;
float gScaleV;

key gKey;
vector gScale;

default
{
//this state will allow colors to be set
state_entry()
{

gScaleU = 1/(float)gCellsAcross;
gScaleV = 1/(float)gCellsDown;
// U range is -0.5 to 0.5 left to right
// V range is 0.5 to -0.5 top to bottom
// divided by 2 to put focus at the center of the cell
gOffsetU = -0.5 + gScaleU / 2;
gOffsetV = 0.5 - gScaleV / 2;
// next line automatically scales the texture
// llScaleTexture(gScaleU, gScaleV, -1);

// next line focuses the texture on the last cell - for use if this is a click-started animation
// llOffsetTexture(0.5-gScaleU/2, -0.5+gScaleV/2, -1);

state Movie;
}

}

state Movie
{
state_entry()
{
integer i;
integer j;
integer k;
float OffsetU;
float OffsetV;
@Loophere;
// set local offset variables equal to global offset constants
OffsetU = gOffsetU;
OffsetV = gOffsetV;

for (i=0; i<gCellsDown; i++)
{

for (j=0; j<gCellsAcross; j++)
{

llOffsetTexture(OffsetU, OffsetV, -1);
llSleep(gSwitchTime);
OffsetU = OffsetU + gScaleU;
}
OffsetU = OffsetU - 1.0;
OffsetV = OffsetV - gScaleV;

}

jump Loophere;
}

}
Yeah - I have the script to actually animate the texture once it's already imported into SL. It's getting it properly laid out in the right format BEFORE importing it that I'm having trouble with. The script I have is even simpler than this one - the one that's still on Peregrine's page - just need to tweak the numbers for whatever grid size the texture is.
Anouk is offline   Reply With Quote
Old 10-12-2017, 01:47 PM   #9 (permalink)
Senior Member
 
Cat Fratica's Avatar
Wondering...
 
Join Date: Sep 2009
Posts: 1,327
My Mood:
I can do them pretty quickly... once you have your gif split into frames just use guides to divide up your 512 (or whatever) image space and drag and drop each frame into place...

I guess it gets pretty laborious if you are going beyond 16 or 24 though
Cat Fratica is offline   Reply With Quote
1 User Said Thanks:
Old 10-12-2017, 02:14 PM   #10 (permalink)
Fuzzlebugs Finkmellon
 
Anouk's Avatar
haz dem bodacious ta-tas
 
Join Date: May 2012
Location: UK
Posts: 2,861
My Mood:
SL Join Date: September 2009
Client: Singularity

Awards: 1
SLU Creepy Avatar Competition 2014 Participant 
Quote:
Originally Posted by Cat Fratica View Post
I can do them pretty quickly... once you have your gif split into frames just use guides to divide up your 512 (or whatever) image space and drag and drop each frame into place...

I guess it gets pretty laborious if you are going beyond 16 or 24 though
I need to learn how to add equally proportioned guides to a new image. At least then I can do it your way and drag and drop and snap to the guides.
Anouk is offline   Reply With Quote
Old 10-12-2017, 02:39 PM   #11 (permalink)
Senior Member
 
Fluffy's Avatar
 
Join Date: Apr 2010
Posts: 125
Piskel will convert from an animated gif like this...



to a spritesheet like this...



It allows you to specify the number of horizontal frames and exports in PNG format.
Attached Thumbnails
Photoshop Help!   GIFs into SL-39201707234667341.jpg  
__________________

Fluffy is offline   Reply With Quote
1 User Said Thanks:
Old 10-12-2017, 02:56 PM   #12 (permalink)
Fuzzlebugs Finkmellon
 
Anouk's Avatar
haz dem bodacious ta-tas
 
Join Date: May 2012
Location: UK
Posts: 2,861
My Mood:
SL Join Date: September 2009
Client: Singularity

Awards: 1
SLU Creepy Avatar Competition 2014 Participant 
Quote:
Originally Posted by Fluffy View Post
Piskel will convert from an animated gif like this...



to a spritesheet like this...



It allows you to specify the number of horizontal frames and exports in PNG format.
Ohhh! That would work. I'll test it later. Thanks Fluffy!
Anouk is offline   Reply With Quote
Old 10-12-2017, 03:00 PM   #13 (permalink)
Senior Member
 
Wanda Belinda's Avatar
 
Join Date: Oct 2016
Posts: 2,578
I haven't messed with any of this stuff in years but I came up with this:

First I started with this animation.



There is free image manipulation software available for Unix / Mac / Windows call ImageMagick. I used the Windows version. Once installed there are command line tools. My original animation was called pizza.gif. So I ran the command

magick convert -coalesce pizza.gif target%03d.gif

This places the frames of the animation into separate files named target000.gif, target001.gif, etc.

SLU wants a number of files that will fit into a grid. There are 53 frames, so I deleted 4 of them aiming for a 7x7 grid. The size of each frame happens to be 600x406 pixels. Then I ran this command.

Magick montage -trim -geometry 600x406+0+0 -tile 7x7 target*.gif output.gif

That makes a single frame grid of our pictures. It's the wrong size and file type though so

magick convert -resize "1024x1024!" output.gif pizza.png

Which looks like this



Then I rezzed a box and put a line its script

llSetTextureAnim(ANIM_ON | LOOP, ALL_SIDES, 7, 7, 0, 49, 10);

Which gave me this



Hope this helps!
Wanda Belinda is offline   Reply With Quote
1 User Said Thanks:
Old 10-12-2017, 04:19 PM   #14 (permalink)
Fuzzlebugs Finkmellon
 
Anouk's Avatar
haz dem bodacious ta-tas
 
Join Date: May 2012
Location: UK
Posts: 2,861
My Mood:
SL Join Date: September 2009
Client: Singularity

Awards: 1
SLU Creepy Avatar Competition 2014 Participant 
Quote:
Originally Posted by Fluffy View Post
Piskel will convert from an animated gif like this...



to a spritesheet like this...



It allows you to specify the number of horizontal frames and exports in PNG format.

Woohoo!!! This worked!!! Thank you soooo much Fluffy!!! That will save me hours of fiddling about in the future!
Anouk is offline   Reply With Quote
2 Users Said Yay!:
Old 10-12-2017, 04:35 PM   #15 (permalink)
Nasty Brit
 
Innula Zenovka's Avatar
Grande Cabalista
 
Join Date: May 2009
Posts: 16,872
SL Join Date: 17 June 2007
Business: Something Spunky
There's also a small downloadable tool (Windows only, I think) here that will convert the .gif into a texture suitable for upload to SL,

https://www.outworldz.com/Secondlife...econd-Life.htm

together with a link to a script by Ferd Frederix to animate the uploaded texture.
Innula Zenovka is online now   Reply With Quote
1 User Said Thanks:
1 User Likes This:
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On




SEO by vBSEO