World of Banished

MODS Garage => Tips and Help => Topic started by: jesta030 on January 22, 2017, 12:03:50 AM

Title: Help a newbie!
Post by: jesta030 on January 22, 2017, 12:03:50 AM
(http://worldofbanished.com/gallery/5376_21_01_17_11_49_47.png)

So this is my First shot at modding and I have a couples questions:

The toolbar Icon is empty, any ideas why?

Whats a decent amount of verts/polys for a simple house?

Can I assign different Materials and textures in blender or is the Single image at 1024x1024 the only way to Texture the House? Can I use a bigger image (eg. 2048x2048)?
Title: Re: Help a newbie!
Post by: Tom Sawyer on January 22, 2017, 01:32:22 AM
Hi Jesta! What a nice farmhouse. Looks like original from northern Germany.^^

The vanilla houses have round about 1 - 1.5 k vertices on 4 x 4 game tiles. My cottages have 2 - 3 k and I could not notice a relevant influence on the game performance in my tests. Trees and crops make much more problems. A texture with 1024 should be enough for a normal building but you can use 2048 too. It can make sense to combine textures of more buildings or variants in one file. I think it is also possible to assign more than one material but I don't use it. Try to keep the textures small. They increase your mod size a lot and are using memory in game. I use 128 pix per game tile for good detail and efficient file size.

The toolbar icon needs a correct link from the template to the sprite sheet.
Title: Re: Help a newbie!
Post by: RedKetchup on January 22, 2017, 02:06:15 AM
personally, i prefer to assign different material to different pieces instead of mapping to 1 big file. yes for a model, it makes more bytes than one 1024 but it gives a  better resolution per texture. and if happends to reuse the same textures for many parts, and for many models, you in fact save space overall because you are reusing many times the same textures
Title: Re: Help a newbie!
Post by: jesta030 on January 22, 2017, 03:40:49 AM
Quote from: Tom Sawyer on January 22, 2017, 01:32:22 AM
Looks like original from northern Germany.

Good eye. Its the house I grew up in from north east germany. If i get the hang of this thing i'm loking into making a whole range of thatched roof houses.

Quote from: Tom Sawyer on January 22, 2017, 01:32:22 AMThe vanilla houses have round about 1 - 1.5 k vertices on 4 x 4 game tiles. My cottages have 2 - 3 k and I could not notice a relevant influence on the game performance in my tests.

Good Lord! Break out the beveling tools, we're going full ham on this bad boy. The model i'm using has 107 verts, 109 faces.

Quote from: Tom Sawyer on January 22, 2017, 01:32:22 AM
The toolbar icon needs a correct link from the template to the sprite sheet.

Yeah the guide by discrepancy i used was a bit vague on what to do with the icon. guess i'll have to figure it out. had some errors building but just ignored them as it was late at night. maybe i'll look into them some more and it'll fix the toolbar icon issue.

Quote from: RedKetchup on January 22, 2017, 02:06:15 AM
personally, i prefer to assign different material to different pieces instead of mapping to 1 big file. yes for a model, it makes more bytes than one 1024 but it gives a  better resolution per texture. and if happends to reuse the same textures for many parts, and for many models, you in fact save space overall because you are reusing many times the same textures

and how would i go about doing this? how does banished know which textures are linked to what part of the mesh? any tutorials out there?
i guess i could use a couple 128x128 or 256x256 textures to get more detail while keeping the size down.

Thanks for the tips guys, much appreciated!
Title: Re: Help a newbie!
Post by: RedKetchup on January 22, 2017, 04:41:59 AM
each texture need his .rsc and Texture.rsc like you do for your big 1024x1024.

how you apply it to your model i dont know, i dont use blender (i use 3dsMax)
but some do
Title: Re: Help a newbie!
Post by: kid1293 on January 22, 2017, 05:33:37 AM

Hi and welcome!
In Blender you first create a new material slot with the 'plus-sign'(1)
name it and assign texture to it.
In edit mode you select your faces and click on the material slot
you want to use and 'Assign' (2)
Then you unwrap as usual having only the faces you want selected.


You must write a set of files for each texture you use. (as RedKetchup wrote)

Title: Re: Help a newbie!
Post by: Tom Sawyer on January 23, 2017, 01:45:32 AM
A range of houses in this original style would be nice. As far as I know we don't have it in Banished.

The vert count of about 100 I can't believe. At least I guess you will increase it fast when continue with creating models.^^

And hard to say what concept is more efficient. With a single texture the efficiency comes by overlay in the uv map to use the same part for several faces. And when making an individual look or weathering effects at walls and so on, you come in trouble with shared files. Probably both have their advantages. I made a little making of (http://www.banishedventures.com/makingofanewtavern-part1) too. Maybe there are some interesting points but I think Discrepancy's Blender guide is more useful for modders.

To help with your toolbar icon issue it would be better to see the code. And of course the vanilla resource files in the modkit are a good reference to check how it works.
Title: Re: Help a newbie!
Post by: jesta030 on January 31, 2017, 01:38:37 PM
thanks for all the replies. my plan is to make models for a 3x4, 4x6 and 5x8 house. they will probably end up looking like this:

3x4: https://farm4.static.flickr.com/3828/9589382171_b77a0cf0e8_b.jpg
4x6: https://upload.wikimedia.org/wikipedia/commons/0/02/Bilderh%C3%BCtte_K%C3%BChlenhagen.jpg
5x8: https://upload.wikimedia.org/wikipedia/commons/thumb/c/c1/Hof_der_Heidmark.jpg/1920px-Hof_der_Heidmark.jpg

the first house is my goal right now.

if i keep at it, here's my plan:

the latter two will be split into two halves that can be combined (like the colonial houses or the small town row houses) offering a choice between housing, storage and maybe functioning as an animal pen yielding meat/eggs since those houses traditionally were half living quarters and half stables/storage.

they might require clay and reeds to be built.


two more questions:
1. can i use the cycles engine in blender?
2. i read discrepancy's tutorial on blender and banished (http://worldofbanished.com/index.php?topic=1216.0) and it uses full cubes as beams where only 1 or 2 of the outside faces would be visible. isnt that adding extra vertices and faces that add unnecessary complexity and load?

thanks again!
Title: Re: Help a newbie!
Post by: kid1293 on January 31, 2017, 02:49:07 PM
As for your houses - they will fit perfectly!
I wish I had thought of combining living quarters and workplace.
It's an organic way of building towns.

question 1 - I never used the cycles engine, but as long as the result is a fbx-file
I don't think it matters. (Looks interesting)
question 2 - Yes, there can be a lot of hidden faces. But one way to reduce them
is to do the tedious work of removing the bottom and 'stick your head in' and remove
faces and edges by hand. But you only get a few that way.
I don't know of any tool to automate it. Maybe Blender forum has hints?
Title: Re: Help a newbie!
Post by: jesta030 on January 31, 2017, 04:20:21 PM
Quote from: kid1293 on January 31, 2017, 02:49:07 PM
But one way to reduce them is to do the tedious work of removing the bottom and 'stick your head in' and remove faces and edges by hand. But you only get a few that way.

well im obsessed with cleaning my models so, i'll stick my head in. no extra vertices, faces with an area of 0 or the likes... :) thanks for your answers!
Title: Re: Help a newbie!
Post by: RedKetchup on January 31, 2017, 05:56:05 PM
taking out the extra unused vertices is important and can still gain a not negligible amound of polygons
but you also need to take care with that, the shadow engine of the game is also counting on it.

shadows arent always casted by the outside face but often by inside faces too
Title: Re: Help a newbie!
Post by: jesta030 on February 01, 2017, 02:24:11 AM
another question: does smooth shading carry over to banished and is it recommended?
Title: Re: Help a newbie!
Post by: kid1293 on February 01, 2017, 02:28:06 AM
Smooth shading works and can be used to soften sharp edges on roofs/beams/whatever
You don't have to use an excess of triangles to make smooth dome on a house...
Title: Re: Help a newbie!
Post by: jesta030 on February 01, 2017, 08:11:01 AM
Quote from: kid1293 on February 01, 2017, 02:28:06 AM
Smooth shading works

This just keeps getting better. Dont think I'll sleep tonight, I#d much rather model and paint.
Title: Re: Help a newbie!
Post by: RedKetchup on February 01, 2017, 08:18:48 AM
Quote from: jesta030 on February 01, 2017, 08:11:01 AM
Quote from: kid1293 on February 01, 2017, 02:28:06 AM
Smooth shading works

This just keeps getting better. Dont think I'll sleep tonight, I#d much rather model and paint.

haha i know how you feel ^^
Title: Re: Help a newbie!
Post by: Tom Sawyer on February 01, 2017, 11:37:58 AM
A new modder on fire.  ;D

I look forward to these houses. A separate part for food production sounds interesting and realistic. Lets see how it works in game.
Title: Re: Help a newbie!
Post by: Paeng on February 01, 2017, 01:34:53 PM
Quote from: jesta030 on February 01, 2017, 08:11:01 AMDont think I'll sleep tonight

You're doomed...  ::)  Lucky you!  ;)

That first building looks great  :)
Title: Re: Help a newbie!
Post by: jesta030 on February 03, 2017, 03:57:18 PM
Am I overdoing this? Probably. Am I having fun and learning in the process? Definitely.

(http://i.imgur.com/SYEqHmD.png)

Will try to build into banished tomorrow and upload the mod/blend file to ask for critique.
Title: Re: Help a newbie!
Post by: RedKetchup on February 03, 2017, 05:33:28 PM
sweet !! looks perfect ! great job !
Title: Re: Help a newbie!
Post by: kid1293 on February 03, 2017, 10:36:04 PM

Very promising!
You are spot on with the style.


Keep going!
Title: Re: Help a newbie!
Post by: Paeng on February 04, 2017, 03:46:45 AM
Quote from: jesta030 on February 03, 2017, 03:57:18 PMAm I overdoing this?

Certainly not... I love some good weathering / "grunge", as well as distinct sidings, fascia boards, foundations etc...  :)
Title: Re: Help a newbie!
Post by: RedKetchup on February 04, 2017, 03:52:01 AM
Quote from: Paeng on February 04, 2017, 03:46:45 AM
Quote from: jesta030 on February 03, 2017, 03:57:18 PMAm I overdoing this?

Certainly not... I love some good weathering / "grunge", as well as distinct sidings, fascia boards, foundations etc...  :)

