SlideShare uma empresa Scribd logo
1 de 33
Baixar para ler offline
Try Real-time Shader for artist.
  Claim back Shader to Softimage artist.


                            CSR&D Support Dept.
                                          Artist
                             Fumoto Kazuhiro
Summary

•   Self-introduction
•   The Advantage to the artist
•   The Realtime-Shader to perform on Softimage
•   Hurdles on learning Shader
    – Shading
    – NormalMap, EnvironmentMap
    – Calculation for expression

•   Goal>Result (to Cgfx)
Self-introduction

•   About CS R&D Support Dept.
    – Graphic library development, Developmental
      environment, Investigation and experiment of the next
      generation graphic

•   About me
       Real-time graphic development.
       In-house tool (such as plug-in) development and
    support (mainly Softimage) for the artist.
          → Technical artist.
An advantage to the artist.

•   The adjustment of the Shader parameter is easy.

•   WYSIWYG - You can see Game Graphics through data
    making.

•   You can get clear knowledge about shader.
    Express higher graphic by learning about the shader
    It doesn’t matter if you can’t write shader code
Face Shader Demo…

•   About Fake image based lighting, Fake sub surface
    scattering…
Simple IBL

•   There are three hurdles to express this Shader.
Hurdle1

• Dot (Inner) product
Hurdle1

•   Shading works out with the dot product of the normal
    vector and the light vector.
    • The expression…
              N・L = cosθ

       Shading : cosθ
       Normar Vector : N
       Light Vector : L
Hurdle1

•   For example…
    The angle of the Normal Vector and the Light Vector is
    60 degrees.
    →Brightness is 0.5.
Hurdle1

•   In Cg Shader…
    float dif1 = dot(normal, light);
•   The dot() calculates the dot-product which is based on
    the data in the parentheses.
•   The data in the parenthesis are Normal Vectors and Light
    Vectors.
•   This expression says that the result which is calculated
    by dot() is put in the variable is called dif1, and declares
    float (few floating mark).
Hurdle1                  struct v2f
                         {
                                float4     hpos : HPOS;
                                float4     color : COL0;
                         };

                         v2f main
                         (

•   Softimage samples.         float4
                               float4
                                          pos : POSITION,
                                          nrml : NORMAL,
                         uniform float4x4 simodelviewproj,
                         uniform float4x4 simodelviewIT,
                         uniform float4x4 simodelview,
                         uniform float3 silightdirection_0
                         )
                         {
                               v2f OUT;

                               OUT.hpos = mul(simodelviewproj, pos);

                               float3 normal = normalize(mul(simodelviewIT, nrml).xyz);
                               float3 lDir1 = normalize(silightdirection_0);

                               float dif1 = dot(normal, lDir1);

                                  if(dif1 < 0) dif1 = 0;
                                  float4 lColor1 = dif1;

                               OUT.color = lColor1;


                               return OUT;
                         }
Hurdle1

                         {
•   Softimage samples.       v2f OUT;
                             OUT.hpos = mul(simodelviewproj, pos);

                             float3 normal = normalize(mul(simodelviewIT,
                             nrml).xyz);
                             float3 lDir1 = normalize(silightdirection_0);

                             float dif1 = dot(normal, lDir1);

                              if(dif1 < 0) dif1 = 0;
                              float4 lColor1 = dif1;
                             OUT.color = lColor1;
                             return OUT;
                         }
Hurdle1

•   Necessary matter
    The dot() from two vector data is used to make
    Shading.
Hurdle1 Other examples…

•   Relations of Vertex Shader and Fragment Shader
•   Specular
    – Blinn-Phong which uses the half vector.
    – Phong which uses the reflection vector.
•   Dot product applied use
    – Using Eyes Vector in substitution for a light vector.
Hurdle2

• Normal Map
  1. Object space
  2. Tangent space
• Environment map
Hurdle2

•   Normal map.
Hurdle2

•   Object space normal map.
    The Object Space Normal Map directly uses RGB
    brightness of texture as XYZ of Normal data.




•   Actually, ( NormalTex – 0.5 ) × 2.
Hurdle2

•   Tangent space normal map.
    • Need to obtain the Normal vector, Tangent vector,
       Binormal vector.
    • The value of the texture used as a normal data based
       on that data.
Hurdle2

•   The kinds of Environment maps.
    1. Simple Environment mapping (sphere)
    2. Dual-Paraboloid mapping
    3. Cube mapping
