News:

Welcome to World of Banished!

Main Menu

Decorative plants

Started by Voeille, May 21, 2018, 01:05:57 PM

Previous topic - Next topic

0 Members and 3 Guests are viewing this topic.

RedKetchup

just rotating to make "F" variants is useless (if thats what you did) because in game we can just hit "R" or "T" and we can rotate it free.

now for the swing with the wind you will need to learn a new thing :) ask you blender to create a third UV map with blender.
we had a tuto on this where blender modder were explaining how to do it with blender but didnt found the post yet ...

maybe @kid1293  can answer about this



but in your pictures it looks so awesome !!
> > > Support Mods Creation developments with Donations by Paypal  < < <
Click here to Donate by PayPal .

elemental

They look great. A few different sizes would be good as variants.

Discrepancy

Quote from: RedKetchup on May 22, 2018, 06:50:00 PM
now for the swing with the wind you will need to learn a new thing :) ask you blender to create a third UV map with blender.
we had a tuto on this where blender modder were explaining how to do it with blender but didnt found the post yet ...

I think the discussion was over on BlackLiquid website: http://blackliquidsoftware.com/index.php?/topic/1147-moving-with-the-wind/


and great looking ferns @Voeille :)

RedKetchup

Quote from: Discrepancy on May 22, 2018, 08:11:07 PM

I think the discussion was over on BlackLiquid website: http://blackliquidsoftware.com/index.php?/topic/1147-moving-with-the-wind/


and great looking ferns @Voeille :)

oh ya right! this is why i couldnt find it !!
> > > Support Mods Creation developments with Donations by Paypal  < < <
Click here to Donate by PayPal .

Voeille

#34
Thanks! I haven't made F key variants yet, firstly I want the moving, then add a remove button, and then the variants (I'm thinking 3 more, different size and rotation). Later I'll make proper icons and add more plants.

Edit: I never remember to ask – what is the purpose of the AO map exactly? Is it just a shading layer, or does it affect other things like how a model covers with snow? (The fern doesn't but that's probably because I used the Billboard material, and it'll vanish in snow after I do it properly anyway). I haven't seen it in other games I've modded, shading is done directly on the texture.

RedKetchup

it is for controling the shadows on the mesh.

there should be a tuto how to do AO files with blender. (i only know to do it on 3dsmax)
> > > Support Mods Creation developments with Donations by Paypal  < < <
Click here to Donate by PayPal .

Voeille

It seems it also does affect snow, there is a bit less of it near the roots and that is consistent with the AO. I made the AO manually (a simple gradient as you probably saw in the file), because Blender came up with something quite strange with the baking (and it's wrong size anyway, I forgot to set it to a rectangle).



Anyway, I added the UV channels (they are all the same as I want the whole plant to be affected), but I can't use the Billboard material. Not only does it change the colour in autumn and add the animation, but also makes the leaves always face the camera, which looks wrong with this model, as it wasn't designed for that. So, I used the Foliage material instead. It adds a nice delicate animation, but no colours or vanishing. I guess I can't have the autumn change but no facing the camera?

This is how it looks in winter. Sort of OK for this plant, but it'll be less nice with the other plants that have flowers. Still better than the camera thing for a model not designed for it though ;)


Tom Sawyer

That's true. The darker the UV the less snow on it. Your fern model looks really great. Looking at it in blender it is a little poly monster and adding UV increases the size a lot then. For small items I sometimes just add a blank light grey uv image. It already has a nice effect in game and costs almost no space. But that's up to you how detailed or optimized you want it. I think it will not be a problem if not used as auto spawned wild plant and only placed here and there with full control by the player. Also I would think of smaller at least F variants. To me they look a bit unnaturally big. :)

Voeille

Yes I'll definitely add smaller sizes (I'm thinking of making 4 size and rotation variants for each plant; I think it'll be more convenient to have colour variants listed as separate plants in the toolbar than having 20 F-key variations), I just wanted one big for covering larger areas :)

If you think that the fern is a poly monster, what about the tree whose larger variation has over 2500 polys? ;) But yes, they are designed as decorations to be placed manually by the player. Incidentally, what is the recommended poly count for Banished? Of course, the fewer the better is always true, but are there any explicit numbers? For Cities Skylines it's 1000 so I try to only go over that if a model really needs it (like for the tree, it's huge and it was supposed to be lush and detailed, not designed to cover a map in any game, the smaller version is slightly better for it), and for Sims 2 it's 800 per tile. So for example, you'd want your armchair to have 800 polys, but your 2-tile wide sofa counts as fine with 1600.

