The International Simutrans Forum

 

Author Topic: pak128 Half Height Tiles  (Read 35808 times)

0 Members and 1 Guest are viewing this topic.

Offline Sarlock

  • Devotee
  • *
  • Posts: 1340
  • Languages: EN
pak128 Half Height Tiles
« on: April 09, 2013, 12:58:14 AM »
Has anyone (Fabio, etc) done any preliminary work on creating half-height tiles for pak128 to go with Kieron's half-height patch?  I was going to start on doing some light-maps if no one has started with anything yet.  I just don't want to accidentally duplicate our efforts.

Doing the ways isn't that bad because we only need to add 4 graphics per way type, though getting the right shading level will take some trial and error.

Offline kierongreen

  • Dev Team, Coder/patcher
  • Devotee
  • *
  • Posts: 2269
Re: pak128 Half Height Tiles
« Reply #1 on: April 09, 2013, 01:26:08 AM »
You should just be able to copy the pak128.Britain lightmaps as these are the same as in pak128. Unless you want to use the opportunity to redo them :)

Offline Sarlock

  • Devotee
  • *
  • Posts: 1340
  • Languages: EN
Re: pak128 Half Height Tiles
« Reply #2 on: April 09, 2013, 01:57:10 AM »
Ah, interesting... I thought the two paks were different in that regard.  I haven't looked that deeply in to the light maps and textures before.  So the only difference between the appearance of the slopes in pak128 and pak128.Britain is the texture, not the light maps?  If so, that makes life much easier... we can move directly to ways :)

EDIT: And lo and behold, it's true!  Exact same light maps... that just saved a lot of work :)
« Last Edit: April 09, 2013, 02:20:48 AM by Sarlock »

Offline VS

  • Senior Plumber (Devotee)
  • Moderator
  • *
  • Posts: 4855
  • Vladimír Slávik
    • VS's Simutrans site
  • Languages: CS,EN
Re: pak128 Half Height Tiles
« Reply #3 on: April 09, 2013, 01:29:10 PM »
I'm somewhat swamped by stuff, but... if some of our graphic masters took a look at this I would be really grateful...

1) Half height marker, borders, sidewalk, slope walls.
2) All ways need +4 images for half slopes, including rivers & powerlines.
3) Catenaries need half height tiles as well.

Anything helps! Well, anything reasonably looking ;)

Offline kierongreen

  • Dev Team, Coder/patcher
  • Devotee
  • *
  • Posts: 2269
Re: pak128 Half Height Tiles
« Reply #4 on: April 09, 2013, 02:00:22 PM »
texture-shore.png and texture-shore.png are also the same as pak128.Britain (you will just need to copy across the double height dat information from texturegrounds.dat). Although I'd hold fire on copying across these just yet as I've just changed the format (removing some images no longer necessary) so next version of the patch will need new versions of those.

Offline Fabio

  • Devotee
  • Administrator
  • *
  • Posts: 2898
  • The Pak128 Guy
    • Visit me on Facebook
  • Languages: EN, IT, RO, FR
Re: pak128 Half Height Tiles
« Reply #5 on: April 09, 2013, 04:44:46 PM »
I was looking into this project as well.

First thing, is it possible to branch the Pak128 SVN folder?
I'd love we could work on a branch (which could be of course fully compiled) until Kieron's patch is committed into trunk, then we could just merge back Pak128 branch into trunk.

Roads will be the easiest to do. All of them will have both slopes (except probably 110 and 130 km/h, treated like railways).

I want to limit railroads to the gentle slope, so I plan to keep hidden tracks (i.e. without icon) in the pakset with both half and full slope (for backwards compatibility), while new official tracks will have ONLY half slopes. This could apply also to motorways and trams, maybe also trolley electrification. Same would apply for canals and navigable rivers, whereas streams would have both slopes.

Power lines and Schwebebahn will have both roads, as well as yet-to-be-painted narrow gauge tracks.

Offline kierongreen

  • Dev Team, Coder/patcher
  • Devotee
  • *
  • Posts: 2269