Hurdle2

•   Dual-Paraboloid Environment mapping
    Uses two environment textures, each with a parabolic
    basis (requires two texture images).
Hurdle1

•   In Cg Shaders…
    if (R.z < 0)                                            ←Front
     {                                                       ┃
       tc0.x = ( -(R.x / (2 * (1 - R.z))) + 0.5) * 0.5;      ┃
       tc0.y = R.y / (2 * (1 - R.z)) + 0.5;                  ┛
    } else if (R.z >= 0)                                    ←Back
    {                                                        ┃
       tc0.x = (R.x / (2 * (1 + R.z)) + 0.5) * 0.5 + 0.5;    ┃
       tc0.y = R.y / (2 * (1 + R.z)) + 0.5;                  ┃
    }                                                        ┛
    •     R:RefrectVector
    •     Tc0.x:U to UV
    •     Tc0.y:V to UV
Hurdle3

• Shader blending
  – Calculation technique to the result
  – Blurring
Hurdle3

•   Calculation technique to the result
    Add (+), Subtract (-), Mutiply (*), Divide (/)
    Color data such as texture or shading which is for the
    final graphic.




    Shading   ×     Texture   +    Flesnel (fake) ×Environmentmap
Hurdle3

•   Image Based Lighting (Fake)…
Hurdle3

•   Blurring of Texture.
    • Program used for blurring a shadow map.
    • Environmental map calculated as Specular
       + Environmental map calculated as Diffuse
       = Image Based Lighting (Fake)
Hurdle3
                    float4 get_softtex(sampler2D map, float2 loc, int siz)
                          {

•
                             float x,y;
    Blur product.            float4 sum = 0;
                             int scl;
                             float n, v;
    Expert from              float2 uv, texmapscale;
                             scl = 4;
    GPU Gems                 v = 1.5f*scl;
                             n = 4.0f*scl;
                             texmapscale.x = 1.0f/512.0 * siz;               set a parameter
                             texmapscale.y = 1.0f/512.0 * siz;
                                        for( y=-v ; y<=v ; y+=1.0f ){
                                                                                 here
                                      for( x=-v; x<= v; x+=1.0f ){
                                      uv.x = loc.x + x * texmapscale;
                                      uv.y = loc.y + y * texmapscale;
                                              sum += tex2D(map, uv);
                            }
                             }
                             sum = sum / (n*n);
                             sum.a = 1.0f;
                             return(sum);
                          }
The First Goal
An appendix

•   Link of parameter and animation (DEMO1)
An appendix

•   Link of parameter and animation (DEMO2)
Next step

•   Shader effect file
    CgFX, Dxfx…
Document
Q & A…

 Thank you…




 Fumoto_Kazuhiro@sega.co.jp

Mais conteúdo relacionado

Mais procurados

XNA L08–Amazing XNA Utilities
XNA L08–Amazing XNA UtilitiesXNA L08–Amazing XNA Utilities
XNA L08–Amazing XNA UtilitiesMohammad Shaker
 
Lesson 28: The Fundamental Theorem of Calculus
Lesson 28: The Fundamental Theorem of CalculusLesson 28: The Fundamental Theorem of Calculus
Lesson 28: The Fundamental Theorem of CalculusMatthew Leingang
 
Matlab 2
Matlab 2Matlab 2
Matlab 2asguna
 
Cea0001 ppt project
Cea0001 ppt projectCea0001 ppt project
Cea0001 ppt projectcea0001
 
Computer graphics lab report with code in cpp
Computer graphics lab report with code in cppComputer graphics lab report with code in cpp
Computer graphics lab report with code in cppAlamgir Hossain
 
Beginning direct3d gameprogramming06_firststepstoanimation_20161115_jintaeks
Beginning direct3d gameprogramming06_firststepstoanimation_20161115_jintaeksBeginning direct3d gameprogramming06_firststepstoanimation_20161115_jintaeks
Beginning direct3d gameprogramming06_firststepstoanimation_20161115_jintaeksJinTaek Seo
 
Task based Programming with OmpSs and its Application
Task based Programming with OmpSs and its ApplicationTask based Programming with OmpSs and its Application
Task based Programming with OmpSs and its ApplicationFacultad de Informática UCM
 
Computer graphics lab manual
Computer graphics lab manualComputer graphics lab manual
Computer graphics lab manualUma mohan
 
