Page 3 of 5

Re: Screenshots for Irrlicht

Posted: Thu May 05, 2016 9:27 pm
by Vectrotek
Image

Re: Screenshots for Irrlicht

Posted: Thu May 05, 2016 9:28 pm
by Vectrotek
Image

Re: Screenshots for Irrlicht

Posted: Thu May 05, 2016 9:29 pm
by Vectrotek
Image

Re: Screenshots for Irrlicht

Posted: Thu May 05, 2016 9:30 pm
by Vectrotek
Tiny Pic messes up again..

Re: Screenshots for Irrlicht

Posted: Thu May 05, 2016 9:31 pm
by Vectrotek

Code: Select all

 
 
 //  - F O G -
 // Fragment Snippet for inspiration..
 
 varying vec2 UVCoordsXY;              // Vanilla..
 varying vec2 UVCoordsXYLIGHTMAP;      // Possible with "*.irrmesh" from Blender with Tubras's IRRB..
                                       // I ignored the scene and just loaded the "*.irrmesh" and gav it this material ID..
 varying vec3 VNormal;                 
 
 varying vec3 VertexGLPosition;
 varying vec3 VertexGLColour;          // Could be used as another method of Image Mixing i.e. Splatting..
                                       // But then your 3D format must support Vertex Colours like "*.stl" (Stanford Polys)
 
 // -------- ---- -- -  other code  
 
 uniform vec3 CameraPos;               // The Position of the camera i.e. the EYE..
                                       
 // *** F O G ***
 float FragCamDist;
 float DBFogFact;     // The key..
 vec3  FragCamDeltas; // Used in Camera to Vertex Distance which matters in Fog..
 
 // =  M A I N  = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 void main()
  {float FOG_MAX_DIST = 150.0;
   vec3 FOG_COLOUR = vec3(0.529, 0.627, 0.608);
   FragCamDeltas = VertexGLPosition - CameraPos;
   // *** other code  *** 
   // Must do a GPU bitshift!!??
   FragCamDist = sqrt ((FragCamDeltas.x * FragCamDeltas.x) + (FragCamDeltas.y * FragCamDeltas.y) + (FragCamDeltas.z * FragCamDeltas.z));
   if (FragCamDist <= FOG_MAX_DIST)
    {DBFogFact =   (1.0 / FOG_MAX_DIST ) *  FragCamDist;
    }
  // It's either Linear Fog with a Further Distance or Squared Fog with a closer distance..
  // DBFogFact *= DBFogFact;       // Bring about a Squared Curve or keep it linear..
 
   if (FragCamDist >= FOG_MAX_DIST) {DBFogFact = 1.0;} // Otherwise fragments sudenly appear beyond the Fog Radius..
   // *** other code  *** 
   // Where MappedMixImageOnLightmapUV.x and y is Mixing Determinant, best painted on vertii and baked on Bitmap Image..
   vec3 PreFogOutput = ((MappedMixImageOnLightmapUV.x * MappedDiffuseOnDiffuseUV.xyz)
                        + (MappedMixImageOnLightmapUV.y * MappedSpecular.xyz))
                        * MappedLightMap.xyz;
                        
   PreFogOutput *= 1.25; // Just an Amp..
   gl_FragColor.xyz = lerp(PreFogOutput  , FOG_COLOUR, DBFogFact); 
 
   gl_FragColor.w = MappedDiffuse.w; // Our "Clip" mapping (not transparency) 
   // "The_Glitch".. This is GLSL but maybe you can convert to HLSL!
  }// -- END -- 
 
 
 
 
 
 
 

Re: Screenshots for Irrlicht

Posted: Thu May 05, 2016 9:37 pm
by Vectrotek
Hand edited piece of the "*.irrmesh" (directory references)..
Much of it not used, but image references important!

