SlideShare a Scribd company logo
1 of 29
Download to read offline
Rendering Wounds in
   Left 4 Dead 2
   Alex Vlachos, Valve
     March 9, 2010
Outline
• Goals

• Technical Constraints

• Initial Prototype

• Final Solution
Left 4 Dead 1 Wounds
•   Built-in
•   5 variations only
•   Requires texture support
•   Always Fatal
The Pitch
      Gray Horsfield lives for destruction
(Gray is a Visual Effects Artist at Valve, previously at Weta)
Goals
• Accurate location of wounds

• Wounds match weapon strength
  – Remove limbs, torso, head, half of body


• Separate wound geometry & textures

• Several active/visible wounds per model
  – Shipped up to 2 active wounds
Technical Constraints
• Already at memory limits on the Xbox 360

• Didn’t want heavy CPU setup

• Ideally wanted a GPU solution

• No additional base meshes except for
  wound geometry
  – Better for artists to author
  – Share wound models among many infected
Common Infected Variation
• Simplest infected has over 24,000 variations




• We didn’t want to add another variable to this
Things We Didn’t/Couldn’t Do
• Model variations of each infected with all
  combinations of 1 and 2 wounds

• Use different index buffers to cull polygons –
  not friendly with LOD and low quality wound
  silhouettes

• Auto-generate new polygonal meshes with
  holes cut for wound models

• Author different body parts/sections with
  different wound variations
Initial Prototype
• Use pose-space ellipsoids to cull pixels
• Fill hole with wound model
Culling Inside an Ellipsoid
• Vertex Shader calculates relative distance
• Interpolate this value and clip / texkill
Benefits
• No additional vertex buffer data
• Still only one draw call for full model
• Wounds are a separate draw call with
  their own textures:
Problems
• Hard cut looked unnatural

• Wound models looked strange
  because they required a lip
  around the wound border

• Lacked blood on the clothes and
  skin near the border of the wound

• Required an exact geometric fit
  with the model
Projected Texture Experiment
Try using a projected texture and use alpha
  to kill pixels
Abdominal Wounds




• Projected texture will affect his back
• So let’s combine the texture and ellipsoid
Blood Layer
• The texture projection is aligned with an
  axis of the ellipse
• We multiply the blood layer by a gradient
  to prevent the blood from spraying too far
Vertex Shader Code
 // Subtract off ellipsoid center
 float3 vLocalPosition = ( vPreSkinnedPosition.xyz - vEllipsoidCenter.xyz );

 // Apply rotation and ellipsoid scale. Ellipsoid basis is the orthonormal basis
 // of the ellipsoid divided by the per-axis ellipsoid size.
 float3 vEllipsoidPosition;
 vEllipsoidPosition.x = dot( vEllipsoidSide.xyz, vLocalPosition.xyz );
 vEllipsoidPosition.y = dot( vEllipsoidUp.xyz, vLocalPosition.xyz );
 vEllipsoidPosition.z = dot( vEllipsoidForward.xyz, vLocalPosition.xyz );

 // Use the length of the position in ellipsoid space as input to texkill/clip
 float fTexkillInput = length( vEllipsoidPosition.xyz );

 // We use the xy of the position in ellipsoid space as the texture uv
 float2 vTextureCoords = vEllipsoidPosition.xy;
Other
• Depth-only and shadow render passes
  – You don’t want phantom shadows


• Hi-Z performance issues

• Wound models are attached to base
  skeleton of infected model
Multiple Wounds
We limited the final solution to 2 active wounds
Upper & Lower Back
Groin
Arms & Legs
Abdomen
Head Wounds
Half Body
Axe & Sword Slashes
Upper Body
Stats
• Up to 54 unique wounds per model

• Each wound is only 13% of the memory
  cost of the old system in Left 4 Dead 1

• Vertex shader costs 15 instructions
  – Fill-bound, so rendering perf impacted
    minimally

• Pixel Shader costs 7 instructions
Summary
• Wound models separate from base mesh

• Use pose-space ellipsoids for outer limiting
  cull volume

• Use projected texture for rough edges and
  blood layer

• Additional details about our rendering:
  http://www.valvesoftware.com/publications.html
Thank you!



   Alex Vlachos, Valve
alex@valvesoftware.com

More Related Content

Viewers also liked

20091012_Personal data_02
20091012_Personal data_0220091012_Personal data_02
20091012_Personal data_02sbur
 
Masa Depanku Rizky 6 A
Masa Depanku Rizky 6 AMasa Depanku Rizky 6 A
Masa Depanku Rizky 6 Aiwan hendrawan
 