XNA L11–Shaders Part 2
XNA L11–Shaders Part 2XNA L11–Shaders Part 2
XNA L11–Shaders Part 2Mohammad Shaker
 
XNA L10–Shaders Part 1
XNA L10–Shaders Part 1XNA L10–Shaders Part 1
XNA L10–Shaders Part 1Mohammad Shaker
 
Lesson 26: The Fundamental Theorem of Calculus (Section 4 version)
Lesson 26: The Fundamental Theorem of Calculus (Section 4 version)Lesson 26: The Fundamental Theorem of Calculus (Section 4 version)
Lesson 26: The Fundamental Theorem of Calculus (Section 4 version)Matthew Leingang
 
237654933 mathematics-t-form-6
237654933 mathematics-t-form-6237654933 mathematics-t-form-6
237654933 mathematics-t-form-6homeworkping3
 
The Object Oriented Paradigm in perspective
The Object Oriented Paradigm in perspectiveThe Object Oriented Paradigm in perspective
The Object Oriented Paradigm in perspectiveRuben Gonzalez Blanco
 
Computer Graphics Lab
Computer Graphics LabComputer Graphics Lab
Computer Graphics LabNeil Mathew
 
Lesson 30: The Definite Integral
Lesson 30: The  Definite  IntegralLesson 30: The  Definite  Integral
Lesson 30: The Definite IntegralMatthew Leingang
 
Beginning direct3d gameprogramming07_lightsandmaterials_20161117_jintaeks
Beginning direct3d gameprogramming07_lightsandmaterials_20161117_jintaeksBeginning direct3d gameprogramming07_lightsandmaterials_20161117_jintaeks
Beginning direct3d gameprogramming07_lightsandmaterials_20161117_jintaeksJinTaek Seo
 

Mais procurados (20)

XNA L08–Amazing XNA Utilities
XNA L08–Amazing XNA UtilitiesXNA L08–Amazing XNA Utilities
XNA L08–Amazing XNA Utilities
 
Lesson 28: The Fundamental Theorem of Calculus
Lesson 28: The Fundamental Theorem of CalculusLesson 28: The Fundamental Theorem of Calculus
Lesson 28: The Fundamental Theorem of Calculus
 
Matlab 2
Matlab 2Matlab 2
Matlab 2
 
Cea0001 ppt project
Cea0001 ppt projectCea0001 ppt project
Cea0001 ppt project
 
Computer graphics lab report with code in cpp
Computer graphics lab report with code in cppComputer graphics lab report with code in cpp
Computer graphics lab report with code in cpp
 
Beginning direct3d gameprogramming06_firststepstoanimation_20161115_jintaeks
Beginning direct3d gameprogramming06_firststepstoanimation_20161115_jintaeksBeginning direct3d gameprogramming06_firststepstoanimation_20161115_jintaeks
Beginning direct3d gameprogramming06_firststepstoanimation_20161115_jintaeks
 
Task based Programming with OmpSs and its Application
Task based Programming with OmpSs and its ApplicationTask based Programming with OmpSs and its Application
Task based Programming with OmpSs and its Application
 
Computer graphics lab manual
Computer graphics lab manualComputer graphics lab manual
Computer graphics lab manual
 
XNA L11–Shaders Part 2
XNA L11–Shaders Part 2XNA L11–Shaders Part 2
XNA L11–Shaders Part 2
 
Light and Shadows
Light and ShadowsLight and Shadows
Light and Shadows
 
XNA L10–Shaders Part 1
XNA L10–Shaders Part 1XNA L10–Shaders Part 1
XNA L10–Shaders Part 1
 
Lesson 26: The Fundamental Theorem of Calculus (Section 4 version)
Lesson 26: The Fundamental Theorem of Calculus (Section 4 version)Lesson 26: The Fundamental Theorem of Calculus (Section 4 version)
Lesson 26: The Fundamental Theorem of Calculus (Section 4 version)
 
237654933 mathematics-t-form-6
237654933 mathematics-t-form-6237654933 mathematics-t-form-6
237654933 mathematics-t-form-6
 
The Object Oriented Paradigm in perspective
The Object Oriented Paradigm in perspectiveThe Object Oriented Paradigm in perspective
The Object Oriented Paradigm in perspective
 
Cgm Lab Manual
Cgm Lab ManualCgm Lab Manual
Cgm Lab Manual
 
numdoc
numdocnumdoc
numdoc
 
