Reply to topic  [ 38 posts ]  Go to page 1, 2, 3  Next
 SK ReMewed 
Author Message
Level 22
Level 22
User avatar

Cash on hand:
174,929.20
Posts: 2255
Joined: Sat Nov 17, 2012 11:10 am
Location: SR388
Group: Special Access
Post SK ReMewed
Tentative title: Sex Kitten Re-Mewed/Re-Nude/Re-j00ed
Status: Idea; visualized, Game design document; blank, Knowledge of 'How to'; 95% (5% untested but theorized).
Current State: scenery grafting - time-table for completion of step; 2 weeks.
[Rainbow]Currently working on: Start screen scene, will present initial 3D when done.[/Rainbow]
Next step: Doors, spawn points and multiple choice question boxes.

Goal/Core: Original SK in explorable 3D environment.

Content: With extras? please comment (mini-games, more rewards? what rewards?) .

Where-froms!: Whats in-between the known scenes? hallways? elevators? ETC.

Backstory?

Adjusted introduction texts (credits) to include some lines by us?

_________________
mepsipax

Image

got any?

His name is not Robert Paulsen, His name is Gregory Matthew Bruni, he won so hard.

_________________
Click the icon to see the image in fullscreen mode  
1 pcs.
Click the icon to see the image in fullscreen mode  
1 pcs.
Click the icon to see the image in fullscreen mode  
1 pcs.
Click the icon to see the image in fullscreen mode  
1 pcs.


Mon Nov 10, 2014 8:38 am
Profile E-mail
Level 39
Level 39
User avatar

Cash on hand:
2,187.55

Bank:
5,250.50
Posts: 21063
Joined: Sat Feb 14, 2009 11:44 pm
Group: Sysop
Post Re: SK ReMewed
Escargo Express delivery!

BGM

Here are your files, in supercompressed .7z format!

Delivery cost will be 18FH$. Have a nice day!

_________________
Image
Yeap.

_________________
Click the icon to see the image in fullscreen mode  
1 pcs.
Click the icon to see the image in fullscreen mode  
4 pcs.


Mon Nov 10, 2014 2:32 pm
Profile E-mail WWW
Level 22
Level 22
User avatar

Cash on hand:
174,929.20
Posts: 2255
Joined: Sat Nov 17, 2012 11:10 am
Location: SR388
Group: Special Access
Post Re: SK ReMewed
YomToxic wrote:
Escargo Express delivery!

BGM

Here are your files, in supercompressed .7z format!

Delivery cost will be 18FH$. Have a nice day!


the music has a similar tune but the embedded tune is more hard core (some wave synth editing no doubt), it's ok I can probably rip the mp3 myself with SWFTOOLS.

delivery fee being paid and status changing!

MP3 objects were fake! -m and -M all fail with errors saying file is not an mp3 no sound files found.

-s however "-s12" gets a 76kb mp3 sound-stream containing teh musics. ... uploading for future reference

http://s000.tinyupload.com/index.php?fi ... 6281456664

Edit!!!!!!

I just checked and You did rip the sound file in the .7z file! sorry Yom I should have checked there first before assuming the youtube video was the sound source you were giving.

Yom gave me everything I NEEDZ

EDIT:

Attempt 1 Scene 1: Flail. actually it wasn't too bad but I should start with a cube rather than a plane

EDIT:

Attempt 2 Scene 1: Flail. it was better than attempt 1 at least but the cube system didn't work I will have to dissect the image into it's components.

Attempt 3 Scene 1: In Progress, I think I've got the hang of this now.

_________________
mepsipax

Image

got any?

His name is not Robert Paulsen, His name is Gregory Matthew Bruni, he won so hard.

_________________
Click the icon to see the image in fullscreen mode  
1 pcs.
Click the icon to see the image in fullscreen mode  
1 pcs.
Click the icon to see the image in fullscreen mode  
1 pcs.
Click the icon to see the image in fullscreen mode  
1 pcs.


Mon Nov 10, 2014 2:58 pm
Profile E-mail
Level 22
Level 22
User avatar

Cash on hand:
174,929.20
Posts: 2255
Joined: Sat Nov 17, 2012 11:10 am
Location: SR388
Group: Special Access
Post Re: SK ReMewed
Image

Humble beginnings as scene 1 Attempt 3 takes form! haven't had much time to work on it what with having to get up early and rush to be a research participant for some spending money, but I did get quite a bit done and it seems to be coming along much better than attempts 1 and 2 which were minimal quality.

Its been half a week, I think if I work hard I can meet the schedule for a ghost play of the game.

Edit, rainbow added, yet to finish the water and sky, finishing beach today.

_________________
mepsipax

Image

got any?

