Screenshots for Irrlicht
Re: Screenshots for Irrlicht
Tiny Pic messes up again..
Last edited by Vectrotek on Fri Sep 30, 2016 8:36 pm, edited 1 time in total.
Re: Screenshots for Irrlicht
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
Hand edited piece of the "*.irrmesh" (directory references)..
Much of it not used, but image references important!
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 ......
-
- Competition winner
- Posts: 685
- Joined: Mon Sep 10, 2012 8:51 am
Re: Screenshots for Irrlicht
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?Vectrotek wrote:
Re: Screenshots for Irrlicht
Thanks chronologicaldot! Its part of a game I'm working on.
Also for training material for companies.
Also for training material for companies.
-
- Competition winner
- Posts: 523
- Joined: Tue Jan 15, 2013 6:36 pm
Re: Screenshots for Irrlicht
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
Awesome images, all of them
"There is nothing truly useless, it always serves as a bad example". Arthur A. Schmitt
Re: Screenshots for Irrlicht
Cool Screenshot The Glitch! See you've hidden the specular..
-
- Competition winner
- Posts: 523
- Joined: Tue Jan 15, 2013 6:36 pm
Re: Screenshots for Irrlicht
What do you mean?
Re: Screenshots for Irrlicht
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)
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)
Last edited by Vectrotek on Mon May 09, 2016 6:16 pm, edited 1 time in total.
Re: Screenshots for Irrlicht
Anyhow, here is a screenshot of adding more detail to a nature scene..