World of Banished

MODS Garage => Tips and Help => Topic started by: Maldrick on January 22, 2018, 02:54:02 PM

Title: Texture Problem
Post by: Maldrick on January 22, 2018, 02:54:02 PM
So I spent the weekend doing @Discrepancy 's tutorial.  With a bit of persistence I'm happy to say I worked through every problem I ran into but can't figure this one out and was hoping someone could get me back on track.

Textures are rendering dark.  They look fine in Blender so I'm guessing either the game doesn't like my textures or there's an AO problem.  Redid the AO map and came out the same so I thought I would ask.

First screen is with the sun behind the camera, second is with the sun in front.

Many thanks!
Title: Re: Texture Problem
Post by: Discrepancy on January 22, 2018, 03:00:56 PM
looks good :)

I made some mistakes with my own when I made that tutorial - mostly I didn't get the AO correct.

Did you bake the AO to a 2nd UVmap?

- Necora wrote a good guide into doing this: http://worldofbanished.com/index.php?topic=1424.msg28417#msg28417 (http://worldofbanished.com/index.php?topic=1424.msg28417#msg28417)

Normally after baking the AO I will then open the AO .png in photoshop of similar and lighten the whole image by 20-25% depending on personal preference. This you will find should lighten the model. The roof you can also lighten more if you want it to be white during snow.
Title: Re: Texture Problem
Post by: Discrepancy on January 22, 2018, 03:04:26 PM
Also make sure you have the correct MaterialInstance AO files being called up by the Mesh and BuildMesh files.
Title: Re: Texture Problem
Post by: Maldrick on January 22, 2018, 03:16:53 PM
I'll double check those files.

Yep, I baked the AO just the way you described.  By separate, you mean separate from the UV map for textures?  Yes.

Attached is the textures file (converted to jpg for the forums).  They are all quite a bit lighter than they are showing up in-game.  Threw the AO map in there too since I was posting the other.
Title: Re: Texture Problem
Post by: Maldrick on January 22, 2018, 03:35:13 PM
Everything looks good with those files.  Assuming the ones in the Models directory point to the corresponding ones in the MaterialInstance directory, which then call on the AO.png it all looks as it should be.  As far as I can tell, that is.
Title: Re: Texture Problem
Post by: kid1293 on January 22, 2018, 03:55:24 PM
@Maldrick
I can think of several reasons for dark textures.
Most problem I have had are AO set bad in Blender.
I have a moment before bed. Can you send blend-file?
Title: Re: Texture Problem
Post by: RedKetchup on January 22, 2018, 03:58:11 PM
a 3dsMax user can also do it for you :)
Title: Re: Texture Problem
Post by: Maldrick on January 22, 2018, 04:02:25 PM
Ah, nice thank's gentlemen. :)

Sending now...
Title: Re: Texture Problem
Post by: Maldrick on January 22, 2018, 04:07:01 PM
Couldn't figure out how to PM it so posting it here.

That was right after I baked the AO...so should have the settings I used.  Inverted the image, as per Discrepancy's instructions.

And yes, I actually named it that lol...I got more descriptive as a got further along to make backing up easier.
Title: Re: Texture Problem
Post by: kid1293 on January 22, 2018, 04:14:29 PM
As I thought. You have no dedicated AO channel in model.
You must add a channel to it.
Really honest, read Necora's tutorial. It is good.
Title: Re: Texture Problem
Post by: Maldrick on January 22, 2018, 04:20:32 PM
Quote from: kid1293 on January 22, 2018, 04:14:29 PM
As I thought. You have no dedicated AO channel in model.
You must add a channel to it.
Really honest, read Necora's tutorial. It is good.


I definitely will.  Little frazzled from sorting out the mod kit stuff earlier might have to wait till tomorrow.  I was just following the tutorial steps, really.  Had never touched Blender before and have no idea what 90% of it does. lol

Thanks much!

The channel is part of the model?  So I'll need to output a new AO map and then redo my FBX exports?  Just mentally thinking about how far back I need to backtrack.

Really appreciate the help!
Title: Re: Texture Problem
Post by: kid1293 on January 22, 2018, 04:25:33 PM
You add a channel at 1
then go to 2 and make New Image
Now you are in AO channel and have to unwrap your model.
NO overlapping UV in AO!!!

Read the rest in Necora's tutorial.

Good Night :)
Title: Re: Texture Problem
Post by: Maldrick on January 22, 2018, 04:30:02 PM
Ok cool, thank you.

Reading Necora's post now.

Much appreciated!
Title: Re: Texture Problem
Post by: RedKetchup on January 22, 2018, 04:30:16 PM
on a side note ... try this too :)

Title: Re: Texture Problem
Post by: Maldrick on January 22, 2018, 04:35:56 PM
@RedKetchup

Interesting...Just plug that in?
Title: Re: Texture Problem
Post by: RedKetchup on January 22, 2018, 04:37:55 PM
Quote from: Maldrick on January 22, 2018, 04:35:56 PM
@RedKetchup

Interesting...Just plug that in?

just rename it and replace your AO.png with this one and compile
Title: Re: Texture Problem
Post by: Maldrick on January 22, 2018, 04:45:56 PM
That fixed it!  Many thanks!  Great to see it all together, finally.  3 days of this. lol  The foundation didn't quite work out that well lol...Like wearing sneakers with a suit.  Was really just grabbing whatever looked okay to keep it moving.  Roof looks a lot better than I thought it would, though.

So I have to ask...What changed with your AO map?  And how did that work?  The elements don't have to be on the same physical location on the map to be recognized?

Totally new to all of this...I find the modelling, specifically, really intriguing.

Thanks again, RK. :)
Title: Re: Texture Problem
Post by: RedKetchup on January 22, 2018, 04:53:54 PM
bah usually my .fbx doesnt contain any infos on the AO parts and doesnt have any infos about the textures. this is why it is a such so small file (few kbs) to compare other 3d files.
all the info are stored inside the .png or other 2D format files.

3dsmax program has a built in function to ask to create those png files which is made by a few clicks


but i never found those AO very accurate, it is like they arent baked into textures. for me it is good cause i can reuse the same texture over and over, thousands of time, in a big mod.
if you use an unique texture map for only that building, maybe the best results would have them baked into the mesh texture.
Title: Re: Texture Problem
Post by: Maldrick on January 22, 2018, 05:13:28 PM
Have to see.  I'm going to try Necora's method tomorrow.  Like to get this sorted out with this one so I know what I'm doing next time better.
Title: Re: Texture Problem
Post by: Maldrick on January 23, 2018, 11:04:12 AM
Also, a couple of other questions going forward...

Was thinking after I fix the AO mapping I would try to do some F variants...After I rework the textures on this one. Lol.  Is there a comprehensive discussion anywhere as to how to do that?  There's a discussion that relates to points that was helpful, but I'm still not even up to that point.  Not really sure how to approach it.  I'm certain I've seen it discussed but can't remember where.

Also, I would like to get better acquainted with the modkit and what all needs to be done for what.  Discrepancy's tutorial is excellent for getting started...with blender especially...I was completely lost when I started and by the next day was actually comfortable with it...but there's not a lot of explanation about the modkit in a general sense.  It gets you to do whats needed for this project but I don't really feel like I know anything I would need to do anything else.  How do people learn this?  Working with the examples in the kit?  The banishedinfo tutorial?

Ideally I'd like to learn as much on my own, if possible.
Title: Re: Texture Problem
Post by: kid1293 on January 23, 2018, 01:31:16 PM
Hi @Maldrick - Many people learn their way into the modkit by
making some simple override. (make mushroom weigh 1 instead of 4)
That way the structure of the modkit comes slowly.

I learned a lot from finding source code here and there and take it to tiny pieces. :)
The step up to work with models can also be troublesome. So many new things
all at the same time. Points, textures, footprints... All needed.

I guess you have to make errors first to fully understand how things work.
But don't hesitate to ask questions. Too generic questions are hard to answer.
Title: Re: Texture Problem
Post by: Maldrick on January 23, 2018, 02:00:11 PM
Thanks @kid1293 .  I guess I just need to get into it and ask questions when I need to.  Just don't want to be a bother with simple things I should be able to figure out.

Actually, the modeling and texturing wasn't that bad with this one, besides that AO problem I couldn't figure out.  Discrepancy's tutorial is really great for getting started with that. I was literally clueless when I started and had to restart a few times because I saw things I could do better and did, but it really helped with overcoming that starting hump, so many thanks to @Discrepancy .  I've been looking at other general blender tutorials for taking it further.

But the mod kit is specific to the game and there isn't as much info around by comparison.  For getting started, that is.  I should go read the documentation again now that I've done something with it.  Basic structure and what needs to be where is what eludes me.  I'm also going to experiment with this one mod now that I've got a working one.

For specific questions, right now I'm trying to figure out how to approach f-variants.  If you are just altering textures, do you need a separate model for each or is there a way to do multiple UV maps for one mesh?  And if separate meshes, do they finalize in one fbx or separate?  From that other discussion, I'm assuming one.  That discussion was about points...how you can have multiple smoke points but not the others.  How does that work with variants of houses where the doors are in different locations?