Progetto etwinning: va' dove ti porta..il mouse
Progetto etwinning: va' dove ti porta..il mouseProgetto etwinning: va' dove ti porta..il mouse
Progetto etwinning: va' dove ti porta..il mouseangela
 
E-waste recycling-L
E-waste recycling-LE-waste recycling-L
E-waste recycling-Lalind tiwari
 
브랜드 아울렛 24홀릭 모바일 상품권 구매 매뉴얼
브랜드 아울렛 24홀릭 모바일 상품권 구매 매뉴얼브랜드 아울렛 24홀릭 모바일 상품권 구매 매뉴얼
브랜드 아울렛 24홀릭 모바일 상품권 구매 매뉴얼동욱 김
 
Yeni microsoft office power point sunusu
Yeni microsoft office power point sunusuYeni microsoft office power point sunusu
Yeni microsoft office power point sunusuNoemi Gutierrez
 
No Panic workshop
No Panic workshopNo Panic workshop
No Panic workshopNo Panic
 
Komputerku Kalyana Sidra Wardhana 4a
Komputerku Kalyana Sidra Wardhana 4aKomputerku Kalyana Sidra Wardhana 4a
Komputerku Kalyana Sidra Wardhana 4aiwan hendrawan
 

Viewers also liked (17)

20091012_Personal data_02
20091012_Personal data_0220091012_Personal data_02
20091012_Personal data_02
 
Masa Depanku Rizky 6 A
Masa Depanku Rizky 6 AMasa Depanku Rizky 6 A
Masa Depanku Rizky 6 A
 
Progetto etwinning: va' dove ti porta..il mouse
Progetto etwinning: va' dove ti porta..il mouseProgetto etwinning: va' dove ti porta..il mouse
Progetto etwinning: va' dove ti porta..il mouse
 
test
testtest
test
 
E-waste recycling-L
E-waste recycling-LE-waste recycling-L
E-waste recycling-L
 
Np rocks and minerals
Np rocks and mineralsNp rocks and minerals
Np rocks and minerals
 
Garbage west
Garbage westGarbage west
Garbage west
 
Test Nan
Test NanTest Nan
Test Nan
 
브랜드 아울렛 24홀릭 모바일 상품권 구매 매뉴얼
브랜드 아울렛 24홀릭 모바일 상품권 구매 매뉴얼브랜드 아울렛 24홀릭 모바일 상품권 구매 매뉴얼
브랜드 아울렛 24홀릭 모바일 상품권 구매 매뉴얼
 
Präsentation schule
Präsentation schulePräsentation schule
Präsentation schule
 
Komputerku Irsyad 5 B
Komputerku Irsyad 5 BKomputerku Irsyad 5 B
Komputerku Irsyad 5 B
 
Good one
Good oneGood one
Good one
 
test
testtest
test
 
CRM Trends 2015
CRM Trends 2015CRM Trends 2015
CRM Trends 2015
 
Yeni microsoft office power point sunusu
Yeni microsoft office power point sunusuYeni microsoft office power point sunusu
Yeni microsoft office power point sunusu
 
No Panic workshop
No Panic workshopNo Panic workshop
No Panic workshop
 
Komputerku Kalyana Sidra Wardhana 4a
Komputerku Kalyana Sidra Wardhana 4aKomputerku Kalyana Sidra Wardhana 4a
Komputerku Kalyana Sidra Wardhana 4a
 

Similar to Rendering Realistic Wounds in Left 4 Dead 2 Using Projected Textures and Ellipsoids

Incarnation - Turning Real World Objects into Perfume World
Incarnation - Turning Real World Objects into Perfume WorldIncarnation - Turning Real World Objects into Perfume World
Incarnation - Turning Real World Objects into Perfume WorldYung-Luen Lan
 
06 image features
06 image features06 image features
06 image featuresankit_ppt
 
Lec14 multiview stereo
Lec14 multiview stereoLec14 multiview stereo
Lec14 multiview stereoBaliThorat1
 
Volumetric Lighting for Many Lights in Lords of the Fallen
Volumetric Lighting for Many Lights in Lords of the FallenVolumetric Lighting for Many Lights in Lords of the Fallen
Volumetric Lighting for Many Lights in Lords of the FallenBenjamin Glatzel
 
COMP 4026 Lecture 5 OpenFrameworks and Soli
COMP 4026 Lecture 5 OpenFrameworks and SoliCOMP 4026 Lecture 5 OpenFrameworks and Soli
COMP 4026 Lecture 5 OpenFrameworks and SoliMark Billinghurst
 
