News:

Do you need help?
Simutrans Wiki Manual can help you to play and extend Simutrans. In 9 languages.

Dithering Shadows in Blender/Gimp

Started by Gouv, January 28, 2010, 11:12:23 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Gouv

Hi,
it seems that i'll need to dither the Shadows outside the ground-plates in my current Blender project.
I guess that most people do it in some sort of Imaging programm. I was planning to do it in gimp also.
The questions are:

1. how exactly do you do it? Just painting single transparent pixels into rendered image or with some sort of alpha-mask or something like that? I'm really no expert, usually just cutting/pasting and doing other pretty basic stuff.

2. Is there a way to dither those Shadows directly in Blender? It seems to be doable with Composite Nodes(shadow pass?), but I couldn't get it to work yet.

Was planning to ask about Implementation of Alpha-Channel into Makeobj/Simutrans, but already found an old thread about it.

VS

Since there is no alpha in Simutrans, shadows are effectively "Emental" black - pattern of black and transparent pixels. With Gimp you could create a pattern, select the area you want and fill it...

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!

vilvoh

I haven't it test it but seems that using ColorRamp in Composite mode you should be able to extract the shadow.  I got the info from this tutorial. The resulting shadow seems to be plain with no alpha, so you just have to cut and paste.




Escala Real...a blog about Simutrans in Spanish...

vilvoh

I've been trying to follow the advices of the tutorial mentioned above, and I must conclude it's possible to "render" the shadow in another image/layer and get a good result.

In fact, it's really simple. You need to use composite nodes with this config (all the details are in the tutorial)
us (site down, do not visit) ]/image/show/pmCDEBCS3k/shadow.png]
Note: I used an extra node to output the result into a file. the Add node is a Math type node.

and from this scene..
us (site down, do not visit) ]/image/show/g92xq3Gsll/original.png]

you should get these shadows....
us (site down, do not visit) ]/image/show/XsxHvUKUvh/prueba-sombra0010.png]

There's no possible overlaping between the original and shadow images, thus it's just a matter of copy and paste..   :)

us (site down, do not visit) ]/image/show/oUmwmIY4wf/result-shadow.png]
Note: I've modified the shadow's color using GIMP to make it more visible.

Escala Real...a blog about Simutrans in Spanish...