Author Topic: No snow on semi transparant plants  (Read 548 times)

0 Members and 1 Guest are viewing this topic.

Offline embx61

  • Modders
  • Architect
  • *****
  • Posts: 629
  • Always on my mind, Forever in my heart
Re: No snow on semi transparant plants
« Reply #15 on: April 09, 2017, 02:46:03 PM »
I shall test if it compiles and show up properly in game. But I think the game engine nor using opacity maps and maybe the pkm will be bigger because of the added maps?

I shall compile my Herbalist and test to see.

Yeah deleting stuff in maps is can be a pain. I use the Slate Editor instead of Compact and delete ant maps assigned to the Opacity.

Then save and that works.

I just did a test. I saved and then exported to FBX. All went fine.
Then I compiled a new version and that went fine too :)
The PKM is exactly the size as the older one :)

Moved it to my Banished folder overwriting the older one and started Banished. No crash and the building can be placed.
I think the compiler just skips the opacity maps all together :)
My beloved Kathy
As you were you will always be
Treasured forever in my memory

Offline embx61

  • Modders
  • Architect
  • *****
  • Posts: 629
  • Always on my mind, Forever in my heart
Re: No snow on semi transparant plants
« Reply #16 on: April 09, 2017, 03:12:17 PM »
I got the plants moving also :)
Thanks Kid and Red :)

I did not know about that 0.0 because I see nothing about that in UV Editor. Is 0.0 the center of that square?
I just lucked out there I guess.

What I did is the following.

I selected all my leaves and branches from the plants (4different plants and with their own textures but it does not seem to care)
Then Add Unwrap UV Modifier and select the channel spinner in channel rollout and move to 2. I get a warning and select Move.
Then click the spinner to 3, same warning and selct move.

I did not selectected a texture but left the blocked one.
I did not unwrap or change anything either and just collapsed the stack.

Saved and exported to FBX.

Added the code from Necora on all 4 plant files and compiled.

Placed the building in game and they sway just a tiny bit.
Probably because they are rather small and it is hard to see, but I see them moving a bit :)

PKM size increased just a little bit but not much.

I learned yet again something, thanks guys :)

One question more:
Can the movement be regulated in some way?
My beloved Kathy
As you were you will always be
Treasured forever in my memory

Offline RedKetchup

  • Champion
  • Banished Expert
  • *****
  • Posts: 6511
Re: No snow on semi transparant plants
« Reply #17 on: April 09, 2017, 03:26:33 PM »
bah usually we send it at the very bottom left corner of your chess map. that what is supposed the 0,0
> > > Support Mods Creation developments with Paypal Donations < < <
Click here to PayPal Donate.

Offline embx61

  • Modders
  • Architect
  • *****
  • Posts: 629
  • Always on my mind, Forever in my heart
Re: No snow on semi transparant plants
« Reply #18 on: April 09, 2017, 03:35:20 PM »
I was lucking out on that one then :)

All my textures maps lower left corners where already touching the lower left corner of the square in the UVW Editor.

Thanks again guys :)

I hope that it will be easier to make foliage in Max with transparency visible in Max Red :)
 
My beloved Kathy
As you were you will always be
Treasured forever in my memory

Offline RedKetchup

  • Champion
  • Banished Expert
  • *****
  • Posts: 6511
Re: No snow on semi transparant plants
« Reply #19 on: April 09, 2017, 04:52:29 PM »
yeah i ll go back to do something in 3dsmax... i ll check what you found and see .....
seems complicated though as i read ^^
> > > Support Mods Creation developments with Paypal Donations < < <
Click here to PayPal Donate.

Offline Necora

  • Modders
  • Trader
  • *****
  • Posts: 398
Re: No snow on semi transparant plants
« Reply #20 on: April 09, 2017, 05:14:38 PM »
@embx61 the UV map is a 2 dimensional lay out of your faces etc., so the grid acts like a graph with an x and y axis. 0'0 is basically 0 x * 0 y, so the bottom left corner of the grid. Obviously, you can go -x and -y. So once you have unwrapped your plants, in the UV editor move the unwrapped coordinates so that 0'0 is the center. Now, the further a point is away from 0'0, the more it will move in the wind (supposedly). If you then scale or shrink your UV coordinates, you can control the amount of movement. With the Foliage Material this is good because it only controls the movement and the leaves/flowers are ever green. Beware if you are using the billboard material for things that appear in spring and disappear in fall though, because it also controls the amount that these grow each season. So the larger you make them, the more they enlarge, and can often result in rather ugly plants if you do not shrink your faces in the model accordingly. Also, different materials have different amounts of sway it seems, I think the evergreen and normal billboard materials make things sway more than the foliage material, but also do some funky things with faces always facing the camera so don't always look good on certain plants. I've played around with them a bit, but not enough to be sure of the results I just know that evergreen billboard looked pants on an evergreen tree where as foliage material comes out just as I wanted it to. One day with some free time I'll have a good look into them and see what they all actually do. 

If you want to know more, red and I had a rather lengthy exploration into tree making over at the Black Liquid site some time ago.

