Sign in to follow this  
CadeF

[MDX]Pick a screenshot and I'll write an article on the most popular one.

Recommended Posts

CadeF    421
Hey everyone, Scince there are not many resources on MDX, I have decided that I will write an article on one. I can't decide what to write on. So, look at the following screenshots and decide which aspect intrests you most, example, parallax mapping, refraction, etc and I will write an article on the most popular one, in VB.NET. Click images to enlarge. EDIT: Better Parallax mapping
[Edited by - CadeF on March 13, 2006 4:46:31 PM]

Share this post


Link to post
Share on other sites
CadeF    421
The third one is rigid body physics, entities collide with themselves and any planes in the BSP they intersect. It's related to DirectX because the planes themselves contain faces which need to be tested, to find out of the collision object is above the face, or somewhere else on the plane.

Share this post


Link to post
Share on other sites
Nik02    4351
I find parallax mapping the most interesting. Even though I don't have problems with the topic myself, I would like some new insights about optimizing the technique, both in performance and quality (preferably, but not necessarily, at the same time).

Have you got info on "true bump mapping" (per-pixel displacement mapping), whereby a volumetric data set is used in ray-tracing bumps onto flat geometry by using a pixel shader? I would like to discuss about how to efficiently implement displaced edges so that when the geometry cuts out, the edge would also be displaced and would kill the pixels that fall outside the simulated bumps.

I have thought about displacing the original geometry by a "maximum bump height" factor * normal, and then just cutting the extraneous pixels off by using either texkill or alpha value of 0 with alpha testing. However, this technique is not water-proof in my opinion.

Share this post


Link to post
Share on other sites
CadeF    421
For parallax mapping, I am not using real volumetric data as I am targetting ps 2.0 hardware.

I am using a blurred heightmap to retrieve max height, then sampling from texcoord - (ViewDir * TBNMatrix). It works fairly well, but I'm going to look into other ps 2.0 methods, if I find any good ones.

Edit: In the screenshots above, the texture is clamped to the edges. I clamp texcoord + (ViewDir * TBNMatrix) and add how much was clamped on the x and y axis to the new texcoord.

This way, a texture cannot "overflow" off the sides.

Share this post


Link to post
Share on other sites
jollyjeffers    1570
2 Looks like an improvement on 1 (which looks like water through a polaroid lense), but I'd go with either of those. Admittedly, I'm not an MDX programmer so it's of little (direct) use to me - but it's a good idea [smile]

As a general comment, your bump/specular mapping looks a little "wet" (especially 5 and 7). That is, it looks a little fake/shiny/plastic. Changing some of the parameters for the specular and other more metal-like lighting models might well improve it a bit. Concept is probably sound though.

Cheers,
Jack

Share this post


Link to post
Share on other sites
jamesw    400
Well I'm obsessed with water simulation, so I'm going to have to say the first two. Cool looking stuff. I don't really care that the app is in VB.NET cause hey, a shader's a shader right? Where are you going to post the article you write? Gamedev?

Share this post


Link to post
Share on other sites
CadeF    421
Jollyjeffers - Thanks for making my images a bit smaller, I was wondering how to do that. My specular looks shiny/plasticy? Look at the 2nd screenshot. ;)
Not so wet scince I've started clamping the specular to a "dirty" texture, based on how rough a surface is.

Water simulation - I'm actually not rendering any water. ;)
My engine sees it as a surface with a shader (the specular in screenshot 2) and scince bDistortion is set to True, a refraction map taken out of another defined shader. So this technique could work on plasma walls, dirty glass, etc without me adding anything to my core engine. I'm using a post-processing method for refraction, fog and any other deferred effects I'll think of. I'm targetting ps 2.0 so just to be safe, I'm limiting myself to 8 textures per shader pass and I'm using single-pass shaders only. My pp deferred technique only uses 3 stages currently, distortion map, distortion stencil map and a depth map from the camera for fog.

Where will I post it? On gamedev.net, most likely.

All these screenshots are from my engine at various points in time, the water specular I'm still working on. The screenshots in order of dev work are 2,1,3,5,6,7,4

Share this post


Link to post
Share on other sites
jollyjeffers    1570
Quote:
Original post by CadeF
Jollyjeffers - Thanks for making my images a bit smaller, I was wondering how to do that.
S'ok - Add a width="__%" attribute to the >img src=""< tag if you want things smaller [smile]

Quote:
Original post by CadeF
My specular looks shiny/plasticy? Look at the 2nd screenshot. ;)
Not so wet scince I've started clamping the specular to a "dirty" texture, based on how rough a surface is.
Okay then - my bad! Didn't realise it was intentional. My current project is exploring a number of lighting models, and one of the big critiscms of Blinn-Phong (and similar) is that it leads to plasticy/wet/artificial type effects. Thus I just put 1+1 together and assumed it was accidental...

Quote:
Original post by CadeF
I'm limiting myself to 8 textures per shader pass and I'm using single-pass shaders only.
May I ask why? For ps_2_0 (if memory serves me well) you should be able to sample from 16 unique samplers at most 32 times. Sure, performance tails off when you get close to that limit - but an artificial limit of 8 in only a single pass might be unnecessary...

Quote:
Original post by CadeF
Where will I post it? On gamedev.net, most likely.
Good choice [grin]

Cheers,
Jack

Share this post


Link to post
Share on other sites
CadeF    421
ps 2.0, scince I'm targetting a Radeon 9600 and a Geforce FX 5200 as my min cards. 8 textures because any more get slow on those cards. Fortunately, I don't need more than 3 textures in any shaders yet.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this