World of Banished

Conversations => Suggestions and Mod Ideas => Topic started by: slink on October 13, 2014, 04:48:44 PM

Title: BETA of Snug Houses
Post by: slink on October 13, 2014, 04:48:44 PM
There are only three models right now, and two of them are not very different.  Also, the smoke dummy isn't placed.  There's no point in placing a smoke dummy until I am sure I want to leave the model the way it is.  There isn't going to be a variety of shapes of the houses, but the decorations and implied interior layouts will change.  Their roofs match the roof of the brewery, and their walls are of stone.  Since they are only 15/16 the size of the stone houses, they cost slightly less both to build and to heat.
Title: Re: BETA of Snug Houses
Post by: Mahnogard on October 13, 2014, 06:07:19 PM
Oh my gosh these are so cute!!! Yay!
Title: Re: BETA of Snug Houses
Post by: mellowtraumatic on October 13, 2014, 06:38:47 PM
I think I'm off to bed but I'll definitely be excited to give these a try tomorrow.  :D
Title: Re: BETA of Snug Houses
Post by: salamander on October 13, 2014, 06:42:02 PM
It would be good to have some houses of a different size from the originals, just to fit into some of that left-over space that always seems to crop up.  And ... the look of these is nice.
Title: Re: BETA of Snug Houses
Post by: irrelevant on October 13, 2014, 07:16:00 PM
Oh yes, now that is very nice; snug indeed!
Title: Re: BETA of Snug Houses
Post by: solarscreen on October 13, 2014, 08:16:39 PM
I like it!

Title: Re: BETA of Snug Houses
Post by: Bobbi on October 13, 2014, 08:29:50 PM
Very cute, @slink . Just how snug are they? 2 x 3 or 3 x4? I can't tell.
Title: Re: BETA of Snug Houses
Post by: RedKetchup on October 13, 2014, 08:59:05 PM
it s just ... the 'head' of the npc doesnt pass through the door. or the npc guy is a tall one in his communauty and is 7'2 foot tall ^^
Title: Re: BETA of Snug Houses
Post by: Nilla on October 14, 2014, 02:09:07 AM
Have you ever walked into a 200-year-old house with the original door @RedKetchup? We have plenty of those here and if you aren´t a very small man, you have to bend your neck to get into it. ;)

Anyhow; the hoses look very nice. Maybe a bit dark for my taste, but we need more different kind of houses, so also the dark ones are good.
Title: Re: BETA of Snug Houses
Post by: assobanana76 on October 14, 2014, 02:19:14 AM
are homes for single people? ideal for widowers?
Title: Re: BETA of Snug Houses
Post by: Pangaea on October 14, 2014, 02:36:08 AM
Those look excellent, like right out of a fishing village or something like that :)

Can a full family live there btw? Since they are smaller, perhaps reduce max children to two, if you haven't?

Great to have houses of a different size as well, so we can fit a house into those leftover spaces. Not always easy to make it all fit perfectly.

Since you said 15/16, these are 5x3? Including the road?
Title: Re: BETA of Snug Houses
Post by: slink on October 14, 2014, 05:05:30 AM
These houses are 3x5, plus the road.   :)

The numbers for a 4x4 stone house are as follows.

Wood Required: 24
Stone Required: 40
Iron Required: 10

45 construction actions

For the snug house:

Wood Required: 22
Stone Required: 38
Iron Required: 10

42 construction actions
Title: Re: BETA of Snug Houses
Post by: slink on October 14, 2014, 06:43:52 AM
Quote from: RedKetchup on October 13, 2014, 08:59:05 PM
it s just ... the 'head' of the npc doesnt pass through the door. or the npc guy is a tall one in his communauty and is 7'2 foot tall ^^

It is a SNUG cottage.  The door is small.  Get used to it.   ;)
Title: Re: BETA of Snug Houses
Post by: RedKetchup on October 14, 2014, 07:02:44 AM

DĂ©finitions de snug
adjectif

comfortable, warm, and cozy; well protected from the weather or cold.

synonymes: cozy, comfortable, warm, welcoming, restful, reassuring, intimate, sheltered, secure, comfy
Title: Re: BETA of Snug Houses
Post by: irrelevant on October 14, 2014, 07:50:56 AM
Also means:

2.fitting closely, as a garment:
a snug jacket.
3.more or less compact or limited in size, and sheltered or warm:
a snug harbor.
Title: Re: BETA of Snug Houses
Post by: slink on October 14, 2014, 08:18:29 AM
Yes, as in "My, this dress is now a snug fit!  I must have eaten too much stuffing with giblet gravy, this Thanksgiving Day."   ;D
Title: Re: BETA of Snug Houses
Post by: rkelly17 on October 14, 2014, 08:31:36 AM
Quote from: slink on October 14, 2014, 08:18:29 AM
Yes, as in "My, this dress is now a snug fit!  I must have eaten too much stuffing with giblet gravy, this Thanksgiving Day."   ;D

@slink, don't tell me you were celebrating Canadian Thanksgiving yesterday!

Here in Kitchener-Waterloo Thanksgiving weekend is also the beginning of Oktoberfest (which we claim to be the world's second largest), so we have to eat bratwurst with our turkey. Saturday was the free Oktoberfest bratwurst and pancake breakfast, yesterday was the Oktoberfest/thanksgiving parade (I mostly grew up near Pasadena, but I try not to diss other people's parades), so we had a big weekend.