Computer Graphics Lab
Computer Graphics LabComputer Graphics Lab
Computer Graphics Lab
 
Lesson 30: The Definite Integral
Lesson 30: The  Definite  IntegralLesson 30: The  Definite  Integral
Lesson 30: The Definite Integral
 
Beginning direct3d gameprogramming07_lightsandmaterials_20161117_jintaeks
Beginning direct3d gameprogramming07_lightsandmaterials_20161117_jintaeksBeginning direct3d gameprogramming07_lightsandmaterials_20161117_jintaeks
Beginning direct3d gameprogramming07_lightsandmaterials_20161117_jintaeks
 
Cs 601
Cs 601Cs 601
Cs 601
 

Semelhante a SA09 Realtime education

CG OpenGL Shadows + Light + Texture -course 10
CG OpenGL Shadows + Light + Texture -course 10CG OpenGL Shadows + Light + Texture -course 10
CG OpenGL Shadows + Light + Texture -course 10fungfung Chen
 
[shaderx5] 4.2 Multisampling Extension for Gradient Shadow Maps
[shaderx5] 4.2 Multisampling Extension for Gradient Shadow Maps[shaderx5] 4.2 Multisampling Extension for Gradient Shadow Maps
[shaderx5] 4.2 Multisampling Extension for Gradient Shadow Maps종빈 오
 
Swift for tensorflow
Swift for tensorflowSwift for tensorflow
Swift for tensorflow규영 허
 
Beginning direct3d gameprogramming10_shaderdetail_20160506_jintaeks
Beginning direct3d gameprogramming10_shaderdetail_20160506_jintaeksBeginning direct3d gameprogramming10_shaderdetail_20160506_jintaeks
Beginning direct3d gameprogramming10_shaderdetail_20160506_jintaeksJinTaek Seo
 
CS 354 Acceleration Structures
CS 354 Acceleration StructuresCS 354 Acceleration Structures
CS 354 Acceleration StructuresMark Kilgard
 
Trident International Graphics Workshop 2014 4/5
Trident International Graphics Workshop 2014 4/5Trident International Graphics Workshop 2014 4/5
Trident International Graphics Workshop 2014 4/5Takao Wada
 
Trident International Graphics Workshop 2014 2/5
Trident International Graphics Workshop 2014 2/5Trident International Graphics Workshop 2014 2/5
Trident International Graphics Workshop 2014 2/5Takao Wada
 
CG OpenGL surface detection+illumination+rendering models-course 9
CG OpenGL surface detection+illumination+rendering models-course 9CG OpenGL surface detection+illumination+rendering models-course 9
CG OpenGL surface detection+illumination+rendering models-course 9fungfung Chen
 
Trident International Graphics Workshop2014 3/5
Trident International Graphics Workshop2014 3/5Trident International Graphics Workshop2014 3/5
Trident International Graphics Workshop2014 3/5Takao Wada
 
Lecture01 fractals
Lecture01 fractalsLecture01 fractals
Lecture01 fractalsvijay bane
 
Fractal Rendering in Developer C++ - 2012-11-06
Fractal Rendering in Developer C++ - 2012-11-06Fractal Rendering in Developer C++ - 2012-11-06
Fractal Rendering in Developer C++ - 2012-11-06Aritra Sarkar
 
Nodebox for Data Visualization
Nodebox for Data VisualizationNodebox for Data Visualization
Nodebox for Data VisualizationLynn Cherny
 
Trident International Graphics Workshop 2014 5/5
Trident International Graphics Workshop 2014 5/5Trident International Graphics Workshop 2014 5/5
Trident International Graphics Workshop 2014 5/5Takao Wada
 
Ch01 basic concepts_nosoluiton
Ch01 basic concepts_nosoluitonCh01 basic concepts_nosoluiton
Ch01 basic concepts_nosoluitonshin
 
03 image transformations_i
03 image transformations_i03 image transformations_i
03 image transformations_iankit_ppt
 
VHDL and Cordic Algorithim
VHDL and Cordic AlgorithimVHDL and Cordic Algorithim
VHDL and Cordic AlgorithimSubeer Rangra
 
Beginning direct3d gameprogramming09_shaderprogramming_20160505_jintaeks
Beginning direct3d gameprogramming09_shaderprogramming_20160505_jintaeksBeginning direct3d gameprogramming09_shaderprogramming_20160505_jintaeks
Beginning direct3d gameprogramming09_shaderprogramming_20160505_jintaeksJinTaek Seo
 