http://blackliquidsoftware.com/index.php?/topic/1147-moving-with-the-wind/

Offline embx61

  • Modders
  • Architect
  • *****
  • Posts: 629
  • Always on my mind, Forever in my heart
Re: No snow on semi transparant plants
« Reply #21 on: April 09, 2017, 08:06:06 PM »
Thanks Necora

So I can move the selected maps out of the square? -y -x

My guess is that the game sees the different channels in a different way depending on the UV channels.

So Channel 1 Diffuse (That is how textures applied to the mesh are shown in the game
Channel 2 AO Shadow, Ambient Occlusion
Channel 3 movement.

It start to maker sense now, that is why Automatic unwrap for AO most of the times works without screwing your UV channel 1 map.

Each channel is just an separate part in the game engine.

Do I understand this right?
My beloved Kathy
As you were you will always be
Treasured forever in my memory

Offline embx61

  • Modders
  • Architect
  • *****
  • Posts: 629
  • Always on my mind, Forever in my heart
Re: No snow on semi transparant plants
« Reply #22 on: April 09, 2017, 08:58:01 PM »
Quote
yeah i ll go back to do something in 3dsmax... i ll check what you found and see .....
seems complicated though as i read ^^

You mean to put the texture in the Opacity part of the maps rollout?

Just select a round circle in you material editor at the top with the material and your alpha texture of your plant in it. I don't know how they call those circles.
Then open the maps rollout almost at the bottom and click the button next to Opacity and browse and add that same texture in there.
It is just the same as adding a texture to diffuse.

set to Alpha Source to Alpha and Mono Channel Output to Alpha.

Then click in the menu Material, it opens up and nearly at the bottom you see Show Material in Viewport as >
If you hoover over that one it opens up a menu to the right. Just click in that menu on Shaded Materials with Maps and that is all.

My beloved Kathy
As you were you will always be
Treasured forever in my memory

Offline Necora

  • Modders
  • Trader
  • *****
  • Posts: 398
Re: No snow on semi transparant plants
« Reply #23 on: April 10, 2017, 04:59:23 AM »
@embx61 that grid, I believe, is more of a visual reference for an empty UV map. Your UV map can be any size you want it to be, and your unwrapped coordinates also can be any size and position you want them to be. I don't think I have yet found a limit (beyond what I actually need). You can see this if you try loading an image into the UV viewer, you will find that the grid becomes the image, and is what ever size the image is, such as 1024*1024, or 1024*64.

http://blackliquidsoftware.com/uploads/monthly_2017_03/Channels_Pic03.thumb.jpg.0582f32a7dc26ec668078011bb7f4b0f.jpg
No snow on semi transparant plants


You can then scale your coordinates to many, many times the size of that image to get a repetitive texturing of the same image. When you select all faces, they frankly become a mess. Here is an example of one of my buildings, you can't even see the grid beneath all those coordinates!

http://blackliquidsoftware.com/uploads/monthly_2017_03/Channels_Pic02.thumb.jpg.1578f3d515bfc0f569ac4c7f96536fa6.jpg
No snow on semi transparant plants


Attached is a example of a tree. What I did is look down on the tree from the top, select all faces with the leaves, then select blender's 'Project from View' unwrap option. I then move the whole resulting map over the 0'0 point of the grid, and scale it from there. Any thing you don't want to move in the wind, you unwrap them to the same channel 3, but scale them down to nothing. In blender, if you hit 'S' then '0' then 'Return' it will put all of the coordinates into the same place, just 1 dot. Move this to 0'0 (or as close as possible).


Offline Necora

  • Modders
  • Trader
  • *****
  • Posts: 398
Re: No snow on semi transparant plants
« Reply #24 on: April 10, 2017, 05:03:53 AM »
@embx61 I forgot the last bit, yes, each UV channel is completely independent of the others so you can do what ever you want to channel 2 without impacting channel 1 etc. In 3dsmax, you can have 99 UV channels per face! In blender, it might even be infinite because you can label them what ever you want. Obviously, in Banished we only need 3 as the game only reads 3 - as you said the textures (1), AO (2), and plant specific movement (3).

Also, for banished, it is the order that is important not the name. In 3dsmax, I don't think this matters because I think you can only have channel 1, 2, 3, etc., but in Blender you can rename each channel to what ever you want. So you can call them 'Texture UV', 'AO UV', or 'Plant UV' if you wanted to, but as long as they are in the correct order of 1,2,3 then Banished will read them no matter what they are called.

Offline embx61

  • Modders
  • Architect
  • *****
  • Posts: 629
  • Always on my mind, Forever in my heart
Re: No snow on semi transparant plants
« Reply #25 on: April 10, 2017, 05:07:39 AM »
Thanks a lot Necora

I did not know that you get beyond the borders of the UV map unless you used tiled textures.

I use max but am pretty sure it is possible to use some short cuts.
Google has to be my friend here :)

Very helpful information, thanks  :)
My beloved Kathy
As you were you will always be
Treasured forever in my memory