How do I maintain a good quality real time rendering without textures?

Started by
6 comments, last by kauna 11 years, 8 months ago
I mean to use shaders such as the one found in Introduction To 3D Game Programming With DirectX9.0c A Shader Approach
When a texture is intermixed with materials, it is of good quality, what about that shader without the texture?
I have discarded the textures because our artist refuses to share his.
Can I use that book's shader but still having good quality rendering?


//Sampler
sampler DiffuseSampler = sampler_state
{
Texture = (texDiffuse);
MinFilter = Linear; MagFilter = Linear; MipFilter = Linear;
AddressU = Wrap; AddressV = Wrap; AddressW = Wrap;
MaxAnisotropy = 16;
};

//Pixel Shader
float4 ps_lighting(VS_OUTPUT IN) : COLOR0
{
// float4 color = tex2D(DiffuseSampler, IN.tex0);
//return color * IN.shade;
float3 texColor = tex2D(DiffuseSampler, IN.tex0).rgb;
float3 diffuse = IN.color.rgb;// * texColor;
//return float4(diffuse + spec.rgb, IN.color.a);
return float4(diffuse, IN.color.a);
}


Thanks
Jack
Advertisement

I have discarded the textures because our artist refuses to share his.

Sounds like it's time to get a new artist? Seriously, that's their job.
clb: At the end of 2012, the positions of jupiter, saturn, mercury, and deimos are aligned so as to cause a denormalized flush-to-zero bug when computing earth's gravitational force, slinging it to the sun.
To get a decent looking reder you're going to have to use textures at some point. That's the whole reason behind "pixel" shaders.

Why cant you create your own texture? Or download some? You can even purchase texture packs. Just google 3D texture packs or visit http://www.cgtextures.com/ for free ones. Just make sure your read the "terms of use" and "license".
you can do this with lighing. or different aproaches of shading!

i allways try to get shaders working in black & white befor adding textures (you can offcourse skip this step)

here is a image to get you going!

post-158805-0-29449400-1339512628_thumb.png
(NOT MY WORK)

as you see, this image is pretty sharp, it has good lighting, and some ambient effects, but no texture and you still
see what it is supposed to be.
"There will be major features. none to be thought of yet"

Why cant you create your own texture?

This is very good question. I program games for fun and I make my own textures. I simply take my camera, go outside and make a photo, then I just make some tuning and all is done. There's a bunch of free software that will help (like nvidia's normal map generator) :)
If you want to have a texture that can't be found in real world, there's a lot of tutorials about making them.
Another idea might be creating a texture inside a shader, but it's a little bit more advanced approach :)
@InvalidPointer: You stole my line. If the artist won't provide art, the relationship isn't working. Unless there is some licensing issue and they're using commercial textures on their model, which is also bad.

You can work without textures for now, just use a flat color instead of the texture, e.g. use float(1.0, 0.0, 0.0) for red instead of tex2D(DiffuseSampler, IN.tex0).rgb.

as you see, this image is pretty sharp, it has good lighting, and some ambient effects, but no texture and you still
see what it is supposed to be.


Well, not so much. You can see the shape (that's where lighting helps the most) and you realise it's some kind of terrain (old-school, minecraft-like), but you don't know whether it's desert, grass, dirt, rocks. Or even Earth or Mars?
You can be perfectly fine without textures, but you'll get a specific look (which can be great for games, these days it's kinda popular to come with new or simple looks), but most probably it won't be realistic. Stylish, not realistic.

Textures don't provide only color information, but also additional small details which you would have to model via polygons otherwise.
And also colors aren't solid in real life. You can make brownish block, but people won't realise it's supposed to be wooden plank without a proper wood texture.
Hi,

you'll need to add some slightly advanced lighting techniques to get the effect of the provided screen shot such as SSAO or some other ambient occlusion method and shadow mapping of course.

Cheers!

This topic is closed to new replies.

Advertisement