Pine Tree

Just to test how fast I can build a low poly model I made a Pine Tree today.

Textures used are my own custom leaf/branch  and the trunk texture came from the wonderful deviantART (http://ftourini.deviantart.com/art/tileable-tree-bark-texture-216962711) by Irene Zeleskou.

Here is the texture that I made for the custom leaf/branch. Please credit me if you use this texture.

LowPolyTree_02

The total build time, roughly 45 minutes.  Below is an image of the result.

PineTree

 

Attached to this post is the model it self. Again please credit me if you use this model.

http://tomrevill.com/files/LowPolyTree.fbx

 

 

Posted in Experiments, Models | 3 Comments

Centre Pivot Tool.

Hi Guys,

In Maya I was wanting to centre a pivot point to an object. Then move the object to the centre of the world.  Unfortunately Maya does not have a one click button for this.

Fortunately for all of you, I did write a piece of code that now does exactly what I have described above.

So here it is. Have fun with this python code!

import maya.cmds as cmds;
centerObjects = cmds.ls(sl=True);
cmds.CenterPivot(centerObjects);
print centerObjects;cmds.move(0,0,0,rpr=True);
Posted in Code, Uncategorized | 1 Comment

Testing in UDK.

Hi Guys.

Over this week I have been experimenting with UDK so I thought I would make a blog post about it and show you my results.

I have been learning about the Emissive lights, SplineLoftActors and the material editor.

Below is my screenshots of my experiments.

Posted in environments, Experiments, Lighthouse Island, Models, Uncategorized, Update, Work In Progress | Leave a comment

Demonstrating Digital Pipelines using GIT – Video Bog

In this video I demonstrate how a git pipeline for Maya can help with collaborative work. This is my first video blog for tomrevill.com.

Video Notes.

Software used:
SourceTree: sourcetreeapp.com
Bitbucket: bitbucket.org
OpenSSH for Windows: sshwindows.sourceforge.net

Installing git on a server tutorial.

http://www.stumiller.me/installing-git-version-control-on-a-shared-hosting-provider/

Git pull to private server command:
git pull https://username@bitbucket.org/username/project.git

Please note this is my first time producing a video blog so there may be errors and I am still learning.

Posted in Experiments, Pipelines, Version Control, Video blog | Leave a comment

Swiss inspired wallpaper

I got bored of my current wallpaper so I decided to make a new wallpaper.

The wallpaper was inspired by Swiss magazine design cover.

So below is what I came up with I have uploaded both the high resolution version and the low resolution.

Crosses_03

Posted in Wallpaper | Leave a comment

Absent with out leave.

At the moment I have been busy work on a few contracts at the moment. But rest assured that I have not forgot this blog. I will be blogging up my next post soon. I also have got a new computer so will hope to be using this to give you more content. The specifications are:

Windows 8 64-bit
Intel Core i7 4770 @ 3.40GHz
8.00GB Dual-Channel DDR3 @ 796MHz
2048MB NVIDIA GeForce GTX 660
Intel HD Graphics 4600
932GB Seagate SATA
HL-DT-ST DVDRAM

I hope the next blog post will be more gaming related.

20130909-222125.jpg

Posted in Update, Website | 1 Comment

Python Rewrite.

Hi All,

As an exercise I thought I would see if I could rewrite the code below from this tutorial http://www.sthurlow.com/python/lesson11/.


def menu(list, question):
    for entry in list:
        print 1 + list.index(entry),
        print ") " + entry

    return input(question) - 1

# running the function
# remember what the backslash does
answer = menu(['A','B','C','D','E','F','H','I'],
'Which letter is your favourite? ')

print 'You picked answer ' + (answer + 1)

and this is the result I got.


Alphlist = ['A','B','C','D','E','F','H','I']
for i in range(len(Alphlist)):
        print i+1, ")",Alphlist[i]
num= int(input('Which letter is your favourite? '))-1
print "Your Favourite letter is:", Alphlist[num]
Posted in Code, Experiments | Leave a comment

Modules in python.

Hi All,

I have just made a neat little Module in Python and I thought I would share this too.

This Module tests a number to see if it is an odd number or a even number.

Importing  the Odd Even Module code below.


#Import the Module.
import OddOrEvenModule
#Import the OddEven Class with in the Module.
OddEvenMachine=OddOrEvenModule.OddEven()
#Imports the debug method/funtion of the Module.
OddEvenMachine.OddEvenDebug()
#Imports the main class method/funtion of the Module.
OddEvenMachine.OddEvenEval()

Odd Even Module code below.


#Defines the class.
class OddEven:
    #Defines the class attributes/variables.
    def __init__(self):
        self.typeNum = int(raw_input("Enter a number: "))
    #Defines the main class method/funtion of the Module. Eval is short for evaluator. 
    def OddEvenEval(self):
        #Checks the number given.
        if self.typeNum % 2 == 0:
            #Prints the result of the number given.
            print self.typeNum, "a is even number."
            if self.typeNum == 42:
                 print "42 is also is the meaning of life!"
        else:
            print self.typeNum, "a is odd number."

    #This is just here to check the Module is working form a read level.
    def OddEvenDebug(self):
        print "Debug Works!"        

See if you can spot a hitchhiker’s guide to the galaxy reference in the code too 🙂

Posted in Code, Experiments | Leave a comment

Python Check Boxes

Hi All,

I am still brushing up on Python and thought I would share another example of some code I have created.

This code creates a cube but only if you check the check box in the User Interface.

Hope this helps in your projects too 🙂


import maya.cmds as cmds

#Creates variable to indecate the check box status. 1=Checked 0=Not Checked. 
cubeNum = 0

#Creates Button funtion. 
def defaultButtonPush(*args):
       #The Print checks if button is pushed and what is the check box status. 
       print "Button is pushed."
       print cubeNum
       #Check box argument finds the status of the variable and determines what to do. 
       #Eather create a cube or display a error dialog box.
       if cubeNum == 1:
        print "Cube Creation suessful"
        cmds.polyCube()
       else:
	 cmds.confirmDialog(t="Error",m="Cube will not be created."+ 'n' + 'Please check the box to create a cube.')

#Creates ui. 
cmds.window( title="Toms Cube maker",wh=(350,250) )
cmds.columnLayout( adjustableColumn=True )
#Creates Button.
cmds.button( label='Execute', command=defaultButtonPush ,align='left' )
#Creates check box. 
#In the onCommand Script (onc) and offCommand Script (ofc) flags all commands must be made in between double quotes.
cmds.checkBox(label='Cube',value=False,align='left',onc="cubeNum = 1", ofc="cubeNum = 0")
cmds.showWindow()
Posted in Code, Experiments | 1 Comment

Python and Mel

Hi All,

I have been busy re learning Python and Mel in Maya.

Below, is a script which makes a material in Maya that has a texture applied to it.


import maya.cmds as cmds
#create a counter and set it to zero
i = 0
#create a shader
shader=cmds.shadingNode("lambert",asShader=True, n='Red')
#a file texture node
file_node=cmds.shadingNode("file",asTexture=True, n = "text_%s" % i)
# defines location where texture is
file = ("textures"+ "/" +"red.jpg")
#a shading group
shading_group = cmds.sets(renderable=True,noSurfaceShader=True,empty=True)
#connect texture to sg surface shader
cmds.setAttr( '%s.fileTextureName' % file_node, file, type = "string")
#connect shader to sg surface shader
cmds.connectAttr('%s.outColor' %shader ,'%s.surfaceShader' %shading_group)
#connect file texture node to shader's color
cmds.connectAttr('%s.outColor' %file_node,'%s.color' %shader)
#increases the counter
i += 1

This code is based on the following reference: http://mayapy.wordpress.com/2011/11/04/create-shaders-through-python/

Posted in Code | 3 Comments