Tom Sawyer

Haha, this I would call a big poly monster then.^^ As you say it depends very much on the use in game. As a single deco mod for manually placed items I find it ok. As part of a main mod it already can be a mess since the player cannot pick and all these little monsters in summary end up in endless loading time and slow game speed. Where we really have to be careful are crops and wild plants, also trees. Everything that is spawned over the map. In general I think it's an underestimated aspect of modding to keep things small, clean and fast.

We don't have a rule or so and it is hard to make something like that because of the things above. I for myself have some rules like a texture resolution of about 128 px per game tile and 64 in terrain footprints. For buildings a poly count of about 100 per tile is a good number. That's sometimes hard to keep with deco items or plant models. Also and of course poly count is not everything. Some of the materials are slower than others. You can make a very low poly tree with transparent billboard material and it will be slower than a tree with more poly but simple opaque material. Also, there are a lot small things which can be done for optimizing. I may be a puristic freak but it pays off. The north mod with all its stuff and game overhaul has still only 140 MB and loads in a few seconds. :)

Voeille

#40
I've never made a building yet (in general I don't think I've even made 10 models so far, so I'm still in the very beginner stage), but for what I can tell by just looking at things in the game it definitely does seem easier to balance the polys/size ratio than for plants, because there are a lot of cubes and the like, and not the more curved shapes (or a large bunch of planes) like for plants. My main fault with respect to making 'heavy' things is textures – I'm familiar with that as retexturing existing models (especially clothes) was a very common form of modding Sims 2 back in 2007 (and it's still a thing, but less common, mesh edits are more popular for clothes nowadays for all I've seen), so I've learnt a lot since then, and I've grown as a perfectionist for textures – everything needs to be just right even if it involves moving things by one pixel and previewing, there needs to be proper shading, textures need to be seamless where applicable (and using mirroring to make them seamless is a texture crime!), and preferably have a lot of detail. And, to show that detail I can go overboard with texture sizes, I often use larger than recommended so nice details are visible from close up. I know that in Banished the default zoom isn't much, but I personally use the zoom hack and like looking at things closer, so with the ferns I went with 256x512, the original 512x1024 would be definitely too much. We're missing out a lot by not having normal maps in Banished (an example of normal map detailing), but that makes texturing more challenging. My ultimate goal for texturing is to reach complete independence of stock images (everything handmade), but I'm far from that ;) All I can do is some plants (ferns weren't one of them, I used brushes from ObsidianDawn.com).

Voeille

#41
OK I've run into another problem. I want to add a remove button so the player can delete them. I used the files provided by @Tom Sawyer but there's a reference to Dialog/Remove.rsc:removeButton2, which is not in the mod kit resources, so I assume it's custom. I tried to use Dialog/Upgrade.rsc from the mod kit, but then the mod fails to compile, so I guess I need that Remove.rsc file. What should be in it?

Edit: I also have a question for you @RedKetchup : you made a PNG sprite sheet using my icon (thanks!) and you put 7 of them in the image. In the Dialog folder folder there are 8 of them (decorations, empty, food, housing, resources, services, storage, and toolbar). Which one isn't included in the sheet? I would like to make proper icons for each category, in what order would I put them on the sheet, is it alphabetical like they are listen in the folder? Also, how exactly do I place them, right next to each other, with some spacing, or it doesn't matter at all?

Tom Sawyer

That's true. It's easier to keep poly counts low with a building. I think, making good plant models is more challenging in general. I made some crops but not satisfied with their performance in game and want to remake them one day. The remove button is defined by the following code. Makes more sense to copy it here since my file contains a lot of buttons. Just copy this into your own Dialog/Remove.rsc and add a RemoveItemTip to your own string file.

ButtonDescription removeButton : "SharedElements.rsc:borderButton"
{
   int _topPad = 4;
   int _leftPad = 200;
   int _bottomPad = 4;
   Alignment _alignment = TopLeft;
   ElementDescription _content = "imageUpgrade";
   Dialog _toolTipDialog = "ToolTipUpgrade.rsc";
   StringTable _toolTipStringTable = "Dialog/StringTable.rsc:objects";
   String _toolTipText = "RemoveItemTip";
}

ImageDescription imageUpgrade
{
   int _leftPad = 8;
   int _rightPad = 8;
   int _bottomPad = 8;
   int _topPad = 8;
   int _width = 32;
   int _height = 32;
}


Voeille

Thanks, I'll add the code and see if it works :) I wouldn't be surprised if I broke something else though, that happens a lot ;) Reminds me of my fights with pointers in C++. You forget an & somewhere, and the whole thing collapses. Java is much more user friendly by automatically managing all the memory, and in assembly even hello world is quite a challenge ;) No wonder it's not used for complex programming and people settle for C++ for games.