yeah everything is great !!
Title: Re: Help a newbie!
Post by: brads3 on February 04, 2017, 07:17:31 AM
Quote from: jesta030 on February 03, 2017, 03:57:18 PM
. Am I having fun and learning in the process? Definitely.

thats the kind of modders we like. new styles and new ideas.
Title: Re: Help a newbie!
Post by: Abandoned on February 04, 2017, 02:05:30 PM
Can't really be much help but wanted to say I really like weathered/grunge look too.  I think the red brick chimney could be change to plain stone like foundation or even chipped or crumbling stone.  Looking forward to see more.
Title: Re: Help a newbie!
Post by: jesta030 on February 05, 2017, 01:35:28 PM
cant import to blender because im failing at baking the AO. i have a circular dependency in blender which fucks the output. no idea how to fix this.

back to the drawing board it is!
Title: Re: Help a newbie!
Post by: RedKetchup on February 05, 2017, 02:23:48 PM
Quote from: jesta030 on February 05, 2017, 01:35:28 PM
cant import to blender because im failing at baking the AO.

you are not obligated to bake AOs !!! i never never never do any. i always use a "white" png of 64x64 pixels.
Title: Re: Help a newbie!
Post by: jesta030 on February 06, 2017, 02:40:56 AM
okay i'll need some help (hence the topics title):

i went back to the drawing board and created the simplest houde thinkable. then i followed discrepancy's excellent tutorial at: http://worldofbanished.com/index.php?topic=1216.0 only to get this error while trying to build:

Assert: Failed to load resource 'C:\BanishedKit_1.0.5.160505\MyMods\Test\bin\Test_Test.crs'

Object\ExternalFactory.cpp(364)

Callstack:
Runtime-x64-profile.dll(0x00000000eef95a95)
Runtime-x64-profile.dll(0x00000000eef9b0d9)
Runtime-x64-profile.dll(0x00000000eef84b4a)
Runtime-x64-profile.dll(0x00000000eef9ab9a)
Runtime-x64-profile.dll(0x00000000eef84b4a)
Runtime-x64-profile.dll(0x00000000eef9a6af)
Runtime-x64-profile.dll(0x00000000eef943ac)
Runtime-x64-profile.dll(0x00000000eef9199d)
Runtime-x64-profile.dll(0x00000000eef958ac)
Tools-x64.exe(0x000000003f9f3c50)
Tools-x64.exe(0x000000003fb72a73)
kernel32.dll(0x00000000774659cd)
ntdll.dll(0x000000007759a561)


When i ignore this error i get a folder called "bin" with a TestResources_resources.crs (mod is called test) of 1KB in MyMods/Test

when I execute the run.bat the house doesnt show anywhere in the toolbar...
Title: Re: Help a newbie!
Post by: kid1293 on February 06, 2017, 03:06:09 AM
1.
In your test.rsc (I think it is in the start folder of your mod)

Do you have a section called test?
The compiler tries to load it.


Toolbar test
{
Toolbar _parent = "Game/Toolbar.rsc:resources";
int _sortPriority = 500;
Action _action = Tool;
ComponentDescription _tool = "Template/gardenshed.rsc";
bool _autoHotKey = true;
}

If it is called something else it crashes.

2.
If you don't have any such section the call is wrong.
Probably from your testResources.rsc

ExternalList resource
{
External _resources
[
  "test.rsc:test"
]
}

change that to:

ExternalList resource
{
External _resources
[
  "test.rsc"
]
}


That is what comes to mind, but it can be other things too.
Title: Re: Help a newbie!
Post by: jesta030 on February 06, 2017, 03:24:47 AM
Thanks for the quick answer.

I forgot to change "apiary" to "test" somewhere. used notpad++'s option to search and replace in whole directorys to fix it. it now builds without errors and i can build the model ingame but it's mostly pretty dark....

http://imgur.com/a/Udxcy

the AO bake is alright, tried inverting it which actually changes nothing. the UVmap is sitting correctly on the AO bake... no idea.
Title: Re: Help a newbie!
Post by: RedKetchup on February 06, 2017, 03:28:31 AM
make sure the AO has been made from a very light grey color texture (almost white). the game is extremly sensible.

and what kind of light did you used in blender ? in 3dsmax we use "light => standard => Skylight" to get a light all around (and not just 2 sides) like a bright and beautiful sunny day.
Title: Re: Help a newbie!
Post by: jesta030 on February 06, 2017, 04:24:18 AM
okay, this is weird. when i pull up the contrast on the AO pic until all the baked areas are white and the rest is transparent, it doesnt change a thing. when i fill the whole picture with white the house suddenly looks normal. could be a problem with mapping the AO pic to the mesh?

Edit: filled the transparent areas with white, ingame model is lighter now. no idea wether AO is actually applied or its just dynamic lighting im seeing now...

(http://i.imgur.com/EirC1lt.jpg)

Quote from: RedKetchup on February 06, 2017, 03:28:31 AM
what kind of light did you used in blender ? in 3dsmax we use "light => standard => Skylight" to get a light all around (and not just 2 sides) like a bright and beautiful sunny day.

no light source. it baked the texture and the AO just fine in blender's cycles engine without lighting.

and another quick question: do i have to delete the "bin" folder every time i change something or will changes replace the older files?
Title: Re: Help a newbie!
Post by: RedKetchup on February 06, 2017, 04:49:22 AM
personally , i am doing it. just to make sure everything is new :)
just by adding this to the begining of your .bat

cd RKTrainingCamp
rmdir bin /S /Q
rmdir build /S /Q
cd ..


replace the RKtainingCamp by your new mod folder
Title: Re: Help a newbie!
Post by: RedKetchup on February 06, 2017, 04:53:11 AM
and personally i always use a full 64x64 white .png as AO. the level of details in game, and the zoom capacity allowed.... i dont think it justify all the time i would need to take to make them all... a white one is enough ^^
Title: Re: Help a newbie!
Post by: jesta030 on February 06, 2017, 04:56:00 AM
So you basicly dont use AO?
Title: Re: Help a newbie!
Post by: RedKetchup on February 06, 2017, 06:04:18 AM
Quote from: jesta030 on February 06, 2017, 04:56:00 AM
So you basicly dont use AO?

