Currently Online

Latest Posts

Topic: Global Illumination/Cycles tests

Joined: 2017-10-09, 13:07
Posts: 16
Pry about Widelands
Posted at: 2017-10-15, 21:32

Hey there folks!

I played around with the standart lighting setup
and had a look, if I might be able to transform it
into a global illumination setup (blenders current
render engine). Here is my first test:

Worked well, but the differences would only really
be apparent with higher resolutions. I tried adding
a scale factor to the images idle animation with
"scale=0.25". Sadly the game crashed asking
what "scale" is supposed to be. I would guess that
this part of the LUA scripting is not exposed for the
config files. Maybe?
I did a lot of fiddling around today (unexpectedly
mainly with bazaar) and as you can see the lighting-
setup does not fit yet. But I made progress nonethe-
I'll have a look how far I can automate the rendering
process, also for the mask layer in cycles. I know one
or two things about python so I'll work through the
scripts and see if I can integrate everything.

Kind regards

Edited: 2017-10-15, 21:57

Top Quote
Joined: 2013-02-18, 20:48
Posts: 2214
One Elder of Players
Location: Germany
Posted at: 2017-10-16, 23:30

Hi HendrikL face-smile.png

I think your proposal a bit too bright, but the direction is awesome face-smile.png

Don't surrender if there is no immediately response... some of our main developers are busy with real life at the moment.

Fight simulator for Widelands:

Top Quote
Joined: 2013-07-29, 00:01
Posts: 1118
One Elder of Players
Location: Poland
Posted at: 2017-10-17, 19:19

Hi HendrikL, I would like to see something between those two models: left is too dark for me, and right is too light. Is it possible to change that easily? Maybe light/shadow colours are the solution?

calculations & maps packages:
backup website files:

Top Quote
Joined: 2013-10-07, 15:56
Posts: 3324
One Elder of Players
Location: RenderedRect
Posted at: 2017-10-17, 20:09

Also, the 2 screenshots don' have the same angle for the building - did you base your own Python scripts on

I have no idea what's causing the crash, I would need more details, e.g. a copy of the Lua file and the crash log. Maybe it's a bug.

Busy indexing nil values

Top Quote
Joined: 2009-02-19, 15:18
Posts: 1441
One Elder of Players
Location: Germany - Munich
Posted at: 2017-10-17, 20:15

Great that you spend time on graphics! That is always a week spot in Widelands face-smile.png

It seems the new render uses a perspective camera while the other one uses an orthographic one - the orthographic one is correct for Widelands.

I think the flat looking shading of the original fits better into the Widelands world - the other somehow looks too realistic. Also the (very cool!) details like the shingles and the individual stones of the walls become rather muddy at the default Widelands resolution.

Top Quote
Joined: 2017-10-09, 13:07
Posts: 16
Pry about Widelands
Posted at: 2017-10-18, 09:53

Hey Folks!

Yes, I based the rendering on the templates in the media
repository and yes, I am using a perspective camera. I will
be using a telephoto lens from far away to mimic the ortho-
graphic camera. The reason is that reflections do not trans-
late properly into orthographic perspective, since every ray
that hits a surface with the same angle lands on the same
pixel of the reflection texture, which creates really odd
effects. It's not simply a re-render but a reconceptionali-
zation of the whole light environment.
So please always keep in mind that I show work-in-progress.