building_games_with_ruby_rubyconf
building_games_with_ruby_rubyconfbuilding_games_with_ruby_rubyconf
building_games_with_ruby_rubyconftutorialsruby
 

Semelhante a SA09 Realtime education (20)

CG OpenGL Shadows + Light + Texture -course 10
CG OpenGL Shadows + Light + Texture -course 10CG OpenGL Shadows + Light + Texture -course 10
CG OpenGL Shadows + Light + Texture -course 10
 
[shaderx5] 4.2 Multisampling Extension for Gradient Shadow Maps
[shaderx5] 4.2 Multisampling Extension for Gradient Shadow Maps[shaderx5] 4.2 Multisampling Extension for Gradient Shadow Maps
[shaderx5] 4.2 Multisampling Extension for Gradient Shadow Maps
 
Swift for tensorflow
Swift for tensorflowSwift for tensorflow
Swift for tensorflow
 
Beginning direct3d gameprogramming10_shaderdetail_20160506_jintaeks
Beginning direct3d gameprogramming10_shaderdetail_20160506_jintaeksBeginning direct3d gameprogramming10_shaderdetail_20160506_jintaeks
Beginning direct3d gameprogramming10_shaderdetail_20160506_jintaeks
 
CS 354 Acceleration Structures
CS 354 Acceleration StructuresCS 354 Acceleration Structures
CS 354 Acceleration Structures
 
Trident International Graphics Workshop 2014 4/5
Trident International Graphics Workshop 2014 4/5Trident International Graphics Workshop 2014 4/5
Trident International Graphics Workshop 2014 4/5
 
Refactoring
RefactoringRefactoring
Refactoring
 
Trident International Graphics Workshop 2014 2/5
Trident International Graphics Workshop 2014 2/5Trident International Graphics Workshop 2014 2/5
Trident International Graphics Workshop 2014 2/5
 
CG OpenGL surface detection+illumination+rendering models-course 9
CG OpenGL surface detection+illumination+rendering models-course 9CG OpenGL surface detection+illumination+rendering models-course 9
CG OpenGL surface detection+illumination+rendering models-course 9
 
Trident International Graphics Workshop2014 3/5
Trident International Graphics Workshop2014 3/5Trident International Graphics Workshop2014 3/5
Trident International Graphics Workshop2014 3/5
 
Lecture01 fractals
Lecture01 fractalsLecture01 fractals
Lecture01 fractals
 
Fractal Rendering in Developer C++ - 2012-11-06
Fractal Rendering in Developer C++ - 2012-11-06Fractal Rendering in Developer C++ - 2012-11-06
Fractal Rendering in Developer C++ - 2012-11-06
 
Glowworm Swarm Optimisation
Glowworm Swarm OptimisationGlowworm Swarm Optimisation
Glowworm Swarm Optimisation
 
Nodebox for Data Visualization
Nodebox for Data VisualizationNodebox for Data Visualization
Nodebox for Data Visualization
 
Trident International Graphics Workshop 2014 5/5
Trident International Graphics Workshop 2014 5/5Trident International Graphics Workshop 2014 5/5
Trident International Graphics Workshop 2014 5/5
 
Ch01 basic concepts_nosoluiton
Ch01 basic concepts_nosoluitonCh01 basic concepts_nosoluiton
Ch01 basic concepts_nosoluiton
 
03 image transformations_i
03 image transformations_i03 image transformations_i
03 image transformations_i
 
VHDL and Cordic Algorithim
VHDL and Cordic AlgorithimVHDL and Cordic Algorithim
VHDL and Cordic Algorithim
 
Beginning direct3d gameprogramming09_shaderprogramming_20160505_jintaeks
Beginning direct3d gameprogramming09_shaderprogramming_20160505_jintaeksBeginning direct3d gameprogramming09_shaderprogramming_20160505_jintaeks
Beginning direct3d gameprogramming09_shaderprogramming_20160505_jintaeks
 
building_games_with_ruby_rubyconf
building_games_with_ruby_rubyconfbuilding_games_with_ruby_rubyconf
building_games_with_ruby_rubyconf
 

Mais de fumoto kazuhiro

Tabc vol3 テクニカルアーティストを始めるにあたって
Tabc vol3 テクニカルアーティストを始めるにあたってTabc vol3 テクニカルアーティストを始めるにあたって
Tabc vol3 テクニカルアーティストを始めるにあたってfumoto kazuhiro
 
