Web By Varis Blog

Build Animated Websites with ChatGPT + Luma

Learn how to create a cinematic, scroll-animated website using ChatGPT and Luma, without manually creating images, editing videos, or building animations from scratch.

Before you begin

Make sure you have the following:

  • ChatGPT account: Access to ChatGPT, ideally with Work or another coding environment that can create files and run terminal commands. Access depends on your plan.
  • Luma account: Visit Luma and check your available generation credits or plan.
  • Luma: Install and connect Luma inside ChatGPT as described in Step 1.
  • Node.js and npm: Required to run the Next.js website. Download from nodejs.org.
  • FFmpeg: Used to extract individual frames from the AI-generated video. FFmpeg and ffprobe must be available in the coding environment.
  • The prompt: Copy the complete prompt in Step 2 and paste it into your ChatGPT coding session.

Step 1: Install and Connect Luma to ChatGPT

You do not need to install a CLI or run terminal commands to connect Luma.

  1. Open ChatGPT.
  2. Open the Plugins section and search for Luma.
  3. Select Luma and choose Install or Connect, as shown in your interface. You can also start from Add Luma to ChatGPT.
  4. Follow the connection instructions to authorize your Luma account.
  5. Return to ChatGPT and make sure Luma is available in your conversation.

Once connected, you can request AI video generation directly from ChatGPT through Luma.

Important: Luma creates the video asset, while ChatGPT's coding environment builds the website. The video may need to be downloaded from the Luma result and uploaded into the coding workspace. Plugin access alone does not guarantee that generated videos are automatically saved to the project's filesystem. Check your available credits before generating.

Step 2: Paste the Prompt

Copy the full prompt below into a ChatGPT Work or coding session with Luma connected. The workflow will:

  • Generate the cinematic hero video with Luma
  • Transfer the video to the website project
  • Extract animation frames with FFmpeg
  • Create a complete Next.js project
  • Build a scroll-driven animated landing page
  • Add responsive sections and smooth animations

The Prompt

You are building a complete cinematic, scroll-animated Next.js website using ChatGPT and the connected Luma MCP.

Work directly in the project directory. Execute commands, generate assets, create source files, install dependencies, and verify the final result wherever terminal and filesystem access are available.

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
STEP 1 — GENERATE ASSETS WITH THE LUMA MCP
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

Use the connected Luma MCP to generate the cinematic hero video.
Create a 10-second cinematic, photorealistic luxury Mediterranean villa construction reveal in one continuous FPV camera shot.

The villa magically assembles from completely empty land while the camera approaches from inland, flies through the interior toward the ocean, and exits onto the infinity pool terrace.

Generation settings: Seedance 2.5 · 10 seconds · 16:9 · 480p.

Critical geography and camera direction

Maintain this fixed spatial order:

Inland terrain → villa entrance → open-plan living room → ocean-facing exit → infinity pool terrace → coastal cliff → Mediterranean Sea.

The camera begins above dry land on the inland side, looking toward the empty plot with the ocean beyond it. It never approaches the villa from the sea. During the interior flythrough, the ocean remains visible directly ahead through the opposite open doorway.

The villa has two aligned, fully open panoramic sliding-glass doorways with their glass panels visibly retracted to the sides. A broad, unobstructed flight corridor connects them.

0–2 seconds — Inland approach and foundations

Begin with a wide aerial view from inland, looking across a completely empty coastal cliffside plot toward the turquoise Mediterranean Sea and golden sunset. Dramatic mountains frame the coastline.

The camera descends smoothly and advances toward the plot. Concrete foundations emerge from the earth, structural columns rise vertically, beams settle into position, and white limestone walls extend upward. Show distinct architectural components assembling precisely in a logical sequence.

2–5 seconds — Exterior construction and entrance approach

The camera follows a graceful, shallow orbit along the inland side of the property, maintaining forward momentum and ending aligned with the land-facing entrance.

White limestone walls complete, massive glass panels slide into their frames, modern roof sections settle into place, and terraces extend outward. On the far, ocean-facing side, the infinity pool basin forms and visibly fills with crystal-clear turquoise water. Landscaped gardens, palms, and outdoor designer furniture assemble progressively.

By five seconds, the exterior is complete. The camera approaches the visibly open inland doorway. Through the aligned entrance and opposite exit, the ocean is visible beyond the building.

5–7 seconds — Interior assembly during entry

