Saturday, April 21, 2012

Sorry, But the Snake Must Die

Take a good look at the picture below.


Take a good look at it because this is the last that anyone will ever see of this snake. Even before I give it the gift of life, it will die stillborn.

When I wrote my last blog post, I thought I was ready to transform the snake I’ve been working on into a hydra. I was wrong. I made a shocking discovery, one that I should have realized before I started texturing the snake. I found out that my model comprised 5,628 triangles, 82% of which comes from the head and neck. If I had made a five-headed hydra out of it, the creature would have weighed in at 24,180 triangles. Just to put things into perspective, the creature with the most number of triangles in NWN2 is probably the blue dragon, which is made up of only 5,810 triangles. Any creature that goes way over this number will be a resource hog that may slow down the game.

Clearly, this situation is untenable. I’m sorry, but the snake must die.

Ironically, only a few weeks ago, I advised Eguintir Eligard to reduce the polygon count of his model before he textures or rigs it. Sometimes, the person who most quickly dispenses advice is the last to take it.

As with real snakes, the biggest offender in my model is the mouth. The teeth alone comprise over 32% of the snake’s polygons. Even with the teeth gone, the inside of the snake’s mouth is still a complex piece of topography, with far too many polygons dedicated to accurately depicting its hills and ridges. Despite that, players are unlikely to look closely at its mouth, especially if they play with the camera zoomed out. All those polygons would have been for nothing.

I spent an entire day reducing my model to its bare essentials until I was left with 1,432 triangles. Making a hydra out of the new snake would have brought its polygon count to 5,368. Good enough.

With all the trimming I did, my UV map was practically useless. I had to retexture the snake from scratch. It is said that there are two kinds of outcomes: successes and learning experiences. Mine was definitely in the latter category. The good thing about having so many learning experiences is that they enable one to work faster than before. I spent three days on the normal map and one day on the diffuse map. Within five days of my startling realization, I was done.

Meet the new snake. Same as the old snake… minus a few thousand polygons.

7 comments:

Eguintir Eligard said...

I did what I could taking your advice into account. I had a rash of problems. Not the least of which was even with VERY high (too high ) optimizations the count was still over 4000 squares. Then I couldnt animate it at all because there wasnt enough edges, and the texture maps got really confusing cause of all the rotated edges. Further to that, I ended up re cutting a bunch of lines so there was enough bend points for animation.

So currently the model sits at 5800 polygons (I assume the polygons, being square, represent 2 triangles, which is why i asked if I need to convert to mesh instead of editable polygon).

Anyway the point is, since most creatures have separate tales, which can have their own polygon and bone count, I think Im still fine. 6k polygons but the tail is built in. Technically I can do 6k plus 3k (tails get about half I think). At most, however, so in regards to that:

Have you checked out the recent custom content thread where a creator was grossly exceeding the limits and testing with people and not seeing any ill effects? He was doing 12k and beyond.

If I'm over simplifying it so be it, but isn't one hydra model with 24k the same as having 4 creatures with 6k in terms of load? I think it only impacts things if NWN2's engine has a hardcoded limit on what it will receive.

Regardless I still don't know how you optimize so hard with the entire model turning to crap on a cracker. Mine did, and I didn't get much poly count relief at all. I'd love if I could though.

boxingalcibiades said...

Man, please keep it up. Didn't want to say it out on the bioware board, but you guys who have actually managed to make the learning curve are really inspiring for me, and what little I've learned to do (at this point, I feel good if I can make a nice texture) is because of seeing what y'all have done and thinking "I wanna do that."

happycrow said...

(Oh, sorry, wrong login. But still, please do keep it up.)

Lance Botelle (Bard of Althéa) said...

Hi Frank,

I cannot see any difference from looking at the pictures, which means that it still looks excellent to me! :)

As far as I am concerned, having new models (as long as they are at least half decent) is better than having mo new models at all.

Lance.

Jclef said...

At least he'll make a nice belt for some lucky Storm Giant...

But seriously, sorry to hear about that. :(

I'd still release it.

Frank Perez said...

@Eguintir,
I don't like using automated methods for reducing polygons because they often make ugly geometry and never take into account where the mesh is supposed to bend. You're right about quads being 2 triangles, so if your model is almost entirely made of quads, it has about 11,600 triangles. Something like that would have to be a major boss creature with no allies helping it to justify its resource consumption. Btw, when I mentioned that the blue dragon has 5,628 triangles, that includes all visible geometry -- the body, head, wings, and tail. Anyhow, best of luck with your project.


@Jclef,
No worries. I can still release the lower-poly version of the snake. There's hardly any noticeable difference between the it and the higher-poly version anyway.


@Lance,
Thanks, man. I was hoping someone would say that. :)


@Happycrow,
I started modeling with zero knowledge of how to go about it. It wasn't easy, but I persisted. This blog is a journal of my growth as a 3D artist, among other things. Keep at it, and your skills will grow as well.

anduraga said...

You can probably release both, only giving a disclaimer that the higher poly snake should only be used for cinematic purposes if the modder so chooses.

That is assuming you still have said high poly snake on your computer.