i dont

but we are obligated to put one in the code or the game will crash .... so it is a blank (white) one.
Title: Re: Help a newbie!
Post by: jesta030 on February 07, 2017, 12:16:32 AM
So I successfully imported multi-texture objects into banished and am making Progress in simplifying my existing house model (baking textures from co-planar faces into a texture Atlas currently), but i have more questions:

do i Need an extra AO Image for every texture Atlas i have and another one that covers all faces with repeating textures?
Title: Re: Help a newbie!
Post by: RedKetchup on February 07, 2017, 12:52:33 AM
no, you cannot have multiple AO for every textures. i dont think. only 1 AO that represent the whole mesh (and 1 AO for build01, 1 AO for the build02 building process. but they are still for the whole meshes)


AO is a per mesh thing, not a per texture thing
Title: Re: Help a newbie!
Post by: Tom Sawyer on February 07, 2017, 03:27:52 AM
If I look at your model @jesta030 I wonder if it is really the best way to make multi texture things. I guess a single texture would simplify your project. AO I did not use too until now. It means a lot more mod size. Not only because of many AO images, more because I can not overlay faces in the uv map (correct me if I'm wrong with that). So much more texture size and that's the thing what makes pkm's big. Passive shadows I always made directly in the texture using Photoshop. Inside the chimney for example. It's just a thought. I do not argue against AO. Actually the game wants it and I try to use it in my current model.
Title: Re: Help a newbie!
Post by: jesta030 on February 07, 2017, 06:37:25 AM
I know that Multiple textures will quickly inflate the Mod but im going in reusing alot of the seamless ones.

I wasnt satisfied with the quality when using a 1024² Image for the simple house I made at First. It was blurry when zooming in. Im going to try to Bale allerdings textures into a bigger Image and See If I can find a suitable quality.

Blender allows baking Texture and AO into the Same image. If I then use a White 2x2 Image as AO Placeholder for the Game I could save alot of Space.
Title: Re: Help a newbie!
Post by: RedKetchup on February 07, 2017, 08:26:11 AM
the way i do it , i prefer to not bake them in one 1024x1024 ...
i prefer to work with multi-textures technic.

like a text for roof, a text for wall, a text for door... window... woodbeam ... etc

that way the resolution is alot better and alot less pixelirized.
and also, when you use the same individual textures, at the end , you save alot of space file. the .pkm is smaller cause you can reuse the same 256x256 or 512x512 like two or three dozen of times if not hundreds...
Title: Re: Help a newbie!
Post by: jesta030 on February 07, 2017, 08:39:37 AM
How do you manage These textures between Models? Where do you put the . rsc Files?
Title: Re: Help a newbie!
Post by: RedKetchup on February 07, 2017, 08:43:07 AM
Quote from: jesta030 on February 07, 2017, 08:39:37 AM
How do you manage These textures between Models? Where do you put the . rsc Files?

in MaterialInstance folder and you make a .rsc and a Texture.rsc for each texture used:)
like :
Title: Re: Help a newbie!
Post by: Tom Sawyer on February 07, 2017, 08:54:14 AM
Blurry with 1024 is strange. Maybe there is something wrong. Even my big barn on 8x5 tiles has a 1024 px texture and I think it's good. And I also use a 2x2 white place holder image and don't care about any AO in Blender. No need to bake something there in this case.
Title: Re: Help a newbie!
Post by: jesta030 on February 09, 2017, 06:06:10 AM
need more help.. :(

i have baked the wall texture to a 1024 image and tried unwrapping the corresponding faces into a separate UV map. i think the separate map isnt recognized by banished because i get distorted/black surfaces ingame for the faces i unwrapped into the second UV map.

so then i tried unwrapping all into a single UV map, placing the faces that make up the walls on the baked texture image, then scaling them and the corresponding wall texture down to half the size. this lets me fill the rest of the UV map with the remaining faces (that have seamless textures). in banished the walls are textured but the texture is obviously double the size, so banished didnt recognize that i scaled the texture size in blender, just the scale of the faces in the UV map...

any tips?
Title: Re: Help a newbie!
Post by: RedKetchup on February 09, 2017, 06:21:11 AM
on blender i cant help. maybe someone can do ....

about the seperate map... i dont think banished can recognize that
Title: Re: Help a newbie!
Post by: jesta030 on February 09, 2017, 10:22:33 AM
Does banished recognize Texture mapping at all? Blenders cycles engine hast this System that allows to move, rotate and scale textures in the uvmap and thus on the unwrapped Faces. I used this to scale the Wall texture to half Size after I scaled the UV unwrap to half Size aswell. The UV scaling Carrier over to banished but the Texture scaling didnt.

How do you use Multiple textures when banished doesnt recognize Multiple UV maps or Texture scaling?
Title: Re: Help a newbie!
Post by: RedKetchup on February 09, 2017, 10:51:09 AM
for sure it does reconize the UV unwrap, i am doing all the time, i dont use a single texture without UV mapping it all sides. the only thing is doesnt reconize when you click and try to multiply 3-4 times the texture over the piece... it needs to be done differently, uv map => quick peel, and you overlap the other part ontop the first part.

kid1293 and other ones use blender... they can explain that better than i cause even i make you screenshot from 3dsmax.... you wont understand me
Title: Re: Help a newbie!
Post by: RedKetchup on February 09, 2017, 11:02:17 AM
the butcher tent i made lately in last big mod.... you can see i use 12 different textures of all the parts i did put in that mesh ...
at top screenshot, you can see all the green squares "diffuse" , each one is designated to a specific .png

and in screen2 you can see each one they have been re UVWrapped accordingly.

unfortunately, i cant tell you how to do it with blender
Title: Re: Help a newbie!
Post by: jesta030 on February 09, 2017, 11:07:53 AM
yeah i know, thanks for taking the time to help me so much Red. :) I really appreciate it.

I'm really close to getting the whole thing into Banished if only the textures would be at the correct location and scale like they are in blender. I found out how to include multiple textures and the whole thing builds without problems but in banished all the textures are either black or distorted...

i could just unwrap all faces, align/scale all textures and bake everything (even including AO) into one single image, make a new material for it and apply that to the whole model. but i'd loose so much detail plus the chance to reuse the texture files on other houses to save size...

maybe someone who uses blender can chime in and give me that last hint how to properly map the textures...
Title: Re: Help a newbie!
Post by: jesta030 on February 09, 2017, 11:11:44 AM
Quote from: RedKetchup on February 09, 2017, 11:02:17 AM
and in screen2 you can see each one they have been re UVWrapped accordingly.

i can see that in the top right corner of the UV window it says "Map #7 RKMtentroof.png" which suggests that you're using at least 7 UV maps... i know how to properly unwrap stuff, even to different UV maps and the model is totally fine in blender, but the problem is that none of this carries over to banished it sems. :(
Title: Re: Help a newbie!
Post by: RedKetchup on February 09, 2017, 11:13:31 AM
there is surely something you dont do or forget to do ... to make it "official" or "apply"...
personally , once i edited the uvwrap of an item... i right click and make it "convert into editable poly" to apply my changes permanently...
Title: Re: Help a newbie!
Post by: RedKetchup on February 09, 2017, 11:15:58 AM
like this screenshot

thats my way to apply the changes permanently...

but it is in 3dsmax so doesnt help you
Title: Re: Help a newbie!
Post by: kid1293 on February 09, 2017, 12:41:12 PM
I use Blender but have no experience from cycles engine.
I've tested but I had enough to try to get the grips on so I left.

Do you always scale the textures?
I do textures first to be able to stack several UV's on
limited texture. I should say I usually use one texture.
I'm good at guessing the size of individual items and
make a habit of extra large texture pieces for very visible things
like door and windows.
I've never had the need to scale textures. I scale the UV's and match
them to the texture.

If all is black. Check the normals.
All can be black with baked AO too. Very black.
If you take RK's advice on an all-white AO you can later enhance your
texturefiles by hand. They are rather 'bleak' in game compared to Blender window.
So try some contrast and darken a little. (without AO that is)

