Posts Tagged ‘TV’

Vue Stereo Image Camera Creation Script

Sunday, August 16th, 2009

This python script creates a pair of cameras for rendering stereo images in Vue. It’s pretty easy to do without the script but this just speeds things up a bit. Christina has two tutorials about making stereo camera’s on her web site. Its a basic solution that doesn’t generate an animated camera and it won’t work with cameras that aren’t flat and level. Originally created after a request from Jim Coe

Download: Vue Stereo Camera Script (3k Zip Archive)

Python Code


#******************************************************
# Creates a pair of cameras in a vue scene for
# rendering stereo position images
#
# - vuestereocamera.py
# - By Mark Caldwell
# - Version 0.1
# - 3rd September 2007
# - Copyright Mark Caldwell 2007
# - Tested with Vue 6.5 Infinite
#
# How to use in 3 easy steps
#
# 1. Download this file onto your computer
#
# 2. Position a camera where you want to render a
#    stereo image for and make sure it's your selected
#    camera
#
# 3. Then run script and wait for it to work
#    To run it go to Python -> Run Python Script
#    Then locate the file on your computer
#
#******************************************************

#------------------------------------------------------
# Get Input and Test Value is a positive floating point
#------------------------------------------------------

def TestValAngle (messagetxt,titletxt,default):
    hit=-2
    val=-1

    while hit<0:
        try:
            if float(val)>0:
                hit=1;
            elif hit==-2:
                val=Prompt (messagetxt,default,true,titletxt)
                hit=-1
            else:
                val=Prompt ("Error: Value must an positive number\n\n"+messagetxt,val,true,titletxt)
        except:
            hit=-1
            val=Prompt ("Error: Value must an positive number\n\n"+messagetxt,val,true,titletxt)

    return float(val)

#------------------------------------------------------
# Convert Degrees to Radians
#------------------------------------------------------

def degtorad(deg):
    rad=deg*(math.pi/180)
    return rad

#--------------------------------------------
# Start of Main Code
#--------------------------------------------

import math

separation=TestValAngle ('Eye Separation','Eye Separation','6.5')

camX=StoreCamera  ()

SwitchCamera (camX)

SelectByType(VuePython.VUEBasicObject.VOT_Camera)
cam = GetSelectedObjectByIndex(0)

pos=cam.Position()
rot=cam.GetRotationAngles()

y=(math.sin(degtorad(rot[2]))*separation)+pos[1]
x=(math.cos(degtorad(rot[2]))*separation)+pos[0]

cam.SetPosition(x,y,pos[2])

#----------------------------------------------
# End of Script
#----------------------------------------------    

Tags: , , , , , , ,
Posted in Uncategorized | Comments Off


Vue EcoRotate Python Script

Friday, August 14th, 2009

This script for Vue Infinite and xStream allows all the objects / instances in an EcoSystem to point in a direction. It also allows a a bit of variation to be included in the rotation.

Download: EcoRotate (3k Zip Archive)

Python Code

#***********************************************************************
# Set all instances in an EcoSystem to point in a given direction
# - EcoRotate.py
# -
# - By Mark Caldwell
# - Version 0.2
# - 25th August 2007
# - Checked with Vue 6.5 Infinite
#
# How to use in 4 easy steps
# 1. Select an object with a populated EcoSystem
#
# 2. Run this script
#
# 3. Enter the values requested by the script
#
# 4. Wait for the script to work
#
#***********************************************************************

#----------------------------------------------------
# Get Input and Test Value for value 0-360 for Angles
#----------------------------------------------------

def TestValAngle (messagetxt,titletxt,default):
    hit=-2
    val=-1

    while hit<0:
        try:
            if int(val) in range (0,360):
                hit=1;
            elif hit==-2:
                val=Prompt (messagetxt,default,true,titletxt)
                hit=-1
            else:
                val=Prompt ("Error: Value must be an integer between 0 and 360\n\n"+messagetxt,val,true,titletxt)
        except:
            hit=-1
            val=Prompt ("Error: Value must be an integer between 0 and 360\n\n"+messagetxt,val,true,titletxt)

    return float(val)

#--------------------------------------------
# Get Input and Test Value for valuse 0 or 1
#--------------------------------------------

