- Home /
Adding Texture image to gameobject
I'm currently making a mock up of a very simple level using Unity's gameObjects (cube's, spheres and cylinders). I'm at a point where I am quite happy with the scene in terms of staging and lighting and the animations are progressing as I had planned, I've even begun to insert ambient sound to make the scene feel a bit more real. What I don't like however is that my objects have no texture to them. Some of them simply need flat colour which I am achieving with a material and changing it's RGB value via scripting when necessary. The other objects just come out the default grey and I don't like them.
As I can't export my 3d models to any other software what is the best way to wrap a texture around my object? It will likely be a repeatable pattern (just to give the object some depth and not look so flat), in which case do I need to worry about the actual image at all or can I make it an arbitrary size and simple have it repeat on the object, or will I notice seams where the image repeats itself?
I know that scale doesn't necessarily represent size well in Unity because it all depends on what your camera is set up as that dictates how things scale in the environment so I'm having a hard time trying to get my head around how to best make an image for it.
Moving ahead I will likely make my objects in Blender (with the help of many tutorials) and UV map that way as it seems more robust but for the sake of the scene I already have built I'd like to retro-fit some textures to two cylinders and a flattened cube, is it as simple as just pulling the image onto the material as a texture?
Answer by DaveA · Dec 11, 2012 at 12:01 AM
" is it as simple as just pulling the image onto the material as a texture?" Yes, but really, you'll want to come up to speed with Blender and its UV mapping next, it's the way to go. In the mean time, also play with the tiling and offset numbers on the material.
Yeah I will definitely swap to Blender for my next scene it was an after thought that I stumbled across once I had the scene basically set up and it's too much of a pain in the bum to go and re-do it all. In the instances of just using cubes and spheres is it still better to export them from blender with a UV mapped texture?
Your answer
Follow this Question
Related Questions
Make a gameobject with textures semitransparent 3 Answers
Can you assign a material to all Items within an Empty Game Object at once? 1 Answer
Can Someone Help Me With Changing Material / Texture On Collision Event 1 Answer
Can see 3D object through itself 0 Answers
How to make emissive maps glow? 2 Answers