iOS Visual F/X Using GLSL
iOS Visual F/X Using GLSLiOS Visual F/X Using GLSL
iOS Visual F/X Using GLSLDouglass Turner
 
OpenGL - Bringing the 3D World into the Android
OpenGL - Bringing the 3D World into the AndroidOpenGL - Bringing the 3D World into the Android
OpenGL - Bringing the 3D World into the AndroidDroidConTLV
 

Similar to Rendering Realistic Wounds in Left 4 Dead 2 Using Projected Textures and Ellipsoids (9)

october9.ppt
october9.pptoctober9.ppt
october9.ppt
 
Incarnation - Turning Real World Objects into Perfume World
Incarnation - Turning Real World Objects into Perfume WorldIncarnation - Turning Real World Objects into Perfume World
Incarnation - Turning Real World Objects into Perfume World
 
06 image features
06 image features06 image features
06 image features
 
Design Intent.ppt
Design Intent.pptDesign Intent.ppt
Design Intent.ppt
 
Lec14 multiview stereo
Lec14 multiview stereoLec14 multiview stereo
Lec14 multiview stereo
 
Volumetric Lighting for Many Lights in Lords of the Fallen
Volumetric Lighting for Many Lights in Lords of the FallenVolumetric Lighting for Many Lights in Lords of the Fallen
Volumetric Lighting for Many Lights in Lords of the Fallen
 
COMP 4026 Lecture 5 OpenFrameworks and Soli
COMP 4026 Lecture 5 OpenFrameworks and SoliCOMP 4026 Lecture 5 OpenFrameworks and Soli
COMP 4026 Lecture 5 OpenFrameworks and Soli
 
iOS Visual F/X Using GLSL
iOS Visual F/X Using GLSLiOS Visual F/X Using GLSL
iOS Visual F/X Using GLSL
 
OpenGL - Bringing the 3D World into the Android
OpenGL - Bringing the 3D World into the AndroidOpenGL - Bringing the 3D World into the Android
OpenGL - Bringing the 3D World into the Android
 

More from ozlael ozlael

Unity & VR (Unity Roadshow 2016)
Unity & VR (Unity Roadshow 2016)Unity & VR (Unity Roadshow 2016)
Unity & VR (Unity Roadshow 2016)ozlael ozlael
 
뭣이 중헌디? 성능 프로파일링도 모름서 - 유니티 성능 프로파일링 가이드 (IGC16)
뭣이 중헌디? 성능 프로파일링도 모름서 - 유니티 성능 프로파일링 가이드 (IGC16)뭣이 중헌디? 성능 프로파일링도 모름서 - 유니티 성능 프로파일링 가이드 (IGC16)
뭣이 중헌디? 성능 프로파일링도 모름서 - 유니티 성능 프로파일링 가이드 (IGC16)ozlael ozlael
 
Optimizing mobile applications - Ian Dundore, Mark Harkness
Optimizing mobile applications - Ian Dundore, Mark HarknessOptimizing mobile applications - Ian Dundore, Mark Harkness
Optimizing mobile applications - Ian Dundore, Mark Harknessozlael ozlael
 
그래픽 최적화로 가...가버렷! (부제: 배치! 배칭을 보자!) , Batch! Let's take a look at Batching! -...
그래픽 최적화로 가...가버렷! (부제: 배치! 배칭을 보자!) , Batch! Let's take a look at Batching! -...그래픽 최적화로 가...가버렷! (부제: 배치! 배칭을 보자!) , Batch! Let's take a look at Batching! -...
그래픽 최적화로 가...가버렷! (부제: 배치! 배칭을 보자!) , Batch! Let's take a look at Batching! -...ozlael ozlael
 
유니티 그래픽 최적화, 어디까지 해봤니 (Optimizing Unity Graphics) Unite Seoul Ver.
유니티 그래픽 최적화, 어디까지 해봤니 (Optimizing Unity Graphics) Unite Seoul Ver.유니티 그래픽 최적화, 어디까지 해봤니 (Optimizing Unity Graphics) Unite Seoul Ver.
유니티 그래픽 최적화, 어디까지 해봤니 (Optimizing Unity Graphics) Unite Seoul Ver.ozlael ozlael
 