A funny piece on why Americans should trade Columbus Day for Canadian Thanksgiving: http://www.vox.com/2014/10/12/6962795/columbus-day-canadian-thanksgiving
Title: Re: BETA of Snug Houses
Post by: slink on October 14, 2014, 09:42:10 AM
 ;D  Thanks for that link, @rkelly17.  Columbus Day has always ranked low for me because most of us don't get it off as a holiday, while vital functions such as banks and the US Mail tend to take the holiday.  Obviously it is a lame holiday and should be replaced, but not by something silly.  I believe the state of Washington's decision to celebrate Indigenous Tribes Day, or whatever it was called, instead is a mistake.  It's not like the Portuguese were the only people slaughtering foreigners and enslaving people weaker than themselves, back in the 1400s.  In fact, some people are still doing it now.  But no, I didn't know yesterday was Canadian Thanksgiving.   :)
Title: Re: BETA of Snug Houses
Post by: mellowtraumatic on October 14, 2014, 10:53:03 AM
Got to try these and doing fine so far.
Title: Re: BETA of Snug Houses
Post by: slink on October 17, 2014, 05:41:36 AM
Okay, I have come to a point at which I must make a decision.  I have been building these houses to be used with the "F" key rather than by choosing each one with a button.  The problem comes with how that is implemented.  We cannot see how the points from which the smoke emits, when the building is occupied, are specified with this type of mod.  That is because the missing information is inside a model file, which Luke did not give to us.

To expand, for those interested:  For multiple houses on one button, accessed by the "F" key, all of the meshes are inside one file.  Normally each model file contains one model named "mesh" and one dummy hierarchy based on a dummy named "points".  There can also be meshes named "build01" and "build02", but these are not necessary if you comment out the calls for them.  They are the intermediate stages in the building process.  However, for the multiple choice system, there are for example six meshes named "mesh1" through "mesh6".  For each of the six buildings there is a line specifying which mesh to use for the chosen building.  However, I do not see any place where the "points" are specified other than by the name of the single FBX file.

What this means is that I can only have one single set of "points", which is the master for the dummies which set the points for building, using, creating, and smoke coming from chimneys, per group of buildings on an "F" key.  This is not a problem for anything except the smoke, which apparently is just going to come out of the middle of the roof no matter what I do.  Unlike with single buildings on one button, the smoke location does not seem to be responding to the movement of the smoke dummy.

So I can do one of three things:

1.  I can leave it the way it is, and let smoke come out of the roof when the house is occupied.
2.  I can remove the smoke points and you won't be able to tell if the building is occupied without looking inside it.
3.  I can move all six houses onto their own buttons.  This takes up menu space and removes the semi-random factor, but would allow me to set the smoke to the proper location for each house.

Any opinions?   :)
Title: Re: BETA of Snug Houses
Post by: rkelly17 on October 17, 2014, 07:00:46 AM
Quote from: slink on October 17, 2014, 05:41:36 AM
So I can do one of three things:

1.  I can leave it the way it is, and let smoke come out of the roof when the house is occupied.
2.  I can remove the smoke points and you won't be able to tell if the building is occupied without looking inside it.
3.  I can move all six houses onto their own buttons.  This takes up menu space and removes the semi-random factor, but would allow me to set the smoke to the proper location for each house.

Any opinions?   :)

Oh, I always have opinions--most of them worth what you pay for them.  ;D

Seriously, this might explain why chimneys don't move much from house to house--or Luke may have some secret he hasn't revealed (my father once told me, "I've taught you everything you know about fishing [true at the time], but I haven't taught you everything I know."). I like the snug houses. It is convenient to have them on the F key. I can live with smoke-osmosis. I don't rely much on smoke to tell me what's going on; I sort of see it as "atmosphere."
Title: Re: BETA of Snug Houses
Post by: slink on October 17, 2014, 07:14:28 AM
So is smoke-osmosis smoke that comes out of the roof instead of out the chimney (option 1), or smoke that is invisible (option 2)?   :)
Title: Re: BETA of Snug Houses
Post by: rkelly17 on October 17, 2014, 07:16:20 AM
Quote from: slink on October 17, 2014, 07:14:28 AM
So is smoke-osmosis smoke that comes out of the roof instead of out the chimney (option 1), or smoke that is invisible (option 2)?   :)

I'm good with either option; whichever suits you is fine by me.
Title: Re: BETA of Snug Houses
Post by: slink on October 17, 2014, 09:26:08 AM
Okay, I went with no smoke showing.  This will crash any game in which you have the previous version, but a in a new colony it works fine.   :)
Title: Re: BETA of Snug Houses
Post by: Alfreddie on October 17, 2014, 10:04:03 AM
Fine. Frankly, the smoke detail is no big deal for me either! But at last, some new houses... That is a great news!  :D
Title: Re: BETA of Snug Houses
Post by: rkelly17 on October 17, 2014, 11:46:01 AM
Quote from: slink on October 17, 2014, 09:26:08 AM
Okay, I went with no smoke showing.  This will crash any game in which you have the previous version, but a in a new colony it works fine.   :)

I suppose the other option would be to move the chimneys to where the smoke is appearing.  ;D  I'll remember your warning and not add the new version until I'm finished with Fingen.
Title: Re: BETA of Snug Houses
Post by: RedKetchup on October 17, 2014, 11:51:46 AM
euh sorry but you need to make 6 differents houses with mesh and 2 builds in each .fbx, so 6 fbx. (it is not a fixed number you can make 4 or 8 or 10 if you like) and all those 6 fbx will have their own set of points.

everythig it s how you call those in your template.

it is 1 template for all the houses.
Title: Re: BETA of Snug Houses
Post by: slink on October 17, 2014, 12:43:12 PM
Quote from: RedKetchup on October 17, 2014, 11:51:46 AM
euh sorry but you need to make 6 differents houses with mesh and 2 builds in each .fbx, so 6 fbx. (it is not a fixed number you can make 4 or 8 or 10 if you like) and all those 6 fbx will have their own set of points.

everythig it s how you call those in your template.