Hang in there, it will come to you!
Title: Re: Help a newbie!
Post by: jesta030 on February 09, 2017, 02:26:51 PM
i have successfully used one 1024 texture that had all faces unwrapped onto it. It showed up fine in banished.

but i want to know how to use multiple textures. for example I want to have a window texture that i can just Color differently on every house. or a seamless brick/thatched Roof/Wood texture. that way if i want to modify a texture i dont have to mess around in gimp/photoshop but just Change a material in blender.

i know how to include multiple textures when building. it builds fine. the only Problem is that banished doesnt recognize the scale/Rotation/Location of the textures that i defined in blender.

:(
Title: Re: Help a newbie!
Post by: kid1293 on February 09, 2017, 04:17:30 PM
I don't really understand. It's the UV you scale/rotate.
I can only send an example I did in Blender.
Multiple textures (the paths are wrong, you have to load them up one by one)
You can see that I made a basic market stall with several textures all mapped.
Under that mesh I put (don't know the name) 'sub-meshes' with food. Also with
different textures. All mapped individually. That's the way I did it earlier.
Then you write code for the top mesh only. And for all those textures. :)

I have to go now, but will check later.
Title: Re: Help a newbie!
Post by: jesta030 on February 09, 2017, 04:54:52 PM
Quote from: kid1293 on February 09, 2017, 04:17:30 PM
I can only send an example I did in Blender.

highly appreciated. cant look at it now since im at work but the pics included suggest thats exactly what im looking for. thanks in advance!
Title: Re: Help a newbie!
Post by: jesta030 on February 10, 2017, 02:13:18 PM
okay, i get it. the way im texturing in blender isnt carrying over to banished because Blenders cycles engine nodes System (see pic) only works inside blender and isnt exported...

(https://i.stack.imgur.com/bcMDH.png)
Title: Re: Help a newbie!
Post by: RedKetchup on February 10, 2017, 02:22:47 PM
Quote from: jesta030 on February 10, 2017, 02:13:18 PM
okay, i get it.

sweet !!
Title: Re: Help a newbie!
Post by: jesta030 on February 10, 2017, 02:51:22 PM
Quote from: RedKetchup on February 10, 2017, 02:22:47 PM
Quote from: jesta030 on February 10, 2017, 02:13:18 PM
okay, i get it.

sweet !!

Yeah, it took a while. Since ure online, another question. :D

is it possible to use decals like a bit of moss, or some dirt and put them on top of a texture i use while keeping them in separate Images? the decal would have transparency and just act like a second layer of texture with exact Placement...
Title: Re: Help a newbie!
Post by: kid1293 on February 10, 2017, 03:19:05 PM

In Blender yes but export to game no.
We're limited to what the game wants as input.
On the other hand I have never thought about it.
But I'm sure I've never seen a double texture in game.


Can't you put your decal on in an external paint program?

Title: Re: Help a newbie!
Post by: jesta030 on February 10, 2017, 03:39:41 PM
sure i can. but the Roof is a seamless texture that has 2 decals (the upper end and the moss) laid over it. i could bake it all into one texture, but i dont want to. :)
Title: Re: Help a newbie!
Post by: RedKetchup on February 11, 2017, 12:33:34 AM
you would need to bake it in one texture, you cannot put 2.

about the decal, it only goes to the ground, not on the building, you can draw (copy paste) everything you want in this decal... dirt.... grass... moss.. it is only an image and the decal will reproduce it on the ground.
Title: Re: Help a newbie!
Post by: jesta030 on February 14, 2017, 08:38:23 AM
nearly done:

(http://i.imgur.com/alkBRLB.png)

3 progblems remain:

1. smoke always comes out of the middle of the house although the "smoke" point is sitting in the chimney
2. how do i change the decal on the ground?
3. people walk through the house when interacting to bring food/firewood or eat/warm up?

thanks for all the great help everybody!
Title: Re: Help a newbie!
Post by: RedKetchup on February 14, 2017, 08:53:06 AM
make sure the name of the smoke point in blender and the name inside your template is the same.
make sure the "smoke" point in blender is "linked"or "attached" to your point called "points" in your mesh
you also need to add a link to your point list inside your particle function like :


ParticleDescription particle
{
PointList _pointList = "Models\PlymouthHouse01Points.rsc";

ParticleAttachment _systems
[
{
Time _fadeInOutTime = 2.0;
bool _addOnCreate = false;
bool _addOnNotify = false;
Particle _particle = "ParticleSystems\Fire\FireSmall.rsc";
}
{
bool _addOnCreate = false;
Particle _particle = "ParticleSystems\ChimneySmoke\ChimneySmoke.rsc";
String _attachNode = "smoke";
}
]
}


about the people walking through ....
the allowed path is always described in your MapDescription map function
#### = not allowed to go there
_ _ _ _ = allowed to go
...... = roads

about the decal on the ground, which i call "footprint" you use a program like Gimp2 which can do transparent png ... and you draw your own brown ground yourself
Title: Re: Help a newbie!
Post by: kid1293 on February 14, 2017, 10:15:10 AM

About points.
I have had my share of problem with points (and Blender).

They do not work as intended if they are in scale=1. My experience.

I always export fbx (scale=1) - import fbx with scale=0.01 then immediately export fbx again.

I know most models are in 0.025 (inches) but I have learned that
0.01 (centimeters) are fine too.

My points never worked when scale=1!
Title: Re: Help a newbie!
Post by: RedKetchup on February 14, 2017, 10:31:56 AM
@kid1293  is the expert in blender !!  ;D
@RedKetchup  is useless in blender ^^
Title: Re: Help a newbie!
Post by: Necora on February 14, 2017, 06:27:09 PM
Hey! So I'm a bit late to this party, didn't see the thread until now.

I've been stumbling my way through blender since December so perhaps another point of view will be useful..

Re. texture map vs multi material... I started off with the texture map but when @RedKetchup introduced me to multi material I have not even thought about going back, I love it. I find a texture map finicky and annoying going back and forth between blender and gimp (mainly because I don't like gimp... but it is free). With multi material, I can do all of my scaling and adjusting in blender, saves a lot of time. A lot of my stuff is themed sets, so I only use a handful of textures, a few sidings, a couple of roofs, a couple of beams etc. so I am using far less textures than if I had a map for each building.

Now, in cycles you could use the multi material approach to texture your models in blender, then use the texture paint tools to 'paint' that texture onto a new UV map, render it, and save it as just one texture map per building, if you were that way inclined. I've not tried it yet, but I did use that to texture a goat and it worked really nicely.

Re. Ambient Occlusion, I actually used the same approach as @RedKetchup before, a white AO texture. But recently I have cracked how to make a good (in my opinion) AO in blender while using multi materials for texturing.

Firstly, I don't use cycles render, just blender render. But I did use cycles to make the custom goat texture map and also some trees. In blender render here is what you do...

1 - Set up two UV channels. Go to the 'Data' tab of your model, scroll down to UV maps. Re-name the first one to 'UVChannel_01' then add a second called 'UVChannel_02'.

2 - Unwrap your model on UVChannel_02. In the 'Data' tab, click make sure you select 'UVChannel_02'. Then in the edit mode, select all (A) and get the unwrap menu (U). Then select the 'Smart UV Project' option. Keep the angle limit the same, change the Island Margin to 0.03 (just to space them out a bit), de-select 'Stretch to UV Bounds' otherwise the edges of the UVs will be at the edge of the map, and you get a thin black line in game. Then click unwrap. Make a new image in your UV viewer, 1024x1024, white background.

3 - Test. Go to the 'Data' tab, and select between the two UV maps. You should find that UVChannel_01 has the original unwrapping from when you made your textures, and UVChannel_02 has the new unwrapping for the AO. The game reads the first channel for textures, and the second for AO. If you are using multi materials, then in the 'Material Veiw' mode UVChannel_01 will look perfect, UVChannel_02 will look funky, this is good.

4 - Set the Scene. Make sure you are viewing 'UVChannel_02', although this step is universal, it is best to keep it selected.
4A - Go to the 'World' tab. Scroll down to the 'World' drop down menu. Click the colour box beneath 'Ambient Color:' and make all three channels (RGB) 150.00.
4B - Scroll down to the next section, 'Ambient Occlusion'. Select the box. Change the factor to your liking... I use 2.5. The higher the number, the more defined the shadows. I also change it to Multiply rather than Add... again it makes them more defined but you could argue that this is too much. You can play around with these later to see the difference.
4C - Scroll down to 'Environment Lighting' and 'Indirect Lighting' and tick them both. Not sure why, but it worked when I did it.
4D - Scroll down to 'Gather'. Make sure you have 'Raytrace' selected. Change the 'Attenuation:' to something in the order of 20 cm (0.2m). This is the distance that objects and faces will cast a shadow on one another. With 20 cm, anything within 20 cm of a face will cast a shadow onto it. The higher the number, the further away a face can be to cast a shadow on another face. You can also play with the drop off values, this is how quickly a shadow fades away from the face or object that cast it.

** Note - All objects in the file will case a shadow, whether they are in the scene or not. If you have F-variants or build stages, make sure they are moved well away from (and possibly hidden fro view) the baking otherwise they will make everything dark.

Make the 'Samples' 10.

5 - Bake. Go the the 'Bake' tab. Scroll down to 'Bake'. Change the 'Bake Mode' to 'Ambient Occlusion' from the drop down. Click 'Normalized' - this is important with materials assigned to your model, it forces the render to see all materials and textures as white. If you do not click this, you'll end up with funky shadows due to your materials. Change the margin to 10px, and click bake!

6 - Go into 'texture view' to see the resulting bake cast onto your model, and save the image as xxxxAO.png. When saving the image, in the png options click 'BW' - there is no point saving it as a full colour image as there is no colour... this saves a lot of file size (about 1/4 in what I have done) of the resulting .png

There you go, that should bake you an awesome AO. No lighting is required, blender bakes AO regardless of lights, so no suns etc. are needed.



Another hint, you can check things on the fly. If you 'Run' your mod in the mod kit, then you can re-bake AOs, change textures, resize models, add/remove what ever, and see the changes happen instantly in game when you export the model again. It is great for playing with the AO.


Another thing with blender, I now do everything to that specific model in one file. Build stages, F-variants etc. When ready, I just scale everything to .01 and export - this works perfectly fine. No importing or exporting models at different scales.

Hope any of this helps.

Edit - a big thanks has to go to ShockPuppet at BL for the AO stuff, while he uses 3DSMax and didn't know the functions of blender, he was great at generally helping me understand my way through it.
Title: Re: Help a newbie!
Post by: jesta030 on March 13, 2017, 05:07:28 AM
Just wanted to let you know, I'm not dead. :) Been taking a break, trying to figure out whats the easiest way to get things done the way i want to.

(http://i.imgur.com/70ajBcc.jpg)

i think it fits quite well with CC and SmallTownRowHouses.
i have a .pkm if you want to try it out:

https://www.dropbox.com/s/bvvcyeylxrbofpx/HouseSmall.pkm (https://www.dropbox.com/s/bvvcyeylxrbofpx/HouseSmall.pkm?dl=1)
Title: Re: Help a newbie!
Post by: RedKetchup on March 13, 2017, 05:34:37 AM
congratulations for your first release @jesta030  it is a very nice house :)
Title: Re: Help a newbie!
Post by: QueryEverything on March 13, 2017, 05:57:17 AM
Hiya @jesta030 I wanted to try your new mod, but I received a warning error when I tried to.
Can you host via dropbox or google by any chance?
Title: Re: Help a newbie!
Post by: jesta030 on March 13, 2017, 07:48:13 AM
im not at home right now so i could only download from that site that Chrome wanted to block and reupload to dropbox. the file size is the same as my original so i dont think it has been tampered with. anyways, the post above has been updated with the new link.
Title: Re: Help a newbie!
Post by: RedKetchup on March 13, 2017, 08:45:49 AM
Quote from: jesta030 on March 13, 2017, 07:48:13 AM
im not at home right now so i could only download from that site that Chrome wanted to block and reupload to dropbox. the file size is the same as my original so i dont think it has been tampered with. anyways, the post above has been updated with the new link.

if you allow me... i will help her, i will send her a copy placed on google drive. that way you wont have to worry :)
Title: Re: Help a newbie!
Post by: QueryEverything on March 13, 2017, 02:42:33 PM
Thank you both, I got the house, will try it in my game today :)
Great work!!
Title: Re: Help a newbie!
Post by: jesta030 on March 14, 2017, 02:59:26 AM
BTW on the topic of AO: I decided to use a texture atlas for the house and bake AO aswell, overlaying it on the texture with 60% opacity. for banished i use a 16x16 white AO image.

Texture atlas:
(http://i.imgur.com/H2Begi4.jpg)

AO bake:
(http://i.imgur.com/IyXo2vi.png)

Combined, as used in the mod:
(http://i.imgur.com/HhIFRK2.jpg)

The house just looked weird without AO IMHO and I think this is the simplest and most efficient way to incorporate it without inflating mod size.

Side note: imgur doesnt like transparency apparently. white in the above pictures should be transparent...
Title: Re: Help a newbie!
Post by: Necora on March 14, 2017, 04:20:58 AM
@jesta030 I think the AO has something to do with lighting between 'rain' and 'sun' in the game and also snow covering... so you might want to make a version up with AO incorporated as you have and also separate as you might find it comes out quite different, or not, would be interesting to know either way.

There are ways to shrink the AO, for example from blender save it as a black and white png rather than full colour, and also compress it a bit, that shrinks the file size. Also use something like RIOT image tool, that also can help you decrease file size without decreasing quality.


Also, a general question to the crowd, how do you make those texture maps??

I always struggled doing them by hand as @Discrepancy 's tutorial showed, which was OK for small buildings but too finicky and always came out looking bad on larger ones. Now I use the multi material way but I would like to know how you do those.
Title: Re: Help a newbie!
Post by: RedKetchup on March 14, 2017, 05:58:30 AM
i would like to see if it is alot more easy and see if it takes alot less time to do with blender than 3dsmax. i know how to do it in 3ds , and it kind long and complicated and losing so much details unless you do a 2048x2048 which is crazy in .png format ^^
Title: Re: Help a newbie!
Post by: Necora on March 14, 2017, 07:00:33 AM
@RedKetchup do you mean the AO or texture map?
Title: Re: Help a newbie!
Post by: jesta030 on March 14, 2017, 07:22:01 AM
@Necora Well it's not that hard once you have everything set up. basicly you make a separate UV map where you arrange all the pieces so they fill the map as good as possible and then use blender's "bake" function. for Color you just bake Diffusion, for AO you bake.. well AO. I'm using the cycles render engine which means i have to define which UVmap to use for the bake and which Image to bake to in the node Editor. you can bake to different Images, rebake only part of  the Image (only the faces with a single material) and modify it in your graphics program afterwards. Colors I usually bake to a 4096x4096 Image since blender is bad at anti-aliasing and when you bake two faces that border each other but have different Colors and are not horizontal or vertical on the UVmap you'll get jagged edges. i then downsize in GIMP to 1024x1024.

i'm actually thinking of making a series of tutorial vids because there's so much i have figured out on my own and i want to make it easier for others. last hurdle i took was figuring out why the .pkm wouldnt build: dots in the file path...
Title: Re: Help a newbie!
Post by: Necora on March 14, 2017, 07:32:45 AM
@jesta030 right, I figured it would be something like that. Do you use multi materials to texture the building, then render those onto another UV map? What render option is it? I have only used a method similar with the texture paint. For that you arrange 1 UV map over an image using project from view, in this case a goat, and paint the image onto another UV map on a black image that is smart projected using the texture paint tool.
Title: Re: Help a newbie!
Post by: Necora on March 14, 2017, 07:46:32 AM
@jesta030 I answered my own question, nvm.

So I tried it and got a nice map at 4096, but it looses a lot of detail compared to how I was doing it before. But that is because my unwrapping previously was not using seams and things, so each individual face has its own spot on the texture map, so even at 4096 everything is super condensed in. It will be a lot of work to go back through and unwrap everything again in a way that can make a good map.

Is there any benefit of using this over multi material? In a large mod maybe not, when lots of buildings are using the same image. But in a smaller mod of only one or two buildings than maybe?
Title: Re: Help a newbie!
Post by: RedKetchup on March 14, 2017, 08:21:17 AM
Quote from: Necora on March 14, 2017, 07:00:33 AM
@RedKetchup do you mean the AO or texture map?

was talking about texture map like
(http://i.imgur.com/H2Begi4.jpg)


working with multimats until everything finished and then at then end from it , make a huge 1024x1024 or 2048x2048 one single .png with all the sides and roof on the same image.
Title: Re: Help a newbie!
Post by: Necora on March 14, 2017, 09:10:23 AM
@RedKetchup I just tried it with the tavern. The problem I have is that every face has a space on the map, which means it is all squished in there even on a big 2048x2048 image. The problem is that I didn't use seams and no faces share a space on it, so I'd have to go through the whole model and re-unwrap everything that is the same size together... I think that when starting a new building it will be good because I can carefully unwrap as I go, but for existing buildings it will take a long time to produce a good image for each one, especially the larger, more complicated ones.

What I really want to use this method for is smaller objects such as barrels and things, as they are what I struggle with the most in terms of good unwrapping. If I can paint freely using loads of textures then bake it into one image it will be really cool.

(ignore the size of the attached image, it is highly compressed and colour reduced to make it shareable).


Title: Re: Help a newbie!
Post by: jesta030 on March 14, 2017, 09:38:46 AM
On my texture map you will notice that there's only one big Window, only one first floor "triangle" (Grey Wood) and the timber Frame pieces are also fewer than there's walls on the ground floor. there's alot of overlapping to save space and the whole marking seams, unwrapping and arranging to get the max Detail per texture map size takes ALOT of work.
Title: Re: Help a newbie!
Post by: RedKetchup on March 14, 2017, 09:58:33 AM
yeah

1. yeah everything get on it, every face so,  thats what i was saying, even at 2048, we lose so much quality.
2. i understand how you go: you do your own ONE texture and put everything you need on it and you overlapping. it is a custom


cause i can do that too! with a 1024x1024 i can put and paste all the 6 roof colors of 256x256 each, i can put a 768x512 wall which serves for all the walls, a 256x256 stone for the chimney and foundations, a 128x256 door and same for window....
and i still have some space left to put my ground dirt footprint on it too !!


but what is the avantage of 1 custom with everything on it, versus .. use 5-6 png of 256x256 or 512 ?
out maybe to have 1 file .png for everything ? is there any game improvement ?
Title: Re: Help a newbie!
Post by: jesta030 on March 14, 2017, 10:46:14 AM
i actually have 2 things i can do on a texture map that cant be done with seamless textures:

1. I can overlay it with AO for the specific object adding more athmosphere
2. I can add Little Details like the moss decal on the Roof to make every house dofferent.-
Title: Re: Help a newbie!
Post by: Tom Sawyer on March 14, 2017, 10:47:02 AM
Nice to see you back and working at your promising houses @jesta030. The first model looks already very nice in game. Your way of texturing is similar to mine and I can say if you are going to design your details in 3d as you said, you will save a lot more space in your texture by overlapping. Arranging uv's in such a texture is a lot of work, that's true, but it becomes faster. I also noticed what you meant with the blurry wall. You will solve it by 3d designed timber pieces. It will look sharp in game and benefit from Antialiasing. Your vert count will increase but the pkm size will be smaller. The textures are great, especially the roof is a masterpiece in my eyes and shows the advantage of single texture files for individual design.

One tiny thing I noticed at your house is this gleam of light on the ground. You can solve it by adding a face on the bottom to close your model. And for my taste the house is too dark in game. Maybe it's because of the AO or just the texture. It can get more contrast. This half-timber style has a lot potential to look nice and atmospheric in game. I still want to make such a house too but I stuck in nordic wooden style.^^ Just my thoughts to the first model. It's going to be a great addition to Banished. :)
Title: Re: Help a newbie!
Post by: jesta030 on March 17, 2017, 05:32:54 AM
I thought I'm nearly done with the first house but instead I'm going to try what @Necora suggested wth the AO and multiple UV maps. I'll see if it offers benefits that justify the increased size for the AO map.

Also I'm on holidays for a week and am collecting pics of houses like the one I'm making to get better textures... I don't think I'll ever be satisfied.
Title: Re: Help a newbie!
Post by: RedKetchup on March 17, 2017, 06:30:46 AM
Quote from: jesta030 on March 17, 2017, 05:32:54 AM
Also I'm on holidays for a week and am collecting pics of houses like the one I'm making to get better textures... I don't think I'll ever be satisfied.

hehe i know how you feel ^^
Title: Re: Help a newbie!
Post by: Necora on March 17, 2017, 08:10:56 AM
@jesta030 if you are worried about the size, there are a couple of things you can do. I just baked one of my more complicated buildings, a water mill with 2,500 faces. Saving the AO ith blender preset values, so a 1024X1024 .png with alpha channel, 'RGBA', 15 % compression, results in a file size of 849 KiB. Saving it with 'BW' selected instead of 'RGBA' gives a file size of 532 KiB. So quite a difference just changing the colours.

I'm not sure if you have come across the RIOT image optimizer... http://luci.criosweb.ro/riot/

Give that a go, it allows you to compress and change colour depth of your images, side by side so you can see if you loose quality. You can do this on the textures and AO once you have built the mod and have the houses loaded up in the mod kit 'run.bat' as you can change these texture files on the fly and see how they look as you do, to make sure you don't lose quality. I would just keep decreasing the colours, of all textures, until you start to see degradation. Then go back a bit.

I got the AO mentioned above down to about 400 KiB before it started to noticeably become pixelated and loose quality.

You can use this for all textures, and the difference is quite a lot some times. It is also really good at resizing a texture with very little loss, depending on the texture. Look at the image I have attached, it took this 1024x1024 wood panel texture from 1.61MiB to a 512x512 texture at 115.88KiB with no perceivable loss in quality. There are a couple of places where some minor detail has changed colour, but you'll never notice that in game.

Title: Re: Help a newbie!
Post by: RedKetchup on March 17, 2017, 09:10:26 AM
nice thanks you, i downloaded it :)
Title: Re: Help a newbie!
Post by: Necora on March 17, 2017, 01:50:27 PM
Thanks should go to @Paeng who originally shared me the link :)
Title: Re: Help a newbie!
Post by: Paeng on March 18, 2017, 04:39:47 AM
Quote from: Necora on March 17, 2017, 01:50:27 PMshared me the link

Oh, glad you find it useful too...  :)

* Yeah, it's ridiculously efficient - I'm able to crunch my (sometimes lengthy, 20 to 30 images) journal posts by close to 50%...
Title: Re: Help a newbie!
Post by: kid1293 on March 18, 2017, 06:24:00 AM
@Necora -  I have tried your way of making an AO map for a model.
I have a house with 3 build. UV stacked on top of each other on (the only) texture.
So I followed your tutorial earlier in this thread. Mesh model was superb!
But... build 1-2-3 were all brown and useless with the new method.
Do I have to name the AOmap different for each model?
I have all my models and points in one fbx.
Title: Re: Help a newbie!
Post by: RedKetchup on March 18, 2017, 08:11:51 AM
i think. if you check apiary, it has 3 AO for the 3 build
Title: Re: Help a newbie!
Post by: Necora on March 18, 2017, 11:32:04 AM
@kid1293 glad it worked! For the mesh at least.

Regarding build stages, it depends on how you build them. I would use a new AO bake, and so a seperate AO.png, for each build stage. If you try to use the same as the final mesh, you might have the problem that shading is in the wrong place now that a baked face is no longer there to cast the shadow, so the shadow will remain even if the face that cast it is gone.

I don't know how you make build stages, but I start with the final mesh, delete all of the walls, and add a lot of beams and things. Even if I make my beams by copying and existing one, and so copying the UV positioning, they won't necessarily have the same shading and interaction with the face around them. Plus as soon as you scale the beam, even if you keep the UV in the same place, the shading will become distorted. I think AO needs to be individual for each face in the model, so it is probably best to bake each build stage individually.

But having said that, I don't use AO on the build stages. I have one small white texture in my mod called 'buildAO' that all build stages use. This is to keep mod sizes down, esp. as for the most part build stages don't stay around in game very long so I don't think they are as important. I am trying to put more effort into the build stages though, just not in terms of AO.
Title: Re: Help a newbie!
Post by: kid1293 on March 18, 2017, 01:40:27 PM

:) No, I use separate AO maps but there is something with Blender...
I have stumbled into this before. One of 3-4 parts work but the other
parts are very dark brown. Eventually i find it but right now I am
very happy with your answer - I decided that build stages are
not that important to waste time and effort on since they are a very
short time on the screen. Reading that my solution with a white AO
is OK by you too really lifted a weight off me. I first thought I was cheating. :)
They look good in game. Not much detail to cast shadows.


