Add 4 rotation texture for object.

Started by jabbamonkey, August 06, 2017, 10:59:36 PM

Previous topic - Next topic

jabbamonkey

I created a new nutrient paste dispenser ... The original was a simple image, that easily rotated 90 degrees. My new graphic allows for a special graphic for each 90 degree. Can someone help me create a mod to help implement this 4 image texture?  See the images below.

Also, I noticed that the game "stretches" the image I have drawn. I used the original source image as a template ... are the dimensions of the source image off?

[attachment deleted by admin: too old]

skullywag

A - you only need 1 _side as itll get mirrored.
B - The graphicClass in the xml needs to be graphic_multi to use _front _back and _side.
C - I posted this in the art thread as well. Textures are stretched/shrunk based on the drawsize defined in the xml.

Hope that helps...i have a feeling its gonna make life more annoying for you however.
Skullywag modded to death.
I'd never met an iterator I liked....until Zhentar saved me.
Why Unity5, WHY do you forsake me?

jabbamonkey

#2
For the drawsize defined in the XML ... shouldn't the ratio be the same as the graphic (or shouldn't the graphic be designed to the same ratio that is set in the xml)?  I was using source images as a template, but they are all screwed in the game as well...

So, I noticed that the drawsize for the nutrient dispenser is (3,4). I assume this means 3 blocks across, and 4 blocks down.  So a 3-4 ratio dimensions.  So, an example ratio for the actual image should be 300 pixels by 400 pixels.  Correct?

skullywag

that sounds right yeah, due to it being very solid colours, straight lines etc its not that noticable, unlike your stuff.
Skullywag modded to death.
I'd never met an iterator I liked....until Zhentar saved me.
Why Unity5, WHY do you forsake me?

jamaicancastle

Quote from: jabbamonkey on August 07, 2017, 09:13:48 AM
So, I noticed that the drawsize for the nutrient dispenser is (3,4). I assume this means 3 blocks across, and 4 blocks down.  So a 3-4 ratio dimensions.  So, an example ratio for the actual image should be 300 pixels by 400 pixels.  Correct?
No. For technical reasons, Unity only takes textures with dimensions that are powers of 2 (64, 128, 256, 512, 1024), or so the other threads on art have led me to believe. What I normally do is create a grid that's about 64px for each cell, then resize it appropriately in the final version. So for the nutrient dispenser, I'd create it at 192x256, then resize it to probably 256x256. In essence, this is pre-stretching it so that when it's stretched the other direction in-game, it cancels out. Technically there's a little blurring but it's hardly noticeable at the scale the game is drawn on anyway.

jabbamonkey

I've been playing around with it ... The game accepts any height/width in my game ... so the texture doesn't need to be powers of 2. For example, I originally had the butcher table set to 512 x 256 ... and that looked "squished". So, I resized it to 512 x 225.  I also played around with the spacing around the image (so, it was a 512x225 image, but inside it was a 37 pixel padding).  The image looks good now.