def TestValZO (messagetxt,titletxt,default):
    hit=-2
    val=-1

    while hit<0:
        try:
            if int(val) in range (0,2):
                hit=1;
            elif hit==-2:
                val=Prompt (messagetxt,default,true,titletxt)
                hit=-1
            else:
                val=Prompt ("Error: Value must be either 0 or 1\n\n"+messagetxt,val,true,titletxt)
        except:
            hit=-1
            val=-3

    return val

#--------------------------------------------
# Start of Main Code
#--------------------------------------------

import random

#--------------------------------------------------------------------------
# Test the user has a scene loaded
#--------------------------------------------------------------------------

if TestLoaded():

#--------------------------------------------------------------------------
# Test the user has 1 object selected with an Eco System on it
#--------------------------------------------------------------------------

    numselected=CountSelectedObjects()

    if numselected>1:
        message="Please select only one object."
    elif numselected<1:
        message="Please select an object."
    else:

        #--------------------------------------------------------------------------
        # Get User values for rotation required, which to rotate and randomness
        #--------------------------------------------------------------------------

        xon=TestValZO ('Rotate on X axis? (Enter 0 for yes and 1 for no)','Rotate on X?','0') 

        if xon=="1":
            rx=TestValAngle ('Rotate to X (0 to 360 degrees)','X Rotation','0')
            rxv=TestValAngle ('Variation of Rotation to X (0 to 360 degrees)','X Rotation Variation','0')

        yon=TestValZO ('Rotate on Y axis? (Enter 0 for yes and 1 for no)','Rotate on Y?','0') # Rotate y (set to 1 to change 0 to leave alone)

        if yon=="1":
            ry=TestValAngle ('Rotate to Y (0 to 360 degrees)','Y Rotation','0')
            ryv=TestValAngle ('Variation of Rotation to Y (0 to 360 degrees)','Y Rotation Variation','0')

        zon=TestValZO ('Rotate on Z axis? (Enter 0 for yes and 1 for no)','Rotate on Z?','0') # Rotate z (set to 1 to change 0 to leave alone)

        if zon=="1":
            rz=TestValAngle ('Rotate to Z (0 to 360 degrees)','Z Rotation','0')
            rzv=TestValAngle ('Variation of Rotation to Z (0 to 360 degrees)','Z Rotation Variation','0')

#--------------------------------------------------------------------------
#Set Up a Few Variables
#--------------------------------------------------------------------------

        bObject=GetSelectedObjectByIndex(0)     # Get first selected object
        Eco = GetEcosystemOnObject(bObject)     # Get EcoSystem on first selected

        objlist=[bObject]

        if Eco==None:
            message="Please select an object with an EcoSystem material applied to it."
        elif bObject.IsLocked():                # Check object isn't locked
            message="Please select an object that isn't locked."
        else:
            ecocount=Eco.GetInstanceCount ()    # Count number of instances in EcoSystem

            if ecocount==0:
                message="Please select an EcoSystem that has been populated."
            else:

#--------------------------------------------------------------------------
# Rotate EcoObjects
#--------------------------------------------------------------------------

                for i in range(0,ecocount):
                   currentrotation=Eco.GetInstanceRotation  (i)

                   if xon!="1":
                       rix=currentrotation[0]
                   else:
                       rix=rx+random.uniform(-rxv,rxv)

                   if yon!="1":
                       riy=currentrotation[1]
                   else:
                       riy=ry+random.uniform(-ryv,ryv)

                   if zon!="1":
                       riz=currentrotation[2]
                   else:
                       riz=rz+random.uniform(-rzv,rzv)

                   Eco.SetInstanceRotation(i,rix,riy,riz)

                message="Eco Rotation Success"
else:
    message="No Scene Loaded"

Message(message)    # Display message

#--------------------------------------------------------------------------
# End of Script
#------------------------------------------------------------------------

Tags: , , , , , ,
Posted in Uncategorized | Comments Off


Vue EcoSystem Vertical Scatter

Thursday, August 13th, 2009

This python script vertically scatters the objects in a Vue EcoSystem by a random amount and works with Vue Infinite and xStream.

Download: Vue EcoSystem Vertical Scatter Script (3k Zip Archive)

Python Code – Vue EcoSystem Vertical Scatter Script


#***********************************************************************
# Set all instances in an EcoSystem to have random heights
# - EcoVerticalScatter.py
# -
# - By Mark Caldwell
# - Version 0.1
# - 5th September 2007
# - Checked with Vue 6.5 Infinite
#
# How to use in 4 easy steps
# 1. Select an object with a populated EcoSystem
#
# 2. Run this script
#
# 3. Enter the values requested by the script
#
# 4. Wait for the script to work
#
#***********************************************************************
#------------------------------------------------------
# Get Input and Test Value is a positive floating point
#------------------------------------------------------

