Jump to content
  • Advertisement
Sign in to follow this  
EDI

Ethereal Darkness Interactive's The Lost City of Malathedra screenshots + discussion

This topic is 4334 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Jeremy,

(I prefer Raymond, btw =D)

yes the eventual goal is to have the sprites cast shadows, but the shadows are simply skewed blended and modulated versions of the real image, but it should work fine.

the project2 kick-off is schedueld for june1:

which means on june first there will be a wide-cast press release that tells people the following.

1. the actual name of the game
2. the primary gist of the storyline
3. features one can expect

at this time the engine and story will be completed and we will enter the implementation phase.

as far as a demo of the engine, we may release a few itterations to the local gdnet community, but offically there will be no external demos until we hit release stage.

P.S. I appologize for not getting the shader code you requested to you in a timely manner, so I am going to post it now.

terrain.fx in HLSL

// An empty material, which simply transforms the vertex and sets the color to white.

//------------------------------------
float4x4 worldViewProj : WorldViewProjection;
float4x4 world : World;
float4x4 worldInverseTranspose : WorldInverseTranspose;
float4x4 viewInverse : ViewInverse;

float4 lightDir : Direction
<
string Object = "DirectionalLight";
string Space = "World";
> = {1.0f, -1.0f, 1.0f, 0.0f};

float4 lightColor : Diffuse
<
string UIName = "Diffuse Light Color";
string Object = "DirectionalLight";
> = {1.0f, 1.0f, 1.0f, 1.0f};

float4 lightAmbient : Ambient
<
string UIWidget = "Ambient Light Color";
string Space = "material";
> = {0.0f, 0.0f, 0.0f, 1.0f};

float4 materialDiffuse : Diffuse
<
string UIWidget = "Surface Color";
string Space = "material";
> = {1.0f, 1.0f, 1.0f, 1.0f};

texture texGround<>;
texture texSplat0<>;
texture texSplat1<>;
texture texSplat2<>;
texture texSplat3<>;
texture texSplatAlpha<>;

sampler splatAlphaSampler = sampler_state
{
texture = <texSplatAlpha>;
AddressU = CLAMP;
AddressV = CLAMP;
MINFILTER = LINEAR;
MAGFILTER = LINEAR;
};

sampler groundSampler = sampler_state
{
texture = <texGround>;
AddressU = WRAP;
AddressV = WRAP;
MINFILTER = LINEAR;
MAGFILTER = LINEAR;
};

sampler splat0Sampler = sampler_state
{
texture = <texSplat0>;
AddressU = WRAP;
AddressV = WRAP;
MINFILTER = LINEAR;
MAGFILTER = LINEAR;
};

sampler splat1Sampler = sampler_state
{
texture = <texSplat1>;
AddressU = WRAP;
AddressV = WRAP;
MINFILTER = LINEAR;
MAGFILTER = LINEAR;
};

sampler splat2Sampler = sampler_state
{
texture = <texSplat2>;
AddressU = WRAP;
AddressV = WRAP;
MINFILTER = LINEAR;
MAGFILTER = LINEAR;
};

sampler splat3Sampler = sampler_state
{
texture = <texSplat3>;
AddressU = WRAP;
AddressV = WRAP;
MINFILTER = LINEAR;
MAGFILTER = LINEAR;
};

//------------------------------------
struct vertexInput {
float3 Position : POSITION;
float3 Normal : NORMAL;
float2 Tex0 : TEXCOORD0;
float2 Tex1 : TEXCOORD1;
};

struct vertexOutput {
float4 HPosition : POSITION;
float4 diffAmbColor : COLOR0;
float2 Tex0 : TEXCOORD0;
float2 Tex1 : TEXCOORD1;
};

//------------------------------------
vertexOutput VS(vertexInput IN)
{
vertexOutput OUT;
OUT.HPosition = mul(float4(IN.Position.xyz , 1.0),worldViewProj);

//calculate our vectors N, E, L, and H
float3 worldEyePos = viewInverse[3].xyz;
float3 worldVertPos = mul(IN.Position, world).xyz;
float4 N = mul(IN.Normal, worldInverseTranspose); //normal vector
float3 E = normalize(worldEyePos - worldVertPos); //eye vector
float3 L = normalize( -lightDir.xyz); //light vector
float3 H = normalize(E + L); //half angle vector

//calculate the diffuse contributions
float diff = max(0 , dot(N,L));

//output diffuse
float4 ambColor = materialDiffuse * lightAmbient;
float4 diffColor = materialDiffuse * diff * lightColor ;
OUT.diffAmbColor = diffColor + ambColor;

OUT.Tex0=IN.Tex0;
OUT.Tex1=IN.Tex1;

return OUT;
}

//-----------------------------------
float4 PS( vertexOutput IN): COLOR
{
//sample the alpha
float4 alpha = tex2D(splatAlphaSampler,IN.Tex1);
//sample the ground
float4 ground = tex2D(groundSampler,IN.Tex0);
//sample the splats
float4 splat0 = tex2D(splat0Sampler,IN.Tex0);
float4 splat1 = tex2D(splat1Sampler,IN.Tex0);
float4 splat2 = tex2D(splat2Sampler,IN.Tex0);
float4 splat3 = tex2D(splat3Sampler,IN.Tex0);

//combine them all into ground
ground = lerp(splat0,ground,1-alpha.r);
ground = lerp(splat1,ground,1-alpha.g);
ground = lerp(splat2,ground,1-alpha.b);
//ground = lerp(splat3,ground,1-alpha.a);

//return ground multiplied by light
return IN.diffAmbColor * ground;
}

//-----------------------------------
technique textured
{
pass p0
{
VertexShader = compile vs_2_0 VS();
PixelShader = compile ps_2_0 PS();
}
}


Share this post


Link to post
Share on other sites
Advertisement
Hmm.. it seems as if the shadows on the terrain are shaded from a slightly different direction compared to the shadows of the objects..
It makes the objects stick out from the terrain somehow..
Other than that, good work!

Share this post


Link to post
Share on other sites
Hmm. not quite sure why this was un-stickied, my plan like before was to keep it running for the length of the project, but oh well.
edit: kudos to the re-stickifier =)


anyhow, updates.

I've been working on some art, still very work in progress, but it's a very large gate, which plays an important role in the game.





[Edited by - EDI on March 10, 2006 12:33:36 PM]

Share this post


Link to post
Share on other sites
More buildings made, these are the last buildings I need in order to complete the proof-of-concept with the S3 Engine before our development kick-off.



Share this post


Link to post
Share on other sites
Quote:
Original post by EDI
Here is a nice movie of the radial menus in action

Video


That looks awesome. From the screenshots I expected kind of static slideshow-style menus, but that little effect really adds some value. What's actually happening in that rotation thingy? My eyes decieve me, how can 2 items become 3 when spun?

Share this post


Link to post
Share on other sites
it's a nice speedy trick =D

here is how the effect works basically:

the ring elements all start at the center of the screen, and expand outwards to the radius where they can all fit comfortably.

as this is happening the entire ring is also being rotated, and the center hub is being rotated in the opposite direction.

all of this motion uses an 'ease out' type interpolation so it starts fast and ends slow and smooth.

it gives a nice 'woosh' unfolding effect =D

the effect is all done with basic translation,scaling and rotation matrices.

Share this post


Link to post
Share on other sites
Raymond-

In a earlier post you showed a demo of texture splatting and said you would be willing to shoot of source to show how its done.

I would love to learn this technique especially if you have it in Directx.

Can you email me this at: tsunamirealms@hotmail.com?

Thanks so much!

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!