Stuff like that all together has me not sure at all how to approach it.
Title: Re: Texture Problem
Post by: RedKetchup on January 23, 2018, 03:02:15 PM
you can do 1 fbx with all inside or you can do 12 fbx with one model each. up to you, you decide it all with the links you give in the XXXXXMesh.rsc and XXXXXPicking.rsc files in the model folder.

about structure in the template, WoodHouse is the best example.

you will also notice you can only link 1 pointlist and 1 footprint. you cannot switch the use_001 point at all, only the smoke point. the smoke point in that case need not to be linked to point dummy anymore but linked to your mesh model. and also you dont put the link anymore in the template under particle system

if you need different footprint, then you need to enlarge your footprint.png and draw them in the empty zones. i ll put a copy of one of mine (all my models of woodhouse/stonehouse)


about AO files, yes you do an AO file for each different models and you give the proper links in their XXXXMesh.rsc files in the model folder.

OH BTW, if you have alot of trouble with these, like me for 2 years before i know how to make them, you can just put an empty white one and it will work perfectly !!! (a little 64x64 totally white will work perfectly) which i also put in attachment. i ve done that for 2 years long in all my models in all my mods.
Title: Re: Texture Problem
Post by: kid1293 on January 23, 2018, 03:10:55 PM
About f-variant.

You have a model and want to change texture.
You have a model ready (textured and AO mapped)
Just copy it and rename. Add a new material. Add texture-file to that material.
It should be made like the first texture file in sizes and positions of textures.
Go to edit mode and select all new building. Select second material slot (new one)
and click assign. That's all.

Doors and smoke and use... POINTS. In Blender I have no way to assign different
points-groups to different houses. They can be named other than 'points' but the build-points
must be there and Blender does not allow same name  :(
So one point group for all buildings in same file. If you want different you have to make
another fbx-file.

Smoke point are special. I haven't tested to put them under mesh tree so I don't know.

3DMAX is different and allows same name. Points placed under corresponding mesh tree.
What RK told they can all be called 'points'. I don't know.

Take your house and change something. Look in game what happens. Change code and test.
Ask us why your computer refuses to aknowledge you after that. ;D
Title: Re: Texture Problem
Post by: Discrepancy on January 23, 2018, 03:12:47 PM
In terms of learning how the modkit works - there is no real documentation available.
The best way is like Kid1293 said and make small changes.

Explore and try to understand the game files in the resource folder of modkit.




to make a house with f-key variants, just take a look at the template of the vanilla houses - you are simply making more calls of 'decal', 'picking', 'model' & 'highlight'.

You will need to make another copy of the house 3d model if you are retexturing, you can do this in the same or different .fbx.  Just assign the other texture to it - if you don't adjust the building itself you can use the same AO image for both. Just do all the model code like the first house, then call it up in the template file.


When adding f-key variants with different shape houses and the smoke point is not in the same spot - Blender has an issue where we cannot add multiple smoke points with the same name.

If you look in the Woodhouse template file you will see:

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


this is the particle call but it does not include the pointlist file...
this is because the points for the smoke are actually attached to the building model, and not in the 'points' group.
With Blender you must export each house as a separate model .fbx if they are f-key variants with changing smoke points. The template file is calling the same named 'smoke' from all the different variants.

For each house, make individual .fbx, add a 'smoke' point to each models hierarchy in blender. Each smoke point must be named the same.


In terms of doors and footprints - they are a little different - citizen pathing for all the variants must be the same for each model as you can only input that within the 'createplaced' and 'map' in template file - this affects all variants.
Title: Re: Texture Problem
Post by: Maldrick on January 23, 2018, 03:23:41 PM
Wow, awesome, thank you, gentlemen!  I'll need to sit down and start playing with it before everything makes sense, but you guys definitely got me back on track enough to get started. I'll have these posts up on the second box while I'm working, for sure.  I just wasn't sure what could be done and what limitations there are enough to wrap my head around how to approach it.  Many thanks!

About footprints...I was reading a bit about that earlier in some comments made in other threads.  The tutorial doesn't have you make one but the game seems to do it anyway, as shown on the pic.  But they are needed?  I gather it's a texture but how does it get there?  I don't think I've seen putting a plane in for it mentioned it anything like that?
Title: Re: Texture Problem
Post by: RedKetchup on January 23, 2018, 03:38:54 PM
Quote from: Maldrick on January 23, 2018, 03:23:41 PM
About footprints...I was reading a bit about that earlier in some comments made in other threads.  The tutorial doesn't have you make one but the game seems to do it anyway, as shown on the pic.  But they are needed?  I gather it's a texture but how does it get there?  I don't think I've seen putting a plane in for it mentioned it anything like that?


the footprint texture is a transparent background .png on which you draw and paint some ground texture on it. it needs to respect the size of 64,128,256,512,1024... digits.
i use a totally free painting program called Gimp 2.0 and i made myself a special brush made from a screenshot of the storeyard ground and i just "paint" the zones i need to put some ground.
Title: Re: Texture Problem
Post by: Maldrick on January 23, 2018, 03:42:43 PM
Quote from: kid1293 on January 23, 2018, 03:10:55 PM

Doors and smoke and use... POINTS. In Blender I have no way to assign different
points-groups to different houses. They can be named other than 'points' but the build-points
must be there and Blender does not allow same name  :(
So one point group for all buildings in same file. If you want different you have to make
another fbx-file.

Smoke point are special. I haven't tested to put them under mesh tree so I don't know.


So if I'm reading correctly, you can have multiple sets of points if each model has it's own fbx...Just have them called individually in the coding?  Forgive me for not being more specific, I don't have it in front of me and I'm very fuzzy on which is which.  Or, no, only one set of points (besides smoke) regardless of approach?

Quote from: Discrepancy on January 23, 2018, 03:12:47 PM

In terms of doors and footprints - they are a little different - citizen pathing for all the variants must be the same for each model as you can only input that within the 'createplaced' and 'map' in template file - this affects all variants.

That's right...I remember setting that...The map thing where you define each square along with the road tiles.  So there's only one per building regardless of how many F-variants.

So how do you accommodate different doors in different places?  Is the door sometimes just cosmetic and they are actually accessing the building through a wall?  Not sure I've ever noticed but was never looking for it, either.

I'm going to keep it simple with this one and probably just stick with the one mesh and just vary the textures.  But I'm thinking ahead to the next one and I'm really curious about this.
Title: Re: Texture Problem
Post by: RedKetchup on January 23, 2018, 03:47:05 PM
yes the doors are just cosmetics. did you played my beta ? where you have 6 different models for each kind of housing ? and noticed the doors where everytime at a different place ? and you had citizen going for the same spot in front of the house ? and not in front of each door ?

yeah only 1 use_001 point is allowed.

if it is more important, then you need to seperate them and not make any "F" alternate and have each single house to have their own single icon on the toolbar :)
Title: Re: Texture Problem
Post by: Maldrick on January 23, 2018, 03:48:36 PM
Quote from: RedKetchup on January 23, 2018, 03:38:54 PM
Quote from: Maldrick on January 23, 2018, 03:23:41 PM
About footprints...I was reading a bit about that earlier in some comments made in other threads.  The tutorial doesn't have you make one but the game seems to do it anyway, as shown on the pic.  But they are needed?  I gather it's a texture but how does it get there?  I don't think I've seen putting a plane in for it mentioned it anything like that?


the footprint texture is a transparent background .png on which you draw and paint some ground texture on it. it needs to respect the size of 64,128,256,512,1024... digits.
i use a totally free painting program called Gimp 2.0 and i made myself a special brush made from a screenshot of the storeyard ground and i just "paint" the zones i need to put some ground.

Very cool...I use Gimp also and I'll plug in your brush for sure.  Thank you very much.

I'm still not entirely sure what they are used for. lol  The tutorial didn't go over that and it still works?

Also, question...After I create a footprint, where does the png go and which file calls it?  I'll have to set that.
Title: Re: Texture Problem
Post by: Maldrick on January 23, 2018, 03:54:44 PM
Quote from: RedKetchup on January 23, 2018, 03:47:05 PM
yes the doors are just cosmetics. did you played my beta ? where you have 6 different models for each kind of housing ? and noticed the doors where everytime at a different place ? and you had citizen going for the same spot in front of the house ? and not in front of each door ?

yeah only 1 use_001 point is allowed.

if it is more important, then you need to seperate them and not make any "F" alternate and have each single house to have their own single icon on the toolbar :)

Awesome, thank you!  This was very confusing.  Couldn't figure out how modders had doors in different places but weren't able to set points for them.  But, no, I'd never noticed that bannies weren't necessarily accessing the doors in each one, either.  Never even occurred to me to look till I got into this over the past couple days.  As long as work gets done, I've long since stopped paying attention to what individual bannies actually do, lest I go completely insane. Kind of like real life work, actually :P  So as long as the use point is accessible, everything works....So for a bunch of different variants just put it in a general location and call it a day.