His name is not Robert Paulsen, His name is Gregory Matthew Bruni, he won so hard.

_________________
Click the icon to see the image in fullscreen mode  
1 pcs.
Click the icon to see the image in fullscreen mode  
1 pcs.
Click the icon to see the image in fullscreen mode  
1 pcs.
Click the icon to see the image in fullscreen mode  
1 pcs.


Thu Nov 13, 2014 7:12 pm
Profile E-mail
Level 39
Level 39
User avatar

Cash on hand:
2,187.55

Bank:
5,250.50
Posts: 21063
Joined: Sat Feb 14, 2009 11:44 pm
Group: Sysop
Post Re: SK ReMewed
The world was without form. No light, no wind. No form.

And then, a new creator challenged the void.

_________________
Image
Yeap.

_________________
Click the icon to see the image in fullscreen mode  
1 pcs.
Click the icon to see the image in fullscreen mode  
4 pcs.


Thu Nov 13, 2014 7:28 pm
Profile E-mail WWW
Level 38
Level 38
User avatar

Cash on hand:
435.45

Bank:
2,750,364.30
Posts: 10364
Joined: Sun Oct 26, 2008 5:47 am
Group: Dev Team
Post Re: SK ReMewed
do you want some cool water shaders?
Here's a cool example water shader by some dude named Wojciech Toman.
Spoiler: show
Code:
// Water pixel shader
// Copyright (C) Wojciech Toman 2009

sampler heightMap: register(s0);
sampler backBufferMap: register(s1);
sampler positionMap: register(s2);
sampler normalMap: register(s3);
sampler foamMap: register(s4);
sampler reflectionMap: register(s5);

// We need this matrix to restore position in world space
float4x4 matViewInverse;

// Level at which water surface begins
float waterLevel = 0.0f;

// Position of the camera
float3 cameraPos;

// How fast will colours fade out. You can also think about this
// values as how clear water is. Therefore use smaller values (eg. 0.05f)
// to have crystal clear water and bigger to achieve "muddy" water.
float fadeSpeed = 0.15f;

// Timer
float timer;

// Normals scaling factor
float normalScale = 1.0f;

// R0 is a constant related to the index of refraction (IOR).
// It should be computed on the CPU and passed to the shader.
float R0 = 0.5f;

// Maximum waves amplitude
float maxAmplitude = 1.0f;

// Direction of the light
float3 lightDir = {0.0f, 1.0f, 0.0f};

// Colour of the sun
float3 sunColor = {1.0f, 1.0f, 1.0f};

// The smaller this value is, the more soft the transition between
// shore and water. If you want hard edges use very big value.
// Default is 1.0f.
float shoreHardness = 1.0f;

// This value modifies current fresnel term. If you want to weaken
// reflections use bigger value. If you want to empasize them use
// value smaller then 0. Default is 0.0f.
float refractionStrength = 0.0f;
//float refractionStrength = -0.3f;

// Modifies 4 sampled normals. Increase first values to have more
// smaller "waves" or last to have more bigger "waves"
float4 normalModifier = {1.0f, 2.0f, 4.0f, 8.0f};

// Strength of displacement along normal.
float displace = 1.7f;

// Describes at what depth foam starts to fade out and
// at what it is completely invisible. The fird value is at
// what height foam for waves appear (+ waterLevel).
float3 foamExistence = {0.65f, 1.35f, 0.5f};

float sunScale = 3.0f;

float4x4 matReflection =
{
   {0.5f, 0.0f, 0.0f, 0.5f},
   {0.0f, 0.5f, 0.0f, 0.5f},
   {0.0f, 0.0f, 0.0f, 0.5f},
   {0.0f, 0.0f, 0.0f, 1.0f}
};

float4x4 matViewProj;

float shininess = 0.7f;
float specular_intensity = 0.32;

// Colour of the water surface
float3 depthColour = {0.0078f, 0.5176f, 0.7f};
// Colour of the water depth
float3 bigDepthColour = {0.0039f, 0.00196f, 0.145f};
float3 extinction = {7.0f, 30.0f, 40.0f};         // Horizontal

// Water transparency along eye vector.
float visibility = 4.0f;

// Increase this value to have more smaller waves.
float2 scale = {0.005f, 0.005f};
float refractionScale = 0.005f;

// Wind force in x and z axes.
float2 wind = {-0.3f, 0.7f};


// VertexShader results
struct VertexOutput
{
   float4 position : POSITION0;
   float2 texCoord : TEXCOORD0;
};

struct PS_OUTPUT
{
   float4 diffuse: COLOR0;
   float4 normal: COLOR1;
   float4 position: COLOR2;
};