it is 1 template for all the houses.
As it happens, I do use six different FBX files, but it appears that the houses in the game actually use only one FBX file for all six houses (we are discussing six houses, and not four or eight or ten).  Within the single Woodhouse.FBX file, there are six different meshes for the final structures, labelled mesh1 through mesh6 in their respective WoodHouseXMesh.RSC files.  I could do this.  The problem comes with the points, which are apparently only defined once for the six.  Given that the chimneys are in different locations for the six houses, it is not possible for me to define six different "smoke" points whether in one FBX file or in six FBX files.

From WoodHouse.rsc:

InteractDescription interact
{
PointList _pointList = "Models\Buildings\WoodHouse\WoodHousePoints.rsc";
}


ParticleDescription particle
{
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";
}
]
}


I believe that Luke has a trick for attaching the smoke to the chimney so that he can place a smoke point right on the top of it as he did for the apiary, and not at some insane offset from that spot, as we are forced to do in our mods.  This would enable him to have six dummies labelled "smoke", one attached to each mesh inside the single FBX file.  Maybe some day someone will figure this out.  For now, the snug houses have invisible smoke.   :)
Title: Re: BETA of Snug Houses
Post by: RedKetchup on October 17, 2014, 12:54:04 PM
did you tried to put 6 different pointlist.rsc gathered with a brakets set ? [  ] ?
Title: Re: BETA of Snug Houses
Post by: slink on October 17, 2014, 01:03:47 PM
Quote from: RedKetchup on October 17, 2014, 12:54:04 PM
did you tried to put 6 different pointlist.rsc gathered with a brakets set ? [  ] ?
Yes, I did.  The game crashed, because there is apparently no statement analogous to a collection of meshes, for a collection of points.  There is no example for listing six different _pointlist in the templates for the standard houses, which is where one would expect to find it.   There are also not six instances of points listed in the WoodHousePoints.rsc file.

I believe the contents of WoodHouse.FBX are

mesh1
mesh1build01
mesh1build02
mesh2
mesh2build01
mesh2build02
mesh3
mesh3build01
mesh3build02
mesh4
mesh4build01
mesh4build02
mesh5
mesh5build01
mesh5build02
mesh6
mesh6build01
mesh6build02

And last but not least

points

One single set of points, referred to with one single smoke attachment statement in the template file.  Since the chimneys are not all in the same location for the six wooden houses, somehow the smoke is being attached other than by simply placing a "smoke" dummy on the chimney.  But I can't see how, looking at Apairy.FBX.

I suspect this is related to the broken animation that imports into 3ds MAX for the white chickens.  The smoke is an animation.
Title: Re: BETA of Snug Houses
Post by: RedKetchup on October 17, 2014, 01:18:30 PM
the smoke dummy of apiary example is attached to its own pointslist as stated inside the particlesystem (nothing to do with the interactdescription which is for builders use and create.)


and whatif you put all your snugs house inside 1 fbx ? i know thats a tons of work and not worth it.
in my very first building, creamery,  i couldnt figured out (or understood yet how that thing working) so i didnt put any smoke.

it s not a big deal ^^
Title: Re: BETA of Snug Houses
Post by: slink on October 17, 2014, 01:39:37 PM
Quote from: RedKetchup on October 17, 2014, 01:18:30 PM
the smoke dummy of apiary example is attached to its own pointslist as stated inside the particlesystem (nothing to do with the interactdescription which is for builders use and create.)


and whatif you put all your snugs house inside 1 fbx ? i know thats a tons of work and not worth it.
in my very first building, creamery,  i couldnt figured out (or understood yet how that thing working) so i didnt put any smoke.

it s not a big deal ^^

It is not so very much work to transfer all the meshes to one file.  I have them all in OBJ format and could import them without resetting the editor in between times, and then import the points list which I saved separately for my own convenience.

The "points" list contains all four types of dummies: build_XXX, create_XXX, use_XXX, and the particle system dummies such as "smoke".

I have just discovered something important.  If the "points" dummy is located at 0,0,0 then the smoke comes from chimneys when the "smoke" points are placed on the chimneys in the mesh.  Apparently "points" functions similarly to "root" in the animated chicken file.  This only works for buildings centered on 0,0,0.  In fact, it is in the ReadMe files, now that I know a little more about animations.

Make sure the objects are properly centered around their pivot. For example, a building that is 4x5m and it's corner is at (0, 0, 0) should have the pivot at (2, 2.5, 0)


The pivot point for animations is called "root" and I am willing to bet that it is called "points" for buildings.  For a building centered over the origin, "points" must be at 0,0,0.

Add dummy helper objects to define locations for use.

    Helpers named build_XXX are where workers will stand when constructing the building
    Helpers named use_XXX are where workers will stand when working at the building.
    Helpers named create_XXX are resources will be created at the building.
    Helpers for particle system attachments can be named arbitrarily, for example, the smoke from the building.



He doesn't say to make these all the children of "points" but that is implied by the apiary example.

However, this does not explain how six different smoke points are defined in a single FBX file.  That would require six different pivot points.  How does the game know which pivot point belongs to which mesh?
Title: Re: BETA of Snug Houses
Post by: RedKetchup on October 17, 2014, 01:47:11 PM
i have no ideas about the animations yet, i am not enough intelligent to understanding alot in that ^^

but...

just gone to my little colorful littlehouse folder.... yeah i see

the meshes are called inside a meshgroup _meshes and a [ ] pairs.

