i had an idea, after trying to texture a city made by “the beast”(and giving up after the first 10 or 15 buildings), to create a script to automaticaly clip the texture based on the size of the building. eg. if i had a texture 100 stories tall and a building 7.5 blender units tall the script would set the MaxY clipping to .75. Only problem is I don’t know how to program . I understand the basic concepts of programming. I was wondering if someone would be willing to help me create this script?
Block 1: The script needs a block of code to get the object size on the specified axis (in this case the Zaxis)
Block 2: a block of code to clip the texture based on the number gotten by Block 1. (the axis of clipping would be dependant on the axis measured Block 1)
It would also be cool if you could select multiple objects and have the script run on all the objects automaticaly
also mabye even a GUI with buttons to set the axis of clipping.
I wrote a script that Uses an orthographic camera to project UV coords onto a building- You set a property on the camera for what Image to use, then it will generate automatic UV coords for all faces on the selected meshes that use this face.
Its been extreamly usefull for applying tiling textures to buildings. Modifying geometry distorts UV;s but just run the script and there all recalculated.
You can even scale the camera to scale the mapping on the x/y axis.
that would work…but that is too much work
I was thinking that I would create a city out of enlongated cubes using the beast.when you scale an object the texture stretches and doesn’t look realto fix that I would then use the script to set the clipping of the texture.(Not UV texture) Is that possible?
the script would be as simple as this…
(I don’t know python syntax so it may not be gramaticaly(python grammar, that is) correct.)
Your script sounds extemely usefull Cambo. Do you have a
link for it. I must have missed it. Ive been strugeling adding
buildings from photo graphs with no real plans. Possably
it could be used to help in this.
Thanks cambo, the script works well.
It isent what I expected, but I bet
the guys in the game engine forum
who made the face to face anim would
be able to use it.
I’m not a coder and I was wondering if my proposal for the auto clip texture script is even possible to create?
if so would someone be willing to create it for me?
it would need to:
create a new material
create a texture
set the texture to image
set the mapping to cube
load the image
set the crop value to the hight of the building
And (If possible) move to the next selected building and repeat the process untill all the buildings have the new texture.
I appended your script to another .blend file to look at the python script. I really dont need the uvmapping as I am just applying textures to enlongated cubes. this is for an independant film for which I am doing some 3D animation.
Cambo,
would you be able to create the script I proposed for me? this would be invaluble to me. I would use it in my animation and also I want to see how it would be created in python.
Thanks!
CGuy