float3x3 compute_tangent_frame(float3 N, float3 P, float2 UV)
{
   float3 dp1 = ddx(P);
   float3 dp2 = ddy(P);
   float2 duv1 = ddx(UV);
   float2 duv2 = ddy(UV);
   
   float3x3 M = float3x3(dp1, dp2, cross(dp1, dp2));
   float2x3 inverseM = float2x3( cross( M[1], M[2] ), cross( M[2], M[0] ) );
   float3 T = mul(float2(duv1.x, duv2.x), inverseM);
   float3 B = mul(float2(duv1.y, duv2.y), inverseM);
   
   return float3x3(normalize(T), normalize(B), N);
}

// Function calculating fresnel term.
// - normal - normalized normal vector
// - eyeVec - normalized eye vector
float fresnelTerm(float3 normal, float3 eyeVec)
{
      float angle = 1.0f - saturate(dot(normal, eyeVec));
      float fresnel = angle * angle;
      fresnel = fresnel * fresnel;
      fresnel = fresnel * angle;
      return saturate(fresnel * (1.0f - saturate(R0)) + R0 - refractionStrength);
}

float4 main(VertexOutput IN): COLOR0
{
   float3 color2 = tex2D(backBufferMap, IN.texCoord).rgb;
   float3 color = color2;
   
   float3 position = mul(float4(tex2D(positionMap, IN.texCoord).xyz, 1.0f), matViewInverse).xyz;
   float level = waterLevel;
   float depth = 0.0f;

   
   // If we are underwater let's leave out complex computations
   if(level >= cameraPos.y)
      return float4(color2, 1.0f);
   
   if(position.y <= level + maxAmplitude)
   {
      float3 eyeVec = position - cameraPos;
      float diff = level - position.y;
      float cameraDepth = cameraPos.y - position.y;
      
      // Find intersection with water surface
      float3 eyeVecNorm = normalize(eyeVec);
      float t = (level - cameraPos.y) / eyeVecNorm.y;
      float3 surfacePoint = cameraPos + eyeVecNorm * t;
      
      eyeVecNorm = normalize(eyeVecNorm);
      
      float2 texCoord;
      for(int i = 0; i < 10; ++i)
      {
         texCoord = (surfacePoint.xz + eyeVecNorm.xz * 0.1f) * scale + timer * 0.000005f * wind;
         
         float bias = tex2D(heightMap, texCoord).r;
   
         bias *= 0.1f;
         level += bias * maxAmplitude;
         t = (level - cameraPos.y) / eyeVecNorm.y;
         surfacePoint = cameraPos + eyeVecNorm * t;
      }
      
      depth = length(position - surfacePoint);
      float depth2 = surfacePoint.y - position.y;
      
      eyeVecNorm = normalize(cameraPos - surfacePoint);
      
      float normal1 = tex2D(heightMap, (texCoord + float2(-1, 0) / 256)).r;
      float normal2 = tex2D(heightMap, (texCoord + float2(1, 0) / 256)).r;
      float normal3 = tex2D(heightMap, (texCoord + float2(0, -1) / 256)).r;
      float normal4 = tex2D(heightMap, (texCoord + float2(0, 1) / 256)).r;
      
      float3 myNormal = normalize(float3((normal1 - normal2) * maxAmplitude,
                                 normalScale,
                                 (normal3 - normal4) * maxAmplitude));   
      
      texCoord = surfacePoint.xz * 1.6 + wind * timer * 0.00016;
      float3x3 tangentFrame = compute_tangent_frame(myNormal, eyeVecNorm, texCoord);
      float3 normal0a = normalize(mul(2.0f * tex2D(normalMap, texCoord) - 1.0f, tangentFrame));

      texCoord = surfacePoint.xz * 0.8 + wind * timer * 0.00008;
      tangentFrame = compute_tangent_frame(myNormal, eyeVecNorm, texCoord);
      float3 normal1a = normalize(mul(2.0f * tex2D(normalMap, texCoord) - 1.0f, tangentFrame));
      
      texCoord = surfacePoint.xz * 0.4 + wind * timer * 0.00004;
      tangentFrame = compute_tangent_frame(myNormal, eyeVecNorm, texCoord);
      float3 normal2a = normalize(mul(2.0f * tex2D(normalMap, texCoord) - 1.0f, tangentFrame));
      
      texCoord = surfacePoint.xz * 0.1 + wind * timer * 0.00002;
      tangentFrame = compute_tangent_frame(myNormal, eyeVecNorm, texCoord);
      float3 normal3a = normalize(mul(2.0f * tex2D(normalMap, texCoord) - 1.0f, tangentFrame));
      
      float3 normal = normalize(normal0a * normalModifier.x + normal1a * normalModifier.y +
                          normal2a * normalModifier.z + normal3a * normalModifier.w);
      
      texCoord = IN.texCoord.xy;
      texCoord.x += sin(timer * 0.002f + 3.0f * abs(position.y)) * (refractionScale * min(depth2, 1.0f));
      float3 refraction = tex2D(backBufferMap, texCoord).rgb;
      if(mul(float4(tex2D(positionMap, texCoord).xyz, 1.0f), matViewInverse).y > level)
         refraction = color2;

      float4x4 matTextureProj = mul(matViewProj, matReflection);
            
      float3 waterPosition = surfacePoint.xyz;
      waterPosition.y -= (level - waterLevel);
      float4 texCoordProj = mul(float4(waterPosition, 1.0f), matTextureProj);
      
      float4 dPos;
      dPos.x = texCoordProj.x + displace * normal.x;
      dPos.z = texCoordProj.z + displace * normal.z;
      dPos.yw = texCoordProj.yw;
      texCoordProj = dPos;      
      
      float3 reflect = tex2Dproj(reflectionMap, texCoordProj);
      
      float fresnel = fresnelTerm(normal, eyeVecNorm);
      
      float3 depthN = depth * fadeSpeed;
      float3 waterCol = saturate(length(sunColor) / sunScale);
      refraction = lerp(lerp(refraction, depthColour * waterCol, saturate(depthN / visibility)),
                    bigDepthColour * waterCol, saturate(depth2 / extinction));

      float foam = 0.0f;      

      texCoord = (surfacePoint.xz + eyeVecNorm.xz * 0.1) * 0.05 + timer * 0.00001f * wind + sin(timer * 0.001 + position.x) * 0.005;
      float2 texCoord2 = (surfacePoint.xz + eyeVecNorm.xz * 0.1) * 0.05 + timer * 0.00002f * wind + sin(timer * 0.001 + position.z) * 0.005;
      
      if(depth2 < foamExistence.x)
         foam = (tex2D(foamMap, texCoord) + tex2D(foamMap, texCoord2)) * 0.5f;
      else if(depth2 < foamExistence.y)
      {
         foam = lerp((tex2D(foamMap, texCoord) + tex2D(foamMap, texCoord2)) * 0.5f, 0.0f,
                   (depth2 - foamExistence.x) / (foamExistence.y - foamExistence.x));
         
      }
      
      if(maxAmplitude - foamExistence.z > 0.0001f)
      {
         foam += (tex2D(foamMap, texCoord) + tex2D(foamMap, texCoord2)) * 0.5f *
            saturate((level - (waterLevel + foamExistence.z)) / (maxAmplitude - foamExistence.z));
      }


      half3 specular = 0.0f;

      half3 mirrorEye = (2.0f * dot(eyeVecNorm, normal) * normal - eyeVecNorm);
      half dotSpec = saturate(dot(mirrorEye.xyz, -lightDir) * 0.5f + 0.5f);
      specular = (1.0f - fresnel) * saturate(-lightDir.y) * ((pow(dotSpec, 512.0f)) * (shininess * 1.8f + 0.2f))* sunColor;
      specular += specular * 25 * saturate(shininess - 0.05f) * sunColor;      

      color = lerp(refraction, reflect, fresnel);
      color = saturate(color + max(specular, foam * sunColor));
      
      color = lerp(refraction, color, saturate(depth * shoreHardness));
   }
   
   if(position.y > level)
      color = color2;

   return float4(color, 1.0f);
}