Kansai cedec 2015_fumoto
Kansai cedec 2015_fumotoKansai cedec 2015_fumoto
Kansai cedec 2015_fumotofumoto kazuhiro
 
シェーダ体系の話
シェーダ体系の話シェーダ体系の話
シェーダ体系の話fumoto kazuhiro
 
TAと歩くGDC2013報告会資料
TAと歩くGDC2013報告会資料TAと歩くGDC2013報告会資料
TAと歩くGDC2013報告会資料fumoto kazuhiro
 
Siggraph2012報告会前半
Siggraph2012報告会前半Siggraph2012報告会前半
Siggraph2012報告会前半fumoto kazuhiro
 
究極のバッチフレームワーク(予定)
究極のバッチフレームワーク(予定)究極のバッチフレームワーク(予定)
究極のバッチフレームワーク(予定)fumoto kazuhiro
 
ネットワークコマンド入力に対応したツール事例
ネットワークコマンド入力に対応したツール事例ネットワークコマンド入力に対応したツール事例
ネットワークコマンド入力に対応したツール事例fumoto kazuhiro
 
そうだRTシェーダをはじめよう
そうだRTシェーダをはじめようそうだRTシェーダをはじめよう
そうだRTシェーダをはじめようfumoto kazuhiro
 
Cedec taラウンドテーブル プログラマー編
Cedec taラウンドテーブル プログラマー編Cedec taラウンドテーブル プログラマー編
Cedec taラウンドテーブル プログラマー編fumoto kazuhiro
 
Gdc2011報告会用 fumotokz
Gdc2011報告会用 fumotokzGdc2011報告会用 fumotokz
Gdc2011報告会用 fumotokzfumoto kazuhiro
 
物理ベースの絵作りのための基礎
物理ベースの絵作りのための基礎物理ベースの絵作りのための基礎
物理ベースの絵作りのための基礎fumoto kazuhiro
 
海外Ta事情から日本のta像について考えてみる
海外Ta事情から日本のta像について考えてみる海外Ta事情から日本のta像について考えてみる
海外Ta事情から日本のta像について考えてみるfumoto kazuhiro
 
Dccツール別リアルタイムシェーダの環境
Dccツール別リアルタイムシェーダの環境Dccツール別リアルタイムシェーダの環境
Dccツール別リアルタイムシェーダの環境fumoto kazuhiro
 
データフロー自動化ツールの考え方
データフロー自動化ツールの考え方データフロー自動化ツールの考え方
データフロー自動化ツールの考え方fumoto kazuhiro
 
第一回テクニカルアーティストラウンドテーブル・セッション
第一回テクニカルアーティストラウンドテーブル・セッション第一回テクニカルアーティストラウンドテーブル・セッション
第一回テクニカルアーティストラウンドテーブル・セッションfumoto kazuhiro
 

Mais de fumoto kazuhiro (18)

Tabc vol3 テクニカルアーティストを始めるにあたって
Tabc vol3 テクニカルアーティストを始めるにあたってTabc vol3 テクニカルアーティストを始めるにあたって
Tabc vol3 テクニカルアーティストを始めるにあたって
 
Kansai cedec 2015_fumoto
Kansai cedec 2015_fumotoKansai cedec 2015_fumoto
Kansai cedec 2015_fumoto
 
シェーダ体系の話
シェーダ体系の話シェーダ体系の話
シェーダ体系の話
 
TAと歩くGDC2013報告会資料
TAと歩くGDC2013報告会資料TAと歩くGDC2013報告会資料
TAと歩くGDC2013報告会資料
 
Siggraph2012報告会前半
Siggraph2012報告会前半Siggraph2012報告会前半
Siggraph2012報告会前半
 
究極のバッチフレームワーク(予定)
究極のバッチフレームワーク(予定)究極のバッチフレームワーク(予定)
究極のバッチフレームワーク(予定)
 
ネットワークコマンド入力に対応したツール事例
ネットワークコマンド入力に対応したツール事例ネットワークコマンド入力に対応したツール事例
ネットワークコマンド入力に対応したツール事例
 
そうだRTシェーダをはじめよう
そうだRTシェーダをはじめようそうだRTシェーダをはじめよう
そうだRTシェーダをはじめよう
 