Re: pak128 Half Height Tiles
« Reply #6 on: April 09, 2013, 06:24:11 PM »
Quote
I want to limit railroads to the gentle slope, so I plan to keep hidden tracks (i.e. without icon) in the pakset with both half and full slope (for backwards compatibility), while new official tracks will have ONLY half slopes.
Brilliant! :)

Offline sdog

  • Devotee
  • *
  • Posts: 2039
Re: pak128 Half Height Tiles
« Reply #7 on: April 09, 2013, 09:03:14 PM »
First thing, is it possible to branch the Pak128 SVN folder?
I'd love we could work on a branch (which could be of course fully compiled) until Kieron's patch is committed into trunk, then we could just merge back Pak128 branch into trunk.

If that is for any reason not done with the SVN, you can also use the github mirror for that. In case you already have a login there you just need to go to the repo page and fork it. From there on you can either use your repo as main development repo (invite colaborators) or we can make branch in the official one and merge yours back in. When it's done the whole project could be patched into the svn again.
(At this step some care has to be taken, not to loose the commit history.)

Offline prissi

  • Developer
  • Administrator
  • *
  • Posts: 9438
  • Languages: De,EN,JP
Re: pak128 Half Height Tiles
« Reply #8 on: April 09, 2013, 09:22:05 PM »
Makeobj should gracefully ignore anything it does not know about, i.e. extra images ...

Offline kierongreen

  • Dev Team, Coder/patcher
  • Devotee
  • *
  • Posts: 2269
Re: pak128 Half Height Tiles
« Reply #9 on: April 09, 2013, 09:35:43 PM »
Yes it should however lightmaps, marker and border images don't just extend the number of existing images - they have a completely different order. Similarly while ways are compatible in theory if the new pak uses half heights then ImageUp[][] will need to be the half height image, with ImageUp2[][] being the existing height images.

Offline VS

  • Senior Plumber (Devotee)
  • Moderator
  • *
  • Posts: 4855
  • Vladimír Slávik
    • VS's Simutrans site
  • Languages: CS,EN
Re: pak128 Half Height Tiles
« Reply #10 on: April 09, 2013, 10:08:51 PM »
Is there actually any practical reason to keep a branch? I think the pakset is rather stable again, after the huge open-source changes. The last release was mostly smaller fixes and graphical updates. I can't imagine any critical bugs being left in, someone would have spoken up by now...

Offline sdog

  • Devotee
  • *
  • Posts: 2039
Re: pak128 Half Height Tiles
« Reply #11 on: April 09, 2013, 10:20:19 PM »
you mean working directly on the trunk, instead of a development branch?

The disadvantage is, you don't really know when the new system is actually available in a stable simutrans. During this time no new content could be included to the pak, as there are dependencies on code that's not available yet. This would also mean other new content would have to be held back until this is done, else changes needed for the half-height conversion and others could not be distinguished anymore. (necessary if something changes in the half-height integration).

Offline Fabio

  • Devotee
  • Administrator
  • *
  • Posts: 2898
  • The Pak128 Guy
    • Visit me on Facebook
  • Languages: EN, IT, RO, FR
Re: pak128 Half Height Tiles
« Reply #12 on: April 09, 2013, 10:35:41 PM »
I started the conversion of walls, borders, markers in my working copy. I also copied Kieron's lightmaps.
Tomorrow I could try to set up a branch as simutrans.svn.sourceforge.net/viewvc/simutrans/Pak128.NewLandscape or simutrans.svn.sourceforge.net/viewvc/simutrans/dev/Pak128.NewLandscape
Could a Trunk be maintained _inside_ the Pak128 subfolder? e.g. simutrans.svn.sourceforge.net/viewvc/simutrans/Pak128/dev/NewLandscape
« Last Edit: April 10, 2013, 05:38:16 PM by Fabio »

Offline Sarlock

  • Devotee
  • *
  • Posts: 1340
  • Languages: EN
Re: pak128 Half Height Tiles
« Reply #13 on: April 10, 2013, 03:39:36 AM »
Perhaps this is a good point to divide our efforts so that we aren't inadventently working on the same project(s).  We can add the 4 extra ways to the PNG files in the trunk and just don't enable them in the DAT files until the patch is released.  Updating the DAT files is a fairly quick operation, it's the PNG files/drawing that take the time.