Here is what it can look like.
Image
Mine is almost the same, except I made other calculations in mine. (but both have the same features, that is reflection, refraction, foam and two different kinds of water discoloring depending on depth.) It is completely made in the pixel shader, meaning not a single polygon is required. Very cheap water. It can look a lot different depending on how you configure the values and make the wave calculations.
Image

_________________
My Pixiv
Image
Spoiler: show
OLD VERSION, BITCHES!
Image


Sun Nov 16, 2014 10:10 pm
Profile E-mail
Level 35
Level 35
User avatar

Cash on hand:
1,745,184.60

Bank:
55,666.50
Posts: 8888
Joined: Fri Feb 18, 2011 3:52 pm
Group: Registered users
Post Re: SK ReMewed
whoa now, this is very interesting. Very interesting indeed. "What are you using to do this?" asks the curious bystander.

_________________
Click the icon to see the image in fullscreen mode  
1 pcs.
Click the icon to see the image in fullscreen mode  
1 pcs.
Click the icon to see the image in fullscreen mode  
1 pcs.
Click the icon to see the image in fullscreen mode  
1 pcs.
Click the icon to see the image in fullscreen mode  
1 pcs.


Sun Nov 16, 2014 10:34 pm
Profile E-mail
Level 38
Level 38
User avatar

Cash on hand:
435.45