def TestVal (messagetxt,titletxt,default):
    hit=-2
    val=-1

    while hit<0:
        try:
            if float(val)>=0:
                hit=1;
            elif hit==-2:
                val=Prompt (messagetxt,default,true,titletxt)
                hit=-1
            else:
                val=Prompt ("Error: Value must an positive number\n\n"+messagetxt,val,true,titletxt)
        except:
            hit=-1
            val=Prompt ("Error: Value must an positive number\n\n"+messagetxt,val,true,titletxt)

    return float(val)

#--------------------------------------------
# Start of Main Code
#--------------------------------------------

import random

#--------------------------------------------------------------------------
# Test the user has a scene loaded
#--------------------------------------------------------------------------

if TestLoaded():

#--------------------------------------------------------------------------
# Test the user has 1 object selected with an Eco System on it
#--------------------------------------------------------------------------

    numselected=CountSelectedObjects()

    if numselected>1:
        message="Please select only one object."
    elif numselected<1:
        message="Please select an object."
    else:

        #--------------------------------------------------------------------------
        # Get User values for rotation required, which to rotate and randomness
        #--------------------------------------------------------------------------

        heightup=TestVal ('Maximum Z Increase','Maximum Z Increase','100')#
        heightdown=TestVal ('Maximum Z Decrease','Maximum Z Decrease','0')

#--------------------------------------------------------------------------
#Set Up a Few Variables
#--------------------------------------------------------------------------

        bObject=GetSelectedObjectByIndex(0)     # Get first selected object
        Eco = GetEcosystemOnObject(bObject)     # Get EcoSystem on first selected

        objlist=[bObject]

        if Eco==None:
            message="Please select an object with an EcoSystem material applied to it."
        elif bObject.IsLocked():                # Check object isn't locked
            message="Please select an object that isn't locked."
        else:
            ecocount=Eco.GetInstanceCount ()    # Count number of instances in EcoSystem

            if ecocount==0:
                message="Please select an EcoSystem that has been populated."
            else:

#--------------------------------------------------------------------------
# Rotate EcoObjects
#--------------------------------------------------------------------------

                for i in range(0,ecocount):
                   currentposition=Eco.GetInstancePosition  (i)

                   x=currentposition[0]
                   y=currentposition[1]
                   z=currentposition[2]+random.uniform((-heightdown),heightup)

                   Eco.SetInstancePosition(i,x,y,z)

                message="Eco Vertical Scatter Complete"
else:
    message="No Scene Loaded"

Refresh()

Message(message)    # Display message

#--------------------------------------------------------------------------
# End of Script
#------------------------------------------------------------------------ 

Tags: , , , , , , ,
Posted in Uncategorized | Comments Off


Twitter Weekly Updates for 2009-08-02

Saturday, August 1st, 2009

Tags: , , , , , , , , , , ,
Posted in Twitter | No Comments »


It’s Trek Jim – Just as we Know It

Sunday, May 10th, 2009

But maybe there was a twist of something in the Romulan Ale.

I was pretty happy with J.J. Abrams take on Mission Impossible so I had high hopes for the new Star Trek film. I think I can safely say it didn’t disappoint. The cast played the characters rather than doing impressions of the original actors playing the characters. The effects were impressive. There were lots of nice touches for the fans without making it impenetrable for anyone who hasn’t watched all the gazillian hours of TV series and films plus read the various technical manuals. The plot made sense, which is always a plus point, even though it involved time travel.

It’s late so I’m going to leave it at that. Excellent film.

Update: Dark Dwarf has posted his impressions of Star Trek.

Tags: , ,
Posted in Film, Review | No Comments »


Sky Filter

Friday, March 27th, 2009

My first Vue Python script. Not exactly earth shattering as all it does is let you apply a colour filter to the sky or make the sky a solid block of one colour.

Note: This script does not work with Vue 6 spectral atmospheres.

Sky Filter 0.1 (1k Zip Archive)

Python Code



#**********************************************
# Simple Sky Colour Filter
# - skyfilter.py
# - Simple Colour Modification of Sky
# - By Mark Caldwell
# - Version 0.1
# - 2nd March 2006
# - Checked with Vue 5 Infinite Version 5.11 and Vue 6 Infinite Pre Release
# - Note this script will not affect Vue6 Spectral Atmospheres
#**********************************************