Quote
1) Half height marker, borders, sidewalk, slope walls.
2) All ways need +4 images for half slopes, including rivers & powerlines.
3) Catenaries need half height tiles as well.

All of this stuff was originally written by you, Fabio, so I am a little reluctant to just start adding half-height parts, but I know you're busy, so if you could direct me to a few areas to start with, I can get to work on those.  Most of the ways and catenaries should be pretty easy, it's just adapting current slope graphics, tightening up the angle and shading.
« Last Edit: April 10, 2013, 03:45:16 AM by Sarlock »

Offline VS

  • Senior Plumber (Devotee)
  • Moderator
  • *
  • Posts: 4855
  • Vladimír Slávik
    • VS's Simutrans site
  • Languages: CS,EN
Re: pak128 Half Height Tiles
« Reply #14 on: April 10, 2013, 12:34:24 PM »
I like most this variant - no nesting, same level:
simutrans.svn.sourceforge.net/viewvc/simutrans/Pak128.NewLandscape

I am really sorry, but my graphic skills are not good enough to help beyond the most rudimentary items :-(

If Fabio suggested how to split the work... That would certainly be convenient!
« Last Edit: April 10, 2013, 05:38:30 PM by Fabio »

Offline Sarlock

  • Devotee
  • *
  • Posts: 1340
  • Languages: EN
Re: pak128 Half Height Tiles
« Reply #15 on: April 10, 2013, 12:54:52 PM »
I'm more than happy to do a big part of this, I will have quite a bit of time in the last two weeks of April to work on this and other things.

Offline greenling

  • Lounger
  • *
  • Posts: 1728
  • Simutransarchology it my hobby!
  • Languages: DE,EN
Re: pak128 Half Height Tiles
« Reply #16 on: April 10, 2013, 03:32:29 PM »
Hello Sarlock,VS,Fabio
The Downloadlinks to the SVN work not wore.

Offline Fabio

  • Devotee
  • Administrator
  • *
  • Posts: 2898
  • The Pak128 Guy
    • Visit me on Facebook
  • Languages: EN, IT, RO, FR
Re: pak128 Half Height Tiles
« Reply #17 on: April 10, 2013, 04:49:07 PM »
Greenling, obviously they don't work, I'll set it up tonight.

Vs: agreed, I was waiting for your ides but this solution is the best also IMHO.

Offline Fabio

  • Devotee
  • Administrator
  • *
  • Posts: 2898
  • The Pak128 Guy
    • Visit me on Facebook
  • Languages: EN, IT, RO, FR
Re: pak128 Half Height Tiles
« Reply #18 on: April 10, 2013, 05:37:25 PM »
Added http://simutrans.svn.sourceforge.net/viewvc/simutrans/pak128.newlandscape/ in r1195. Unfortunately I forgot to add a description to the commit, but being the first one of the folder, it shouldn't matter too much.

Offline Fabio

  • Devotee
  • Administrator
  • *
  • Posts: 2898
  • The Pak128 Guy
    • Visit me on Facebook
  • Languages: EN, IT, RO, FR
Re: pak128 Half Height Tiles
« Reply #19 on: April 10, 2013, 11:20:07 PM »
A basic landscape is now possible in r1196:


Offline kierongreen

  • Dev Team, Coder/patcher
  • Devotee
  • *
  • Posts: 2269
Re: pak128 Half Height Tiles
« Reply #20 on: April 10, 2013, 11:40:12 PM »
Nice :) however it looks like there's some errors in the texture transitions in that screenshot. I've checked the 1196 svn and it looks fine though - is that screenshot using 1196?

Offline greenling

  • Lounger
  • *
  • Posts: 1728
  • Simutransarchology it my hobby!
  • Languages: DE,EN
Re: pak128 Half Height Tiles
« Reply #21 on: April 11, 2013, 03:56:21 PM »
Fabio The photo how you have be make be look very good out. :thumbsup:

Offline Sarlock

  • Devotee
  • *
  • Posts: 1340
  • Languages: EN