Bank:
2,750,364.30
Posts: 10364
Joined: Sun Oct 26, 2008 5:47 am
Group: Dev Team
Post Re: SK ReMewed
My own engine, using DirectX 11.
But the picture was taken on a computer with only dx10 support, so no tessellation and other advanced features are visible.

And I think joshex is using blender.

_________________
My Pixiv
Image
Spoiler: show
OLD VERSION, BITCHES!
Image


Mon Nov 17, 2014 5:08 am
Profile E-mail
Level 22
Level 22
User avatar

Cash on hand:
174,929.20
Posts: 2255
Joined: Sat Nov 17, 2012 11:10 am
Location: SR388
Group: Special Access
Post Re: SK ReMewed
Newpurple wrote:
do you want some cool water shaders?
Here's a cool example water shader by some dude named Wojciech Toman.
Spoiler: show
Code:
// Water pixel shader
// Copyright (C) Wojciech Toman 2009

sampler heightMap: register(s0);
sampler backBufferMap: register(s1);
sampler positionMap: register(s2);
sampler normalMap: register(s3);
sampler foamMap: register(s4);
sampler reflectionMap: register(s5);

// We need this matrix to restore position in world space
float4x4 matViewInverse;

// Level at which water surface begins
float waterLevel = 0.0f;

// Position of the camera
float3 cameraPos;

// How fast will colours fade out. You can also think about this
// values as how clear water is. Therefore use smaller values (eg. 0.05f)
// to have crystal clear water and bigger to achieve "muddy" water.
float fadeSpeed = 0.15f;

// Timer
float timer;

// Normals scaling factor
float normalScale = 1.0f;

// R0 is a constant related to the index of refraction (IOR).
// It should be computed on the CPU and passed to the shader.
float R0 = 0.5f;

// Maximum waves amplitude
float maxAmplitude = 1.0f;

// Direction of the light
float3 lightDir = {0.0f, 1.0f, 0.0f};

// Colour of the sun
float3 sunColor = {1.0f, 1.0f, 1.0f};

// The smaller this value is, the more soft the transition between
// shore and water. If you want hard edges use very big value.
// Default is 1.0f.
float shoreHardness = 1.0f;

// This value modifies current fresnel term. If you want to weaken
// reflections use bigger value. If you want to empasize them use
// value smaller then 0. Default is 0.0f.
float refractionStrength = 0.0f;
//float refractionStrength = -0.3f;

// Modifies 4 sampled normals. Increase first values to have more
// smaller "waves" or last to have more bigger "waves"
float4 normalModifier = {1.0f, 2.0f, 4.0f, 8.0f};

// Strength of displacement along normal.
float displace = 1.7f;

// Describes at what depth foam starts to fade out and
// at what it is completely invisible. The fird value is at
// what height foam for waves appear (+ waterLevel).
float3 foamExistence = {0.65f, 1.35f, 0.5f};

float sunScale = 3.0f;

float4x4 matReflection =
{
   {0.5f, 0.0f, 0.0f, 0.5f},
   {0.0f, 0.5f, 0.0f, 0.5f},
   {0.0f, 0.0f, 0.0f, 0.5f},
   {0.0f, 0.0f, 0.0f, 1.0f}
};

float4x4 matViewProj;

float shininess = 0.7f;
float specular_intensity = 0.32;

// Colour of the water surface
float3 depthColour = {0.0078f, 0.5176f, 0.7f};
// Colour of the water depth
float3 bigDepthColour = {0.0039f, 0.00196f, 0.145f};
float3 extinction = {7.0f, 30.0f, 40.0f};         // Horizontal

// Water transparency along eye vector.
float visibility = 4.0f;

// Increase this value to have more smaller waves.
float2 scale = {0.005f, 0.005f};
float refractionScale = 0.005f;

// Wind force in x and z axes.
float2 wind = {-0.3f, 0.7f};


// VertexShader results
struct VertexOutput
{
   float4 position : POSITION0;
   float2 texCoord : TEXCOORD0;
};

struct PS_OUTPUT
{
   float4 diffuse: COLOR0;
   float4 normal: COLOR1;
   float4 position: COLOR2;
};


float3x3 compute_tangent_frame(float3 N, float3 P, float2 UV)
{
   float3 dp1 = ddx(P);
   float3 dp2 = ddy(P);
   float2 duv1 = ddx(UV);
   float2 duv2 = ddy(UV);
   
   float3x3 M = float3x3(dp1, dp2, cross(dp1, dp2));
   float2x3 inverseM = float2x3( cross( M[1], M[2] ), cross( M[2], M[0] ) );
   float3 T = mul(float2(duv1.x, duv2.x), inverseM);
   float3 B = mul(float2(duv1.y, duv2.y), inverseM);
   
   return float3x3(normalize(T), normalize(B), N);
}