Without cutting, stopping, or abruptly changing speed, the camera flies through the open inland doorway and continues toward the sea.

Italian marble floor slabs slide and lock beneath the camera. Wall and ceiling panels move into position. Designer sofa frames and cushions assemble beside the flight corridor. Sculptural lighting descends into place, and a contemporary kitchen island rises to one side.

Every component follows a smooth, precise trajectory into its final position. Furniture stays clear of the camera's path. Warm golden sunlight enters through the ocean-facing glass facade ahead.

7–8.5 seconds — Completed interior and ocean-facing exit

Glide through the fully completed living room, revealing sophisticated neutral furnishings, Italian marble, natural wood, and panoramic ocean views.

Continue directly through the opposite, visibly open sea-facing doorway onto the infinity pool terrace. The pool lies immediately ahead, with the cliff and Mediterranean Sea beyond it.

Clearly show the camera traveling through the interior, entering from land and exiting toward the ocean.

8.5–10 seconds — Completed villa hero reveal

Fly forward above the infinity pool toward the sea, then bank into a smooth, rising outward arc. While continuing forward along the curve, turn the camera view back toward the completed villa.

Finish with a spectacular wide three-quarter composition showing the complete property, glowing interiors, infinity pool, dramatic coastal cliff, and golden reflections across the sea. Maintain gentle camera movement through the final frame.

Visual style

World-class architectural visualization and ultra-premium luxury real estate advertising. Photorealistic white limestone, natural wood, Italian marble, expansive glass facades, realistic reflections, golden-hour lighting, natural motion blur, and a perfectly stabilized 24mm wide-angle FPV perspective.

Mandatory constraints
- One continuous, uninterrupted shot.
- Start on completely empty land and show progressive construction while the camera moves.
- Follow the order: foundations → structure → exterior finishes → interior furnishings.
- Preserve consistent architecture, realistic rigid geometry, coastline, and sunlight direction.
- Both doorways must be visibly open before the camera crosses them.
- No cuts, dissolves, teleportation, hovering, reversing, or passing through solid walls or closed glass.
- No instant appearance of entire buildings or rooms, chaotic transformations, or random object morphing.
- No people, workers, cranes, machinery, or vehicles.
- No visible drone, propellers, aircraft, camera equipment, or drone shadows.
- No text, logos, or watermarks.

Wait for the Luma generation to complete. Obtain the resulting video file or a downloadable asset link.

Transfer the video into the Next.js coding workspace and save it as:

assets/hero.mp4

If the MCP result cannot be directly written to the workspace, ask the user to download the generated video and upload it to the coding session. Do not claim the file exists until it has actually been transferred. If Luma supplies only a preview, request or retrieve the actual video file before continuing.

Create the assets directory if needed. Verify that assets/hero.mp4 exists, is readable, and contains a playable video stream before proceeding to frame extraction.

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
STEP 2 — EXTRACT VIDEO FRAMES
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

Confirm ffmpeg and ffprobe are installed and accessible.

On Windows, if missing, install using:

winget install --id Gyan.FFmpeg -e --source winget --accept-package-agreements --accept-source-agreements

Refresh PATH or locate the installed executable if necessary.

Inspect the generated video:

ffprobe -v error -select_streams v:0 -show_entries stream=r_frame_rate,duration,nb_frames -of default=noprint_wrappers=1 assets/hero.mp4

Create the frames directory.

Extract JPEG frames at 24fps and 1920px width:

ffmpeg -i assets/hero.mp4 -vf "fps=24,scale=1920:-1" -q:v 3 "frames/frame_%04d.jpg"

Count the actual JPEG files in frames/.

Use that exact count as FRAME_COUNT. Do not rely on ffprobe's estimated frame count.

Copy the entire frames directory to:

public/frames/

Also copy the original video to:

public/hero.mp4

Preserve the cinematic sunset lighting, warm golden sunlight, terracotta, sandstone, cream, muted olive, and deep Mediterranean blue.

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
STEP 3 — SCAFFOLD THE NEXT.JS PROJECT
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

Create a complete Next.js App Router project using TypeScript.

Use compatible, supported dependency versions. Prefer current security-patched releases and verify peer dependencies rather than assuming a particular historical version is safe.

Required dependencies:
- next
- react
- react-dom
- framer-motion
- typescript
- @types/react
- @types/react-dom
- @types/node

Run npm install and resolve any dependency conflicts before continuing.

Run npm audit and address high/critical vulnerabilities where practical.

