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

Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountPuma Security, LLC
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...shyamraj55
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure servicePooja Nehwal
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking MenDelhi Call girls
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slidespraypatel2
 
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024BookNet Canada
 
Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Paola De la Torre
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking MenDelhi Call girls
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxMalak Abu Hammad
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Allon Mureinik
 
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...gurkirankumar98700
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreternaman860154
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Drew Madelung
 
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Alan Dix
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...HostedbyConfluent
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdfhans926745
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024Scott Keck-Warren
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Miguel Araújo
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesSinan KOZAK
 

Recently uploaded (20)

Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slides
 
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
 
Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)
 
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen Frames
 

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