Excellent, thank you!
Title: Re: Texture Problem
Post by: kid1293 on January 23, 2018, 03:55:17 PM
Just a quick note on AO. RK's mention of an all-white AO is good and useful.
I have an all-white DummyAO.png and DummyAO.rsc which I bring along to all new mods.
I call it from buildstages. Why AO-map a buildstage which is visible only a couple of seconds?

edit - The game uses UV-map for AO if there is no specified AO-map. With an all-white is does
not matter.
Title: Re: Texture Problem
Post by: RedKetchup on January 23, 2018, 03:55:42 PM
Quote from: Maldrick on January 23, 2018, 03:48:36 PM

Very cool...I use Gimp also and I'll plug in your brush for sure.  Thank you very much.

I'm still not entirely sure what they are used for. lol  The tutorial didn't go over that and it still works?

Also, question...After I create a footprint, where does the png go and which file calls it?  I'll have to set that.

did you found my brush i posted somewhere in another thread ? if not i can repost.

in your template you have this code
DecalDescription decal
{
MaterialInstance _materials
[
"Models\Buildings\WoodHouse\MaterialInstance\WoodHouseFootprintMaterial.rsc"
"Models\Buildings\WoodHouse\MaterialInstance\WoodHouseFootprintDamageMaterial.rsc"
]


you decide where you put those. the links need to reflect your folder structure where you want to put those. and inside each file, you put the good link structures relying to the next footprint file. they come in group of 4 files. (3.rsc 1.png)

the code below decide the size of your .png and where it need to start to read - to - where it finish for each footprint
bool _tiled = false;
float _initialAlpha = 0.5;
float _mapWidth = 1024.0;

DecalLocation _decalLocations
[
{
float _x0 = 0.0;
float _y0 = 0.0;
float _x1 = 256.0;
float _y1 = 256.0;
}
Title: Re: Texture Problem
Post by: Discrepancy on January 23, 2018, 03:57:50 PM
Quote from: Maldrick on January 23, 2018, 03:42:43 PM
So how do you accommodate different doors in different places?  Is the door sometimes just cosmetic and they are actually accessing the building through a wall?  Not sure I've ever noticed but was never looking for it, either.

Sometimes I do make them cosmetic and actually have the 'use_001' point just in front of the house - I think I did this for some of the jetty houses as well as the angled village housing. So they never actually enter the house to collect food or warm up.
You can of course just have them go through the wall.


Quote from: Maldrick on January 23, 2018, 03:42:43 PM
So if I'm reading correctly, you can have multiple sets of points if each model has it's own fbx...Just have them called individually in the coding?  Forgive me for not being more specific, I don't have it in front of me and I'm very fuzzy on which is which.  Or, no, only one set of points (besides smoke) regardless of approach?

Yes and no.

What I do is make my models, make a single dummy 'points' list, also make the build_001, use_001, create_001 points and attach to 'points'.
I include this point list with 1 of the variants .fbx file or you can make a .fbx with just these points.

Now with each variant building you have made - they are to each be compiled as separate .fbx's

on each building attach another dummy point called 'smoke' - just add it to the actual 'mesh' model in blender.

by not including the point list in the particle code call-up it, the template file for the building will instead search each model for a corresponding 'smoke' point.

I don't know if this actually works the same with the use_001, build_001 etc
Title: Re: Texture Problem
Post by: Maldrick on January 23, 2018, 04:29:48 PM
Quote from: kid1293 on January 23, 2018, 03:55:17 PM
Just a quick note on AO. RK's mention of an all-white AO is good and useful.
I have an all-white DummyAO.png and DummyAO.rsc which I bring along to all new mods.
I call it from buildstages. Why AO-map a buildstage which is visible only a couple of seconds?

edit - The game uses UV-map for AO if there is no specified AO-map. With an all-white is does
not matter.

Very interesting.  I think I saw a post of yours where you mentioned this.  Makes sense.  But why do it if you are AO mapping the mesh anyway?  I'm guessing to save space on the map so you can spread everything out and get a better image?

@RedKetchup

Yes, I went through Triangle's tipi post earlier because he was doing a couple weeks ago what I'm doing now and thought there'd be relevant info there.  Think you posted it there.

Thank you for the clarification.  I'm kind of lost with the mod kit so any info about what is where goes a long way to getting me on track.

Thank you again. :)

Quote from: Discrepancy on January 23, 2018, 03:57:50 PM

What I do is make my models, make a single dummy 'points' list, also make the build_001, use_001, create_001 points and attach to 'points'.
I include this point list with 1 of the variants .fbx file or you can make a .fbx with just these points.

Now with each variant building you have made - they are to each be compiled as separate .fbx's

on each building attach another dummy point called 'smoke' - just add it to the actual 'mesh' model in blender.

by not including the point list in the particle code call-up it, the template file for the building will instead search each model for a corresponding 'smoke' point.

I don't know if this actually works the same with the use_001, build_001 etc

Just to make sure I have this straight...

Make a generic points fbx like we did for the tutorial, but leave out smoke.  Do a smoke point for each variant in its own separate fbx, and link it to the mesh in each one with the drag and drop functionality in blender.  Leave out the call for smoke in the template.  And the pointlist in the template rsc will do the rest?

I'm sure I'm going to screw this up and be back here asking more questions in a couple of days, but if I've got that straight I should be okay to get a good start on it.

Also, since you mention it, what is the create_001 point for?  That wasn't covered in the tutorial...I'm guessing that's for production buildings?  Here's where I probably need to go read the documentation again but thought I'd ask since it comes up.

Thanks again, everybody!  Totally got me back on track.  Enough to get started anyway.
Title: Re: Texture Problem
Post by: Discrepancy on January 23, 2018, 04:32:20 PM
you got it :) correct.


create_001 point is only used in production and other buildings. not in house buildings.

It creates a spot for the resources to appear that have been made.
Title: Re: Texture Problem
Post by: Discrepancy on January 23, 2018, 04:39:04 PM
So the points are:

build_001, build_002, ...... etc. etc  - as many as you want- these dictate the spots where builders will construct the building. The more you have, the more builders can be employed to build.

use_001, use_001, ... etc - can be many also, these are spots that workers will work at in production buildings - so for a mine or quarry where you might have 10+ workers, you should have as many use points as maximum workers.
In a house, they will use the use_001 point only, this is where they collect food and get warm.

create_001, create_002 - like I said above, this is where resources will appear in production buildings - for example where firewood will appear at woodcutter.

*** create_002 is also the point that nomads will arrive at the townhall. *** ????? or is it 'nomad_001'... I just did a forum search and found that in RK's Choo Choo post... I'm unable to look at my own models right now, but I'm sure I used create_002....

*** boat_001 is the point that is used at trading posts for the boat to arrive at.

smoke points can be called anything as long as you refer correctly to them in the particle list in template file.


@RedKetchup & @kid1293 have I missed any?
Title: Re: Texture Problem
Post by: RedKetchup on January 23, 2018, 04:58:31 PM
trading post i think it is "boat_001" although i always put a "boat" one to make sure
livestock bought is "create_002" but it needs also the "create_001" so the _002 can operate.


nomad is "create_002" i also do the same as the TP, i put also a "create_001" to make sure the _002 operates.


as you said, numbers of "build_00x" = the number of builders required to build the building.
the "create_00x" are where you want to new resources created to appear.
the "use_00x" is where you want to have the workers standing in order to work or use the building.

Title: Re: Texture Problem
Post by: Maldrick on January 24, 2018, 05:26:25 AM
Excellent. Thank you, guys.  This is great info.  Not anywhere close to this point, but I'll reference this in the future, for sure.

@Discrepancy

Thinking I might start a new project to try the f-variants with.  Question...In the tutorial we set the scale to meters (making a grid square in blender 1 meter) and then scaled the fbx down from there at the end.  Using that system, what do you guys generally consider "1 story" in terms of building height?  I would look in game, but we scaled the model down an additional 30% at the end.  Purely guessing, but I'm thinking a bannie is roughly 1 meter tall (in these terms) or just short of it?
Title: Re: Texture Problem
Post by: Discrepancy on January 24, 2018, 05:35:08 AM
yeah about 1 meter is the height of them.

depending on the building my doors are from 1m to 1.5, most about 1.3m