the picking one has :
   PickingGroup _meshes
   [

the mesh one has :
   MeshGroup _meshes
   [

the highlight has :
   EdgeGroup _meshes
   [

but i agree surely there is no pointlist group that have been identified like:
   PointListGroup _pointList(es?)   or PointGroup _pointList(es?)
   [

IMO

i would clearly give up ^^ and put no smoke !!
Title: Re: BETA of Snug Houses
Post by: Bobbi on October 17, 2014, 03:46:17 PM
SPEAKING of colorful little houses, @RedKetchup, when are you ever going to release them?  :(
Title: Re: BETA of Snug Houses
Post by: slink on October 17, 2014, 04:20:04 PM
YES!  If one assigns the "points" dummy to the mesh, it stays with that mesh and no other in the FBX file.  The smoke comes out of the correct chimney no matter which model you use.  I figured it out!!!  *does victory dance, favoring right knee sore from planting hostas*   ;D

Title: Re: BETA of Snug Houses
Post by: RedKetchup on October 17, 2014, 05:13:18 PM
@slink Great ! so now are all your houses are in the same FBX ? or still have 3 fbx ?

@Bobbi : soon i just finished modified my watermill to meet people exigences ^^ i can go back to it before doing the bakery :)
Title: Re: BETA of Snug Houses
Post by: slink on October 17, 2014, 05:20:32 PM
All six are in the same FBX.  I only tested with three, but now there are six again.
Title: Re: BETA of Snug Houses
Post by: RedKetchup on October 17, 2014, 05:26:02 PM
so it wasnt a bad idea to put them all in same fbx ? :)
Title: Re: BETA of Snug Houses
Post by: Pangaea on October 17, 2014, 05:26:53 PM
Fantastic work, @slink! *applauds* :)
Title: Re: BETA of Snug Houses
Post by: slink on October 17, 2014, 05:36:32 PM
No, @RedKetchup, it was not a bad idea, once I figured out how to make the smoke work.  Before that, it did not matter.  But, because the game can only use one FBX file for points, they have to be in one FBX file in order for the "F" key to work with them.
Title: Re: BETA of Snug Houses
Post by: RedKetchup on October 17, 2014, 05:38:00 PM
k, then good to know (bobbi really want my colorful little house... i ll have to do it :) the same way as you did, thanks you
Title: Re: BETA of Snug Houses
Post by: slink on October 17, 2014, 06:14:58 PM
You are welcome, @RedKetchup.  Hopefully this pays you back for the tip about the OBJ file.   ;)
Title: Re: BETA of Snug Houses
Post by: RedKetchup on October 17, 2014, 06:34:44 PM
i know right, the OBJ file is great ! it fix so much things :)
Title: Re: BETA of Snug Houses
Post by: Nilla on October 18, 2014, 03:12:26 AM
Great job, I will ceartainly build many of your snug houses, thank you!
Title: Re: BETA of Snug Houses
Post by: Alfreddie on October 18, 2014, 05:09:48 AM
HI! I built some of your snug houses in my village. They are cute and bring a bit of diversity in the housing and frankly, I was longing for that since day one of the tool mod!
But when it's snowing, their roofs are a bit odd (a little bit of snow on one side of the roof, and some few snowdrops on the other side) when in the meantime, all the vanilla houses have totally white roofs, covered with thick snow. So it's may look weird but it is only my humble opinion...  :P
In any case, again, thanks for your work... I'll look forward for your next mods!
Title: Re: BETA of Snug Houses
Post by: slink on October 18, 2014, 05:54:23 AM
I know that, for some reason, the snow is sticking to only one side of the house.  This is a different mystery to unravel.   ;)
Title: Re: BETA of Snug Houses
Post by: Alfreddie on October 18, 2014, 08:34:01 AM
Mmn... Snow only on one side of the roof... That is most certainly WITCHCRAFT! Perhaps, good banished people should burn one or two old witches on a stake to ward off bad luck. ;D 
Title: Re: BETA of Snug Houses
Post by: Mahnogard on October 18, 2014, 09:04:04 AM
Quote from: Alfreddie on October 18, 2014, 08:34:01 AM
Mmn... Snow only on one side of the roof... That is most certainly WITCHCRAFT! Perhaps, good banished people should burn one or two old witches on a stake to ward off bad luck. ;D 

My Bannies are witches. That's why they were banished! :D
Title: Re: BETA of Snug Houses
Post by: Denis de la Rive on October 18, 2014, 11:52:21 AM
Tested the mod works well except for you being in conflict with you.  ;)  The snow issue is not important as I see it, I live with lots of snow and in our climate, this kind of difference is just a sign of a badly insulated and vented attic. As you can see in my image many other building have little snow on them, and the roof slope is far less steep, with is also a factor with snow.  ;D
Title: Re: BETA of Snug Houses
Post by: rkelly17 on October 18, 2014, 03:03:41 PM
Quote from: Alfreddie on October 18, 2014, 08:34:01 AM
Mmn... Snow only on one side of the roof... That is most certainly WITCHCRAFT! Perhaps, good banished people should burn one or two old witches on a stake to ward off bad luck. ;D

Naw, just strong winds. That's life in the Frozen North.  ;D
Title: Re: BETA of Snug Houses
Post by: rageingnonsense on October 20, 2014, 06:26:55 PM
@slink :

I tried to follow the example from your screen shot when it comes to the points lists. For some reason though, the game is favoring the last group of points for all my buildings. I added a points object as a child to each of my house meshes, and added the required points to them (build_01, build_02, etc).