Flat Shading
I understand that style is a delicate matter, since you all
have grown attached to the look of widelands. But ultimately
Blenders old render engine does not have a lot of flexibility.
We can always cut the reflective materials later and go back
to an ortographic camera, but the material-setup needs to be
converted anyway in the long run. @SirVer When you
say fit the widelands world, are you talking about a
specific style concept or the rest of the graphics? (don't you
worry, I'll do some terrain tests too) The design guide in the
graphic development section basically just says "keep ani-
mations and color calm and the content appropriate for chil-

The game doesn't really crash, It just says that it can't load
the map, because it encounters an unknown token "scale".
Basically I just added "scale=0.25" to the [idle] of the imperial
headquarters config file. But I can reproduce the error and
send you the files if you like. However I encountered another
problem: Widelands does not offer me a whole lot of Resolu-
tions for Fullscreen mode. To be specific it only offers me a
resolutions that combines my two screens so roughly
3200x1050. Since that is silly I reverted to windowed mode and
now have a window of the size of my two screens and I am not
able to resize it. As I said there is only one offered resolution
under the graphics options.

Kind regards

Top Quote
Joined: 2013-08-04, 22:05
Posts: 41
Pry about Widelands
Posted at: 2017-10-18, 16:37

Hey Hendrik

Could you be using Widelands build 19? If I'm not mistaking, the scale attribute was only added after the last release, so you'd need a development build. It is demonstrated in the Barbarian warehouse, you can check if data/tribes/buildings/warehouses/barbarians/warehouse/init.lua contains a "scale" line. The high-resolution warehouse also demonstrates the challenges of making better graphics look good on lower resolutions (eg. the grass on the roof)... Also, you should set "scale=4" instead of 0.25, otherwise you'll get a rather huge HQ. face-wink.png

Widelands' style is more cartoony, not just the existing graphics, but also the fighting, the simplicity of the game world, the fact that a single carrier can lift a marble column, et cetera. Your HQ makes me think of 0 AD, it looks very nice but a lot more serious. But I do think you have the talent to make Widelands look a lot better than it does now!

Top Quote
Joined: 2017-10-09, 13:07
Posts: 16
Pry about Widelands
Posted at: 2017-10-18, 18:02

Hey stdh!

I'll get the newest build and have a look! Do you guys
mind widelands looking a bit more like Settlers 3?
I have not much experience with cartoony styles
but that's something I'd like to try out for sure! I guess
my favorite Settlers was Settlers 2.5, which had the
visuals and gameplay of 3 with the soldier leveling and
money/beverage mechanics of 2.

I didn't figure out how to zoom in the version I down-
loaded, I'll retry with the latest build.

I managed to produce valid map-tiles by converting
them to an indexed color space with gimp. I did not
work through the terrain configs yet, can all tiles be
animated? Also is there a specific reason you bind
yourself to a 64x64 resolution? Can I just add higher
resolution terrain and it will work? Does the terrain-
tile transition need to be black and white or is gray-
scale ok, too?

You know what guys? I'll remodel a building of
Settlers IV, then I'll know if I can do a high resolution
comic style.

Kind regards Hendrik

Top Quote
Joined: 2013-10-07, 15:56
Posts: 3324
One Elder of Players
Location: RenderedRect
Posted at: 2017-10-18, 18:56

Yes, you can animate any terrain tile you like. Changing terrain tile size would need some recoding in the engine I guess - I don't know how it will react to bigger tiles. It is certainly something to think about though now that we have a zoom feature.

Busy indexing nil values

Top Quote
Joined: 2017-10-09, 13:07
Posts: 16
Pry about Widelands
Posted at: 2017-11-13, 23:04

Hey Folks!

Small update: I downloaded and tested the newest build.
My resolution trouble is gone, I have plenty of options to
choose from and I could successfully apply a scale to my
rendering with the hint you provided.

I did some tricks to make it work but I was able to use
an orthographic camera for the rendering. With the cur-
rent maximum zoom level the resolution of the head-
quarters needs to be roughly 512px. But boy does it look
nice! So the resolution of the current images needs to
be roughly quadrupled, which will increase disk space
eightfold, if I did my maths right.

I'll do some more tests and report back with some more
images soon. Are the Buildings of the Atlanteans place-
holders? Some of the larger buildings look kind of bland
compared to the other races. Is there a developed de-
sign concept for them? I would expect sort of a mixture
of Babylonian and Egyptian architecture with a lot of
gardens, waterfalls and the occasional crystal.

Other than that here are some points I noticed:
- I couldn't find a file where I could change the scaling
of the building overlay images. If there is none please
provide one in future builds
- A lot of terrain pieces seem to have tiling issues. But
tiling seems to work correctly with a texture I tested.
- Terrain resolution needs to be 256px to match the
current zoom level. The game refuses to load a level
with a tileset larger than 64px. I'll report back with
that topic once I have some replacements ready.
- The hotspot defined in the init.lua files corresponds
to the scaled image, which makes it hard to set it cor-
rectly for scaled images. It would prevent a lot of fid-
deling in the future to divide the hotspot by the scale
internally, I assume.
- The camera position in the building render template
does not fit the angle on the current imperial head-
quarter. I'll test some other buildings to see if the
headquarters is rendered wrong or the template does
not match.

I hope I can provide some updated graphics while
keeping the current style. One can see how much love
has flown into this project

Thank you for your hard work and dedication
Kind regards

Top Quote