// Function calculating fresnel term.
// - normal - normalized normal vector
// - eyeVec - normalized eye vector
float fresnelTerm(float3 normal, float3 eyeVec)
{
      float angle = 1.0f - saturate(dot(normal, eyeVec));
      float fresnel = angle * angle;
      fresnel = fresnel * fresnel;
      fresnel = fresnel * angle;
      return saturate(fresnel * (1.0f - saturate(R0)) + R0 - refractionStrength);
}

float4 main(VertexOutput IN): COLOR0
{
   float3 color2 = tex2D(backBufferMap, IN.texCoord).rgb;
   float3 color = color2;
   
   float3 position = mul(float4(tex2D(positionMap, IN.texCoord).xyz, 1.0f), matViewInverse).xyz;
   float level = waterLevel;
   float depth = 0.0f;

   
   // If we are underwater let's leave out complex computations
   if(level >= cameraPos.y)
      return float4(color2, 1.0f);
   
   if(position.y <= level + maxAmplitude)
   {
      float3 eyeVec = position - cameraPos;
      float diff = level - position.y;
      float cameraDepth = cameraPos.y - position.y;
      
      // Find intersection with water surface
      float3 eyeVecNorm = normalize(eyeVec);
      float t = (level - cameraPos.y) / eyeVecNorm.y;
      float3 surfacePoint = cameraPos + eyeVecNorm * t;
      
      eyeVecNorm = normalize(eyeVecNorm);
      
      float2 texCoord;
      for(int i = 0; i < 10; ++i)
      {
         texCoord = (surfacePoint.xz + eyeVecNorm.xz * 0.1f) * scale + timer * 0.000005f * wind;
         
         float bias = tex2D(heightMap, texCoord).r;
   
         bias *= 0.1f;
         level += bias * maxAmplitude;
         t = (level - cameraPos.y) / eyeVecNorm.y;
         surfacePoint = cameraPos + eyeVecNorm * t;
      }
      
      depth = length(position - surfacePoint);
      float depth2 = surfacePoint.y - position.y;
      
      eyeVecNorm = normalize(cameraPos - surfacePoint);
      
      float normal1 = tex2D(heightMap, (texCoord + float2(-1, 0) / 256)).r;
      float normal2 = tex2D(heightMap, (texCoord + float2(1, 0) / 256)).r;
      float normal3 = tex2D(heightMap, (texCoord + float2(0, -1) / 256)).r;
      float normal4 = tex2D(heightMap, (texCoord + float2(0, 1) / 256)).r;
      
      float3 myNormal = normalize(float3((normal1 - normal2) * maxAmplitude,
                                 normalScale,
                                 (normal3 - normal4) * maxAmplitude));   
      
      texCoord = surfacePoint.xz * 1.6 + wind * timer * 0.00016;
      float3x3 tangentFrame = compute_tangent_frame(myNormal, eyeVecNorm, texCoord);
      float3 normal0a = normalize(mul(2.0f * tex2D(normalMap, texCoord) - 1.0f, tangentFrame));

      texCoord = surfacePoint.xz * 0.8 + wind * timer * 0.00008;
      tangentFrame = compute_tangent_frame(myNormal, eyeVecNorm, texCoord);
      float3 normal1a = normalize(mul(2.0f * tex2D(normalMap, texCoord) - 1.0f, tangentFrame));
      
      texCoord = surfacePoint.xz * 0.4 + wind * timer * 0.00004;
      tangentFrame = compute_tangent_frame(myNormal, eyeVecNorm, texCoord);
      float3 normal2a = normalize(mul(2.0f * tex2D(normalMap, texCoord) - 1.0f, tangentFrame));
      
      texCoord = surfacePoint.xz * 0.1 + wind * timer * 0.00002;
      tangentFrame = compute_tangent_frame(myNormal, eyeVecNorm, texCoord);
      float3 normal3a = normalize(mul(2.0f * tex2D(normalMap, texCoord) - 1.0f, tangentFrame));
      
      float3 normal = normalize(normal0a * normalModifier.x + normal1a * normalModifier.y +
                          normal2a * normalModifier.z + normal3a * normalModifier.w);
      
      texCoord = IN.texCoord.xy;
      texCoord.x += sin(timer * 0.002f + 3.0f * abs(position.y)) * (refractionScale * min(depth2, 1.0f));
      float3 refraction = tex2D(backBufferMap, texCoord).rgb;
      if(mul(float4(tex2D(positionMap, texCoord).xyz, 1.0f), matViewInverse).y > level)
         refraction = color2;

      float4x4 matTextureProj = mul(matViewProj, matReflection);
            
      float3 waterPosition = surfacePoint.xyz;
      waterPosition.y -= (level - waterLevel);
      float4 texCoordProj = mul(float4(waterPosition, 1.0f), matTextureProj);
      
      float4 dPos;
      dPos.x = texCoordProj.x + displace * normal.x;
      dPos.z = texCoordProj.z + displace * normal.z;
      dPos.yw = texCoordProj.yw;
      texCoordProj = dPos;      
      
      float3 reflect = tex2Dproj(reflectionMap, texCoordProj);
      
      float fresnel = fresnelTerm(normal, eyeVecNorm);
      
      float3 depthN = depth * fadeSpeed;
      float3 waterCol = saturate(length(sunColor) / sunScale);
      refraction = lerp(lerp(refraction, depthColour * waterCol, saturate(depthN / visibility)),
                    bigDepthColour * waterCol, saturate(depth2 / extinction));

      float foam = 0.0f;      

      texCoord = (surfacePoint.xz + eyeVecNorm.xz * 0.1) * 0.05 + timer * 0.00001f * wind + sin(timer * 0.001 + position.x) * 0.005;
      float2 texCoord2 = (surfacePoint.xz + eyeVecNorm.xz * 0.1) * 0.05 + timer * 0.00002f * wind + sin(timer * 0.001 + position.z) * 0.005;
      
      if(depth2 < foamExistence.x)
         foam = (tex2D(foamMap, texCoord) + tex2D(foamMap, texCoord2)) * 0.5f;
      else if(depth2 < foamExistence.y)
      {
         foam = lerp((tex2D(foamMap, texCoord) + tex2D(foamMap, texCoord2)) * 0.5f, 0.0f,
                   (depth2 - foamExistence.x) / (foamExistence.y - foamExistence.x));
         
      }
      
      if(maxAmplitude - foamExistence.z > 0.0001f)
      {
         foam += (tex2D(foamMap, texCoord) + tex2D(foamMap, texCoord2)) * 0.5f *
            saturate((level - (waterLevel + foamExistence.z)) / (maxAmplitude - foamExistence.z));
      }


      half3 specular = 0.0f;

      half3 mirrorEye = (2.0f * dot(eyeVecNorm, normal) * normal - eyeVecNorm);
      half dotSpec = saturate(dot(mirrorEye.xyz, -lightDir) * 0.5f + 0.5f);
      specular = (1.0f - fresnel) * saturate(-lightDir.y) * ((pow(dotSpec, 512.0f)) * (shininess * 1.8f + 0.2f))* sunColor;
      specular += specular * 25 * saturate(shininess - 0.05f) * sunColor;      

      color = lerp(refraction, reflect, fresnel);
      color = saturate(color + max(specular, foam * sunColor));
      
      color = lerp(refraction, color, saturate(depth * shoreHardness));
   }
   
   if(position.y > level)
      color = color2;

   return float4(color, 1.0f);
}