Thanks! I send you a nice picture of 'lessons learned'.
Title: Re: Help a newbie!
Post by: RedKetchup on March 18, 2017, 01:42:12 PM
woah ! so much detail in last shot !!!! look so great :)
Title: Re: Help a newbie!
Post by: kid1293 on March 18, 2017, 01:49:11 PM
Thanks to Necora but there are a good 2000 triangles too. :)
Title: Re: Help a newbie!
Post by: RedKetchup on March 18, 2017, 01:55:40 PM
Quote from: kid1293 on March 18, 2017, 01:49:11 PM
Thanks to Necora but there are a good 2000 triangles too. :)

just 2 k ? thats very good too !
Title: Re: Help a newbie!
Post by: Necora on March 18, 2017, 04:59:04 PM
House looks awesome @kid1293.

I never really bothered with AO when I started, because I couldn't figure it out right. Then I was determined to make a good one so spent a solid day doing nothing but messing with AO, and came up with a method that works. Just the contrast and framing it gives the edges between wood beams and faces I think makes a lot of difference in the 'feel' of the model, and it also does a great job at tempering the, in my opinion, drastic lighting changes between rain and sun in game. Something I don't do, that I should, is play around with the values more. So the Factor, Add or Multiply, and the Attenuation distance. Also, there is the fall off as well. I don't know how much these will make a difference in Banished, but one bored cold winter day I will mess around more and see.

