Author Topic: Decorative plants  (Read 3015 times)

0 Members and 2 Guests are viewing this topic.

Offline RedKetchup

  • Champion
  • Banished Expert
  • *****
  • Posts: 9619
  • Country: ca
Re: Decorative plants
« Reply #30 on: May 22, 2018, 06:50:00 PM »
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 .

Offline elemental

  • Architect
  • *****
  • Posts: 661
  • Country: au
Re: Decorative plants
« Reply #31 on: May 22, 2018, 07:38:26 PM »
They look great. A few different sizes would be good as variants.

Offline Discrepancy

  • Modders
  • Architect
  • *****
  • Posts: 913
  • Country: au
Re: Decorative plants
« Reply #32 on: May 22, 2018, 08:11:07 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 :)

Offline RedKetchup

  • Champion
  • Banished Expert
  • *****
  • Posts: 9619
  • Country: ca
Re: Decorative plants
« Reply #33 on: May 22, 2018, 09:23:41 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 .

Offline Voeille

  • Trader
  • ****
  • Posts: 205
  • Country: 00
Re: Decorative plants
« Reply #34 on: May 22, 2018, 10:04:51 PM »
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.
« Last Edit: May 22, 2018, 10:10:46 PM by Voeille »

Offline RedKetchup

  • Champion
  • Banished Expert
  • *****
  • Posts: 9619
  • Country: ca
Re: Decorative plants
« Reply #35 on: May 23, 2018, 12:25:55 AM »
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 .

Offline Voeille

  • Trader
  • ****
  • Posts: 205
  • Country: 00
Re: Decorative plants
« Reply #36 on: May 23, 2018, 12:45:08 AM »
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).

https://i.imgur.com/Sgh2MRl.png
Decorative plants


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 ;)

https://i.imgur.com/fgws7hq.png
Decorative plants

Offline Tom Sawyer

  • Modders
  • Architect
  • *****
  • Posts: 895
  • Country: is
Re: Decorative plants
« Reply #37 on: May 23, 2018, 01:06:31 AM »
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. :)

Offline Voeille

  • Trader
  • ****
  • Posts: 205
  • Country: 00
Re: Decorative plants
« Reply #38 on: May 23, 2018, 01:24:36 AM »
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.

Offline Tom Sawyer

  • Modders
  • Architect
  • *****
  • Posts: 895
  • Country: is
Re: Decorative plants
« Reply #39 on: May 23, 2018, 02:04:48 AM »
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. :)

Offline Voeille

  • Trader
  • ****
  • Posts: 205
  • Country: 00
Re: Decorative plants
« Reply #40 on: May 23, 2018, 02:42:39 AM »
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).
« Last Edit: May 23, 2018, 02:46:52 AM by Voeille »

Offline Voeille

  • Trader
  • ****
  • Posts: 205
  • Country: 00
Re: Decorative plants
« Reply #41 on: May 23, 2018, 02:02:02 PM »
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?
« Last Edit: May 23, 2018, 02:26:47 PM by Voeille »

Offline Tom Sawyer

  • Modders
  • Architect
  • *****
  • Posts: 895
  • Country: is
Re: Decorative plants
« Reply #42 on: May 23, 2018, 02:44:29 PM »
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;
}


Offline Voeille

  • Trader
  • ****
  • Posts: 205
  • Country: 00
Re: Decorative plants
« Reply #43 on: May 23, 2018, 02:58:53 PM »
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.

Offline RedKetchup

  • Champion
  • Banished Expert
  • *****
  • Posts: 9619
  • Country: ca
Re: Decorative plants
« Reply #44 on: May 23, 2018, 04:32:23 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:
Code: [Select]
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 :
Code: [Select]
{
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:
Code: [Select]

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


then you will create that template called : DecorativePlantsTrash.rsc
Code: [Select]
// 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
Code: [Select]
{ String _name = "DecorativePlantsTrash"; String _source = "UI/Sprite/DecorativePlantsTrash.png"; }

then you will add these info in your UI/Fern1StringTable.rsc
Code: [Select]
{ 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
« Last Edit: May 23, 2018, 04:35:58 PM by RedKetchup »
> > > Support Mods Creation developments with Donations by Paypal  < < <
Click here to Donate by PayPal .