Here is what it can look like.
Image
Mine is almost the same, except I made other calculations in mine. (but both have the same features, that is reflection, refraction, foam and two different kinds of water discoloring depending on depth.) It is completely made in the pixel shader, meaning not a single polygon is required. Very cheap water. It can look a lot different depending on how you configure the values and make the wave calculations.
Image


I'm trying to keep this as simple as possible, an Open GL shader is alot of work, even with a Direct X one to work from. I have my own methods for realistic water (if I need it) for right now I will animate the water by inverting the normals in a second image and have one fade out into the other slowly then back again and repeat.

As for reflections, again I'm trying to keep it simple, I will probably use the above water image again under the water's surface and let the normals of the waves distort it on their own, the main character can't swim after all so he'll never be underwater at least not in this game lol.

as for teh character's reflection I'll just be using some stretched sprites from one of the overhead SK games at least that's what I figure I'll do, haven't gotten there yet.

right now I need to add more beach, make some jagged rocks and finish the water then make a skybox.

_________________
mepsipax

Image

got any?

His name is not Robert Paulsen, His name is Gregory Matthew Bruni, he won so hard.

_________________
Click the icon to see the image in fullscreen mode  
1 pcs.
Click the icon to see the image in fullscreen mode  
1 pcs.
Click the icon to see the image in fullscreen mode  
1 pcs.
Click the icon to see the image in fullscreen mode  
1 pcs.


Mon Nov 17, 2014 8:41 am
Profile E-mail
Level 38
Level 38
User avatar

Cash on hand:
435.45

Bank:
2,750,364.30
Posts: 10364
Joined: Sun Oct 26, 2008 5:47 am
Group: Dev Team
Post Re: SK ReMewed
ok, that is fine. still, keep the shader for later. Everything is done in shaders nowadays.
Heck, even game logic is moving to the GPU with compute shaders.