The only thing that is different for me is that I use Blender, which does not allow for any object to share a name, even if it is a child. I had to go into the FBX file and manually rename the other points list. I guess I could have fucked that up... but is there anything I may be missing? Are all the points objects in your screen shot unique objects, or is it one object that is shared across three of the meshes? So confuse :(
Title: Re: BETA of Snug Houses
Post by: slink on October 20, 2014, 07:51:05 PM
I do not know how to do anything in Blender.  Sorry.  I'm using 3ds MAX 2015, registered copy.  I've only had it for less than two weeks, so I barely know how to use that program.  If it is any consolation, I messed up my brewery FBX this afternoon and I am still trying to figure out how to get it back to working correctly so I can release the new version with the improved text output.  :(

Anyway, all of the "points" in Snug Houses were created separately and then renamed to the same name.  3ds MAX apparently doesn't care if you call everything on the screen by the same name, although I would expect the game to object.
Title: Re: BETA of Snug Houses
Post by: RedKetchup on October 20, 2014, 11:18:00 PM
Quote from: slink on October 17, 2014, 06:14:58 PM
You are welcome, @RedKetchup.  Hopefully this pays you back for the tip about the OBJ file.   ;)

bah i didnt understood really what you did. you gave very few details, i dont even know how you can get that toolbar on the left of your screen :P.


so Rage i cannot help out out unfortunatly, i have absolutly no idea how she did it out of to have follow my "one .FBX tips" lol
Title: Re: BETA of Snug Houses
Post by: slink on October 21, 2014, 09:41:07 AM
@rageingnonsense, I loaded the FBX file of my snug houses into Blender and every last duplicate of the dummy helpers was renamed by Blender.  I don't think that will work in the game.   :(
Title: Re: BETA of Snug Houses
Post by: rageingnonsense on October 21, 2014, 11:34:45 AM
@slink

Aww man, that is disappointing to hear. I really appreciate that you took the time to load it in blender though to see what happens!!!

I am curious, would it be possible to have an ascii version of your fbx file where each building has its own points? I am curious to see how the fbx file is set up compared to the edits i manually made to my file. I feel like I can "post process" my file manually by hand so the points all have the same name, but I must be missing something in the format. I do not break the file by doing this, but I do not get the results I would expect.

I dunno if that is asking too much, but it would be really neat to help get to the bottom of it. :D
Title: Re: BETA of Snug Houses
Post by: slink on October 21, 2014, 02:43:25 PM
Here you go.  I changed the extension to txt so I could view it in Notepad.
Title: Re: BETA of Snug Houses
Post by: rageingnonsense on October 21, 2014, 03:00:09 PM
@slink

You are the man! Thanks so much! Wish me luck! :D
Title: Re: BETA of Snug Houses
Post by: slink on October 21, 2014, 03:01:21 PM
Good luck!   ;)
Title: Re: BETA of Snug Houses
Post by: irrelevant on October 21, 2014, 03:33:05 PM
@slink You aren't the man! ;)
Title: Re: BETA of Snug Houses
Post by: slink on October 21, 2014, 03:57:48 PM
LOL, for these purposes, I am.   ;)
Title: Re: BETA of Snug Houses
Post by: rageingnonsense on October 28, 2014, 10:33:49 AM
For the snow issue; where snow goes is dictate by your AO texture.

I saw your fbx file, and I noticed that all of your houses are on top of each other, occupying the same space. I dunno if you generated your AO texture when them positioned like that, but that will interfere with the ray casting.

To me, it looks like you had another model very close to the house models, and as such the AO baking made one side of the roof very shadowy, causing a lack of snow. Try to move one of the houses someplace further away from the others (preferably above them), and then bake your AO texture. That should correct the issue.
Title: Re: BETA of Snug Houses
Post by: slink on October 28, 2014, 11:29:01 AM
Quote from: rageingnonsense on October 28, 2014, 10:33:49 AM
For the snow issue; where snow goes is dictate by your AO texture.

I saw your fbx file, and I noticed that all of your houses are on top of each other, occupying the same space. I dunno if you generated your AO texture when them positioned like that, but that will interfere with the ray casting.

To me, it looks like you had another model very close to the house models, and as such the AO baking made one side of the roof very shadowy, causing a lack of snow. Try to move one of the houses someplace further away from the others (preferably above them), and then bake your AO texture. That should correct the issue.

There are lots of things new to me in your reply.  Thank you.

I did not generate an AO texture in 3ds MAX.  I did as @RedKetchup told me he does, and used a blank white png file for that purpose.  I have to assume, therefore that the AO texture you are referring to is not the same as the one that the game requires to be in MaterialInstance.

I have heard the "baking" with regards to applying materials to models, but I never did that.  I don't know how.  That does not mean it was not done to the model before I acquired it.  The model as I acquired it had three identical huts in a row.  That would explain the other model that was close to the hut that I eventually modified.

There is a lot I have to learn about using 3ds MAX, and it would be helpful if the tutorial did not start with a fully developed scene and try to teach esoteric operations before I even know what most of the buttons mean.  It is trying to teach me to run before I know how to walk.  Thus, I hobble.

I'll try to weed through the help and see if I can use your valuable input to remedy the situation with the snow on the houses.  What baffles me is that there is no problem with the snow on the brewery and the tavern, both of which models came from the same source.  More study is needed.

Thanks again.
Title: Re: BETA of Snug Houses
Post by: rageingnonsense on October 28, 2014, 12:37:06 PM
I wish I could help you, but I only know how to bake an AO texture in Blender.

At first, I was mystified by it. I saw the apiary and wondered how in the hell Luke made that AO texture. It became clear to me when I found out that the modeling software is responsible for it; no way a human could do that! haha.

Basically though, the process is to create a second UV channel (this is in the readme file). This UV channel contains the uv coordinates for the light generation, and can be entirely different than the UV map you use for the main texture. Then, your modeling software should be able to bake the lightmap to this uv map.

How it works is it will fire a gagillion rays at the model, and figure out how light reflects off of parts. It will slowly generate a black and white image for each face based on this. Then all you have to do is save this image!

The snow appears based on how white the area is. Full white will be full snow coverage. Black parts will not have any snow at all. In addition, Banished also uses this when texturing the model. The result is better lighting on your model, which gives an appearance of depth and detail. In my Sawmill, the AO texture is quite dark for the interior of the work area. Without it, that area would be unnaturally bright.

Here is an album with a few images that show my AO texture, the AO UV map, and the main texture UV map:

http://imgur.com/jzGneO5,NyyWtQY,bXbWGtB#0 (http://imgur.com/jzGneO5,NyyWtQY,bXbWGtB#0)

You'll notice in the top of the pic of the AO UV map, that the model has a natural shading to it based on the AO texture. If you just use a png full of white pixels, that model would just look completely white.


Title: Re: BETA of Snug Houses
Post by: rageingnonsense on October 28, 2014, 12:40:56 PM
On another note, regarding separate points for each model...

This worked wonderfully for me. I figured out how to do this in Blender despite the renaming of points. I am noticing a weird issue though where citizens only use some of the points. for other points, they just go to the central point node. As a result, they walk right through walls to get to the center of the model!

It is really weird, because the smoke is in the right place for the most part, and the citizens will use some of the points; just not all of them. I was wondering if you had this issue too, and if so, how you fixed it?
Title: Re: BETA of Snug Houses
Post by: slink on October 28, 2014, 12:54:31 PM
Quote from: rageingnonsense on October 28, 2014, 12:40:56 PM
On another note, regarding separate points for each model...

This worked wonderfully for me. I figured out how to do this in Blender despite the renaming of points. I am noticing a weird issue though where citizens only use some of the points. for other points, they just go to the central point node. As a result, they walk right through walls to get to the center of the model!

It is really weird, because the smoke is in the right place for the most part, and the citizens will use some of the points; just not all of them. I was wondering if you had this issue too, and if so, how you fixed it?

I sometimes had to elevate the build, use, and create points just slightly above 0 (on the Z-axis).  I don't know why, but I did.  It might have to do with the size of the dummies.  I tried to make them one game tile across, but I did not always succeed and I don't remember whether the ones that were one tile across are the ones that worked at Z=0, or the ones I had to elevate.  But if your people are going to the center, try elevating the other dummies by a tiny amount.  @RedKetchup said it won't work to move the other points when they are children of "points", so I have been unlinking them before moving them, but I don't know if that is true.  I still don't understand why moving something on the screen of the editor isn't really moving it, unless you grab it by the vertices first.  When I change words on the screen in a word processor, they are edited.  I don't have to highlight them in any special way before editing them.  However, a word processor is not 3ds MAX.  It does explain how build0 and build1 in apiary.fbx could be located where they are in the fbx file and still sit on the building site as if they were centered over 0,0,0.  I had assumed there was some kind of offset recorded somewhere, but there isn't.  They just work where they are.  It is a strange editor.
Title: Re: BETA of Snug Houses
Post by: slink on October 28, 2014, 01:00:25 PM
Quote from: rageingnonsense on October 28, 2014, 12:37:06 PM
I wish I could help you, but I only know how to bake an AO texture in Blender.

At first, I was mystified by it. I saw the apiary and wondered how in the hell Luke made that AO texture. It became clear to me when I found out that the modeling software is responsible for it; no way a human could do that! haha.

Basically though, the process is to create a second UV channel (this is in the readme file). This UV channel contains the uv coordinates for the light generation, and can be entirely different than the UV map you use for the main texture. Then, your modeling software should be able to bake the lightmap to this uv map.

How it works is it will fire a gagillion rays at the model, and figure out how light reflects off of parts. It will slowly generate a black and white image for each face based on this. Then all you have to do is save this image!

The snow appears based on how white the area is. Full white will be full snow coverage. Black parts will not have any snow at all. In addition, Banished also uses this when texturing the model. The result is better lighting on your model, which gives an appearance of depth and detail. In my Sawmill, the AO texture is quite dark for the interior of the work area. Without it, that area would be unnaturally bright.

Here is an album with a few images that show my AO texture, the AO UV map, and the main texture UV map:

http://imgur.com/jzGneO5,NyyWtQY,bXbWGtB#0 (http://imgur.com/jzGneO5,NyyWtQY,bXbWGtB#0)

You'll notice in the top of the pic of the AO UV map, that the model has a natural shading to it based on the AO texture. If you just use a png full of white pixels, that model would just look completely white.
Thank you, again.  I had at first assumed that the AO map of the apiary was a bump map, and I made one for my first buildings by creating a monochrome version and (I think) posterizing it.  That is how I made bump maps for textures in The Sims.  Then I realized I was making my buildings dark, and that the AO map wasn't a bump map.  I was at a loss.

I saw the reference in the readme to a second UV channel, but since I did not know what the first UV channel was (to a spectroscopist, UV means ultraviolet), I was again at a loss.  For me the mod kit readme is a bit like the original Microsoft programming language documentation in that it only make sense once I know what it says, at which point I don't need it.
Title: Re: BETA of Snug Houses
Post by: Fellow Villager on October 28, 2014, 01:16:55 PM
slink, now i noticed that the texture of snug house gives me some problem...do you know why??
Title: Re: BETA of Snug Houses
Post by: RedKetchup on October 28, 2014, 01:47:22 PM
looks like you need some explanation for the points :)

if you put the points higher ("z" value in 3 dimensions) it should not change nothing, most of the time. Usually, it works 100% at z=0.

explanations:
points group is always linked to the 0,0,0 position(always get the 0,0,0), where ever on your screen is that group named point, it is always 0,0,0. what we should do if we would be very good and very professional is... we should "calculate" each position of each dummy relative at the central point of all those dummy. but we never do, i never did ^^ i am not enough good for that. but thats the rules.

example:
in a perfect world, if you put one dummy at 15,15 and another one at -15,-15 once you group them, the group points will be at 0,0,0. but it is never the case ( to have a such perfect symetry ). if i said to Slink to always 'ungroup' the dummies it s because the "group point' wherever you place it, it s always 0,0,0. so give you nothing to move the group. you would put the group in Japan, and it will always 0,0,0.