Create:
- package.json
- tsconfig.json
- next.config.ts
- app/globals.css
- app/layout.tsx
- app/page.tsx
- app/components/

In globals.css:

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  background: #F4EFE7;
  color: #2C2924;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

In layout.tsx:
- Import Inter and Playfair_Display from next/font/google
- Expose --font-inter and --font-playfair
- Set metadata title to the restaurant name
- Use the App Router layout structure

Use npm run dev for local preview at http://localhost:3000.

Do not create Claude-specific configuration files.

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
STEP 4 — DESIGN TOKENS
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

Use the following visual system consistently:

Background: #F4EFE7
Primary text: #2C2924
Body text: #5F5A51
Accent terracotta: #B86F4B
Accent hover: #D18A61
Dim text: #777168
Subtle border: rgba(74,63,51,0.16)
Warm cream: #E8DDCC
Olive accent: #69705A

Display font:
Playfair Display, weight 400

Body font:
Inter, weights 300–500

Labels:
Inter, 0.65rem, uppercase, letter spacing 0.25em, terracotta.

Visual direction:
Premium Greek restaurant overlooking the Mediterranean during sunset.

Use warm limestone, whitewashed architecture, natural wood, terracotta, olive foliage, soft cream, and golden-hour sunlight.

Avoid pure black, cold blue UI colors, neon, excessive gradients, and artificial-looking grading.

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
STEP 5 — BUILD ScrollHero.tsx
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

Create:

app/components/ScrollHero.tsx

Use 'use client'.

Do not use a video element for the scroll animation.

Use HTML canvas and preloaded JPEG frames.

STRUCTURE

Outer container:
- height: 500vh
- position: relative
- ref: containerRef

Sticky inner container:
- position: sticky
- top: 0
- width: 100vw
- height: 100vh
- overflow: hidden
- background: #F4EFE7

Canvas:
- width: 100%
- height: 100%
- ref: canvasRef

Overlay:
- position: absolute
- inset: 0
- pointer-events: none on noninteractive regions
- restore pointer events on interactive buttons

CRITICAL FRAME LOADING

Never hide the text overlay behind an image-loading or ready state.

Text must appear immediately according to its own mount animation and scroll progress, even while images load.

The canvas can temporarily display the cream fallback.

Do not mark a frame as drawn until its image has actually loaded and been painted.

Maintain:
- wantedFrameIndex
- lastSuccessfullyDrawnIndex

The draw function must return true only when a loaded image was successfully painted.

Return false when only the fallback background was painted.

Each image onload handler must check whether its index is still the wanted frame and attempt to draw it.

The requestAnimationFrame loop must retry drawing the wanted frame until successful.

This prevents a blank canvas on fresh page load.

CANVAS DRAWING

Use devicePixelRatio-aware sizing.

Draw images using cover-fit:

scale = Math.max(canvasWidth / imageWidth, canvasHeight / imageHeight)

Center each image and preserve the cinematic composition.

Fill the background with #F4EFE7.

Preload all frames from:

/frames/frame_XXXX.jpg

Use four-digit zero-padded filenames.

FRAME_COUNT must exactly match the actual number of JPEG files extracted.

SCROLL PROGRESS

Use requestAnimationFrame, not a scroll event listener.

Calculate:

top = containerRef.getBoundingClientRect().top

progress = Math.max(
  0,
  Math.min(
    1,
    -top / (container.offsetHeight - window.innerHeight)
  )
)

targetFrame = Math.round(progress * (FRAME_COUNT - 1))

Use the same progress value to drive both canvas frames and text transitions.

On resize, update canvas dimensions and redraw the wanted frame.

Cancel animation frames and remove listeners during cleanup.

HERO IDENTITY BLOCK

Initial content:

Label:
"Aegean Dining · Since 1987"

Heading:
Restaurant name

Paragraph:
A short, atmospheric description of cliffside dining in Greece.

Button:
"Discover the Restaurant"

Use Playfair Display for the heading:

clamp(2.8rem, 7vw, 6.5rem)

Heading color:
#F8F2E8

Body text:
#F4EFE7

CTA:
Terracotta background, white text, uppercase Inter, 0.7rem, letter spacing 0.18em, padding 0.9rem 2.6rem.

INITIAL MOUNT ANIMATION

Animate each identity element independently with Framer Motion initial, animate, and transition.

Label:
opacity 0 → 1
translateY 28px → 0
duration 1s
delay 0.05s