Re: pak128 Half Height Tiles
« Reply #22 on: April 11, 2013, 05:35:49 PM »
So we aren't working on the same thing at the same time, I am working on roads currently.  It has taken some experimenting to find a pattern that works for the slopes so that the lines match up but I think I've figured out a system that works (north and west slopes move in a 3-4-4-4 pixel stagger pattern).  When I finish the first road I'll post it here so that you can get an idea of what worked for me.

Offline Sarlock

  • Devotee
  • *
  • Posts: 1340
  • Languages: EN
Re: pak128 Half Height Tiles
« Reply #23 on: April 14, 2013, 05:42:07 PM »
I've completed a first draft for the 50kph roads for half height tiles.  This took me a while because I had to get used to the new slope angle and how best to draw the lines, etc.  I haven't been able to test it yet until I get a copy of the half-height makeobj that works (DLL problem), but visually it seems to look fine and meshes up nicely against the other tiles when I do it manually.  The rest of the roads should go faster now that I am comfortable with the style.



Let me know if you see any glaring errors.  I also just tacked it on to the right because I didn't want to change the nice layout in the file and redo all of the coordinates in the .DAT file.  The snow picture can go down at the bottom on the same side.  The empty space shouldn't matter.

Fabio, I imagine you've done your roads with GIMP and probably used multiple layers to construct them.  I drew these on a single layer, hopefully it won't matter.

Offline kierongreen

  • Dev Team, Coder/patcher
  • Devotee
  • *
  • Posts: 2269
Re: pak128 Half Height Tiles
« Reply #24 on: April 14, 2013, 06:08:15 PM »
Looking good :) Sarlock - see if this compile of makeobj works any better: http://simutrans-germany.com/files/upload/makeobjdouble140413.zip

Offline Sarlock

  • Devotee
  • *
  • Posts: 1340
  • Languages: EN
Re: pak128 Half Height Tiles
« Reply #25 on: April 14, 2013, 06:34:11 PM »
Works great, Kieron, it ran perfectly.  Thanks for compiling it :)

Quick test, used it with pak128.Britain textures since I haven't fully compiled a pak128 version yet.  Will do later when I have some more time.



A bit of a meshing issue to fix with the lines on some slopes but overall it works well.

Offline kierongreen

  • Dev Team, Coder/patcher
  • Devotee
  • *
  • Posts: 2269
Re: pak128 Half Height Tiles
« Reply #26 on: April 14, 2013, 06:46:45 PM »
Excellent :)

Offline VS

  • Senior Plumber (Devotee)
  • Moderator
  • *
  • Posts: 4855
  • Vladimír Slávik
    • VS's Simutrans site
  • Languages: CS,EN
Re: pak128 Half Height Tiles
« Reply #27 on: April 14, 2013, 08:31:41 PM »
Woooow, perfect! ...nearly ;)

One note, perhaps too late - the sidewalk texture doesn't really match. Could you please coordinate that with Fabio? Maybe he has already updated it. If you want to have a go at it yourself, the point is that it lacks the light bits to contrast the dark ones. (The original texture scale was near sampling frequency. Thus, the resampling on rotation/scaling resulted in some averaging which of course killed the extreme values. I guess that increasing contrast could help, or maybe sharpening. Possibly even anything that widens the histogram again?)

Offline Fabio

  • Devotee
  • Administrator
  • *
  • Posts: 2898
  • The Pak128 Guy
    • Visit me on Facebook
  • Languages: EN, IT, RO, FR
Re: pak128 Half Height Tiles
« Reply #28 on: April 14, 2013, 09:15:07 PM »
You can use the updated sidewalk in svn. For lighting the road you can use (even just for a reference) the light map, applying it in a grain merge layer in gimp or whatever equivalent image editor.

Indeed I would prefer for later updates to make the change also in the multi layer gimp sources, but it's not strictly mandatory.

Great work you made!

I personally plan to tackle rivers next.

Offline Sarlock

  • Devotee
  • *
  • Posts: 1340
  • Languages: EN
Re: pak128 Half Height Tiles
« Reply #29 on: April 15, 2013, 04:08:39 AM »
Good call on the texture loss on the sidewalks from rotating the image... I didn't notice that until you pointed it out and now that I can see it I can't understand how I didn't see it the first time :)

