News:

Welcome to World of Banished!

Main Menu

Help a newbie!

Started by jesta030, January 22, 2017, 12:03:50 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

kid1293


@Necora - I model in scale 1 and I put the mesh 20 units away :)
So it is maybe something with Blender losing focus when I am struggling
to make everything right. We'll see. Right now I am mapping separate
and I have a lot of time, so...

Discrepancy

I also have learned much from Necora.

@Tom Sawyer , I have been painting my AO image whiter, particularly the roof, lowering brightness and increasing contrast slightly, This seems to give it a 'thicker' snow look.

RedKetchup

> > > Support Mods Creation developments with Donations by Paypal  < < <
Click here to Donate by PayPal .

Necora

@Tom Sawyer I have a theory about snow but have not tested yet. Have you made a road texture? I did my first one the other day. It was only 1 texture, and I was messing around with it. In game in winter it came out as completely whited out by snow. When I was building, I noticed the mod kit throw up a warning (not an error) saying that the alpha channel of the texture is all white. So I added the alpha channel in gimp and changed it to transparent and you can now see the texture through the snow. So I am wondering, is this the same as with AO? Can you manipulate the colour of the alpha channel to add more snow where you want it by adding a white area to the alpha channel? IDK much about this sort of thing, but it might be worth giving it a go.

Tom Sawyer

Yes @Necora, I know about removing snow from roads via alpha channel and it also works for models. But it does not help here. I want more snow where it is affected by AO. I have brighten my AO in Photoshop like @Discrepancy and it helps. The shading is lighter (not so dark as it comes from Blender) and I have a bit more snow but still not really good. And full white would take away he AO shading from this part of the model.

There is a step while rendering the snow texture and so I went into the material files. I changed row 229 in the snow section of the OpaqueMaterial.srsl to "color.xyz = lerp(color.xyz, sno, pc.userPosition.x * input.seasonData.z * color.w);" and voila... Full snow on my little chapel, just a bit darker on the beams and stairs because of AO. :)

From left to right: without AO - with AO but removed snow - AO with changed opaque material.


Necora

@Tom Sawyer firstly, that is a beautiful little chapel.

Secondly, that awesome! Is looks like the same amount of snow as the first, without loosing AO. I noticed also that even vanilla buildings don't have great snow covering on the roofs, but I have no idea why AO should change that and the pure white AO is better. I've been playing around with the texture for the best part of the last hour, but just could not change the snow covering. I had two buildings side by side, one left as is, one I was messing around with all sorts of things in Gimp with the AO. No matter how much I made it brighter or contrasted, I could not get the white section any brighter than it already was from blender. The only thing I could do was remove the snow, not add to it. It is a shame really because I would love to have snow pile up in the corners, but instead you get dark shading.

I'll try your change and see what it does.

Necora

@Tom Sawyer could you tell me what that line of code was before you changed it? I need to revert back but forgot to back it up :(

Discrepancy

Nice find @Tom Sawyer

@Necora

vanilla OpaqueMaterial.srsl - line 229 =
color.xyz = lerp(color.xyz, sno, pc.userPosition.x * input.seasonData.z * color.w * ao.x * ao.x);

as Tom had changed it for snow on roof:
color.xyz = lerp(color.xyz, sno, pc.userPosition.x * input.seasonData.z * color.w);

Necora

Great thanks @Discrepancy

I changed it, and I can't see the difference... screenshot40 has Tom's line, screenshot41 has the original line.

Tom Sawyer

Maybe your change was not compiled @Necora. I copied the whole material folder in my mod for a quick attempt... For a clean solution we should use a new material to not affect all other buildings. I made such a material. Just copy these files in the Material folder of your mod and link to it from .../MaterialInstance/YourModelMesh.rsc instead of OpaqueSnowMaterial like this:

MaterialInstance resource
{
Material _material = "Material\OpaqueMoreSnow\OpaqueMoreSnowMaterial.rsc";
        ...
}


You also can rename the material to have your own and to not conflict with other mods.


jesta030

I suggest that all answers regarding AO and snow on models go into blackliquidsoftware.com/index.php?/topic/861-ambient-occlusion-ao/&page=3 to minimize confusion.


jesta030

Rumors of my death have been greatly exaggerated. It's just Civilization 6...

Anyways, I'm fiddling around again and am currently trying to get the map generator to spawn wheat close to and in water to later replace the model with reeds since I don't like what's in CC currently. And for the life of me I can't figure out how to do it. I've tried adding the path "template/NaturalResourceReed.rsc" to the StartingConditions.rsc which seems to control the map generator but to no avail. Googling hasn't brought up anything to point me in the right direction so... Help please?

Tom Sawyer

Welcome back! I'm also playing a game for myself these days but always come back to my modding project. ;)

The natural resource has to be added to the start condition itself (Hard.rsc for example), not to the default in StartConditions.rsc. At least I do it this way. But natural growing reeds is not really possible as far as I know and the reason why CC reeds is as it is. We cannot let it grow in water because people cannot gather it there and we cannot make it reseeding because it would spread on ground level 0 which means away from waters over the whole map. Maybe Bartender/Despo found a solution. I did not test their new version yet.

RedKetchup

so i guess you made your own template NaturalResourceReed.rsc ? because it doesnt exist in the game. it has been created by moddlers.
but yeah, citizens cannot harvest in water zones.

about the the ground level... yeah original wheat has been designed to be at 0 level. to have something that would spawn at -0,75 of a tile below the 0 level, it needs to be setup inside its graphic file .fbx, and only there.
> > > Support Mods Creation developments with Donations by Paypal  < < <
Click here to Donate by PayPal .

Tom Sawyer

I did not mean z-position of the mesh. I mean spawning on tiles with ground level 0 (flat land). We cannot avoid this because the game ignores the spawn height value when reseeding. If reeds would be able to reseed it would spread over the whole map...