News:

Simutrans Wiki Manual
The official on-line manual for Simutrans. Read and contribute.

pak128 Half Height Tiles

Started by Sarlock, April 09, 2013, 12:58:14 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Sarlock

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.
Current projects: Pak128 Trees, blender graphics

kierongreen

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 :)

Sarlock

#2
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 :)
Current projects: Pak128 Trees, blender graphics

VS

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 ;)

My projects... Tools for messing with Simutrans graphics. Graphic archive - templates and some other stuff for painters. Development logs for most recent information on what is going on. And of course pak128!

kierongreen

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.

Fabio

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.

kierongreen

QuoteI 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! :)

sdog

Quote from: Fabio on April 09, 2013, 04:44:46 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.)

prissi

Makeobj should gracefully ignore anything it does not know about, i.e. extra images ...

kierongreen

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.

VS

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...

My projects... Tools for messing with Simutrans graphics. Graphic archive - templates and some other stuff for painters. Development logs for most recent information on what is going on. And of course pak128!

sdog

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).

Fabio

#12
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

Sarlock

#13
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.

Quote1) 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.
Current projects: Pak128 Trees, blender graphics

VS

#14
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!

My projects... Tools for messing with Simutrans graphics. Graphic archive - templates and some other stuff for painters. Development logs for most recent information on what is going on. And of course pak128!

Sarlock

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.
Current projects: Pak128 Trees, blender graphics

greenling

Hello Sarlock,VS,Fabio
The Downloadlinks to the SVN work not wore.
Opening hours 20:00 - 23:00
(In Night from friday on saturday and saturday on sunday it possibly that i be keep longer in Forum.)
I am The Assistant from Pakfilearcheologist!
Working on a big Problem!

Fabio

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.

Fabio

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.

Fabio

A basic landscape is now possible in r1196:


kierongreen

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?

greenling

Fabio The photo how you have be make be look very good out. :thumbsup:
Opening hours 20:00 - 23:00
(In Night from friday on saturday and saturday on sunday it possibly that i be keep longer in Forum.)
I am The Assistant from Pakfilearcheologist!
Working on a big Problem!

Sarlock

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.
Current projects: Pak128 Trees, blender graphics

Sarlock

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.
Current projects: Pak128 Trees, blender graphics

kierongreen

Looking good :) Sarlock - see if this compile of makeobj works any better: http://simutrans-germany.com/files/upload/makeobjdouble140413.zip

Sarlock

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.
Current projects: Pak128 Trees, blender graphics

kierongreen


VS

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?)

My projects... Tools for messing with Simutrans graphics. Graphic archive - templates and some other stuff for painters. Development logs for most recent information on what is going on. And of course pak128!

Fabio

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.

Sarlock

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.
Current projects: Pak128 Trees, blender graphics

Fabio

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).

Fabio

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).

Fabio

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

prissi

Isn't that visual basic scripts? How would one run them on Unix or Mac?

Fabio

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.