• Announcements

    • khawk

      Download the Game Design and Indie Game Marketing Freebook   07/19/17

      GameDev.net and CRC Press have teamed up to bring a free ebook of content curated from top titles published by CRC Press. The freebook, Practices of Game Design & Indie Game Marketing, includes chapters from The Art of Game Design: A Book of Lenses, A Practical Guide to Indie Game Marketing, and An Architectural Approach to Level Design. The GameDev.net FreeBook is relevant to game designers, developers, and those interested in learning more about the challenges in game development. We know game development can be a tough discipline and business, so we picked several chapters from CRC Press titles that we thought would be of interest to you, the GameDev.net audience, in your journey to design, develop, and market your next game. The free ebook is available through CRC Press by clicking here. The Curated Books The Art of Game Design: A Book of Lenses, Second Edition, by Jesse Schell Presents 100+ sets of questions, or different lenses, for viewing a game’s design, encompassing diverse fields such as psychology, architecture, music, film, software engineering, theme park design, mathematics, anthropology, and more. Written by one of the world's top game designers, this book describes the deepest and most fundamental principles of game design, demonstrating how tactics used in board, card, and athletic games also work in video games. It provides practical instruction on creating world-class games that will be played again and again. View it here. A Practical Guide to Indie Game Marketing, by Joel Dreskin Marketing is an essential but too frequently overlooked or minimized component of the release plan for indie games. A Practical Guide to Indie Game Marketing provides you with the tools needed to build visibility and sell your indie games. With special focus on those developers with small budgets and limited staff and resources, this book is packed with tangible recommendations and techniques that you can put to use immediately. As a seasoned professional of the indie game arena, author Joel Dreskin gives you insight into practical, real-world experiences of marketing numerous successful games and also provides stories of the failures. View it here. An Architectural Approach to Level Design This is one of the first books to integrate architectural and spatial design theory with the field of level design. The book presents architectural techniques and theories for level designers to use in their own work. It connects architecture and level design in different ways that address the practical elements of how designers construct space and the experiential elements of how and why humans interact with this space. Throughout the text, readers learn skills for spatial layout, evoking emotion through gamespaces, and creating better levels through architectural theory. View it here. Learn more and download the ebook by clicking here. Did you know? GameDev.net and CRC Press also recently teamed up to bring GDNet+ Members up to a 20% discount on all CRC Press books. Learn more about this and other benefits here.
Sign in to follow this  
Followers 0
ill

Rendering Doom 3 models, HORRIBLE texture seams.

8 posts in this topic

This is something I've been wondering for a while as I was using some Doom 3 models for testing my renderer.

 

Here's a screenshot.

http://i.imgur.com/J7O3iK9.jpg

 

Notice how down the middle, he has those seams.  This is using my deferred shading engine and when I look at the normals in the Gbuffer, the normals are also full of seams there, while the diffuse output looks fairly OK.

 

The legs also have some nasty texture seam artifacts going on, and I can see these horrible seams when I render the specular gBuffer as well and see how the specular textures map on.  The insides of the arms look especially bad.

 

I remember back in the day on my shitty graphics card, I'd have some seams down the middle of models and it seems to be a complaint around the web people have had.  Forcing the normal maps to be uncompressed seems to have been the fix, and nowadays when I play Quake 4 and Doom 3 on higher than ultra settings by tweaking some cvars, I never see these seams.

 

My renderer is just loading the normal maps as they are in tga format in the .pak.  I saw some dds textures in the paks as well and I assume Doom 3 actually uses those, but I don't have a dds texture loader just yet.  (I'm also surprised at how much scratch work and useless stuff is inside the pak files that isn't really used by the game, but I'm also really greatful it's there)

 

Here's a forum post where they actually say to enable some sort of compression on normal maps.

http://forums.cgsociety.org/archive/index.php/t-182031.html

0

Share this post


Link to post
Share on other sites

From what I can gather from the links and info you posted, this texture seam is also in the Doom 3 engine and is a result of the way the normals in the model resource file are compressed? I believe they used normal mapping, where they modelled the actor at a higher polygon level, then reduced the polygon count but kept the normals at the higher level and baked them into a normal map.

 

So the question is how are you rendering these models? Have you loaded the normal map and are you decompressing it (and how) and how do you adjust the normals based on the values in the normal map?

Edited by Steve_Segreto
0

Share this post


Link to post
Share on other sites

This is a common problem when baking normals, and can be improved by blending the connected pieces to together.

This is usually avoided by placing the seams in a unseen place like below the arm on the side, the only reason I can think of doing it like this is if a model is viewed from behind 95% of the time.

0

Share this post


Link to post
Share on other sites

Notice how down the middle, he has those seams.

You need to take care of mirrored normal maps, e.g. the chest is mirrored at the middle line. In this case your engine needs to take care of two things:

1. Correct handling of handness of the tangent space.

The tangent space of a normal mapped model often uses left-handed and right-handed tangent spaces together. If you strictly use only one handness, some normals will point into the model resulting in wrong lighting (often the whole half of a model is wrongly lit, this seems to be not an issue here).

 

2. Vertex splitting.

I don't know if the doom model format already take care of it, but you need to split vertices when the handness of the tangent space switches, which is the case when using mirrored normal maps. In this case some vertices will share the same texture/normalmap uv coords, but will have different tangent spaces.

2

Share this post


Link to post
Share on other sites

OK, I was actually using Assimp to convert the md5s to my own format.  Maybe Assimp is messing something up.  I might try to take a look.  I can try debug drawing the tangents on the model and making sure they face opposite directions, which I think would indicate the handedness switch?

 

I'm not sure how to explain the ugly seams at the legs though.

0

Share this post


Link to post
Share on other sites

To be honest, it is really hard to notice your seams in your image, it does not help to render 10.000 models with an psychedelic color scheme tongue.png. Try to render a single model and mark the seams.

1

Share this post


Link to post
Share on other sites

One problem with md5mesh format is that it does not store normal vectors, so the mesh needs to be smoothed after it is loaded. If the artist used some custom smoothing schemes when baking the normals, the renderer has no chance of getting the correct results. I guess that Doom 3 smoothes the meshes uniformly or uses some sort of fixed threshold smooth angle, which is then also used when baking the normal maps.

 

Note that at texture seams, there are degenerate vertices, which should have the same normal. To properly smooth the mesh, it is not sufficient to compare if two faces share the same vertex index, but you must actually compare the vertex positions, possibly with some threshold distance.

0

Share this post


Link to post
Share on other sites

OK, maybe Assimp needs to be tweaked.  I don't really intend on using Doom 3 models for ever though, just while I'm developing because they're so friggin cool.  Our artist would export things as Dae, With Normals, and then this would probably not be a problem for our real assets.

0

Share this post


Link to post
Share on other sites

looks like when you make half of a body in 3d and you dont weld the vertices at the seam.

0

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  
Followers 0