Archived

This topic is now archived and is closed to further replies.

webjeff

my model looks good but crappy in game

Recommended Posts

OK, In 3d max 6 my model looks sweet!! I can render a picture and it blows people''s minds, its nice. But I load it in my 3d game and render it and it looks horrible. Its a big model, and at the other end it gets all pixellated and the whole model just looks terrible. What things should I start searching or any renderstates I can set to make the textures look their best?? I know like detail maps n stuff, but do I gotta do that to everything?? Thanks Jeff

Share this post


Link to post
Share on other sites
Well, 3D Studio Max is probably using very complicated rendering processes to make the models look so good. Trying to mimick that in real time in a game is pretty much impossible (especiallly since this is a big model).

Also, you might want to increase the screen resolution of the window your game is running in (if it''s full screen), and try increasing the depth buffer to 32 bit if you''ve not done so already. Using anti-aliasing would help too, if it''s not already turned on.

A screen shot would help a lot.

----------------------------------------------------------
You know, I might as well go ahead and say I can''t fix the problem... because that''s when I figure out how.

Share this post


Link to post
Share on other sites
You need to set a couple of render states, and it will look much better. It will never look 3DS Max calibre, but it will look nice.

Turn on bilinear filtering, use mipmapping, and -- if possible -- use full-screen antialiasing.

If you're just loading it into the DirectX SDK samples, for instance, they will indeed look lousy. Most of those samples do not utilize mipmap filtering. But, enable those render states and it will look great.


[edited by - The Frugal Gourmet on May 17, 2004 4:00:29 PM]

Share this post


Link to post
Share on other sites
quote:
Original post by Super Robot Fox
screenshot?


Agreed! Screenshot!!

C''mon Webjeff, in fact you have internet-buzzword right in your nick, but didn''t include a screenshot!

You''d have 5 definate answers by now!

Share this post


Link to post
Share on other sites
ok,

The long awaited screenie is here.

http://www.artec-rail.com/artec2/imgversions.JPG

haha. You will see 3 versions

1) old, original
2) some added renderstates
3) the max rendered god.

Is there anything else besides bilinear filtering and mip maps that would make it look better... oh yea, it is windowed too so anti-aliasing will come later once its full screened.

Thanks sooo much guys.
Jeff.

Share this post


Link to post
Share on other sites
you need to add a black background first of all and maybe an effect that blurs the screen a little since it kind of looks way to sharp to me!

Share this post


Link to post
Share on other sites
Antialiasing as obviously playing a big factor into how good the model will look. As for the texture filtering your method should look better than what it does. I''d suggest looking into that.

Share this post


Link to post
Share on other sites
Hmm,

Well, here are the render states I am setting:

m_pd3dDevice->SetSamplerState( 0, D3DSAMP_MAGFILTER, D3DTEXF_LINEAR );
m_pd3dDevice->SetSamplerState( 0, D3DSAMP_MINFILTER, D3DTEXF_LINEAR );
m_pd3dDevice->SetSamplerState( 0, D3DSAMP_MIPFILTER, D3DTEXF_GAUSSIANQUAD );

I''m loading the textures like this:

D3DXCreateTextureFromFileEx(
m_pd3dDevice,
szTextureFilePath,
D3DX_DEFAULT,
D3DX_DEFAULT,
D3DX_DEFAULT,
0,
D3DFMT_UNKNOWN,
D3DPOOL_MANAGED,
D3DX_DEFAULT,
D3DX_DEFAULT,
0,
NULL,
NULL,
&m_pTexture[tempint])
//Note I use D3DX_DEFAULT for the mip mapping.

AND the window itself has these parameters:

d3dpp.Windowed = TRUE;
d3dpp.SwapEffect = D3DSWAPEFFECT_DISCARD;
d3dpp.BackBufferFormat = D3DFMT_UNKNOWN;
d3dpp.EnableAutoDepthStencil = TRUE;
d3dpp.AutoDepthStencilFormat = D3DFMT_D16;

Not sure if there is anything special I can change or any techniques that might make it look sharper.

Thanks again.

Share this post


Link to post
Share on other sites
It''s called using a screen resalution higher then 640x480. The pixelations come from complex geometry in small res. Use anti aliasing, ad some lights to yoru scene, since it''s just full bright now. If you can''t figure that out on your own, I seriously suggest reading some books.

Share this post


Link to post
Share on other sites
Adding some kind of lighting would greatly improve the appearance of your model. The best thing to do in this case would be to have some kind of lightmap, but writting a decent lightmapper can be tricky and difficult. I think 3DS Max has the ability to bake lighting colors into the texture though, you may want to try that. If you can have 3DS Max create a lightmap for you your model will look a lot closer to what you have in 3DS. If that doesn't work you can always try some simple vertex lighting. Your model looks decently tessalated so it may look good. You should also turn on alpha blending. It looks like the lights in stadium have transparent sections.


[edited by - impossible on May 17, 2004 12:09:11 AM]

Share this post


Link to post
Share on other sites
Here are the top three hitters:

1) You need to create a device with multi-sample anti-aliasing.

2) You need to add a point light that''s in the upper-left corner of the scene, as viewed right now -- your current scene is totally flat-lit.

3) Max renders with per-pixel lighting. You need to write a per-pixel material that works much like the MAX material, which isn''t too hard (you can start with a typical Phong .fx file and go from there).

If you have a card older than GeForce FX 5200, or older than Radeon 9500, then you need to upgrade so that you have support for shader model 2.0; it''s hardly possible to emulate the Max materials with the older cards at all.

Good luck!

Share this post


Link to post
Share on other sites
lighting-shading (per pixel lighting), anti-aliasing, mip-mapping, transparency.

looks like your stuff is rendered flat-lit. add some lights, I let you guess where to place them

Share this post


Link to post
Share on other sites
Same as everyone else said.
Nice model though - how long did it take you? Are you a hobbyist - at some point I want to find a modeller for my game...

Share this post


Link to post
Share on other sites