본문 바로가기
코딩 · 개발

절차적 3D 지형 생성 구현

게임 개발 시 프레임 저하 없이 무한한 지형을 실시간으로 생성하는 3D 절차적 레벨 시스템을 구현합니다.

추천 툴
Claude CodeAI 분류
쓰인 기법
역할 부여 · 구조화된 지시

프롬프트 원문

I want you to act as a 3D Level Design Expert specializing in procedural content generation (PCG).

Task:
Create a system that generates an infinite, dynamic 3D landscape using Perlin or Simplex noise algorithms for a high-speed racing or flight game.

Technical Details:
Develop a vertex shader or a CPU-side logic that modifies a plane geometry’s heightmap in real-time based on player displacement.
Implement an object-pooling mechanism for "terrain chunks" to ensure 60 FPS performance on mobile devices.
Define a logic to automatically spawn obstacle meshes at points where the terrain gradient exceeds a specific threshold.
Calculate real-time surface normals so player characters can align their orientation and adjust acceleration based on the slope.
Suggest an environmental lighting setup (Direct/Ambient) to enhance the depth perception of the procedural terrain.
한국어 풀이 보기(참고용)
절차적 콘텐츠 생성(PCG) 전문 3D 레벨 디자인 전문가 역할을 맡아주세요.

작업:
고속 레이싱 또는 비행 게임을 위해 펄린(Perlin) 또는 심플렉스(Simplex) 노이즈 알고리즘을 사용해 무한하고 역동적인 3D 지형을 생성하는 시스템을 제작하세요.

기술 세부 사항:
플레이어 이동에 따라 평면 지형의 높이맵(Heightmap)을 실시간으로 수정하는 버텍스 셰이더 또는 CPU 로직을 개발하세요.
모바일 기기에서 60 FPS 성능을 보장하기 위해 "지형 청크(Terrain Chunk)" 오브젝트 풀링 메커니즘을 구현하세요.
지형 경사도가 특정 임계값을 초과하는 지점에 장애물 메시를 자동으로 배치하는 로직을 정의하세요.
플레이어 캐릭터가 경사면에 맞추어 방향을 정렬하고 가속도를 조절할 수 있도록 실시간 표면 노멀(Normal)을 계산하세요.
절차적 지형의 공간감을 향상시키기 위한 환경 조명 설정(직사광/환경광)을 제안하세요.
  • 활용Unity, Unreal Engine, Three.js 등 사용하는 엔진 이름을 추가 지정하세요.
  • 활용모바일 최적화 및 60FPS 유지를 위한 아키텍처 설계를 빠르게 파악할 수 있습니다.

출처 · prompts.chat · Procedural 3D Environment Designer — 원문은 출처에 게시된 그대로이며, 권리는 원작자에게 있습니다.

텍스트 결과

Gemini로 실행한 결과입니다. 입력 항목에는 국내 환경의 예시값을 적용했습니다(AI 생성 — 사실 확인 필요).

실행 입력값 보기
I want you to act as a 3D Level Design Expert specializing in procedural content generation (PCG).

Task:
Create a system that generates an infinite, dynamic 3D landscape using Perlin or Simplex noise algorithms for a high-speed racing or flight game.

Technical Details:
Develop a vertex shader or a CPU-side logic that modifies a plane geometry’s heightmap in real-time based on player displacement.
Implement an object-pooling mechanism for "terrain chunks" to ensure 60 FPS performance on mobile devices.
Define a logic to automatically spawn obstacle meshes at points where the terrain gradient exceeds a specific threshold.
Calculate real-time surface normals so player characters can align their orientation and adjust acceleration based on the slope.
Suggest an environmental lighting setup (Direct/Ambient) to enhance the depth perception of the procedural terrain.

고속 레이싱/비행 게임을 위한 모바일 최적화 무한 PCG 지형 생성 시스템 설계안입니다.

  1. 높이맵 및 위치 추적

Simplex Noise와 CPU 멀티스레딩(Job System)을 활용하여 플레이어의 이동(X, Z)에 맞춰 렌더링 영역의 Vertex 높이를 실시간 계산합니다. 4단 Octave와 Low-frequency 설정으로 고속 주행에 적합한 완만한 곡선과 굴곡을 연출합니다.

  1. 청크 오브젝트 풀링 (모바일 60 FPS)

플레이어 중심 5x5 청크 그리드 풀을 유지합니다. 시야 범위를 벗어난 청크는 즉시 재사용(Recycle)되어 진행 방향 전방으로 재배치됩니다. Draw Call 절감을 위해 GPU Instancing 및 거리별 LOD 시스템을 적용합니다.

  1. 경사도 기반 장애물 배치

정점 간 이웃 높이차를 이용해 경사각(Gradient)을 계산합니다. 경사도가 35도 이상인 험준한 지형 영역의 표면에 바위나 파괴 가능한 장애물 메쉬를 풀링 시스템으로 자동 스폰합니다.

  1. 표면 법선(Normal) 계산 및 물리 반영