Taと歩くgdc2012 up
Taと歩くgdc2012 upTaと歩くgdc2012 up
Taと歩くgdc2012 up
 
Tart2011 Art sub
Tart2011 Art subTart2011 Art sub
Tart2011 Art sub
 
Cedec taラウンドテーブル プログラマー編
Cedec taラウンドテーブル プログラマー編Cedec taラウンドテーブル プログラマー編
Cedec taラウンドテーブル プログラマー編
 
Gdc2011報告会用 fumotokz
Gdc2011報告会用 fumotokzGdc2011報告会用 fumotokz
Gdc2011報告会用 fumotokz
 
Cyma gdc2011 tabc報告
Cyma gdc2011 tabc報告Cyma gdc2011 tabc報告
Cyma gdc2011 tabc報告
 
物理ベースの絵作りのための基礎
物理ベースの絵作りのための基礎物理ベースの絵作りのための基礎
物理ベースの絵作りのための基礎
 
海外Ta事情から日本のta像について考えてみる
海外Ta事情から日本のta像について考えてみる海外Ta事情から日本のta像について考えてみる
海外Ta事情から日本のta像について考えてみる
 
Dccツール別リアルタイムシェーダの環境
Dccツール別リアルタイムシェーダの環境Dccツール別リアルタイムシェーダの環境
Dccツール別リアルタイムシェーダの環境
 
データフロー自動化ツールの考え方
データフロー自動化ツールの考え方データフロー自動化ツールの考え方
データフロー自動化ツールの考え方
 
第一回テクニカルアーティストラウンドテーブル・セッション
第一回テクニカルアーティストラウンドテーブル・セッション第一回テクニカルアーティストラウンドテーブル・セッション
第一回テクニカルアーティストラウンドテーブル・セッション
 

Último

A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)Gabriella Davis
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAndrey Devyatkin
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?Igalia
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Enterprise Knowledge
 
HTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation StrategiesHTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation StrategiesBoston Institute of Analytics
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024The Digital Insurer
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsJoaquim Jorge
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)wesley chun
 
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
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptxHampshireHUG
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CVKhem
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processorsdebabhi2
 
Tech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdfTech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdfhans926745
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfsudhanshuwaghmare1
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?Antenna Manufacturer Coco
 
Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessAdvantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessPixlogix Infotech
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...Neo4j
 

Último (20)

A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
 
HTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation StrategiesHTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation Strategies
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
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...
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
Tech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdfTech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdf
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?
 
Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessAdvantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your Business
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 