1.5-1.8 or higher for start of second story.  I myself have no set dimensions.
Title: Re: Texture Problem
Post by: Maldrick on January 24, 2018, 05:39:54 AM
Awesome, thank you.
Title: Re: Texture Problem
Post by: RedKetchup on January 24, 2018, 05:55:11 AM
i usually have foundations of 0,3' high with 0,1' underground (so 0,2' outside) then the 1st floor wall has 1,4' and then the attic.
my door is 1,2' high per 0,66'
my windows have 0,4'x0'5' or 0,5'x0,6' depending what i want.
Title: Re: Texture Problem
Post by: Maldrick on January 24, 2018, 05:59:04 AM
Awesome, thank you, RK.  Helps a lot.
Title: Re: Texture Problem
Post by: Maldrick on January 24, 2018, 03:52:18 PM
So I decided to follow through with the house I already have...Partly because I'm not entirely sure what I'm going to do next and partly because it gets me into the modkit faster.  Spent about an hour today browsing through it and have a lot better understanding of how everything works together.  For where I'm at now at least.  Plus, I already did this one, might as well finish it.

@kid1293

Thank you for the advice on AO mapping.  Before getting into Necora's post, I tried what you suggested...Made a separate AO channel and separated everything out so nothing is overlapping.  Was a bit tedious, but worked perfectly.  Thank you for the help with that.

@kid1293 @Discrepancy

Was sitting down to start putting some F-variants together.  Was about to do what you suggested but just out of curiosity I made some changes to the texture png and recompiled without making any changes in Blender.  The changes showed up just fine.  Is it possible to just use different texture files for each variant or is not assigning them in Blender asking for problems of some kind?  I was planning to make the changes in blender, but since I noticed that I just thought I would ask if that's an acceptable corner to cut.

Also, I was thinking I would skip making a footprint for this one.  The model gets resized as part of the tutorial and it doesn't cleanly fit the grid and not sure I want to deal with it.  I'll do one for the next one though.  Will that cause any kind of problem?   Still not entirely sure what they actually do besides build01 cosmetics.

Really appreciate all the help.  You guys got me back on track with your advice and it finally started to click today and having a great time with this.
Title: Re: Texture Problem
Post by: Discrepancy on January 24, 2018, 04:19:57 PM
The footprints do finish off a model nicely, adding the dirt (or other) look to the ground below the model. It is not necessary, but also helps players know where the building is just after they've set the footprint down....
I also still have a lot of buildings that don't have one or are invisible.

If you are making an F-key variant, you will need to duplicate the model in the .fbx file and assign the 2nd texture to it - you need to do this as the game will look for the material name when it tries to compile.

So you have your first house: for example right now you would have the mesh within the .fbx calling up the material texture, names used for example 'MaldrickSmallHouse', the modkit links this to a MaterialInstance file of the same name: 'MaldrickSmallHouse.rsc', this calls up another file called 'MaldrickSmallHouseTexture.rsc', which calls up your ''MaldrickSmallHouse.png' texture file.

For you to add a 2nd textured home, you must make the same again but obviously named different.
So you will have copied the house model you made (you can do it in the export blender file, just select the house that you have already made in object mode and press Shift+D), name it something different, and attach the 2nd texture you have made, you will then need to do the same Models and MaterialInstance files to call up the texture.
Title: Re: Texture Problem
Post by: Maldrick on January 24, 2018, 04:23:43 PM
Quote from: Discrepancy on January 24, 2018, 04:19:57 PM
The footprints do finish off a model nicely, adding the dirt (or other) look to the ground below the model. It is not necessary, but also helps players know where the building is just after they've set the footprint down....
I also still have a lot of buildings that don't have one or are invisible.

If you are making an F-key variant, you will need to duplicate the model in the .fbx file and assign the 2nd texture to it - you need to do this as the game will look for the material name when it tries to compile.

So you have your first house: for example right now you would have the mesh within the .fbx calling up the material texture, names used for example 'MaldrickSmallHouse', the modkit links this to a MaterialInstance file of the same name: 'MaldrickSmallHouse.rsc', this calls up another file called 'MaldrickSmallHouseTexture.rsc', which calls up your ''MaldrickSmallHouse.png' texture file.

For you to add a 2nd textured home, you must make the same again but obviously named different.
So you will have copied the house model you made (you can do it in the export blender file, just select the house that you have already made in object mode and press Shift+D), name it something different, and attach the 2nd texture you have made, you will then need to do the same Models and MaterialInstance files to call up the texture.

Right...I was about to do that.  But just to experiment I tried just altering the png and recompliled without changing anything in blender and it worked.  So thought I'd ask if it was possible to do just that for F-variants.  Was looking at the template rsc and everything it points to and seems like it would.

But no worries...I'll go do that.  Just thought I'd ask about that.  Thank you!
Title: Re: Texture Problem
Post by: Discrepancy on January 24, 2018, 04:50:24 PM
It won't work if you change the name of the texture, so if you add another texture image, the model won't call it up, and the modkit will end up just duplicating the first house.
There is a MaterialInstance file call from the Models/MaldricksHouseMesh.rsc, but  only affects the damaged look of the house - so when it catches on fire.
Title: Re: Texture Problem
Post by: RedKetchup on January 24, 2018, 04:53:29 PM
you absolutely need to go in blender to duplicate it, change the name of the duplicated mesh, and change the names of the textures. an fbx doesnt store any textures, only names.
Title: Re: Texture Problem
Post by: Maldrick on January 24, 2018, 05:01:03 PM
Okay cool. Thank you. :)
Title: Re: Texture Problem
Post by: Maldrick on January 25, 2018, 03:42:36 PM
Thank you all again for all of the help.  And apologies for the endless questions while I was wrapping my head around how it all goes together.  After going through everything again doing the F-variants it made a lot more sense.  Getting comfortable navigating the modkit, finally.

So I finished everything up and it compiled on the first try. :)  Spent a couple hours tweaking textures a bit and got the toolbar set up.  Just need to make some icons to replace the temporaries I have slugged in and this one is all set.

One last question, since we were discussing F-variants...

The template has this bit of code..

DecalLocation _decalLocations
[
{
float _x0 = 0.0;
float _y0 = 0.0;
float _x1 = 256.0;
float _y1 = 320.0;
}
{
float _x0 = 256.0;
float _y0 = 0.0;
float _x1 = 512.0;
float _y1 = 320.0;
}
{
float _x0 = 512.0;
float _y0 = 0.0;
float _x1 = 768.0;
float _y1 = 320.0;
}
{
float _x0 = 768.0;
float _y0 = 0.0;
float _x1 = 1024.0;
float _y1 = 320.0;

}
{
float _x0 = 0.0;
float _y0 = 320.0;
float _x1 = 256.0;
float _y1 = 640.0;
}
{
float _x0 = 256.0;
float _y0 = 320.0;
float _x1 = 512.0;
float _y1 = 640.0;
}
]
}


Copied that from the woodenhouse template in the kit for this.  What do you do for the float values if you are doing more than 6 variants?  Not really sure what they do.  Not anything I need to do anytime soon, was just curious.

And if anyone has any tips about making icons I'd love to hear them.  I'm not the best at that kind of thing, to say the least. lol
Title: Re: Texture Problem
Post by: RedKetchup on January 25, 2018, 04:28:43 PM
x0 and y0 = the point the most top left of your .png
x1 and y1 = is the most right bottom of your .png

this is the square you define where start your footprint, and where it stops.

a 256x256 that use the entire png will have a float _mapWidth = 256.0 and wil start at x0=0 y0=0 and will end at x1=256 and y1=256

but if your footprint .png is as big as 1024x1024 and subvised by 4 footprints by 4 footprints of 256 each..., where it start ? and where it end ?
if it is the 3rd in row by the 2nd column... it can start x0=512 and end at x1=768 and on y0 = 256 and end at y1= 512....
Title: Re: Texture Problem
Post by: Maldrick on January 25, 2018, 04:38:38 PM
Oh, right!  And we came full circle.  Thank you I was thinking of something else.  It's starting to run together a bit. lol

And I didn't do a footprint for this one so hadn't worked with that yet.  Awesome.  Thank you. )
Title: Re: Texture Problem
Post by: Maldrick on January 25, 2018, 07:26:53 PM
Last question, I promise. :)

Trying to rename my mod...What the pkm will be.  Changing the name in the package.rsc does it but the mod doesn't work and I'm having the worst time tracking down what else I need to change.  I'm guessing this is the same reason you can't directly rename a pkm. Is there an easy way to do this?
Title: Re: Texture Problem
Post by: RedKetchup on January 25, 2018, 07:42:12 PM
did you changed the name of resource file too ? (and names inside the .bat)

Title: Re: Texture Problem
Post by: Maldrick on January 25, 2018, 07:52:13 PM
No but I'll try that.  Thank you.
Title: Re: Texture Problem
Post by: Maldrick on January 25, 2018, 07:59:28 PM
Doesn't compile if I rename the resource file.
Title: Re: Texture Problem
Post by: Discrepancy on January 25, 2018, 08:08:04 PM
make sure you have everything correct.


So you rename the mod to 'MaldricksMod'

make sure the folder it is in is called 'MaldricksMod'

within that folder you will have to edit:

MaldricksModResources.rsc
MaldricksMod.rsc
Package.rsc

within each of those files make sure you have renamed everything to match the names of the .rsc files above

within Package.rsc ensure the topline is matching PackageFile MaldricksMod

within your .bat file/s:

build.bat
..\..\bin\x64\Tools-x64.exe /build MaldricksModResources.rsc:resource /pathres ../MyMods/MaldricksMod /pathdat ../MyMods/MaldricksMod/bin
pause

run.bat
..\..\bin\x64\Application-x64-profile.exe /ref MaldricksModResources.rsc:resource /pathres ../MyMods/MaldricksMod /pathdat ../MyMods/MaldricksMod/bin
pause