Code: Select all

 
   <buffer>
      <material bmat="001_WORLD:001_D_WORLD_GRASS_A.tga:Untitled.001">
         <enum name="Type" value="lightmap"/>
         <color name="Ambient" value="ffffffff"/>
         <color name="Diffuse" value="ffcccccc"/>
         <color name="Emissive" value="ff000000"/>
         <color name="Specular" value="ffffffff"/>
         <float name="Shininess" value="0"/>
         <float name="Param1" value="0"/>
         <float name="Param2" value="0"/>
         <bool name="Wireframe" value="false"/>
         <bool name="GouraudShading" value="true"/>
         <bool name="Lighting" value="true"/>
         <bool name="ZWriteEnable" value="true"/>
         <int name="ZBuffer" value="1"/>
         <bool name="BackfaceCulling" value="true"/>
         <bool name="FrontfaceCulling" value="false"/>
         <bool name="FogEnable" value="false"/>
         <bool name="NormalizeNormals" value="false"/>
         <bool name="UseMipMaps" value="true"/>
         <int name="AntiAliasing" value="1"/>
         <int name="ColorMask" value="15"/>
         <int name="PolygonOffsetFactor" value="0"/>
         <enum name="PolygonOffsetDirection" value="Front"/>
         <texture name="Texture1" value="DATA/0158_OAK_FOREST/001_D_WORLD_GRASS_A.tga"/>
         <enum name="TextureWrapU1" value="texture_clamp_repeat"/>
         <enum name="TextureWrapV1" value="texture_clamp_repeat"/>
         <bool name="BilinearFilter1" value="true"/>
         <bool name="TrilinearFilter1" value="false"/>
         <int name="AnisotropicFilter1" value="0"/>
         <int name="LODBias1" value="0"/>
         <texture name="Texture2" value="DATA/0158_OAK_FOREST/001_A_WORLD_A.tga"/>
         <enum name="TextureWrapU2" value="texture_clamp_repeat"/>
         <enum name="TextureWrapV2" value="texture_clamp_repeat"/>
         <bool name="BilinearFilter2" value="true"/>
         <bool name="TrilinearFilter2" value="false"/>
         <int name="AnisotropicFilter2" value="0"/>
         <int name="LODBias2" value="0"/>
         <texture name="Texture3" value="DATA/0158_OAK_FOREST/001_D_WORLD_ROCKS_A.tga"/>
         <enum name="TextureWrapU3" value="texture_clamp_repeat"/>
         <enum name="TextureWrapV3" value="texture_clamp_repeat"/>
         <bool name="BilinearFilter3" value="true"/>
         <bool name="TrilinearFilter3" value="false"/>
         <int name="AnisotropicFilter3" value="0"/>
         <int name="LODBias3" value="0"/>
         <texture name="Texture4" value="DATA/0158_OAK_FOREST/001_M_WORLD_A.tga"/>
         <enum name="TextureWrapU4" value="texture_clamp_repeat"/>
         <enum name="TextureWrapV4" value="texture_clamp_repeat"/>
         <bool name="BilinearFilter4" value="true"/>
         <bool name="TrilinearFilter4" value="false"/>
         <int name="AnisotropicFilter4" value="0"/>
         <int name="LODBias4" value="0"/>
      </material>
      <vertices type="2tcoords" vertexCount="387">
         16.314362 7.8625 -2.083676 0.110965 0.993103 etc etc etc ......
 

Re: Screenshots for Irrlicht

Posted: Thu May 05, 2016 9:42 pm
by Vectrotek
Image

Re: Screenshots for Irrlicht

Posted: Fri May 06, 2016 7:53 am
by chronologicaldot
Vectrotek wrote:Image
:D I like it! Looks good. Would look interesting with rain, which, I'm under the impression can be done cheaply with the existing built-in particle system. Anyways... What's the project for?

Re: Screenshots for Irrlicht

Posted: Sat May 07, 2016 12:56 am
by Vectrotek
Thanks chronologicaldot! Its part of a game I'm working on.
Also for training material for companies.

Re: Screenshots for Irrlicht

Posted: Sat May 07, 2016 8:32 pm
by The_Glitch
Image

Finally got somewhat decent specular working for my radiosity normal mapping shader without a cubemap.
Now onto fix other things.

Might take a look at vectroteks fog shader he sent me Thanks bud.

Re: Screenshots for Irrlicht

Posted: Mon May 09, 2016 11:38 am
by Mel
Awesome images, all of them :)

Re: Screenshots for Irrlicht

Posted: Mon May 09, 2016 5:36 pm
by Vectrotek
Cool Screenshot The Glitch! See you've hidden the specular..

Re: Screenshots for Irrlicht

Posted: Mon May 09, 2016 5:50 pm
by The_Glitch
What do you mean?

Re: Screenshots for Irrlicht

Posted: Mon May 09, 2016 6:04 pm
by Vectrotek
I mean this.. It looks like your specular does not shine "through the pillar" like this..

I was looking at more DOOM MMXVI movies on YouTube and found this..
You can clearly see the annoying persistence of the Specular Highlight
despite the Light Source being behind the Pillar..
(great job from ID though and one probably wouldn't notice it during this kind of game play)
Image

Re: Screenshots for Irrlicht

Posted: Mon May 09, 2016 6:13 pm
by Vectrotek
Anyhow, here is a screenshot of adding more detail to a nature scene..
Image