if you want to have your smoke chimney point at 10,15 you need something at -15,-10 (a build_001 for example) but if you don't want your builder there, and just only at -5,-5 ... you need to compensate so when you group them, the smoke point need to be at 10,15 relative at the group points once made (which is always become 0,0,0) :)

i think you both see now clearly about that....
now: why they go at central point and not at the place they should go ?

there are a couple of factor :
one is : a negative z=-negative position , underground.
but mainly why it happends (98% of the time) ?  it is because where is the dummy, inside your .rsc (mapdescription) fall in same place where they cant go, not allowed to go ( aka a "###" ).
then the game override everything (instead to bug and crash) and make them go at 0,0,0 group points.
just move your dummys abit further and once it is cleared (of "###") they will go there.

if need more answers , just ask :)
Title: Re: BETA of Snug Houses
Post by: slink on October 28, 2014, 01:56:13 PM
Quote from: Fellow Villager on October 28, 2014, 01:16:55 PM
slink, now i noticed that the texture of snug house gives me some problem...do you know why??
What sort of problems, @Fellow Villager?
Title: Re: BETA of Snug Houses
Post by: RedKetchup on October 28, 2014, 02:06:59 PM
i tried my best to explain it (in english) i know some people (cause it s me and they dont like me for whatever reason...) they will just skip the post ^^
Title: Re: BETA of Snug Houses
Post by: irrelevant on October 28, 2014, 02:08:55 PM
@RedKetchup I'll certainly skip it, because, "WHOOSH!" right over my head. But I still like you. ;)
Title: Re: BETA of Snug Houses
Post by: Fellow Villager on October 28, 2014, 02:37:28 PM
the texture seems strange...not well defined
Title: Re: BETA of Snug Houses
Post by: slink on October 28, 2014, 02:42:15 PM
Quote from: Fellow Villager on October 28, 2014, 02:37:28 PM
the texture seems strange...not well defined
Can you post a screendump?
Title: Re: BETA of Snug Houses
Post by: Fellow Villager on October 28, 2014, 04:02:40 PM
thx...tomorrow i'll do that.
Title: Re: BETA of Snug Houses
Post by: rageingnonsense on October 28, 2014, 08:34:25 PM
@RedKetchup

Thanks so much for the detailed reply man! However, I do think that the position of the points node is actually centered not on object origin, but at the center of geometry, regardless of where it is in the file.

You have an interesting point about citizens being blocked, but I am unsure if that is the case. Sawmill had an issue during development where citizens would walk through the wall to get to one of the use points. I will play with it though.

As I analyzed my issue more, I think what is happening is that the game is using the last set of points for my 4th and final model. I want to play with your suggestions and that as well, but the first thing I need to do is write a utility script to help with my fbx export. Right now, I have to manually change the names of things inside the fbx during each export. I'm tired of doing it, it is time to make a program that does it for me. haha. I'll probably share it with the community in my Blender tutorial thread on banishedmods.com.
Title: Re: BETA of Snug Houses
Post by: RedKetchup on October 28, 2014, 09:17:41 PM
Quote from: rageingnonsense on October 28, 2014, 08:34:25 PM
@RedKetchup

Thanks so much for the detailed reply man! However, I do think that the position of the points node is actually centered not on object origin, but at the center of geometry, regardless of where it is in the file.

thats what i said, the group points. in 3ds you click and drag all the points to select them all and you create a group that you manually call : points. thats your 'points' node. the name doesnt have importance, you can call it whatever you want, till you name the group properly in the .rsc
it always get the 0,0,0

if you wanted the chimney at 15,15 and your group node points end at 10,6. then your group node will get the 0,0,0 status and if you still want you chimney at 15,15 you will need to add it so, the real smoke point must be at  25,21 on your map, screenmap of your blender.

about to have all your houses in 1 fbx and have all your smoke points... in that fbx.... cant help you out of saying : get a 30days trial  of 3dsmax the time you figure out :)
Title: Re: BETA of Snug Houses
Post by: slink on October 29, 2014, 06:17:22 AM
Quote from: RedKetchup on October 28, 2014, 09:17:41 PM
Quote from: rageingnonsense on October 28, 2014, 08:34:25 PM
@RedKetchup

Thanks so much for the detailed reply man! However, I do think that the position of the points node is actually centered not on object origin, but at the center of geometry, regardless of where it is in the file.

thats what i said, the group points. in 3ds you click and drag all the points to select them all and you create a group that you manually call : points. thats your 'points' node. the name doesnt have importance, you can call it whatever you want, till you name the group properly in the .rsc
it always get the 0,0,0

if you wanted the chimney at 15,15 and your group node points end at 10,6. then your group node will get the 0,0,0 status and if you still want you chimney at 15,15 you will need to add it so, the real smoke point must be at  25,21 on your map, screenmap of your blender.

about to have all your houses in 1 fbx and have all your smoke points... in that fbx.... cant help you out of saying : get a 30days trial  of 3dsmax the time you figure out :)
Aha.  That is why our understandings are so different.  You only make a group named "points".  I actually make a dummy helper named "points" and make all of the others its children.  I do that because that is how it was done in apiary.FBX.  You can tell that those two things really are different because they have a different symbol next to them in the Scene Explorer window.

The parent dummy helper, named "points", becomes the 0,0,0 of the child dummy helpers no matter where they are located, and you can explicitly set its position to 0,0,0 in the editor.  Then all of the children will appear in the game where they do in the editor, with respect to the dummy helper named "points".  If the center of the base of your model is also based at 0,0,0 then it is not necessary to balance smoke at 25,21 with all of the other dummy helpers in order to get it to appear at 15,15 in the game.  One can simply locate it at 15,15 in the editor and it will appear at 15,15 in the game.

With only a group named "points", the 0,0,0 of the group is indeed their center of gravity and one has to make wild guesses about where the smoke will appear because adding any new dummy helpers to the group moves the origin of the entire group.