Heading:
opacity 0 → 1
translateY 56px → 0
duration 1.3s
delay 0.2s

Paragraph:
opacity 0 → 1
translateY 36px → 0
duration 1.1s
delay 0.4s

CTA:
opacity 0 → 1
translateY 28px → 0
duration 1s
delay 0.55s

Easing:
[0.16, 1, 0.3, 1]

This entrance animation must run on mount independently of scroll.

Add a warm gradient behind the identity text:

linear-gradient(
  to top,
  rgba(32,25,18,0.68) 0%,
  rgba(32,25,18,0.20) 45%,
  transparent 100%
)

SCROLL TEXT SEQUENCE

There are four cinematic text beats.

BEAT 1 — INITIAL IDENTITY

At scroll progress 0, the identity block is visible and plays its mount animation.

Between progress 0 and 0.14, fade the entire identity block out and move it slightly upward.

BEAT 2 — RIGHT PARAGRAPH

At approximately progress 0.18, reveal a short atmospheric paragraph on the right side.

Animate:
opacity 0 → 1
translateX 40px → 0

Keep it visible briefly while the canvas continues scrubbing.

Fade it out and move it slightly upward/right by progress 0.5.

BEAT 3 — LEFT PARAGRAPH

At approximately progress 0.54, reveal a new atmospheric paragraph on the left.

Animate:
opacity 0 → 1
translateX -40px → 0

Keep it visible briefly and fade it out before progress 0.88.

BEAT 4 — FINAL CENTER CTA

Between progress 0.88 and 0.96, reveal a centered closing block.

Animate:
opacity 0 → 1
translateY 36px → 0

Keep it visible through progress 1.0.

Do not fade it out.

Content:

Label:
"Limited Seating · Golden Hour"

Heading:
"The sunset table is yours."

Button:
"Reserve Your Table"

Heading:
Playfair Display
clamp(2.4rem, 6vw, 5.2rem)
#F8F2E8
max-width approximately 18ch

CTA:
Terracotta background, white text.

Hover:
scale 1.04
background #D18A61

Tap:
scale 0.98

Add a radial dark backdrop that begins fading in at progress 0.86:

radial-gradient(
  ellipse at center,
  rgba(32,25,18,0.6) 0%,
  rgba(32,25,18,0.25) 50%,
  transparent 78%
)

The closing block must remain fully visible until the sticky hero ends.

TEXT TRANSITION RULES

- All scroll text transitions use the same progress value as the canvas.
- Only the initial mount animation is time-based.
- The initial identity must disappear before the right paragraph appears.
- The right paragraph must disappear before the left paragraph appears.
- The left paragraph must disappear before the closing CTA appears.
- The closing CTA must stay visible through the end.
- Keep text readable over the footage.
- Avoid overlapping important visual subjects.
- Use responsive positioning on mobile.
- Keep motion cinematic, subtle, and smooth.

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
STEP 6 — BUILD THE REST OF THE WEBSITE
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

After ScrollHero, transition naturally into the remaining restaurant sections.

Keep the background warm cream #F4EFE7.

Use generous whitespace, natural textures, elegant typography, terracotta accents, olive details, and subtle borders.

Use Framer Motion useInView animations:

translateY 24px → 0
opacity 0 → 1
stagger 100ms
ease [0.25, 0, 0, 1]
once: true

EXPERIENCE SECTION

Create:
app/components/ExperienceSection.tsx

Label:
"The Aegean Experience"

Heading:
Elegant Playfair Display heading, clamp(2rem, 4vw, 3.5rem).

Include a large editorial paragraph about the restaurant.

Use a responsive two-column layout.

Use a suitable extracted frame from the generated video as supporting imagery.

Focus on:
- Cliffside dining
- Mediterranean ingredients
- Sunset atmosphere
- Greek hospitality
- Seasonal cuisine

MENU SECTION

Create:
app/components/MenuSection.tsx

Label:
"From Land & Sea"

Heading:
"A taste of the Mediterranean."

Create an elegant menu with 6–8 dishes.

Include:
- Dish name
- Short description
- Price

Suggested dishes:
- Grilled Octopus
- Aegean Sea Bass
- Lamb Souvlaki
- Charred Eggplant
- Greek Salad
- Seafood Orzo
- Honey Baklava
- Yogurt with Seasonal Fruit

Use thin warm borders, generous spacing, and subtle hover interactions.

Do not use lorem ipsum.

STORY SECTION