Glad I could contribute something!
Title: Re: Help a newbie!
Post by: kid1293 on March 18, 2017, 11:11:41 PM

Then I am confident I can leave it to you to do the dirty work. :)


Just a joke, I am good with the values you found. For now.
I maybe take a look later on to see if they can be changed depending on
if I want, for example, a more rundown, dirty look on my model.
Title: Re: Help a newbie!
Post by: kid1293 on March 19, 2017, 02:13:45 AM
@Necora - I think I found the error with AO.
Blender seems to ignore/misinterpret all but the first model if I have
several models and AO map them all.
Some setting are probably reset. I did go over all and it looked OK. But...
My solution is that I AO map them separately and then copy/paste
into the combined file. Cumbersome but working. Will test some more.
I'll go back to my other projects and test if I can make this work with them too.

edit - @jesta030 I am sorry for spinning off like this, but it was discussed here
so I took the liberty to elaborate on it.
Title: Re: Help a newbie!
Post by: jesta030 on March 19, 2017, 02:25:55 AM
Don't worry about it. I'm learning aswell.😀

Look what i found on blend swap: http://www.blendswap.com/blends/view/23807
Title: Re: Help a newbie!
Post by: Necora on March 19, 2017, 07:37:43 AM
@kid1293 that is odd, I've never had that problem before. I always work in 1 file when I have F-variants so I have done this in single .blend that have 7 different models and their build stages and I've not had a problem with it coming out differently for each one.