유니티 그래픽 최적화, 어디까지 해봤니 (Optimizing Unity Graphics) NDC15 Ver.
유니티 그래픽 최적화, 어디까지 해봤니 (Optimizing Unity Graphics) NDC15 Ver.유니티 그래픽 최적화, 어디까지 해봤니 (Optimizing Unity Graphics) NDC15 Ver.
유니티 그래픽 최적화, 어디까지 해봤니 (Optimizing Unity Graphics) NDC15 Ver.ozlael ozlael
 
Infinity Blade and beyond
Infinity Blade and beyondInfinity Blade and beyond
Infinity Blade and beyondozlael ozlael
 
스티브잡스처럼 프레젠테이션하기
스티브잡스처럼 프레젠테이션하기스티브잡스처럼 프레젠테이션하기
스티브잡스처럼 프레젠테이션하기ozlael ozlael
 
유니티의 라이팅이 안 이쁘다구요? (A to Z of Lighting)
유니티의 라이팅이 안 이쁘다구요? (A to Z of Lighting)유니티의 라이팅이 안 이쁘다구요? (A to Z of Lighting)
유니티의 라이팅이 안 이쁘다구요? (A to Z of Lighting)ozlael ozlael
 
Introduce coco2dx with cookingstar
Introduce coco2dx with cookingstarIntroduce coco2dx with cookingstar
Introduce coco2dx with cookingstarozlael ozlael
 
Deferred rendering case study
Deferred rendering case studyDeferred rendering case study
Deferred rendering case studyozlael ozlael
 
Kgc make stereo game on pc
Kgc make stereo game on pcKgc make stereo game on pc
Kgc make stereo game on pcozlael ozlael
 
Modern gpu optimize blog
Modern gpu optimize blogModern gpu optimize blog
Modern gpu optimize blogozlael ozlael
 
Bickerstaff benson making3d games on the playstation3
Bickerstaff benson making3d games on the playstation3Bickerstaff benson making3d games on the playstation3
Bickerstaff benson making3d games on the playstation3ozlael ozlael
 
Hable uncharted2(siggraph%202010%20 advanced%20realtime%20rendering%20course)
Hable uncharted2(siggraph%202010%20 advanced%20realtime%20rendering%20course)Hable uncharted2(siggraph%202010%20 advanced%20realtime%20rendering%20course)
Hable uncharted2(siggraph%202010%20 advanced%20realtime%20rendering%20course)ozlael ozlael
 
Deferred rendering in_leadwerks_engine[1]
Deferred rendering in_leadwerks_engine[1]Deferred rendering in_leadwerks_engine[1]
Deferred rendering in_leadwerks_engine[1]ozlael ozlael
 

More from ozlael ozlael (20)

Unity & VR (Unity Roadshow 2016)
Unity & VR (Unity Roadshow 2016)Unity & VR (Unity Roadshow 2016)
Unity & VR (Unity Roadshow 2016)
 
뭣이 중헌디? 성능 프로파일링도 모름서 - 유니티 성능 프로파일링 가이드 (IGC16)
뭣이 중헌디? 성능 프로파일링도 모름서 - 유니티 성능 프로파일링 가이드 (IGC16)뭣이 중헌디? 성능 프로파일링도 모름서 - 유니티 성능 프로파일링 가이드 (IGC16)
뭣이 중헌디? 성능 프로파일링도 모름서 - 유니티 성능 프로파일링 가이드 (IGC16)
 
Optimizing mobile applications - Ian Dundore, Mark Harkness
Optimizing mobile applications - Ian Dundore, Mark HarknessOptimizing mobile applications - Ian Dundore, Mark Harkness
Optimizing mobile applications - Ian Dundore, Mark Harkness
 
그래픽 최적화로 가...가버렷! (부제: 배치! 배칭을 보자!) , Batch! Let's take a look at Batching! -...
그래픽 최적화로 가...가버렷! (부제: 배치! 배칭을 보자!) , Batch! Let's take a look at Batching! -...그래픽 최적화로 가...가버렷! (부제: 배치! 배칭을 보자!) , Batch! Let's take a look at Batching! -...
그래픽 최적화로 가...가버렷! (부제: 배치! 배칭을 보자!) , Batch! Let's take a look at Batching! -...
 
유니티 그래픽 최적화, 어디까지 해봤니 (Optimizing Unity Graphics) Unite Seoul Ver.
유니티 그래픽 최적화, 어디까지 해봤니 (Optimizing Unity Graphics) Unite Seoul Ver.유니티 그래픽 최적화, 어디까지 해봤니 (Optimizing Unity Graphics) Unite Seoul Ver.
유니티 그래픽 최적화, 어디까지 해봤니 (Optimizing Unity Graphics) Unite Seoul Ver.
 