SA09 Realtime education

  • 1.
  • 2. Try Real-time Shader for artist. Claim back Shader to Softimage artist. CSR&D Support Dept. Artist Fumoto Kazuhiro
  • 3. Summary • Self-introduction • The Advantage to the artist • The Realtime-Shader to perform on Softimage • Hurdles on learning Shader – Shading – NormalMap, EnvironmentMap – Calculation for expression • Goal>Result (to Cgfx)
  • 4. Self-introduction • About CS R&D Support Dept. – Graphic library development, Developmental environment, Investigation and experiment of the next generation graphic • About me Real-time graphic development. In-house tool (such as plug-in) development and support (mainly Softimage) for the artist. → Technical artist.
  • 5. An advantage to the artist. • The adjustment of the Shader parameter is easy. • WYSIWYG - You can see Game Graphics through data making. • You can get clear knowledge about shader. Express higher graphic by learning about the shader It doesn’t matter if you can’t write shader code
  • 6. Face Shader Demo… • About Fake image based lighting, Fake sub surface scattering…
  • 7. Simple IBL • There are three hurdles to express this Shader.
  • 9. Hurdle1 • Shading works out with the dot product of the normal vector and the light vector. • The expression… N・L = cosθ Shading : cosθ Normar Vector : N Light Vector : L
  • 10. Hurdle1 • For example… The angle of the Normal Vector and the Light Vector is 60 degrees. →Brightness is 0.5.
  • 11. Hurdle1 • In Cg Shader… float dif1 = dot(normal, light); • The dot() calculates the dot-product which is based on the data in the parentheses. • The data in the parenthesis are Normal Vectors and Light Vectors. • This expression says that the result which is calculated by dot() is put in the variable is called dif1, and declares float (few floating mark).
  • 12. Hurdle1 struct v2f { float4 hpos : HPOS; float4 color : COL0; }; v2f main ( • Softimage samples. float4 float4 pos : POSITION, nrml : NORMAL, uniform float4x4 simodelviewproj, uniform float4x4 simodelviewIT, uniform float4x4 simodelview, uniform float3 silightdirection_0 ) { v2f OUT; OUT.hpos = mul(simodelviewproj, pos); float3 normal = normalize(mul(simodelviewIT, nrml).xyz); float3 lDir1 = normalize(silightdirection_0); float dif1 = dot(normal, lDir1); if(dif1 < 0) dif1 = 0; float4 lColor1 = dif1; OUT.color = lColor1; return OUT; }
  • 13. Hurdle1 { • Softimage samples. v2f OUT; OUT.hpos = mul(simodelviewproj, pos); float3 normal = normalize(mul(simodelviewIT, nrml).xyz); float3 lDir1 = normalize(silightdirection_0); float dif1 = dot(normal, lDir1); if(dif1 < 0) dif1 = 0; float4 lColor1 = dif1; OUT.color = lColor1; return OUT; }
  • 14. Hurdle1 • Necessary matter The dot() from two vector data is used to make Shading.
  • 15. Hurdle1 Other examples… • Relations of Vertex Shader and Fragment Shader • Specular – Blinn-Phong which uses the half vector. – Phong which uses the reflection vector. • Dot product applied use – Using Eyes Vector in substitution for a light vector.
  • 16. Hurdle2 • Normal Map 1. Object space 2. Tangent space • Environment map
  • 17. Hurdle2 • Normal map.
  • 18. Hurdle2 • Object space normal map. The Object Space Normal Map directly uses RGB brightness of texture as XYZ of Normal data. • Actually, ( NormalTex – 0.5 ) × 2.
  • 19. Hurdle2 • Tangent space normal map. • Need to obtain the Normal vector, Tangent vector, Binormal vector. • The value of the texture used as a normal data based on that data.
  • 20. Hurdle2 • The kinds of Environment maps. 1. Simple Environment mapping (sphere) 2. Dual-Paraboloid mapping 3. Cube mapping
  • 21. Hurdle2 • Dual-Paraboloid Environment mapping Uses two environment textures, each with a parabolic basis (requires two texture images).
  • 22. Hurdle1 • In Cg Shaders… if (R.z < 0) ←Front { ┃ tc0.x = ( -(R.x / (2 * (1 - R.z))) + 0.5) * 0.5; ┃ tc0.y = R.y / (2 * (1 - R.z)) + 0.5; ┛ } else if (R.z >= 0) ←Back { ┃ tc0.x = (R.x / (2 * (1 + R.z)) + 0.5) * 0.5 + 0.5; ┃ tc0.y = R.y / (2 * (1 + R.z)) + 0.5; ┃ } ┛ • R:RefrectVector • Tc0.x:U to UV • Tc0.y:V to UV
  • 23. Hurdle3 • Shader blending – Calculation technique to the result – Blurring
  • 24. Hurdle3 • Calculation technique to the result Add (+), Subtract (-), Mutiply (*), Divide (/) Color data such as texture or shading which is for the final graphic. Shading × Texture + Flesnel (fake) ×Environmentmap
  • 25. Hurdle3 • Image Based Lighting (Fake)…
  • 26. Hurdle3 • Blurring of Texture. • Program used for blurring a shadow map. • Environmental map calculated as Specular + Environmental map calculated as Diffuse = Image Based Lighting (Fake)
  • 27. Hurdle3 float4 get_softtex(sampler2D map, float2 loc, int siz) { • float x,y; Blur product. float4 sum = 0; int scl; float n, v; Expert from float2 uv, texmapscale; scl = 4; GPU Gems v = 1.5f*scl; n = 4.0f*scl; texmapscale.x = 1.0f/512.0 * siz; set a parameter texmapscale.y = 1.0f/512.0 * siz; for( y=-v ; y<=v ; y+=1.0f ){ here for( x=-v; x<= v; x+=1.0f ){ uv.x = loc.x + x * texmapscale; uv.y = loc.y + y * texmapscale; sum += tex2D(map, uv); } } sum = sum / (n*n); sum.a = 1.0f; return(sum); }
  • 29. An appendix • Link of parameter and animation (DEMO1)
  • 30. An appendix • Link of parameter and animation (DEMO2)
  • 31. Next step • Shader effect file CgFX, Dxfx…
  • 33. Q & A… Thank you… Fumoto_Kazuhiro@sega.co.jp