A couple of things I can think of. 1 is saving the image. You have to do it once it is baked and with that mesh selected, because if you tab out of that mesh then for some reason it changes what images are displayed in the image viewer, so you might be saving the wrong AO. I've done this before, where all came out right apart from one which had funky shading, and I think it was because this happened, I accidentally saved the AO from another building.

Another is where are the meshes located in the file? It seems that AO doesn't just bake the selected mesh, but if another mesh is close enough, it will also cast shadows. It seems to use everything in the scene when it bakes, not just the selected mesh. So you need to make sure you either bake 1 then scale the mesh down to .01 ready to export, then bake the next, then scale it, then the next etc. Or move them far away from each other so they won't interfere with the next bake.

Not sure if these are the problems but it is all I can think of.
Title: Re: Help a newbie!
Post by: Tom Sawyer on March 19, 2017, 12:25:27 PM
Following the AO discussion I finally have it too. I think I always failed because I did not add a second UV map in Blender. It was the missing thing for me. Great Thanks to @Necora for this hint! :)

Now I make 512 px AO files for all my models in this second uv map. It increases the pkm by about 150 KB per model. It's not much and absolutely worth in my opinion. It looks really better in game now, especially in rain when the sun disappears and no direct shadows are created. I also have the impression that the game is calculating something with the AO file when it lights the model. So I would suggest to create a separate AO file and not build it into the texture image. Another reason is that AO clashes with overlapping faces in the texture map. For a better result for my models I increased the brightness of the texture in Photoshop but probably I also can brighten the AO itself. It avoids that my models become too dark or grey in game.

I still have one small problem with the AO. It seems that it also affects snow overlay in winter as you can see in the picture. I would like to see it fully snowed like without AO. Has somebody any idea how to solve this?

(http://www.banishedventures.com/images/chapel-ao.jpg)
Title: Re: Help a newbie!
Post by: kid1293 on March 19, 2017, 01:16:10 PM

@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...
Title: Re: Help a newbie!
Post by: Discrepancy on March 19, 2017, 01:31:01 PM
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.
Title: Re: Help a newbie!
Post by: RedKetchup on March 19, 2017, 01:32:20 PM
Quote from: Discrepancy on March 19, 2017, 01:31:01 PM
I also have learned much from Necora.


we all do :)
Title: Re: Help a newbie!
Post by: Necora on March 19, 2017, 02:14:45 PM
@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.
Title: Re: Help a newbie!
Post by: Tom Sawyer on March 19, 2017, 03:17:10 PM
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.