For now a building seems more challenging for me as I've never made one yet, but once I do I'll probably change my mind. Flat-plane based plants seem easy to make, but it's likely to go overboard with polys for a large and dense model.

RedKetchup

#44
Quote from: Voeille on May 23, 2018, 02:02:02 PM
Edit: I also have a question for you @RedKetchup : you made a PNG sprite sheet using my icon (thanks!) and you put 7 of them in the image. In the Dialog folder folder there are 8 of them (decorations, empty, food, housing, resources, services, storage, and toolbar). Which one isn't included in the sheet? I would like to make proper icons for each category, in what order would I put them on the sheet, is it alphabetical like they are listen in the folder? Also, how exactly do I place them, right next to each other, with some spacing, or it doesn't matter at all?

i am so sorry @Voeille  i have absolutely no idea of what you are talking. i didnt put anything of 7 of them of image. i dunno to what you are refering to.
and i dont understand neither the question about how exactly do you place them, place what and where ?



-------------

about your trash icon.

you will need to go in the Resource/Dialog folder and pickup the Upgrade.rsc and copy paste it in your Dialog folder of your mod. and rename it DecorativePlantsUpgrade.rsc
inside you will change a couple of names to reflect your mods:

ButtonDescription upgradeButton : "SharedElements.rsc:borderButton"
{
int _topPad = 4;
int _rightPad = 2;
Alignment _alignment = TopRight;
ElementDescription _content = "imageUpgrade";

Dialog _toolTipDialog = "ToolTipUpgrade.rsc";
StringTable _toolTipStringTable = "UI\Fern1StringTable.rsc";
String _toolTipText = "DecorativePlantsUpgradeTip";

}

ImageDescription imageUpgrade
{
int _leftPad = 4;
int _rightPad = 4;
int _bottomPad = 4;
int _topPad = 4;

int _width = 32;
int _height = 32;
}


you need to add that option in your decorative plant UI of your decorative plant template (Template/Fern1.rsc) and refering the upgrade button to that new file renamed :

{
ObjectType _type = UpgradeUI;
ElementDescription _element = "Dialog/DecorativePlantsUpgrade.rsc:upgradeButton";
String _insertAt = "userButton0";
DialogControllerConfig _config = "upgradeConfig";
}


and at the bottom of your template  (Template/Fern1.rsc) you add the explanation of that UI:


UpgradeUIConfig upgradeConfig
{
ComponentDescription _upgradeTo = "Template/DecorativePlantsTrash.rsc";
}



then you will create that template called : DecorativePlantsTrash.rsc

// layout of the entity
ComponentDescription resource
{
// how often to update
UpdatePriority _updatePriority = Fourth;

// declare types that will be used
Description _descriptions
[
"toolbar",
"map",
"work",
"destroy",
]
}

ToolbarDescription toolbar
{
SpriteSheet _spriteSheet = "UI/Fern1SpriteSheet.rsc";
String _spriteName = "DecorativePlantsTrash";

StringTable _stringTable = "UI/Fern1StringTable.rsc";
String _stringName = "DecorativePlantsTrash";
String _stringNameLwr = "DecorativePlantsTrashLwr";
String _toolTip = "DecorativePlantsTrashTip";

String _statusStrings
[
"CreateOk",
"CreateBlocked",
]

int _group = 1;
}

MapDescription map
{
PathType _pathType = Normal;
bool _addToOverhead = true;
Color _mapColor = 0xFF80694D;
}

WorkDescription work
{
int _defaultWorkers = 1;
}

DestroyDescription destroy { }



then you will add these info in your UI/Fern1SpriteSheet.rsc

{ String _name = "DecorativePlantsTrash"; String _source = "UI/Sprite/DecorativePlantsTrash.png"; }


then you will add these info in your UI/Fern1StringTable.rsc

{ String _name = "DecorativePlantsTrash"; String _text = "Trash"; }
{ String _name = "DecorativePlantsTrashLwr"; String _text = "trash"; }
{ String _name = "DecorativePlantsTrashTip"; String _text = "Trash this plant and remove it."; }
{ String _name = "DecorativePlantsUpgradeTip"; String _text = "Trash this plant and remove it."; }


then you will pickup this icon below in attachment and put it in your UI/Sprite folder
> > > Support Mods Creation developments with Donations by Paypal  < < <
Click here to Donate by PayPal .