package.bat
..\..\bin\x64\Tools-x64.exe /mod Package.rsc:MaldricksMod /pathres ../MyMods/MaldricksMod /pathdat ../MyMods/MaldricksMod/bin
pause

Title: Re: Texture Problem
Post by: Discrepancy on January 25, 2018, 08:09:26 PM
 :)

and by all means, if you have trouble send me a link and I can check the code.
Title: Re: Texture Problem
Post by: Maldrick on January 25, 2018, 08:21:14 PM
Awesome, thanks @Discrepancy.  I tried all of that except the directory name.  Been a while since I used .bat files like this so I forgot about that.  Didn't make a difference otherwise, oddly, but I'll give it a go.
Title: Re: Texture Problem
Post by: Maldrick on January 25, 2018, 08:52:40 PM
Yeah, it's still hanging on the resource file.  Thanks for your help.  I've been at this for hours and think I'll go over it again tomorrow.  The exact last thing I wanted to do. lol

You mind if I post this as "small town homes"? lol  Doesn't really fit the theme of where they wound up but I've kind of had it with trying to figure this out.
Title: Re: Texture Problem
Post by: Discrepancy on January 25, 2018, 09:12:06 PM
 :) you can name it whatever you'd like.

There must be a spelling mistake somewhere.

sounds like something within the .bat files if it isn't giving you an error.
also make sure there are no . (dots) , (commas) - (dashes) etc in your folder/file names
also i find the modkit only likes to work from the root of the main drive (C:\BanishedKit\)



the three main files to check like I said earlier are:

MaldricksModResources.rsc
MaldricksMod.rsc
Package.rsc

MaldricksModResources.rsc, will be what the build process of the modkit will first look at.
if you are just adding housing it should have nothing but references to: MaldricksMod.rsc
so within MaldricksModResources.rsc, it will be something like this:
ExternalList resource
{
External _resources
[
"MaldricksMod.rsc:MaldricksHouse01",

]
}


this is telling the game to load something within the MaldricksMod.rsc file called 'MaldricksHouse01'

so if we were to look in the MaldricksMod.rsc file:
Toolbar MaldricksHouse01
{
Toolbar _parent = "Game/Toolbar.rsc:housing";
int _sortPriority = 1110;

Action _action = Tool;
ComponentDescription _tool = "Template/MaldricksHouse01.rsc";

bool _autoHotKey = true; 
}


also if you are trying to add toolbar menus and need help let me know.
Title: Re: Texture Problem
Post by: Maldrick on January 25, 2018, 09:34:27 PM
I'm off the PC now but I'll give it another look tomorrow.  It may be a typo someplace but I went over it all several times already.  Your code will help, though. I got an error related to the resource file. Usually you can see what it tried to load and can backtrack from there but was just an error about a _resource file not being loaded...had an underscore in it.  Not like other errors I've had.

Bear in mind I got all my variants done earlier and everything was working fine.  As well as the community toolbar. I'm just trying to figure out how to change the name because it will likely come up again at some point.  And I'm a glutton for punishment, apparently.  Just need to get some icons together and it's good to go.

Really appreciate the help!  I've had a blast with this and looking forward to more.
Title: Re: Texture Problem
Post by: Maldrick on January 26, 2018, 04:12:59 AM
@Discrepancy

That last bit of code you posted...Does the template file name need to change, also?  I was just changing what's in the main directory.

Basically I just used the same names for everything you did in the tutorial so as to not complicate things as I was learning.  I'd just like to change what needs to be to get a different name for the pkm.  I really have no idea what isn't jibing.

At this point I might just rebuild the project with the new name from the ground up because the time I've spent trying to change it is approaching the same amount of time it took to do it originally.  Around 7 hours at this point.  I'm doing this as much for the learning experience so I know how to do it down the road when rebuilding isn't an option, but man.  Lol

I have a back up of the working project (with the old name) set aside and start over renaming everything with your suggestions.  But I can't see where my problem is at all.
Title: Re: Texture Problem
Post by: RedKetchup on January 26, 2018, 04:19:18 AM
nan the template names stay the same till you dont change the name of the template in the toolbar resource file (at the root of your folder)
Title: Re: Texture Problem
Post by: kid1293 on January 26, 2018, 04:20:47 AM
Let us have a look. 12 pairs of eyes are better :)
Title: Re: Texture Problem
Post by: Maldrick on January 26, 2018, 04:32:25 AM
Ugh.  Feel like that's admitting defeat! :P

Okay, I'm going to give this one more go and if it doesn't work I'll zip everything up and get them posted someplace.  Need to set up a dropbox or something anyway so might as well do it for this.

Much appreciated, Sir!
Title: Re: Texture Problem
Post by: Maldrick on January 26, 2018, 06:11:25 AM
It worked this time! :)  I have no idea what the problem was before but starting fresh and doing it again fixed whatever it was.  Many thanks, gentlemen.  This whole project has had ups and downs but renaming this thing was the first time I was starting to get really frustrated with it.

Going forward...Decided to add footprints after all.  I was thinking there was no footprint but actually it's calling up the vanilla wooden house footprints, so I should go ahead and do that.  Will be good to learn how to do that.

All that's left after that is getting some icons together.  Do you guys have any tips for that?  You all have such amazing icons...Do you just draw them?  Start with an image and alter it?  I'm not a designer and cookbook my way through things like this so any tips would be greatly appreciated.  Tried lifting the game icons from a screenshot...Was close but was a little muddy and the color is way off.  I'm going to do some searches for button and icon tips and tutorials for Gimp when I get back later, also.  There's bound to be some stuff like that around.

And again, I can't thank you guys enough.  This has been something I've wanted to tackle for quite some time and feels like I'm getting a good start, but would be lost without you all keeping me on track.  Sincerest thanks.
Title: Re: Texture Problem
Post by: kid1293 on January 26, 2018, 06:27:45 AM
If you need game icons they're all in resource/Dialog/Sprite in the modkit.

Yes we draw them :)
The easy ones, or we search internet for usable icons/pictures.
It is a habit. First try to think how you want it. Then search. As a last resort
draw some simple monochrome icon. That's me. I guess we all can relate to that.

And yes, you are off to a good start!
Title: Re: Texture Problem
Post by: Maldrick on January 26, 2018, 06:40:49 AM
Oh, fantastic!  I gave that a cursory look when working on other things and must have missed it.  Thank you.

Thanks for the advice.  I'll do some searches and see what I find.  I really need to get my Gimp skills up so I'm more comfortable with this.  In fact, when I get this project done, my next one is to find some good tutorials for that and blender to get a little deeper into both before the next one.

Thanks again. :)
Title: Re: Texture Problem
Post by: kid1293 on January 26, 2018, 06:43:53 AM
try

some nice colored icons
http://www.softicons.com/

a lot of icons many sizes
http://www.iconarchive.com/
Title: Re: Texture Problem
Post by: Maldrick on January 26, 2018, 06:55:26 AM
Very nice, thank you.  Had a glance and there are quite a few that could make potential game icons for sure.
Title: Re: Texture Problem
Post by: RedKetchup on January 26, 2018, 07:17:46 AM
i always find my icons on google :) sometimes i need to edit them  ::)

keep in mind to always resize to  32x32  :)
Title: Re: Texture Problem
Post by: Discrepancy on January 26, 2018, 05:31:27 PM
a lot of my icons i now make from taking a screen shot, mostly from the front of the building in blender. For some buildings though this doesn't always work so well.

In blender i take the front screenshot, and then paste it into a paint/photo program, i mostly use photoshop, but I can also do it in GIMP which I will show:

Picture 1, screenshot taken of front view from blender, I turn on the setting 'Display - Only Render' - press PrintScreen keyboard button, paste into blank canvas on GIMP.
I select all the parts I don't want and delete, i then find it easier to copy house to another canvas to work on.

Picture 2, shows that I deleted door and windows to show alpha.

Picture 3, in GIMP select 'Colors' - 'Components' - 'Channel Mixer' , select Monochrome, adjust the Red, Green, Blue channels. I normally don't adjust to full white and keep a small amount of building definition in the image.

Resize the image and adjust canvas size, then my final icon export:
Picture 4

** EDIT - fixed last icon to actual .png image
Title: Re: Texture Problem
Post by: Discrepancy on January 26, 2018, 05:40:44 PM
Quote from: RedKetchup on January 26, 2018, 07:17:46 AM
keep in mind to always resize to  32x32  :)

I haven't always adhered to this... I keep the height to 32px, but those who play with my mods will know I have some narrow ones:
16px, 20px, 24px, 26px, also some wider ones 32x64px.

They work fine, except for the tooltip icon is distorted as it makes it display square.
Title: Re: Texture Problem
Post by: RedKetchup on January 26, 2018, 06:12:55 PM
Quote from: Discrepancy on January 26, 2018, 05:40:44 PM
Quote from: RedKetchup on January 26, 2018, 07:17:46 AM
keep in mind to always resize to  32x32  :)

I haven't always adhered to this... I keep the height to 32px, but those who play with my mods will know I have some narrow ones:
16px, 20px, 24px, 26px, also some wider ones 32x64px.