(http://www.banishedventures.com/images/ao-snow.jpg)
Title: Re: Help a newbie!
Post by: Necora on March 19, 2017, 03:42:55 PM
@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.
Title: Re: Help a newbie!
Post by: Necora on March 19, 2017, 03:59:11 PM
@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 :(
Title: Re: Help a newbie!
Post by: Discrepancy on March 19, 2017, 04:13:05 PM
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);
Title: Re: Help a newbie!
Post by: Necora on March 19, 2017, 04:34:04 PM
Great thanks @Discrepancy

I changed it, and I can't see the difference... screenshot40 has Tom's line, screenshot41 has the original line.
Title: Re: Help a newbie!
Post by: Tom Sawyer on March 19, 2017, 05:35:09 PM
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.

Title: Re: Help a newbie!
Post by: jesta030 on March 21, 2017, 07:49:02 AM
I suggest that all answers regarding AO and snow on models go into blackliquidsoftware.com/index.php?/topic/861-ambient-occlusion-ao/&page=3 (http://blackliquidsoftware.com/index.php?/topic/861-ambient-occlusion-ao/&page=3) to minimize confusion.

Title: Re: Help a newbie!
Post by: jesta030 on July 01, 2017, 11:32:07 PM
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?
Title: Re: Help a newbie!
Post by: Tom Sawyer on July 02, 2017, 01:04:45 AM
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.
Title: Re: Help a newbie!
Post by: RedKetchup on July 02, 2017, 01:31:04 AM
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.
Title: Re: Help a newbie!
Post by: Tom Sawyer on July 02, 2017, 01:49:13 AM
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...
Title: Re: Help a newbie!
Post by: RedKetchup on July 02, 2017, 04:57:11 AM
for sure it wont spawn on a tile tagged as "water" or "deepwater"
Title: Re: Help a newbie!
Post by: jesta030 on July 02, 2017, 06:25:38 AM
Well i got wheat to spawn in water as deep as -3, but trying to harvest it failed. Further testing showed that wheat can be harvested up to -0.7. that's a promising start because it means a model that reaches from -0.5 to +0.5 might be a solution... I'll have to make a model tonight and try it out...
Title: Re: Help a newbie!
Post by: RedKetchup on July 02, 2017, 09:34:34 AM
ok let us kknow cause nobody reallydid anything there
Title: Re: Help a newbie!
Post by: jesta030 on July 05, 2017, 05:00:16 AM
So I tried two different approaches to model and implement the reeds and both have treir... downsides. :(

(http://i.imgur.com/VXuzu9u.jpg)

This is just partly transparent faces overlapping. each plant has 2 or 3 faces = 4 to 10 vertices. the problem is the plants diasppear when scrolling too far back.

(http://i.imgur.com/fltBCid.jpg)

this is each plant modeled separately. each plant has 24 faces = 49 vertices. looks awesome, cripples performance.

suggestions?

[Edit] Was able to reduce Vertices and improve performance. there's also too much reed spawning so i guess i'll be fine as it is right now.
Title: Re: Help a newbie!
Post by: Bartender on July 05, 2017, 07:16:11 AM
Quote from: Tom Sawyer on July 02, 2017, 01:04:45 AM
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.

We didn't, our reeds don't reseed either. Personally I don't think there is a solution, as Luke simply did not code the game to take the minHeight and maxHeight values into account for reseeding. What we did, after trying a lot of things, is to make a reed farm in the forester fashion, which is built on the water. It has a small influence area, so it only grows new reeds on the two banks, though still only at z1.0.

Quote from: jesta030 on July 02, 2017, 06:25:38 AM
Well i got wheat to spawn in water as deep as -3, but trying to harvest it failed. Further testing showed that wheat can be harvested up to -0.7. that's a promising start because it means a model that reaches from -0.5 to +0.5 might be a solution... I'll have to make a model tonight and try it out...

From my tests I concluded that -0.75 is kind of the limit, so with -0.5 you're definitely safe. Be careful with the range as well though; if the villagers harvest a resource from a tile below 1.0 that tile turns into water afterwards. This means that any resources that are still lower than that tile might become inaccessible. I've set our reeds between -0.15 and -0.7, and this (almost) never gives this problem while still looking good.
Title: Re: Help a newbie!
Post by: RedKetchup on July 05, 2017, 08:06:15 AM
Quote from: jesta030 on July 05, 2017, 05:00:16 AM
this is each plant modeled separately. each plant has 24 faces = 49 vertices. looks awesome, cripples performance.

but you have what 10-20 plants per mesh ? (per tile ?)
Title: Re: Help a newbie!
Post by: jesta030 on July 06, 2017, 03:11:42 AM
Quote from: Bartender on July 05, 2017, 07:16:11 AM
Personally I don't think there is a solution, as Luke simply did not code the game to take the minHeight and maxHeight values into account for reseeding.
...
Be careful with the range as well though; if the villagers harvest a resource from a tile below 1.0 that tile turns into water afterwards. This means that any resources that are still lower than that tile might become inaccessible.

well shit. everything is exactly as you said. reeds will spread across the whole map at elevations between 0.0 and 1.0. they wont even reseed close to water. this sucks ass...

maybe it's possible to make a reed farmer that needs to be built on the edge of the water and has an invisible plane at 0.0 so the banis can walk on it and plant/harvest above the water? and have the naturally spawned weed be permanent and non-obstructing? any thoughts?

[Edit] I'll stick with Reeds that spawn next to the river and live forever plus a reed farmer that simply produces reed when being worked. seems to work just fine.
Title: Re: Help a newbie!
Post by: jesta030 on July 06, 2017, 12:03:00 PM
So I read here (http://worldofbanished.com/index.php?topic=1211.msg22987#msg22987) about floors and have been digging around in the resource files... is it impossible to create a crop field that can be dragged over water that has an invisible floor and grows reeds?
Title: Re: Help a newbie!
Post by: RedKetchup on July 06, 2017, 01:03:43 PM
Quote from: jesta030 on July 06, 2017, 12:03:00 PM
So I read here (http://worldofbanished.com/index.php?topic=1211.msg22987#msg22987) about floors and have been digging around in the resource files... is it impossible to create a crop field that can be dragged over water that has an invisible floor and grows reeds?

i think you can add Water | DeepWater to the Normal | Obstacle;

CreateDragDescription createdrag
{
bool _ignoreZones = false;

PathBits _placeBits = Normal | Obstacle;

int _maxWidth = 15;
int _maxHeight = 15;
int _minWidth = 4;
int _minHeight = 4;

ComponentDescription _allowAndRemove = "Template/Clear.rsc";
}



not sure if you can add
      "floor",

to the // layout of the entity
ComponentDescription resource

and set the FloorDescription floor
Title: Re: Help a newbie!
Post by: jesta030 on July 06, 2017, 01:40:26 PM
thats what i tried. i made an .fbx that has a plane of 1x1 size at z=-0.7 with no material attached to it.
did the modifications to template/cropfield.rsc and it builds fine, but crashes when dragging to create a field on water...

inside cropfield.rsc:
FloorDescription floor
{
PickingMesh _mesh = "Models\ReedFarmFloor.rsc";
}


reedfarmfloor.rsc:
PickingMesh resource
{
String _meshName = "Models\ReedFarmFloor.fbx";
String _subObject = "floor";
}


the .fbx:
(http://i.imgur.com/ME4zaYE.png)
Title: Re: Help a newbie!
Post by: RedKetchup on July 06, 2017, 01:49:50 PM
so we cant put Water/DeepWater ? thats sad


Water | DeepWater works !! i dont get crash !

but they dont go plant there though, they plant on what is available
Title: Re: Help a newbie!
Post by: jesta030 on July 06, 2017, 02:51:35 PM
yeah, the field is still under water and the banis wont go there... i tried that before and thought i could get a fix by using that "floor" thingy... but thats when i get a crash.
Title: Re: Help a newbie!
Post by: RedKetchup on July 06, 2017, 03:00:25 PM
Quote from: jesta030 on July 06, 2017, 02:51:35 PM
yeah, the field is still under water and the banis wont go there... i tried that before and thought i could get a fix by using that "floor" thingy... but thats when i get a crash.

yeah dooesnt accept the floor function

and wont get harvested neither :(
Title: Re: Help a newbie!
Post by: jesta030 on July 07, 2017, 02:06:11 AM
Alright, I found something that seems workable!

I now have two different Resources: permanent reeds and spawned reeds.

The permanent reeds are put next to water on map creation (-1.7 < z < -0.001), are walkable but cant be harvested.
The spawned reeds are spawned by the permanent reeds just like trees spawn onions/mushrooms/roots/etc. They look the same but can be harvested and yield a rawmaterial.

This allows a profession "reed collector/farmer" as well as manual harvest, has no problem with pathing or tiles becoming water and thus unusable, the reeds dont reseed and spread across the whole map.
The downside is the permanent reeds will stick through buildings built on top of them (fishermans dock).

[Edit]
I'd love to give you guys the .pkm that I built, but it crashes when creating a game. it only works using the run.bat in the mod's directory. No idea why. :(

[Edit 2]
New Idea: make the permanent reeds invisible and let them spawn the harvestable reeds like trees spawn mushrooms/onions/herbs/etc!

[Edit 3]
So i went ahead and tried it. Aaaand it works.

(http://i.imgur.com/k5aPwir.jpg)

The green cones in the pic are markers where the invisible reeds were put by the map generator. (-0.3 < z < -0.001) obviously they will later be made invisible.

As you can see they are spawning reeds next to them and on top of neighbouring markers. the reeds can be harvested like trees and the markers dont obstruct pathing/building etc.

downside: reeds wont spawn in water which would look even more realistic. :(

[Edit 4]
Added Marshes: invisible markers that spawn in groups away from the water (z = 0) and spawn reeds and some mushrooms/Roots/Herbs/Onions.

(http://i.imgur.com/aDDHt8F.jpg)
Title: Re: Help a newbie!
Post by: RedKetchup on July 07, 2017, 10:50:24 AM
it looks good !
Title: Re: Help a newbie!
Post by: jesta030 on July 07, 2017, 11:49:44 AM
BUT IT CRASHES WHEN I TRY TO LOAD THE .PKM!!!! GNNNAAAAAA

"...fatal access violation..."
Title: Re: Help a newbie!
Post by: RedKetchup on July 07, 2017, 12:17:48 PM
if you want me to check... you can send it by PM , i ll take a look at it :)