#**********************************************
#
# How to Use Simple Sky Colour Filter
# -----------------------------------
#
# Save this Python script onto your computer
#
# Go To Python -> Run Python Scripts
#
# Locate skyfilter.py
#
# Enter values requested
#
# Render scene to see effect
#
#**********************************************

#--------------------------------------------
# Get Input and Test Value for valuse 0-255
#--------------------------------------------

def TestVal (messagetxt,titletxt,default):
    hit=-2
    val=-1

    while hit<0:
        try:
            if int(val) in range (0,256):
                hit=1;
            elif hit==-2:
                val=Prompt (messagetxt,default,true,titletxt)
                hit=-1
            else:
                val=Prompt ("Error: Value must be an integer between 0 and 255\n\n"+messagetxt,val,true,titletxt)
        except:
            hit=-1
            val=Prompt ("Error: Value must be an integer between 0 and 255\n\n"+messagetxt,val,true,titletxt)

    return val

#--------------------------------------------
# Get Input and Test Value for valuse 0 or 1
#--------------------------------------------

def TestValZO (messagetxt,titletxt,default):
    hit=-2
    val=-1

    while hit<0:
        try:
            if int(val) in range (0,2):
                hit=1;
            elif hit==-2:
                val=Prompt (messagetxt,default,true,titletxt)
                hit=-1
            else:
                val=Prompt ("Error: Value must be either 0 or 1\n\n"+messagetxt,val,true,titletxt)
        except:
            hit=-1
            val=-3

    return val

#-------------------------------------
# Create Sky Callback Function
#-------------------------------------

def SkyFilterCallback(x_pos, y_pos, z_pos, x_dir, y_dir, z_dir):
    return (int(red),int(green),int(blue),int(behind),float(trans))

#------------------------------------
# Ininitialise
#------------------------------------

red=TestVal ('Enter the Red Sky Filter Value (0-255)','Select Red Value','0')
green=TestVal ('Enter the Green Sky Filter Value (0-255)','Select Green Value','0')
blue=TestVal ('Enter the Blue Sky Filter Value (0-255)','Select Blue Value','0')
trans=TestVal ('Enter the Transparancy Value (0-255)','Select Transparancy Value','0')
trans=float(trans)/255
behind=TestValZO ('Enter 0 for in front of clouds\nEnter 1 for behind clouds','Filter Position','1')

SetSkyFilterCallback  (  SkyFilterCallback  ) 

Message("Simple Sky Colour Filter")

Tags: , , , ,
Posted in Uncategorized | No Comments »


Eco Spray

Friday, March 27th, 2009

This python script coats the outside of an object with an EcoSystem. It won’t cover all faces because of the way it works. It will cover a sphere, cube, cone but won’t cover all of a torus.

Eco Spray 0.1 (3k Zip Archive)

Python Code

#******************************************************
# Spray an EcoSystem onto an object
#
# - ecospray.py
# - By Mark Caldwell
# - Version 0.1
# - 15th September 2006
# - Tested with Vue 5 Infinite 5.10 and Vue 6 Infinite Pre Release
# - http://www.impworks.co.uk/
#
# How to use in 3 easy steps
#
# 1. Download this file onto your computer
#
# 3. Select an object with a populated EcoSystem applied
#
# 4. Then run script and enter values when asked
#    To run it go to Python -> Run Python Script
#    Then locate the file on your computer
#
#******************************************************

#--------------------------------------------
# Get Input and Test Value for values 0-10000
#--------------------------------------------

def TestVal (messagetxt,titletxt,default):
    hit=-2
    val=-1

    while hit<0:
        try:
            if int(val) in range (0,10000):
                hit=1;
            elif hit==-2:
                val=Prompt (messagetxt,default,true,titletxt)
                hit=-1
            else:
                val=Prompt ("Error: Value must be an integer between 0 and 10000\n\n"+messagetxt,val,true,titletxt)
        except:
            hit=-1
            val=Prompt ("Error: Value must be an integer between 0 and 10000\n\n"+messagetxt,val,true,titletxt)

    return val

#--------------------------------------------
# Set up Random Numbers
#--------------------------------------------

import random
ran = random.Random()

#----------------------------------------------
# Configuration: Get User Input
#----------------------------------------------

number_instances=TestVal ('Maximum Number of Instances to use (0-10000)','Select Maximum Instance','0')

