//Notes: //------ // //This file can be used to simulate a web page for mockup purposes. It provides a step up from an image by providing //scrolling and very basic mouse pointer movement. It works by providing a .png image of a website design and //specifying mouse movements and scrolling. By changing the image used for the background at the proper frames, //buttons or other page elements can be shown in their "hover" states. // //The pointer and scroll settings are intended to facilitate animation. You will probably only want one of these //things moving at any given time. Set the end position equal to the start position of whichever setting you'd like to //keep constant. // //The aspect ratio used for rendering must match the aspect ratio that pointer location settings were measured at in //order for the pointer to be positioned properly. // //The final animation should be displayed at the resolution it was rendered at, otherwise the mouse pointer and slider //bar will be sized innapropriately. //-f //-d Anim #version 3.7; /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* * * */ /* * * */ /* * USER SETTINGS * */ /* * * */ /* * * */ /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ //Pointer settings: #local P0 = <2251, 1400>; //Start position (<0, 0> = top left of image) #local P1 = <2665, 974>; //End position //Scroll settings: (0 = Top of image, 1 = bottom) #local S0 = 0; //Start position #local S1 = 0; //End position //Background settings: #local BackgroundImageFileName = "Background0"; /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* * * */ /* * * */ /* * SCENE SETTINGS * */ /* * * */ /* * * */ /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ global_settings {assumed_gamma 2.2} #local AspectRatio = image_width / image_height; #local ResolutionFactor = 3840 / image_width; camera { orthographic location <0, 0, -1> right AspectRatio * x direction <0, 0, 1> look_at <0, 0, 0> } //camera /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* * * */ /* * * */ /* * MACROS * */ /* * * */ /* * * */ /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ #macro MakePointerLayer (Border) #local A0 = 21; #local A1 = 64; #local A2 = A0 + 15; //Final rotation from vertical #local Length = 2.75; #local ShaftWidth = .5; #local L0 = 1; #local Cutout = object { intersection { box {<0, ShaftWidth / 2 - Border, -.02> } plane {y, Border rotate A1 * z translate (Length - L0) * x} } //intersection } //object object { difference { intersection { box {<0, -2, 0> } plane {y, -Border rotate A0 * z} plane {y, Border inverse rotate -A0 * z} } //intersection object {Cutout} object {Cutout rotate 180 * x} } //difference rotate (-90 + A2) * z } //object #end //#macro MakePointerLayer #macro MakePointer (Border, PointerScale) object { union { object {MakePointerLayer (0) texture {pigment {color <0, 0, 0>} finish {emission .9}}} object {MakePointerLayer (Border) translate -.01 * z texture {pigment {color <1, 1, 1>} finish {emission .9}}} } //union scale } //object #end //#macro MakePointer /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* * * */ /* * * */ /* * BACKGROUND * */ /* * * */ /* * * */ /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ #local DistanceFactor = (cos (radians (180 + clock * 180)) + 1) / 2; //Change to just "clock" for linear speed. #local ScrollDistance = S0 + DistanceFactor * (S1 - S0); #local BackgroundImagePigment = pigment {image_map {png BackgroundImageFileName gamma 2.2 map_type 0 once}} #local BackgroundImageResolution = max_extent (BackgroundImagePigment); #local BackgroundImageColor = texture { pigment { BackgroundImagePigment scale translate <-AspectRatio / 2, -.5, 0> } //pigment finish {emission .9} } //texture #local YOffset = (1 - ScrollDistance) * (BackgroundImageResolution.y / BackgroundImageResolution.x * AspectRatio - 1); plane {z, 0 texture {BackgroundImageColor translate -YOffset * y}} /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* * * */ /* * * */ /* * SLIDER * */ /* * * */ /* * * */ /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ #local SliderColor = color <244 * .997, 241 * .996, 235 * .995> / 255; #local Width = .0225 * ResolutionFactor; #local SliderHeight = (BackgroundImageResolution.x / BackgroundImageResolution.y) / AspectRatio; #local SliderHeight = min (max (SliderHeight, .1), 1) * (1 - Width * 2); #if (SliderHeight < 1 - Width * 2) #local Margin = .003 * ResolutionFactor; #local X0 = AspectRatio / 2 - Width; #local Y0 = -.5; #local Y1 = .5; #local Arrow = object { intersection { box {<-.1, -.0085 * ResolutionFactor, 0> <.1, 0, .02>} plane {x, 0 inverse rotate -45 * z} plane {x, 0 rotate 45 * z} } //intersection texture {pigment {color SliderColor * .6} finish {emission .9}} } //object #local ArrowYOffset = .0065 * ResolutionFactor; box { translate -.01 * z texture {pigment {color SliderColor} finish {emission .9}}} object {Arrow rotate 180 * z translate translate -.02 * z} object {Arrow translate translate -.02 * z} #local SliderY0 = Y0 + Width; #local SliderY1 = Y1 - Width - SliderHeight; #local SliderY = SliderY1 - ScrollDistance * (SliderY1 - SliderY0); #local Slider = object { box { } texture {pigment {color SliderColor * .8} finish {emission .9}} } //object object {Slider translate translate -.02 * z} #end //#if /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* * * */ /* * * */ /* * POINTER * */ /* * * */ /* * * */ /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ #local Pointer = object {MakePointer (.08, .011 * ResolutionFactor)} #local ImageMidX = (BackgroundImageResolution.x - 1) / 2; #local ImageMidY = (BackgroundImageResolution.x / AspectRatio - 1) / 2; #local DistanceFactor = sin (radians (clock * 90)); //Change to just "clock" for linear speed. #local P2 = ; #local P2 = <(P2.x - ImageMidX) * (AspectRatio / 2 / ImageMidX), (ImageMidY - P2.y) * (.5 / ImageMidY), 0>; object {Pointer translate P2 translate -.1 * z}