OFFSET January 22, 2009, 10:13:31 am I can't find any documentation on the use of y-offset (and x-offset) and i don't remember their usage in dat files. can anybody help me? thanks Quote Selected
Re: OFFSET Reply #1 – January 22, 2009, 10:23:59 am Usage (AFAIK) is like EmptyImage[SW]=PNG_NAME.ROW.COL,OFFSET_X,OFFSET_YExample:Code: [Select]EmptyImage[SW]=Airbus_A380.0.0,-48,-48Edit: Btw I'm not sure of x and y order Quote Selected
Re: OFFSET Reply #2 – January 22, 2009, 10:31:51 am IIRC: First y, then x. Same with row/column - first y order (row), then column (x).btw... http://graphics.simutrans.com/displayimage.php?pos=-165 Quote Selected
Re: OFFSET Reply #3 – January 22, 2009, 01:22:08 pm Quote from: VS – on January 22, 2009, 10:31:51 amIIRC: First y, then x. Same with row/column - first y order (row), then column (x).It's a slight commentary:It's a bit odd you have (y,x) instead of (x,y) "to be exact math-wise". ... unless we are considering we are working strictly in computation approach, not with trigonometry. Quote Selected Last Edit: January 22, 2009, 01:26:27 pm by IgorTekton
Re: OFFSET Reply #5 – January 22, 2009, 05:45:57 pm WELL, for sure y offset is less troublesome, so it can be used more... this could be a reason...thank you very much, guys!EDIT:Do offsets work also for ways and bridges? i tried, but it looks like it doesn't work... Quote Selected Last Edit: January 22, 2009, 06:14:57 pm by fabio
Re: OFFSET Reply #7 – January 22, 2009, 08:58:40 pm yep, i'm making the bridges 32 pixel higher, so that i can use also full width and some tile-high pillar ends. is it possible? Quote Selected
Re: OFFSET Reply #8 – January 22, 2009, 09:15:16 pm Quote from: VS – on January 22, 2009, 07:50:30 pmDid you use negative offsets? Quote Selected
Re: OFFSET Reply #9 – January 22, 2009, 09:18:09 pm Indded y is first, since often you need only y-offset. Also in an intermediate version, no x but only y-offset was possible.There are some constarins to offsets: -128<=Offset<127 Also I am not sure what will happen if Offset+w<0 or Offset+w>255. Quote Selected
Re: OFFSET Reply #10 – January 22, 2009, 09:38:15 pm @Frank:From memory I'd say you switched x and -x ... but I'm not sure, and I have no time to check right now. Quote Selected
Re: OFFSET Reply #11 – January 22, 2009, 10:11:21 pm If I am not mistaken, Zeno reported success when aligning with both offsets negative... but I may indeed be wrong! Quote Selected
Re: OFFSET Reply #12 – January 22, 2009, 10:31:17 pm Quote from: DirrrtyDirk – on January 22, 2009, 09:38:15 pm@Frank:From memory I'd say you switched x and -x ... but I'm not sure, and I have no time to check right now.I also think it's switched.All my A380 planes were coded with -y,-x (I think -48 both). Maybe you should check any of them to see if it's really centered as expected. But fairly, I don't remember Edit: Err... I suppose you use makeobj49. I remember it didn't work with previous versions, did it? Quote Selected
Re: OFFSET Reply #14 – January 24, 2009, 07:12:06 pm Oooops... I'm doing a remake of my A380 planes... and it seems to be something strange behaviour with offsets... let's see:1) I take a 128-4-tile template VS recommended to use as background.2) I resize to 176 px, which is the size of the A380 pngs.3) I center the planes on the 176-sized tiles.4) DAT code is like this EmptyImage[SW]=newA380.0.0,-48,-48 for all views.5) I get this:Alignment image.Results image.What is happening to West-East alignment?Edit: Now I know: y alignment seems not to be working in makeobj49. I get same result when I put 0px on y offset!It's working ok. Try redownload makeobj. I was using a wrong (49 beta) version Redownloaded and corrected! Quote Selected Last Edit: January 24, 2009, 07:51:49 pm by Zeno
Re: OFFSET Reply #15 – January 24, 2009, 07:53:05 pm Offsets are not the same for x and y.dx = (a-b)/2dy = (a-b)*3/4And actual alignment may be still different... Quote Selected
Re: OFFSET Reply #16 – January 24, 2009, 08:08:12 pm With x=(128-176)/2=-24 and y=(128-176)*3/4=-36 I get a misalignment in N-S directions Quote Selected
Re: OFFSET Reply #18 – January 24, 2009, 08:11:32 pm Quote from: VS – on January 24, 2009, 08:09:48 pmThese are "straight" ?Ups... I've messed up the models, sorry I'm deleting all variants but one to make the tests, give me a minute.Edit: Not in N-S but in E-W direction. I have a small displacement and appears below the runway line. Quote Selected Last Edit: January 24, 2009, 08:15:43 pm by Zeno
Re: OFFSET Reply #19 – January 24, 2009, 09:01:01 pm Arrrrrrgh! I was wrong, totally wrong. Offsets are x,y. Sorry. Or so I think now. I tested with a big rectangle and it appears to work with swapped offsets.I apologize again to everyone who believed my instructions and couldn't get offsets to work. Quote Selected Last Edit: January 24, 2009, 09:09:02 pm by VS