They work fine, except for the tooltip icon is distorted as it makes it display square.

yeah i saw the thinner ones :)
Title: Re: Texture Problem
Post by: Maldrick on January 27, 2018, 07:19:45 AM
@RedKetchup

Google brings up tons!  Found a couple I like for this and lots for future use.

I used your footprint brush and the tips you gave here for when I did footprints last night...All went together nicely after a bit of tweaking.  Thank you again for the info.  Helped a lot.  Would have been lost without it, really.

@Discrepancy

Awesome, thanks for the examples.  I'm taking my time with this and will give this a try.  Was kind of dreading dealing with icons but I've wound up having a lot of fun with it.  Played around with it all night last night and there are a few more things I'm going to try today.  One thing I found, too, is Paint is really simple to use and you can get some really nice basic shapes quickly and easily that work nicely for icons...export as png then do the rest in Gimp.  I'm going to try your method out too, for sure.

Also going to adjust the color I used for the toolbar and do some more tweaking of textures because I noticed some things I'm not crazy about and if I don't get too far afield with that (I did last time) I should have it all done today, if not tomorrow.

Speaking of which, going full circle to the original topic and since we're talking about image manipulation, do you guys have any tips for keeping textures consistent across multiple buildings?  It's not really an issue with this one as these are kind of hodgepodgey anyway, I was just thinking ahead to the next one.

I'm thinking doing any scaling of the UV map elements using the numbers rather than the slider and being consistent with it.  I think there's a way to do that?  I've just used the slider so far.  And doing the same with the textures.  Is my theory, at least.  You guys get a very clean consistent look across buildings in your sets and I'd like to follow suit in the future.
Title: Re: Texture Problem
Post by: Maldrick on January 30, 2018, 10:14:25 PM
Is anyone aware of a way to control the scale of unwrapped elements in the UV map in Blender?  Not rescaling but locking it to a set scale when it unwraps so as to keep everything in proportion?  Everything I try always fills the map with whatever faces are being unwrapped.
Title: Re: Texture Problem
Post by: Discrepancy on January 30, 2018, 11:20:19 PM
Texturing I found always tedious and a little daunting, so I would delay it most often.
Now I texture as I go, and love it, I can spend more time altering textures and seeing immediate changes.
If I start with a wood frame, I add a wood texture to a blank texture canvas and load it into blender right at the start with my first wooden post, I then add more parts and textures simultaneously to the mesh as I make it.

In my tutorial I explained all about adding/marking seams on vertices, nowadays I don't do that often, only when texturing certain curves and shapes and rooflines.

Select individual faces that I want to be in a certain part of the UV map, when I press 'U' and it gives me various options. If you've added seams to vertices and select 'Unwrap' they will be unwrapped in to proportion to each other and will split along the seams.
This can be useful for a roof to get the edges to match with the upper side, selecting the vertices and marking a seam will cut the UV along those lines when unwrapped.
If you select other options to unwrap, like: Smart UV Project you can select to either retain the aspect of the UV or stretch to boundaries.
If you are trying to line up brick walls, It all comes down to lining it up against it's counterpart and just adjusting manually.

Trying out all the options in the unwrap menu helps for unwrapping certain things.
Project from View is one I use often.

I might do things the wrong way or long way more likely, I'm not sure. Blender is a big piece of software and I am by no means an expert... I know maybe 2-3% of it's capabilities.
So I'm not completely sure if you can do what you ask.

What I'm trying to say is I haven't found an easy way to do the textures, I've just started to enjoy it. The more you use the UV image editor in blender and get use to all the controls and shortcuts the easier and better it becomes.

Ctrl-Z is still my most used shortcut in blender....
Title: Re: Texture Problem
Post by: Maldrick on January 31, 2018, 04:32:34 AM
Thanks, @Discrepancy.

Yeah, I'm finding lots of interesting things about how seams work. Not finding a way to keep pieces consistent in size when unwrapping.  Considering blender does everything short of splitting an atom, assuming you can find how it's done, there's got to be a way to do it.

After a couple days stuck at this point I'm going to change gears and see if I can learn how to texture while building instead of doing it externally.  Have one of several meshes done but not going any further till I know I can keep it consistent.  Necora mentioned having success with it in that same post he gets into AO mapping. We shall see.  Might just go play some 7 days and call it a day. Lol
Title: Re: Texture Problem
Post by: Discrepancy on January 31, 2018, 04:45:49 AM
I think Necora actually started using multi-materials.
Which is a bit different again to what I'm doing.

You would have your Door texture, Roof texture, Wall texture, etc,
Select face and unwarp, and select 'Assign' in materials view.
View the model using Material in 3d view to view textures. You can scale UV's larger than texture to make them repeat.
Title: Re: Texture Problem
Post by: Maldrick on January 31, 2018, 05:08:00 AM
Been reading about that.  Still not sure how it helps keep things consistent across multiple projects, though.  Texturing a mesh isn't my concern. Texturing several and keeping it consistent is and I'm not finding anything in blender that helps with that.  Being able to keep UV map elements locked to scale would go a long way towards helping with that but not finding way to do it.  I'm probably missing something.
Title: Re: Texture Problem
Post by: Discrepancy on January 31, 2018, 05:11:12 AM
Yeah I'm not sure either, I would just import the other .fbx if it isn't already in the same blender file and and compare with them next to each other.
Title: Re: Texture Problem
Post by: Maldrick on January 31, 2018, 05:14:49 AM
Interesting. And then just resize textures there to make them match?

How do people get things like roof textures to match across an entire set?

Title: Re: Texture Problem
Post by: kid1293 on January 31, 2018, 06:30:09 AM
Experience, trial and error, measures, counting bricks...
You name it. :)
Title: Re: Texture Problem
Post by: Maldrick on January 31, 2018, 06:46:16 AM
@kid1293 Is there a remotely systematic way of doing it?

I've enjoyed getting into modding so far but if the whole thing is an exercise in resizing textures in gimp over and over ad nauseum because the UV mapping has no controllable scale don't know if I'll continue.

Like if you've got one building that's, say, 4m x 4m with 8 faces to unwrap and another that's 4x4 with 15 faces and you want to have the same matching textures on both, there's no way to keep the unwrapped elements in the proper scale?  Because even with the same sized faces they are going to wind up sized differently on the UV map because it always fills it and one has more faces than the other which throws the scaling off.  No matter the size of the face or multiple faces it always fills the UV map giving no discernible reference to scale it.  Meanwhile there's a perfectly good scaling system in the software.  It makes no sense.

With as robust as Blender is, I have a hard time believing this part of it is this random.
Title: Re: Texture Problem
Post by: kid1293 on January 31, 2018, 07:04:11 AM
If you unwrap one face at the time you get uneven scales.

If you unwrap a complete set of selected walls you get them in proper size between themselves.

I use Smart UV Project with an angle limit of 33 (almost all is proportional) and I uncheck
Stretch to UV bounds. Then I sit and rotate (a lot) and move. It works for me. It is tedious.
To get the same result in a second model I just have to unwrap and then compare one
known surface in each model to know the scale. Often I get some hint when I place a face on texture.
I can see if it there will be a match. (same height on both and one is 13 bricks high...)

You will soon develop a method that works for you. Blender is huge and as Discrepancy said -
you have to test different unwrapping methods to know them fully.
Title: Re: Texture Problem
Post by: Maldrick on January 31, 2018, 07:26:10 AM
Alright, I can see that dialing it in a bit.  Yeah, I've been experimenting with just UV mapping for a couple of days.  Getting more control of it, for sure, but still not anything reliable as a way of moving forward.  Which is why it's getting frustrating.

You touched on something I'll definitely try next...Smart UV but only select faces at a time.  The other times I used it it was all or most.  I'll try that. Thank you.

It's making me crazy. For example, I've got a roof that was created by extruding a plane, then knifed out the nonvisible part of the underside.  So it's a rooftop, the vertical lip on the side, then a small overhang on the underside, on both sides.  The roof and underside unwrap in proportion. The lip always gets scaled to half along with it no matter what I try.  Then I try manually scaling it but I don't think I'm hitting that right.  It would be nice if there was just an option to maintain a static scale for unwrapping.  It seems to just randomly do whatever.  Driving me bananas.

Thanks again. I'll keep playing with it.  And I'm going to look more into the materials and texture system Necora mentioned. Not a lot of info around about that it seems.  Everything I'm finding in tutorials is just how to get textures on things but in no particularly ordered way.

Title: Re: Texture Problem
Post by: kid1293 on January 31, 2018, 08:19:01 AM
Small tip
I select the faces I want to unwrap and then press p (separate)
I get a mesh with only those faces I want to manipulate. After I have done all those 'parts'
I have separate I select all those meshes and control-j (join)

When separated it is much easier to select all, inverse selection and all that.

Small manageable parts!

Title: Re: Texture Problem
Post by: kid1293 on January 31, 2018, 08:29:09 AM
I have a mesh divided in windows/doors, walls, roof, chimney, wood, stone...