Here are screenshots to demonstrate that a group is different from a parent dummy helper, and how it is in apairy.FBX.
Title: Re: BETA of Snug Houses
Post by: RedKetchup on October 29, 2014, 07:07:49 AM
ok ! thats explain everything ! i thought it was a grp we had to make. i guess it s a different way to do, and probably the best way to do it instead of guessing where i need to put my points to get it in the game :)
but, know that, i am still making it work quickly, and none of my dummys arent working at all, till they dont end up in a "####" forbitten wall :)

how do you call (where do you click) to get that " Scene Explorer window " to the left ? (as a 3rd tentative to get that answers lol)
Title: Re: BETA of Snug Houses
Post by: slink on October 29, 2014, 07:14:26 AM
Quote from: RedKetchup on October 29, 2014, 07:07:49 AM
ok ! thats explain everything ! i thought it was a grp we had to make. i guess it s a different way to do, and probably the best way to do it instead of guessing where i need to put my points to get it in the game :)
but, know that, i am still making it work quickly, and none of my dummys arent working at all, till they dont end up in a "####" forbitten wall :)

how do you call (where do you click) to get that " Scene Explorer window " to the left ? (as a 3rd tentative to get that answers lol)
Under Tools, New Scene Explorer is where I find it in my version.

And yes, your dummy helpers would still work, it would just be trial and error where they should be in the editor in order to work in the game.
Title: Re: BETA of Snug Houses
Post by: RedKetchup on October 29, 2014, 07:32:43 AM
found it ! thanks you Slink ! it repay for the tip about how to hide a button in game (like a limit button, or even a full tab) ^^
look how my group is setup :) i defined my group box by setting the builders at corners so i get the 0,0,0 when grouped and then i placed all my use_ create_ properly :)


but ........ wow this model i made is so........... lovely ! :)
Title: Re: BETA of Snug Houses
Post by: slink on October 29, 2014, 07:34:35 AM
Quote from: RedKetchup on October 29, 2014, 07:32:43 AM
found it ! thanks you Slink ! it repay for the tip about how to hide a button in game (like a limit button) ^^
That's fine, except I was not trying to hide a button in the game.   ;)
Title: Re: BETA of Snug Houses
Post by: RedKetchup on October 29, 2014, 07:38:29 AM
Quote from: slink on October 29, 2014, 07:34:35 AM
Quote from: RedKetchup on October 29, 2014, 07:32:43 AM
found it ! thanks you Slink ! it repay for the tip about how to hide a button in game (like a limit button) ^^
That's fine, except I was not trying to hide a button in the game.   ;)

no, but still useful (when we try to finish and polish something)  ;)
Title: Re: BETA of Snug Houses
Post by: slink on October 29, 2014, 08:00:42 AM
I give the information for free, and not in return for anything.  The only reason I said I paid you back last time was because you complained so much about giving me for free the two months it took you to figure out that importing things from an OBJ file gave the option to combine meshes.  At the time, I did not need that part of your information about OBJ files, but I have used it many times since then.  What I did need was the suggestion to try the OBJ format for the farmhouse that I was converting to small markets.  The MAX file that I had downloaded was not working as expected in the game, but the OBJ file I downloaded with it did work.  That is possibly because my version of 3ds MAX has a problem with its own files, or possibly because whoever posted it had already treated the model incorrectly.  Regardless, once I stopped using MAX format files I have had no more problems with things on the screen not looking like they do in the game.  Even misplaced smoke made sense once I realized that the smoke in the game was offset from the chimney by the same distance and direction as the parent dummy helper named "points" was offset from 0,0,0 in the editor.
Title: Re: BETA of Snug Houses
Post by: rageingnonsense on October 29, 2014, 10:58:23 AM
I was right; my issue is actually that all the buildings are using the points from the last model in my fbx. Now to find out why! :P
Title: Re: BETA of Snug Houses
Post by: rageingnonsense on October 31, 2014, 12:09:16 PM
Just an FYI, I have finally figured this out. It's quite simple: Banished does not support separate citizen helper nodes per variation!

What I decided to do is to watch how citizens use the stock wooden houses. To my surprise, they all dropped their food off to the same point of each variation, even if it made no sense. For instance, a house with a door in the middle had citizens moving food to the corner of their house.

So, basically the only thing Banished will support is individual particle systems. For citizen helper nodes, you have to live with the fact that they will all share the same one (the first one it finds in the fbx).

I could still be wrong, but I figure if the stock houses are structured like this, then there is no way. I don't see how Luke would not give helper nodes that make mode sense for the stock buildings if he could.
Title: Re: BETA of Snug Houses
Post by: slink on October 31, 2014, 02:53:48 PM
Except then how do the smoke points move around?  The chimneys are not all in the same places for the houses.

I've ordered myself a book from Amazon, so maybe I can understand mental rays on a UV channel as not something involving reflective sunscreen hats.   ;D

Edit: I was playing briefly with the wooden shack from the fountain mod, and discovered that the occupant dropped her groceries off out in the forest rather than near the house.  When I redid the build with one of RedKetchup's houses, she dropped them off at her door.

Title: Re: BETA of Snug Houses
Post by: rageingnonsense on October 31, 2014, 03:48:58 PM
I mean that all variations share the same nodes EXCEPT particle nodes.

For a test, load up the game in debug mode and build all 6 variations of the stock wooden houses. zoom in and take a look at where the citizens drop off their goods. It is in the same spot for each variation, despite the fact that the doors are in different places.
Title: Re: BETA of Snug Houses
Post by: slink on October 31, 2014, 03:52:10 PM
I kind of remember that.  I thought it was because he'd been lazy and just put the use point in front of all of the houses.  Since we can't see his FBX file it is hard to tell.  And all of my doors are in the same place, so that is not a good test.

You might be on to something.