_________________
My Pixiv
Image
Spoiler: show
OLD VERSION, BITCHES!
Image


Mon Nov 17, 2014 9:32 am
Profile E-mail
Level 35
Level 35
User avatar

Cash on hand:
1,745,184.60

Bank:
55,666.50
Posts: 8888
Joined: Fri Feb 18, 2011 3:52 pm
Group: Registered users
Post Re: SK ReMewed
Newpurple wrote:
My own engine, using DirectX 11.
But the picture was taken on a computer with only dx10 support, so no tessellation and other advanced features are visible.

And I think joshex is using blender.


Image

_________________
Click the icon to see the image in fullscreen mode  
1 pcs.
Click the icon to see the image in fullscreen mode  
1 pcs.
Click the icon to see the image in fullscreen mode  
1 pcs.
Click the icon to see the image in fullscreen mode  
1 pcs.
Click the icon to see the image in fullscreen mode  
1 pcs.


Mon Nov 17, 2014 9:38 pm
Profile E-mail
Level 22
Level 22
User avatar

Cash on hand:
174,929.20
Posts: 2255
Joined: Sat Nov 17, 2012 11:10 am
Location: SR388
Group: Special Access
Post Re: SK ReMewed
1st week report!

progress is slower than I expected!, also the rainbow got deleted somehow, it's ok though cause I still need to fix the rainbow's top and end in teh gimp.

I made the series of rocks found in front of the cliff, I double layered the water so the top is reflective and see through and the bottom has full color, I hanged the specular color to yellow on the water so it looks like sunlight is reflecting on it. will try to finish the background today and lots more rocks to make (and here I thought this would be an easy start Lol.

picture after dump. restrooom!

Image

_________________
mepsipax

Image

got any?

His name is not Robert Paulsen, His name is Gregory Matthew Bruni, he won so hard.

_________________
Click the icon to see the image in fullscreen mode  
1 pcs.
Click the icon to see the image in fullscreen mode  
1 pcs.
Click the icon to see the image in fullscreen mode  
1 pcs.
Click the icon to see the image in fullscreen mode  
1 pcs.


Wed Nov 19, 2014 3:32 pm
Profile E-mail
Level 39
Level 39
User avatar

Cash on hand:
2,187.55

Bank:
5,250.50
Posts: 21063
Joined: Sat Feb 14, 2009 11:44 pm
Group: Sysop
Post Re: SK ReMewed
Pretty~

_________________
Image
Yeap.

_________________
Click the icon to see the image in fullscreen mode  
1 pcs.
Click the icon to see the image in fullscreen mode  
4 pcs.


Wed Nov 19, 2014 4:11 pm
Profile E-mail WWW
Level 22
Level 22
User avatar

Cash on hand:
448,276.95
Posts: 2470
Joined: Sat Nov 08, 2014 10:11 pm
Group: Registered users
Country: Australia (au)
Post Re: SK ReMewed
its pretty but not as pretty as you yom

_________________
I gm the game of dungeons and dragons 3.5 over on the text based rpg section of the forum feel free to join in we are always looking for new players

_________________
Click the icon to see the image in fullscreen mode  
1 pcs.
Click the icon to see the image in fullscreen mode  
1 pcs.
Click the icon to see the image in fullscreen mode  
1 pcs.
Click the icon to see the image in fullscreen mode  
1 pcs.
Click the icon to see the image in fullscreen mode  
1 pcs.
Click the icon to see the image in fullscreen mode  
1 pcs.


Wed Nov 19, 2014 5:16 pm
Profile E-mail
Level 22
Level 22
User avatar

Cash on hand:
174,929.20
Posts: 2255
Joined: Sat Nov 17, 2012 11:10 am
Location: SR388
Group: Special Access
Post Re: SK ReMewed
Just finished most of the water in the scene, some still needs a seabed, and there will need to be some expansion in places, theres also one hole I will fill at some time tomorrow.

_________________
mepsipax

Image

got any?

His name is not Robert Paulsen, His name is Gregory Matthew Bruni, he won so hard.

_________________
Click the icon to see the image in fullscreen mode  
1 pcs.
Click the icon to see the image in fullscreen mode  
1 pcs.
Click the icon to see the image in fullscreen mode  
1 pcs.
Click the icon to see the image in fullscreen mode  
1 pcs.


Wed Nov 19, 2014 6:22 pm
Profile E-mail
Display posts from previous:  Sort by  
Reply to topic   [ 38 posts ]  Go to page 1, 2, 3  Next

Who is online

Users browsing this forum: No registered users and 3 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
Mods Database :: Imprint :: Crawler Feeds :: Reset blocks
Designed by STSoftware for PTF.

Portal XL 5.0 ~ Premod 0.3 phpBB SEO