유니티 그래픽 최적화, 어디까지 해봤니 (Optimizing Unity Graphics) NDC15 Ver.
유니티 그래픽 최적화, 어디까지 해봤니 (Optimizing Unity Graphics) NDC15 Ver.유니티 그래픽 최적화, 어디까지 해봤니 (Optimizing Unity Graphics) NDC15 Ver.
유니티 그래픽 최적화, 어디까지 해봤니 (Optimizing Unity Graphics) NDC15 Ver.
 
Infinity Blade and beyond
Infinity Blade and beyondInfinity Blade and beyond
Infinity Blade and beyond
 
스티브잡스처럼 프레젠테이션하기
스티브잡스처럼 프레젠테이션하기스티브잡스처럼 프레젠테이션하기
스티브잡스처럼 프레젠테이션하기
 
유니티의 라이팅이 안 이쁘다구요? (A to Z of Lighting)
유니티의 라이팅이 안 이쁘다구요? (A to Z of Lighting)유니티의 라이팅이 안 이쁘다구요? (A to Z of Lighting)
유니티의 라이팅이 안 이쁘다구요? (A to Z of Lighting)
 
Introduce coco2dx with cookingstar
Introduce coco2dx with cookingstarIntroduce coco2dx with cookingstar
Introduce coco2dx with cookingstar
 
Deferred rendering case study
Deferred rendering case studyDeferred rendering case study
Deferred rendering case study
 
Kgc make stereo game on pc
Kgc make stereo game on pcKgc make stereo game on pc
Kgc make stereo game on pc
 
mssao presentation
mssao presentationmssao presentation
mssao presentation
 
Modern gpu optimize blog
Modern gpu optimize blogModern gpu optimize blog
Modern gpu optimize blog
 
Modern gpu optimize
Modern gpu optimizeModern gpu optimize
Modern gpu optimize
 
Bickerstaff benson making3d games on the playstation3
Bickerstaff benson making3d games on the playstation3Bickerstaff benson making3d games on the playstation3
Bickerstaff benson making3d games on the playstation3
 
DOF Depth of Field
DOF Depth of FieldDOF Depth of Field
DOF Depth of Field
 
Hable uncharted2(siggraph%202010%20 advanced%20realtime%20rendering%20course)
Hable uncharted2(siggraph%202010%20 advanced%20realtime%20rendering%20course)Hable uncharted2(siggraph%202010%20 advanced%20realtime%20rendering%20course)
Hable uncharted2(siggraph%202010%20 advanced%20realtime%20rendering%20course)
 
Deferred rendering in_leadwerks_engine[1]
Deferred rendering in_leadwerks_engine[1]Deferred rendering in_leadwerks_engine[1]
Deferred rendering in_leadwerks_engine[1]
 
Deferred shading
Deferred shadingDeferred shading
Deferred shading
 

Recently uploaded

TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024Lonnie McRorey
 
unit 4 immunoblotting technique complete.pptx
unit 4 immunoblotting technique complete.pptxunit 4 immunoblotting technique complete.pptx
unit 4 immunoblotting technique complete.pptxBkGupta21
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsRizwan Syed
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLScyllaDB
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek SchlawackFwdays
 
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxThe Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxLoriGlavin3
 
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxUse of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxLoriGlavin3
 
From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .Alan Dix
 
The State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxThe State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxLoriGlavin3
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr BaganFwdays
 
SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxSAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxNavinnSomaal
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii SoldatenkoFwdays
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Commit University
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebUiPathCommunity
 
SALESFORCE EDUCATION CLOUD | FEXLE SERVICES
SALESFORCE EDUCATION CLOUD | FEXLE SERVICESSALESFORCE EDUCATION CLOUD | FEXLE SERVICES
SALESFORCE EDUCATION CLOUD | FEXLE SERVICESmohitsingh558521
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsSergiu Bodiu
 
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxThe Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxLoriGlavin3
 
Generative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersGenerative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersRaghuram Pandurangan
 

Recently uploaded (20)

TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024
 
unit 4 immunoblotting technique complete.pptx
unit 4 immunoblotting technique complete.pptxunit 4 immunoblotting technique complete.pptx
unit 4 immunoblotting technique complete.pptx
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL Certs
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQL
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
 
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxThe Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
 
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxUse of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
 
From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .
 
The State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxThe State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptx
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan
 
SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxSAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptx
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio Web
 