When I unwrap a frame like an edge around a window I get problem.
Blender wants to unwrap that part as a rectangle.
I select the vertical front sides only and select Mesh/Clean Up/Limited Dissolve and
get each as one plane. Then invert selection and Limited Dissolve again on the rest of the frame.
You have to think carefully if here are more sides adjoining (like in my build stages, a criss-cross of beams)!! Think and use Control-z :)
Select all frame and Edges/Mark Seam - then unwrap with Smart UV. You get nicely laid out faces in the UV,
all in one direction Easy to move to your wood texture.
Title: Re: Texture Problem
Post by: Maldrick on January 31, 2018, 08:58:36 AM
Awesome, great tips, thank you.  I will play around with all of that.

Yeah, I keep separate saves before doing anything experimental and use control Z a lot of course.

Blender is very powerful, it's just a matter of finding combos of things that work.  Read someplace it's estimated it takes about two years to come close to really utilizing it well. I believe it.
Title: Re: Texture Problem
Post by: kid1293 on January 31, 2018, 09:34:44 AM
About Blender - Yes it is true. It has lot.
Not a corporate thing. Useful ideas from users. Made by users.
It has some shortcoming too. Maybe some patented ideas will
not be implemented unless someone pays for them.
I sit daily and in about two weeks it is two years for me.  :) :) :)
Title: Re: Texture Problem
Post by: RedKetchup on January 31, 2018, 12:52:47 PM
wow you guys are using Blender more technically that i use 3dsmax lol

only 1 keybinding i use in 3dsmax and it is "M" that bring the material window and thats all ^^
Title: Re: Texture Problem
Post by: Discrepancy on January 31, 2018, 09:56:00 PM
blender is full of key binding, it makes it so much quicker.

The thing about blender is it isn't just a 3d modelling program anymore, it is also a game engine with some quite powerful tools.

Every now and then I watch/skip through a few youtube video tutorials to get some more knowledge.
There is a lot of info out there, just a matter of finding what will work for you.
I've seen 3 different methods of making cloth effects in blender, there is probably even more. But things like this are really cool, and once you know them (and remember them), along with the shortcut keybindings, things become quicker and enjoyable. Gone are the days where I dread just redoing a whole model.

@Maldrick, I will send you some of my mod sourcecodes to download if you want. That way you can import my models into blender, open the textures in the UV editor and you can see how I've been texturing lately - all mostly by hand - I probably do spend more time in the UV editor now then in the 3d view.
I've looked through some forums and done some searches but I can't really find anything that would help you. Most advice is just like Kid1293 said, moving UV around by hand or combining then splitting UV's once unwrapped in proportion.

Title: Re: Texture Problem
Post by: Maldrick on February 01, 2018, 09:13:29 AM
Awesome, @Discrepancy, thank you.  Examples help a lot.

Yeah, I've been watching a lot of YouTube videos.  It's crazy how robust this software is.  Many ways to do the same thing but often with slightly different results that may fit a particular thing better.  With modding in mind, for about every half dozen videos I always come away with one or two new things I can use and a short list of notes for things that might be of use later.

After this current mod I'm working on I may do some of these other things just to gain some first hand knowledge that may give new perspective for modding.

Very much appreciated.
Title: Re: Texture Problem
Post by: Maldrick on February 01, 2018, 09:41:42 AM
Oh, also, the most significant modding skill I learned this week is the ability to just say "F-it, I'm not going to worry about this one thing and press on." lol

I'm working on a larger set than I did the first time and went in looking for ways to keep things consistent and not create new problems. I got caught up on this one thing and I have a tendency to overthink things.  On one hand, I'm glad I did because I learned a couple of things I hadn't earlier, but finally just decided to not worry about what I was trying to do and press forward.  As kid said, a lot comes with experience, so no need to get bogged down as long as I'm getting experience and learning, I think.

Thanks again, all.
Title: Re: Texture Problem
Post by: RedKetchup on February 01, 2018, 07:07:02 PM
Quote from: Discrepancy on January 31, 2018, 09:56:00 PM
blender is full of key binding, it makes it so much quicker.



3dsMax is very full of keybinds too !! i just dont know them at all and i dont try to know them neither ^^
i am a clicker, not a keybinder :) even when i played 10 years long World of Warcraft i always been a clicker. dont ask me to use the "w a s d" keybind to move! LOL
Title: Re: Texture Problem
Post by: RedKetchup on February 01, 2018, 09:00:45 PM
i think there is something wrong with your "wood cottage" ? the real coords of your mesh is not what you see at your screen in your blender.
screenshot 1


as you also notice in screenshot 2, the people will go somewhere else to "use" the house.


it is like the "real coordinates" of the mesh is not the same as the "screen coordinates"
i cannot tell you how to fix it in blender.... though , surely someone can do!
Title: Re: Texture Problem
Post by: Maldrick on February 01, 2018, 09:13:05 PM
Not sure what I'm looking at in the first pic.  I've tested it, of course, and saw nothing like that in the second pic.  Everything worked fine, actually.

I see in the background you've got stuff loaded from other new modders.  Try it without that?  Thinking there could be a conflict with something one or both of us didn't do properly, maybe?
Title: Re: Texture Problem
Post by: kid1293 on February 01, 2018, 09:21:32 PM
Strange. I tested again and there is nothing wrong.
It works as intended. Placement is okay. Points are okay.
Title: Re: Texture Problem
Post by: Maldrick on February 01, 2018, 09:36:08 PM
Ya I just downloaded (to make sure it was the same thing) and started a game....All use points (right in front of the doors) are working fine on all 6 variants.

No idea what's causing your problem, RK.
Title: Re: Texture Problem
Post by: RedKetchup on February 01, 2018, 09:55:07 PM
thats the code you gave to Kralyerg, thats the problem he is experimenting while he tries to add it to the megamod


maybe a conflict with some other "name of the building" points.rsc files ? or something ?
"Wood Cottage" can be very popular ^^ did you named your building in  a way to make sure it doesnt conflict with anything else made by the hundred of modders ? ^^


Edited
Title: Re: Texture Problem
Post by: Maldrick on February 01, 2018, 10:00:29 PM
Don't know what to say.  It's working properly here.
Title: Re: Texture Problem
Post by: RedKetchup on February 01, 2018, 10:02:00 PM
edited previous post
Title: Re: Texture Problem
Post by: Discrepancy on February 01, 2018, 10:03:18 PM
if it is conflicting on your end, are you seeing the conflict @RedKetchup in the mod menu?
Title: Re: Texture Problem
Post by: RedKetchup on February 01, 2018, 10:05:42 PM
Quote from: Discrepancy on February 01, 2018, 10:03:18 PM
if it is conflicting on your end, are you seeing the conflict @RedKetchup in the mod menu?

no , it is conflicting in the Kralyerg 's screen
i didnt tested anything about it personally, i am just reporting
Title: Re: Texture Problem
Post by: Discrepancy on February 01, 2018, 10:08:45 PM
haha, ok I've found it.

It is conflicting with my tutorial house as I named all the model files as SmallTownHome also, so there is my files for SmallTownHomePoints, and Maldricks.

Kralyerg should delete my mod as I don't think it is needed.
Title: Re: Texture Problem
Post by: RedKetchup on February 01, 2018, 10:14:21 PM
Quote from: Discrepancy on February 01, 2018, 10:08:45 PM
haha, ok I've found it.

It is conflicting with my tutorial house as I named all the model files as SmallTownHome also, so there is my files for SmallTownHomePoints, and Maldricks.

Kralyerg should delete my mod as I don't think it is needed.


so if he wants to keep both.... need to rename one of those :)


THANKS you ALL for the problem resolution :)
Title: Re: Texture Problem
Post by: Maldrick on February 01, 2018, 10:15:30 PM
I just loaded what I sent him and recompiled...tested...No problems.

Naming...No, it's called SmallTownHome in the code because that's what Discrepancy's tutorial called for.  Wasn't expecting to having it added to MegaMod...He messaged me after I posted it so I sent him the source.  So it's probably conflicting with Discrepancy's if anything.
Title: Re: Texture Problem
Post by: Maldrick on February 01, 2018, 10:18:34 PM
Quote from: Discrepancy on February 01, 2018, 10:08:45 PM
haha, ok I've found it.

It is conflicting with my tutorial house as I named all the model files as SmallTownHome also, so there is my files for SmallTownHomePoints, and Maldricks.

Kralyerg should delete my mod as I don't think it is needed.

Yeah I'm sure that's it.

He can delete mine, if he wants.  I'll have another mod ready before too long.

I'll need to fix that in the download at some point.  In the meantime I'll put a note in there that it conflicts with Discrepancy's.

@Discrepancy Which mods of yours have that house? So I can make sure I put a complete list in the warning.
Title: Re: Texture Problem
Post by: Discrepancy on February 01, 2018, 10:24:56 PM
It is only the tutorial house : http://worldofbanished.com/index.php?action=downloads;sa=view;down=111 (http://worldofbanished.com/index.php?action=downloads;sa=view;down=111) Small Town Home

I have found my sourcecode for it and am changing all my files to DSSmallTownHome