I'll fix that... and I will also make the changes to the original gimp sources, I didn't see that they were in the SVN until now.  I'll update those.

I used the light map as guidance for creating the lighting levels on the slopes.

Offline Fabio

  • Devotee
  • Administrator
  • *
  • Posts: 2898
  • The Pak128 Guy
    • Visit me on Facebook
  • Languages: EN, IT, RO, FR
Re: pak128 Half Height Tiles
« Reply #30 on: April 15, 2013, 11:26:18 AM »
Gimp sources have a different layout but there's an Imagemagick script to convert it in the svn. I'll post the instructions for if tonight (cet time).

Offline Fabio

  • Devotee
  • Administrator
  • *
  • Posts: 2898
  • The Pak128 Guy
    • Visit me on Facebook
  • Languages: EN, IT, RO, FR
Re: pak128 Half Height Tiles
« Reply #31 on: April 15, 2013, 11:28:10 AM »
Gimp sources have a different layout but there's an Imagemagick script to convert it in the svn. I'll post the instructions for if tonight (cet time).

Offline Fabio

  • Devotee
  • Administrator
  • *
  • Posts: 2898
  • The Pak128 Guy
    • Visit me on Facebook
  • Languages: EN, IT, RO, FR
Re: pak128 Half Height Tiles
« Reply #32 on: April 15, 2013, 10:02:12 PM »
Ok, vbs scripts were missing, they are now in r1206, alog with these instrutions in README.txt




How to use the vbs scripts to obtain Makeobj sorces from GIMP files (MS Windows only)

Preliminary steps:
1) Make sure you have ImageMagick installed (see: www.imagemagick.org) and its
   convert.exe executable in a folder in path.
2) Make sure you have Optipng installed (see optipng.sourceforge.net) and its
   executable is in a folder in path.

How to edit sources of sources:
1) Open xxxxxxxx-zzzzzzz.xcf.bz2 with GIMP and edit the appropriate layers.
2) Export two files with filename xxxxxxxx-yy.png with the following naming convention:
      xxxxxxx : name of the GIMP file truncated at the first dash (-)
     yy      : to digits number, typically 01 for summer version (snow layers hidden)
               and 02 for winter version (snow layers activated)
   Note that Simutrans Tools for GIMP ver. 0.7+ (http://forum.simutrans.com/index.php?topic=9500)
   include a tool to export in png format adding a Simutrans transparency (#E7FFFF)
   background if missing.
3) Edit xxxxxxxx.tdat in a text editor. This is a dat file template.
   Most entries are in the same format as in dat files. Image references however differ
   and are in the following format:
      !nn@zz.y.x (sometimes with trailing offsets ,ox,oy)
   where
      !nn is the number used for seasonal versions (typically 01 for summer and 02 for winter)
     @zz is an optional column offset, e.g. !nn@20.0.24 actually points to !nn.0.4
4) Run compile.vbs script.
   It will output individual makeobj sources (both png and dat) for each object
   in ./output/ subfolder. Another *.tmp folder will be created, but it can be safely deleted.
5) For your convenience, run output.vbs script.
   It will move the objects in output subfolder to the appropriate folder (e.g. tunnels
   with tunnels, bridges with bridges and so on) IF the newly created file is new or differs
   from the existing one. It will also compress pngs using optipng -o7

Offline prissi

  • Developer
  • Administrator
  • *
  • Posts: 9438
  • Languages: De,EN,JP
Re: pak128 Half Height Tiles
« Reply #33 on: May 12, 2013, 08:56:21 PM »
Isn't that visual basic scripts? How would one run them on Unix or Mac?

Offline Fabio

  • Devotee
  • Administrator
  • *
  • Posts: 2898
  • The Pak128 Guy
    • Visit me on Facebook
  • Languages: EN, IT, RO, FR
Re: pak128 Half Height Tiles
« Reply #34 on: May 13, 2013, 04:37:56 AM »
those scripts were for my personal use, hence written in the language I'm most proficient in. I shared them for other artists' convenience. if anyone cares to translate them, be my guest.