SALESFORCE EDUCATION CLOUD | FEXLE SERVICES
SALESFORCE EDUCATION CLOUD | FEXLE SERVICESSALESFORCE EDUCATION CLOUD | FEXLE SERVICES
SALESFORCE EDUCATION CLOUD | FEXLE SERVICES
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platforms
 
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxThe Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
 
Generative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersGenerative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information Developers
 

Rendering Realistic Wounds in Left 4 Dead 2 Using Projected Textures and Ellipsoids

  • 1. Rendering Wounds in Left 4 Dead 2 Alex Vlachos, Valve March 9, 2010
  • 2. Outline • Goals • Technical Constraints • Initial Prototype • Final Solution
  • 3. Left 4 Dead 1 Wounds • Built-in • 5 variations only • Requires texture support • Always Fatal
  • 4. The Pitch Gray Horsfield lives for destruction (Gray is a Visual Effects Artist at Valve, previously at Weta)
  • 5. Goals • Accurate location of wounds • Wounds match weapon strength – Remove limbs, torso, head, half of body • Separate wound geometry & textures • Several active/visible wounds per model – Shipped up to 2 active wounds
  • 6. Technical Constraints • Already at memory limits on the Xbox 360 • Didn’t want heavy CPU setup • Ideally wanted a GPU solution • No additional base meshes except for wound geometry – Better for artists to author – Share wound models among many infected
  • 7. Common Infected Variation • Simplest infected has over 24,000 variations • We didn’t want to add another variable to this
  • 8. Things We Didn’t/Couldn’t Do • Model variations of each infected with all combinations of 1 and 2 wounds • Use different index buffers to cull polygons – not friendly with LOD and low quality wound silhouettes • Auto-generate new polygonal meshes with holes cut for wound models • Author different body parts/sections with different wound variations
  • 9. Initial Prototype • Use pose-space ellipsoids to cull pixels • Fill hole with wound model
  • 10. Culling Inside an Ellipsoid • Vertex Shader calculates relative distance • Interpolate this value and clip / texkill
  • 11. Benefits • No additional vertex buffer data • Still only one draw call for full model • Wounds are a separate draw call with their own textures:
  • 12. Problems • Hard cut looked unnatural • Wound models looked strange because they required a lip around the wound border • Lacked blood on the clothes and skin near the border of the wound • Required an exact geometric fit with the model
  • 13. Projected Texture Experiment Try using a projected texture and use alpha to kill pixels
  • 14. Abdominal Wounds • Projected texture will affect his back • So let’s combine the texture and ellipsoid
  • 15. Blood Layer • The texture projection is aligned with an axis of the ellipse • We multiply the blood layer by a gradient to prevent the blood from spraying too far
  • 16. Vertex Shader Code // Subtract off ellipsoid center float3 vLocalPosition = ( vPreSkinnedPosition.xyz - vEllipsoidCenter.xyz ); // Apply rotation and ellipsoid scale. Ellipsoid basis is the orthonormal basis // of the ellipsoid divided by the per-axis ellipsoid size. float3 vEllipsoidPosition; vEllipsoidPosition.x = dot( vEllipsoidSide.xyz, vLocalPosition.xyz ); vEllipsoidPosition.y = dot( vEllipsoidUp.xyz, vLocalPosition.xyz ); vEllipsoidPosition.z = dot( vEllipsoidForward.xyz, vLocalPosition.xyz ); // Use the length of the position in ellipsoid space as input to texkill/clip float fTexkillInput = length( vEllipsoidPosition.xyz ); // We use the xy of the position in ellipsoid space as the texture uv float2 vTextureCoords = vEllipsoidPosition.xy;
  • 17. Other • Depth-only and shadow render passes – You don’t want phantom shadows • Hi-Z performance issues • Wound models are attached to base skeleton of infected model
  • 18. Multiple Wounds We limited the final solution to 2 active wounds
  • 20. Groin
  • 25. Axe & Sword Slashes
  • 27. Stats • Up to 54 unique wounds per model • Each wound is only 13% of the memory cost of the old system in Left 4 Dead 1 • Vertex shader costs 15 instructions – Fill-bound, so rendering perf impacted minimally • Pixel Shader costs 7 instructions
  • 28. Summary • Wound models separate from base mesh • Use pose-space ellipsoids for outer limiting cull volume • Use projected texture for rough edges and blood layer • Additional details about our rendering: http://www.valvesoftware.com/publications.html
  • 29. Thank you! Alex Vlachos, Valve alex@valvesoftware.com