삼각면 정점들의 외적(Cross Product)으로 표면 Normal을 실시간 산출합니다. 기체 레이캐스트를 통해 Up 벡터를 지면 Normal과 정렬하고, 경사각에 따라 내리막길 가속 및 오르막길 감속 피드백을 적용합니다.

  1. 입체감을 높이는 조명 설정
  2. Direct Light: 25~30도의 낮게 비추는 주광(Sun)을 설정하여 그림자를 길게 늘어뜨려 지형의 음영 입체감을 강조합니다.
  3. Ambient & Fog: Gradient Ambient Light와 이동 속도에 따라 감도가 변하는 Height Fog를 조합하여 정교한 깊이감과 속도감을 선사합니다.

hotpick 개선안

원문을 더 잘 동작하게 고쳐 쓴 프롬프트

원문을 그대로 넣으면 AI 가 매번 다르게 답하거나 중요한 부분을 빠뜨릴 수 있습니다. 개선안은 원문의 뜻과 언어는 그대로 두고 역할 · 바꿔 넣을 입력 칸 · 결과 형식 · 지킬 조건을 보완해 다시 쓴 버전입니다. 원문과 같은 곳(ChatGPT · Claude 등)에 그대로 붙여 넣어 쓰면 됩니다.

AI 자체 평가 — 개선안을 쓴 AI 가 명확성 · 구체성 · 결과 형식 · 재사용성 기준(100점)으로 직접 매긴 점수 · 결과를 돌려 검증한 값은 아님

원문75
개선안93

원문의 문제 → 개선안에서 고친 점

  • AI 역할레슨 01 배우기 ›

    원문 · 없음AI 에게 맡길 역할이 정해져 있지 않아 답의 관점 · 수준이 그때그때 달라질 수 있었습니다.

    개선 · 역할을 정함Role: Act as a 3D Level Design Expert specializing in procedural content generation (PCG)

  • 입력 칸레슨 05 배우기 ›

    원문 · 없음바꿔 넣을 자리가 표시돼 있지 않아 쓸 때마다 원문을 직접 고쳐야 했습니다.

    개선 · 7개[Target Engine, e.g., Unity/Unreal] · [Noise Algorithm, e.g., Perlin/Simplex] · [Game Genre, e.g., racing/flight] 외 4개

  • 작업 순서레슨 07 배우기 ›

    원문 · 없음작업 순서가 정해져 있지 않아 AI 가 순서를 스스로 정해야 했습니다.

    개선 · 5단계

고친 이유 (개선안을 만든 AI 의 설명)

  1. 1엔진·플랫폼·파라미터를 변수화해 재사용성 대폭 향상
  2. 2출력 형식을 체계화하여 구체적이고 일관된 답변 유도
  3. 3경사도 임계값 등 요구 조건을 더욱 명확하게 보강

원문

I want you to act as a 3D Level Design Expert specializing in procedural content generation (PCG).

Task:
Create a system that generates an infinite, dynamic 3D landscape using Perlin or Simplex noise algorithms for a high-speed racing or flight game.

Technical Details:
Develop a vertex shader or a CPU-side logic that modifies a plane geometry’s heightmap in real-time based on player displacement.
Implement an object-pooling mechanism for "terrain chunks" to ensure 60 FPS performance on mobile devices.
Define a logic to automatically spawn obstacle meshes at points where the terrain gradient exceeds a specific threshold.
Calculate real-time surface normals so player characters can align their orientation and adjust acceleration based on the slope.
Suggest an environmental lighting setup (Direct/Ambient) to enhance the depth perception of the procedural terrain.

개선안 · 색칠한 [칸]에 내 내용을 넣어 쓰세요

Role: Act as a 3D Level Design Expert specializing in procedural content generation (PCG) for [Target Engine, e.g., Unity/Unreal].

Task:
Provide a technical implementation plan and code/pseudocode to generate an infinite, dynamic 3D landscape using [Noise Algorithm, e.g., Perlin/Simplex] noise for a high-speed [Game Genre, e.g., racing/flight] game targeting [Target Platform, e.g., Mobile].

Technical Requirements:
1. Heightmap Logic: Vertex shader or CPU-side displacement driven by player coordinates.
2. Chunk Management: Object-pooling mechanism for terrain chunks to ensure [Target FPS, e.g., 60] FPS.
3. Obstacle Spawning: Automatic mesh placement where gradient exceeds [Slope Threshold, e.g., 45 degrees].
4. Surface Normals: Real-time normal calculation for slope-based orientation and vehicle physics.
5. Lighting: Direct/Ambient lighting setup optimized for depth perception.

Output Format:
- System Architecture Overview
- Well-commented Code/Pseudocode Snippets
- Optimization Checklist for [Target Platform]

같은 분야 프롬프트 코딩 · 개발

더 보기 ›