#--------------------------------------------------------------------------
# Main
#--------------------------------------------------------------------------

if TestLoaded():            # Test user has a scene loaded

#--------------------------------------------------------------------------
# Test the user has 1 object selected with an Eco System on it
#--------------------------------------------------------------------------

    numselected=CountSelectedObjects()

    if numselected>1:
        message="Please select only one object."
    elif numselected<1:
        message="Please select an object."
    else:

#--------------------------------------------------------------------------
#Set Up a Few Variables
#--------------------------------------------------------------------------

        obj=GetSelectedObjectByIndex(0)     # Get selected object
        mat=obj.Material(0)                 # Get material on selected object
        Eco = GetEcosystemOnObject(obj)     # Get EcoSystem on first selected

        if Eco==None:                       # Check object has an EcoSystem Material
            message="Please select an object with an EcoSystem material applied to it."
        elif obj.IsLocked():                # Check object isn't locked
            message="Please select an object that isn't locked."
        else:

#--------------------------------------------------------------------------------
# Find out how many different objects can be used as instances for this EcoSystem
#--------------------------------------------------------------------------------     

            newinst=0
            instcount=0
            while newinst==0:
                ret=Eco.AddInstance(instcount)
                if ret==-1:
                    newinst=1
                else:
                    instcount=instcount+1
            instcount=instcount-1

#--------------------------------------------------------------------------
# Coat
#--------------------------------------------------------------------------

            Eco.ClearInstances  ()         # Clear all instances from Eco
            obj2=AddCube()
            obj2.Resize(0.1)
            pos=obj.Position()
            rot=obj.GetRotationAngles()
            obj.SetPivotPosition((pos[0]),(pos[1]),(pos[2]))
            obj2.SetPivotPosition((pos[0]),(pos[1]),(pos[2]))

            # Now apply instances

            for i in range(0,int(number_instances)):
                x=random.uniform(0,360)
                y=random.uniform(0,360)
                z=random.uniform(0,360)
                obj2.SetPosition(pos[0],pos[1],(pos[2]+1100))
                obj.Rotate(x,y,z)
                hitobj=GetFirstHitObject ((pos[0],pos[1],(pos[2]+1000)),(0,0,-1))
                SelectOnly(hitobj)
                if obj.IsSelected():
                    SelectOnly(obj2)
                    Drop()
                    pos2=obj2.Position()
                    instno=random.randint(0,instcount)
                    inst=Eco.AddInstance(instno)
                    Eco.SetInstancePosition  (inst,pos2[0],pos2[1],pos2[2])
            obj.SetRotationAngles(rot[0],rot[1],rot[2])
            SelectOnly(obj2)
            Delete()

            message="Coating Completed. "+str(Eco.GetInstanceCount () )+" instances used."

else:
    message="No Scene Loaded"

Message(message)    # Display message

#--------------------------------------------------------------------------
# End of Script
#--------------------------------------------------------------------------

Tags: , , , , , , ,
Posted in Uncategorized | No Comments »


Spooks won’t be Winning…

Monday, November 10th, 2008

…Great British Menu. Microwaving a land mine might be an original way to diffuse it (and inverts the microwave as bomb from Under Siege) – unfortunately it was a dastardly French landmine so it would fail the test of being regional. Not sure if it would count as seasonal either. The Bondish technobable element (like the localised EMP last series when a few well disguised tire bursters would have done the job just as well) crept in again – a bit of a shame since they could have just skipped it and then tracked the snatch car using a technobable CCTV / car number plate tracking system.

Tags:
Posted in TV | No Comments »


Sharpe’s Peril

Sunday, November 2nd, 2008

There are few things that lure me to watch ITV and few things that lure me to costume drama. I missed the original Sharpe’s and only discovered them as a bright spot on day time television when I was sick a few years ago. So I’m very pleased that the latest episode Sharpe’s Peril was up to the usual standards tonight and I’m looking forward to next weeks conclusion.

Now if someone could persuade Ioan Gruffudd back to play Hornblower again I’d be really happy.

Tags:
Posted in Review, TV | 1 Comment »


Searchlight in Vue

Tuesday, September 23rd, 2008

Jonj1611 asked on Renderosity how to create a searchlight like effect in Vue – if this is what he’s looking for I’ll post an explanation here soon.

Edit: Its now up as: Making a Searchlight in Vue

Tags: , ,
Posted in 3d, Lighting, Vue | No Comments »


« Older Entries