I will update it shortly.
Title: Re: Texture Problem
Post by: Maldrick on February 01, 2018, 10:27:06 PM
Well, don't go to a lot of trouble.  It's my mod causing this conflict.

So, aside from the one you linked, there should be no problems with DSSV or any of the other sets?
Title: Re: Texture Problem
Post by: RedKetchup on February 01, 2018, 10:34:42 PM
Quote from: Maldrick on February 01, 2018, 10:27:06 PM
Well, don't go to a lot of trouble.  It's my mod causing this conflict.

So, aside from the one you linked, there should be no problems with DSSV or any of the other sets?

Maldrick

just to know, when you are making a mod and naming files, you need to put unique own names each time, each building. you cannot name them all *SmallTownHome*.rsc. at some point you will notice it :) and you ll get conflits. each time to do a new building, you have to get new unique names for the files for every buildings.

i know you are just starting and it was your first mod :) but you didnt made unique names, you just took the discrepancy tuto names files :)

and thats ok ! you are starting to learn... and thats something you've learned today :)
Keep UP the good work Bro !!
Title: Re: Texture Problem
Post by: Maldrick on February 01, 2018, 10:44:41 PM
Ya, I knew that, but didn't occur it would be a problem deeper in the code than the root stuff.  Plus, it was one of those things where I was just going to do the tutorial and move on to something else but started adding and changing things and it became its own mod.

I'm going to put a note in the download and discussion section until I can get it updated properly.

Which files actually conflict?  Is it absolutely everything or are there particular files I can rename to avoid the conflict?

Thanks for the encouragement.  Having fun with this and pretty stoked about the one I'm working on now.
Title: Re: Texture Problem
Post by: RedKetchup on February 01, 2018, 10:52:29 PM
Quote from: Maldrick on February 01, 2018, 10:44:41 PM

Which files actually conflict?  Is it absolutely everything or are there particular files I can rename to avoid the conflict?

Thanks for the encouragement.  Having fun with this and pretty stoked about the one I'm working on now.


everything named *SmallTownHome*
everyone use a code to be sure to not conflict with someone else. i put RK in front of everything, and then i can add GW after RK for my personal use like : RK (me) GW( gardenwalls) and then i put whats left of the name depending on purpose.... like HouseBrick... foundry.... etc

and it would give like RKGWhousebrick.rsc ... RKGWhousebrickBuild01Mesh.rsc ... RKGWhousebrickBuild02Mesh.rsc ... etc or
RKGWfoundry.rsc ... RKGWfoundryBuild01Mesh.rsc ... RKGWfoundryBuild01Mesh.rsc ... etc

or NMT30 in front for my medieval town 3.0 like in that screenshot. :)
Title: Re: Texture Problem
Post by: Discrepancy on February 01, 2018, 10:56:27 PM
Basically you have to remember when someone loads a mod they will have added things to their games folder structure which is the same as the structure we make in the modkit...

In the Template folder:
If 2 mods have building templates called FishingSpot.rsc, only one will load,

Same as in Dialog, Models, MaterialInstance, etc, etc, all of them actually. That is why it is safer to put a prefix (I use DS) in front of the files we create.




I have updated my small town home, I don't think your mod will conflict with anything else now - DSSV is safe as I had already named everything with the DSSV prefix.

:)
Title: Re: Texture Problem
Post by: Maldrick on February 02, 2018, 12:28:33 AM
Cool, I was just curious as to which particular files were the key ones. Ya, I'm using the MD prefix on everything.  Just didn't on this one because of the particular situation with it.  Won't be an issue going forward.

I renamed everything, also, and updated the download here.  Will send the updated source to @kralyerg momentarily.
Title: Re: Texture Problem
Post by: RedKetchup on February 02, 2018, 01:44:09 AM
sweet :)
Title: Re: Texture Problem
Post by: Maldrick on February 02, 2018, 09:00:08 PM
Since naming issues comes up...

It's just the file names within the mod that can conflict, right?  The strings for display names in-game can repeat?  Like, I'm sure I've seen "Small House" and the like across multiple mods and had no problems.

About to start coding for my current project and just thought I'd ask so I don't paint myself in a corner to sort out later.
Title: Re: Texture Problem
Post by: RedKetchup on February 02, 2018, 09:07:01 PM
the string text in the string table can be same, it is not real, only the words , or strings of letters, that appear in our monitor.
Title: Re: Texture Problem
Post by: Maldrick on February 02, 2018, 09:09:18 PM
Awesome, thanks RK.  I thought so, but thought I would confirm so as to avoid problems.
Title: Re: Texture Problem
Post by: Maldrick on February 04, 2018, 12:16:12 PM
Working on my current mod...Everything is compliling but I'm getting an error trying to run the game...

Assert: Failed to load resource 'C:\BanishedKit107\MyMods\MDAAFrameCabin\bin\MDAAFrameCabin_resource.crs'

Object\ExternalFactory.cpp(364)

Callstack:
Runtime-x64-profile.dll(0x00000000eeb55a65)
Runtime-x64-profile.dll(0x00000000eeba9297)
Runtime-x64-profile.dll(0x00000000eeba5177)
Runtime-x64-profile.dll(0x00000000eeb6e48c)
MSVCR110.dll(0x00000000fbd23fef)
MSVCR110.dll(0x00000000fbd24196)
KERNEL32.DLL(0x00000000064f1fe4)
ntdll.dll(0x000000000773efb1)


I checked against my first mod and the .crs it's calling for isn't generated when compiling.  Which leads me to suspect there's something off with my .fbx but I've double checked everything and there's nothing amiss that I can find.  Really has me stumped.

Anyone seen anything like this?  Given the nonspecific nature of the error, and the fact the code is compiling, I'm really not sure what I should be looking to fix.
Title: Re: Texture Problem
Post by: kid1293 on February 04, 2018, 12:21:06 PM
Too generic error!
We don't have the error codes so I can not say where it failed.
You have a screen output when compiling. Was it error free?

I can have a look if you want. I can PM my email if you don't want to post it here.
Title: Re: Texture Problem
Post by: Maldrick on February 04, 2018, 12:30:37 PM
Awesome, thanks @kid1293 .

Yeah, it is generic, isn't it?  First time running into this.

I may take you up on your offer.  But something occurred to me that I might try first.  The only real difference between this one and the first one is I'm using generic build stages for this one, instead of a separate duplicate for each variant as per Discrepancy's example.

But I just noticed that he uses separate FBXes for each one, where I'm still using one FBX for everything.

Think that might be my problem?
Title: Re: Texture Problem
Post by: kid1293 on February 04, 2018, 12:33:49 PM
If you address them wrong, yes.
I have not found any problems with all-in-one.
Yes, I have but I solved them. Check spelling. Capitals and all that.
Title: Re: Texture Problem
Post by: Maldrick on February 04, 2018, 12:36:16 PM
Hmm...Double checked all of that, but I'll look again to be sure.
Title: Re: Texture Problem
Post by: Maldrick on February 04, 2018, 01:05:05 PM
Yeah, that all looks good.

Only other thing I can think of is I haven't set up footprints yet, but that wasn't a problem with the last one.  Although this one is 3x3 (3x4 with road) and the default house footprint is 4x4 so could that be the problem?
Title: Re: Texture Problem
Post by: RedKetchup on February 04, 2018, 02:05:55 PM
Quote from: Maldrick on February 04, 2018, 01:05:05 PM
Yeah, that all looks good.

Only other thing I can think of is I haven't set up footprints yet, but that wasn't a problem with the last one.  Although this one is 3x3 (3x4 with road) and the default house footprint is 4x4 so could that be the problem?

footprints .png ? it is a 256,512, 1024 thing .. pixels it does nothing with it is a 4x4 or 5x5. it will always stretch the .png so it fits the number of tiles you ask

if you cant find the error, another pair of eyes are very helpful. ask kid how many times he got to check for me cause it was laughing at me :P
Title: Re: Texture Problem
Post by: Maldrick on February 04, 2018, 02:27:46 PM
I sent @kid1293 my source.  He packed it and it loaded and ran just fine.  I did the same and had the same result.

But running it in the modkit doesn't work for either of us, it seems.  Very strange.

I'm going to try removing the modkit and doing a fresh install.  But beyond that, not sure what else to do. lol
Title: Re: Texture Problem
Post by: RedKetchup on February 04, 2018, 02:35:58 PM
Quote from: Maldrick on February 04, 2018, 02:27:46 PM
I sent @kid1293 my source.  He packed it and it loaded and ran just fine.  I did the same and had the same result.

But running it in the modkit doesn't work for either of us, it seems.  Very strange.

I'm going to try removing the modkit and doing a fresh install.  But beyond that, not sure what else to do. lol


i never never never never run anything in the modkit : i am always always run real LIVE!
Title: Re: Texture Problem
Post by: Maldrick on February 04, 2018, 02:49:12 PM
I'd go crazy!  I'm constantly tweaking and running in the kit.

He suggested some changes to my root rsc and resources that seems to fix it.  Now I've got to figure out what that does so I know how to do it going forward adding to this. lol