Create:
app/components/StorySection.tsx

Label:
"Our Story"

Heading:
"Where the sea meets the table."

Create an editorial two-column layout.

Describe the restaurant's connection to the Greek landscape, local produce, seafood, hospitality, and sunset dining.

Use Playfair Display for major statements.

Keep the design sophisticated and minimal.

CLOSING CTA

Create:
app/components/ClosingCTA.tsx

Full-width centered section.

Background:
#F4EFE7

Label:
"Join Us by the Aegean"

Heading:
"Come for the view."
"Stay for the experience."

Make the second line italic.

Heading font:
Playfair Display

Heading size:
clamp(2.2rem, 5vw, 4.5rem)

Subtext:
Inter 300
#5F5A51
max-width 480px

Button:
"Reserve a Table"

Background:
#B86F4B

Text:
white

Add a subtle hover interaction and a warm radial glow:

radial-gradient(
  ellipse,
  rgba(184,111,75,0.12) 0%,
  transparent 70%
)

This CTA must remain separate from the final centered CTA inside ScrollHero.

Both CTAs should look consistent but exist as independent components.

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
STEP 7 — WIRE THE PAGE
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

Create app/page.tsx.

Import:
- ScrollHero
- ExperienceSection
- MenuSection
- StorySection
- ClosingCTA

Render in this order:

1. ScrollHero
2. ExperienceSection
3. MenuSection
4. StorySection
5. ClosingCTA

Wrap in:

<main style={{ background: '#F4EFE7' }}>

Ensure the ScrollHero stops being sticky once its 500vh container ends.

The rest of the page must scroll normally.

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
STEP 8 — RUN AND VERIFY
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

Run:

npm install
npx tsc --noEmit
npm run build
npm run dev

Open:
http://localhost:3000

Verify:

- The website loads without runtime errors.
- /frames/frame_0001.jpg returns HTTP 200.
- All extracted frames are accessible.
- The first video frame appears correctly on a fresh load.
- The canvas does not remain blank while frames load.
- The initial identity elements rise and fade in sequentially.
- The canvas scrubs through the cinematic video as the user scrolls.
- The initial identity fades out naturally.
- The right paragraph appears and disappears.
- The left paragraph appears and disappears.
- The final centered CTA appears and stays visible.
- All scroll text transitions are synchronized with canvas progress.
- The sticky hero ends cleanly.
- Experience, Menu, Story, and Closing CTA appear afterward.
- Sections animate naturally as they enter the viewport.
- The website works at 375px mobile width.
- No unexpected horizontal scrolling occurs.
- Text remains readable over all frames.
- The final booking CTA is accessible and clickable.

If browser automation is available, verify these behaviors in a browser.

If browser automation is unavailable, perform all feasible static and runtime checks and clearly report what could not be visually verified.

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
NON-NEGOTIABLE RULES
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

- Use the connected Luma MCP for AI asset generation.
- Inspect Luma's available video-generation options before requesting a video.
- Never invent unsupported plugin actions, model names, durations, or settings.
- If Luma cannot write directly into the project, transfer the finished video manually before extracting frames.
- Do not assume that generation credits are free.
- Use canvas + JPEG frames, not a video element, for scroll scrubbing.
- No scroll event listener; use requestAnimationFrame.
- Use the same progress calculation for frames and text.
- Never gate text visibility behind image loading.
- Never mark an unloaded frame as successfully drawn.
- Use the exact extracted JPEG count as FRAME_COUNT.
- Verify React, Next.js, and Framer Motion compatibility.
- Animate initial identity elements on mount.
- Keep all four text beats in the correct order.
- Keep the final hero CTA visible until the hero ends.
- No navbar, footer, or cookie banner.
- No lorem ipsum.
- Stack responsive layouts below 768px.
- Maintain warm Mediterranean sunset colors.
- Avoid black luxury-watch styling.
- Keep animations cinematic, subtle, and premium.
- Do not ask unnecessary clarification questions.
- Start with Luma video generation and transfer the completed asset into the coding workspace.
- Complete and verify as much of the project as the environment permits.

Step 3: Run the Project

Once ChatGPT has generated the project files and installed the dependencies, open a terminal in your project folder. Use the actual project path if it differs from this example.

cd C:\projects\luma-website
npm run dev

Open http://localhost:3000 in your browser. Scroll through the hero to see the Luma-generated footage scrub frame by frame.

Follow @webbyvaris for more!