Monday, March 14, 2005

Sector1 texturing finished.

Woo!
Today I've finished texturing sector1 with textures borrowed for non-profit from a popular game, hope no one will hold a grudge. Was hell of a task to browse through all these textures there, thousands of textures with every theme imaginable, and all of exceptional quality. Then i had to filter them by theme and create tilesets to texture everything nice. After texturing major zones, i made some transit textures between those zones.
For example, in the hall there is a stone pavement on the floor, while in the cave there is dirt, so i made a mix of those two in photoshop and now there's a dusty pavement between the zones.
The plan for next few days is :
- finish modelling the rest of the cave body
- texture everything
- make some decorations and texture them
- light everything
- bake lightmaps
- sort textures (will have 50+ of them i think)
- start coding CD/Shaders

'nuff of ranting, time to whack some wolves.

Hall of Justice, straight from Ironforge ;D (max)

Hand mapped crystal and trans-texture seaming two areas.

Overview of sector1 (max)

Shot of corridor in sector 1 (max)

Wednesday, March 09, 2005


Here's the second version of the lightmapping. Yet again i had to change renderer from radiosity (which wasnt giving me shadows nor real GI) to mental ray with photometric lights (because mr doesnt work too well with mr lights.. DOH). This result is more than acceptable i think. Yay!

First Working Lightmapping screenshot. I managed to get multitexturing right so everything is multiplied as it should be. But i dont like the effect too much..

Monday, March 07, 2005


Yay! Made it! Now time for lightmaps and I'm almost home! Woo! Joy! Partay \o <> o/

Thats what I've managed to do so far.
Everything seems fine-ish.
But the textures bound are only 1/4 size. Thats for starters. The other funny thing is that no matter what i bind to the tex-coord buffer, it always renders the texcoords the same way.
But if i dont bind anything, it crashes. Hell, it can render that picture with totally random data..
Im working on it, more details to come :)

Another wooden log at my feet ;-/

Today i wanted to finish my poli-texturing system for the nGine, and work on lightmap multitexturing tommorow.
After whole day of fighting with IO's and that goddamn glDrawElements, I managed to get everything to work. Almost.What i wasnt aware of is that the face-index indexes also the texture coords, which are in no way connected to that. This resulted in some really bogus mappings and basically the texturing doesnt work as its supposed to. As you can see in the pics below.
One idea is to repack and consolidate everything just like it was with the glDrawArrays approach. This would make data redundant, about 40% of vertices would be doubled, so its a big nono.Other than that glMultiTexCoord works in per-vertex basis and i fear it may go wrong too, effectively destroying my lightmapping.
In an hour of dire need i've posted with my problem on gamedev.net (http://www.gamedev.net/community/forums/topic.asp?topic_id=305215). Hopefully someone more experienced will read that and share his knowledge with me.

And the damn blog is buggy, geh.

This is what I've managed to achieve. Textures are in their place more or less. Or at least on the faces they were supposed to be, so the matID's work properly. The bad thing is that mapping is totally screwed up, and at this hour i dont see any easy ways out of it.

This is how the scene should look like, screen from max viewport.

Saturday, March 05, 2005

Slow progress.

I've spent most of the day cursing at 3dsmax, vray, mentalray and scanline-radiosty.

First of all, I've found out that vray cannot render lightmap to texture, no matter what i chose, i got complete map at the end. So.. YAY! Need to redo whole lighting in my scene, just great.
Then i tried mentalray.. but this thingie is sluggish and uncomfortable.. and hell.. the renders were complete maps too..
Then my last hope was built in crappy radiosity renderer. Failed me of course, frambuffer was showing only complete map. At this point i got a bit depressed.. oh, did i mention that you have to click everything very slow in the render to texture dialog because otherwise it crashes? :)

Finally in the evening i decided to check the output files from the renders. And guess what, they were more or less correct, at least those from radiosity, vray isnt working and thats that. Mental ray is not comfy , so im staying with scanline - which is to be honest even less comfy with those pesky photometric lights, candelas, lux's and other things.. guess re-lighting the scene will eat another day.

Meanwhile TJViking tried to convince me to drop all these renderers and precompute GI lighting by brute force. After reading a chapter on it in Siggraph materials i've decided that i'll stay with rendering maps.. too much hassle and not enough time.

At the end of the day i've re-edited the export script, made a test scene, and altered the import class in nGine. Sorting faces, rendering elements and other nasty things bound to glRenderElements await me tommorow.. and cab-driving family at 8am..

Thursday, March 03, 2005

Yay #coders and #3dmax

Yay!

Good that I sticked with IRC :) People on #coders are very helpfull, lots of expierienced coders, some with GL knowledge, lots of people with generic realtime 3d knowlege, and everybody very keen to help. Good to know some demosceners :P

Special greets go to ryg of farbraush and kusma for recent help.
After yesterdays night debate/tutor with ryg and todays tutor with kusma I've decided that the whole texturing system needs rewrting.

Currently I export one sector with its pre-baked texture of the same name. So i have model.n3d and model.bmp. Then i just load it into my engine and voila! But as you can see the results are very weak.

My new approach, suggested by meh gurus will be reusing the texture maps (like regular texturing in max) and making only lightmaps unique. This approach will let me to achieve good texture quality on the object, and the GI lighting from Vray. I think im gonna use 512 or 1024 textures for lightmaps for optimal quality. Generally lightmaps do not need that much, but I want to test it myself :)

So now I need to rewrite my exporter (goddamn maxscript, i hate you). And importer in nIO.h class.
While im at it, kusma pointed out that my vertex consolidation for glDrawArrays is a wrong approach, and i should leave the face-index array and use only indexes. I also need to implement two UV sets and two matID sets into the file format so i can multitexture everything.

Gues I'll just sit to coding now and post later what i came up with ;]

Special thanks for TJViking and utek from #3dmax for their max/vray/3d meritoric help :)

nGine "blog" is Up!

Today I've figured out that i need some sort of logging my achievements and sharing my coding problems with other people. Unfortunately blogger/hello does not allow me to post multiple pics in one post (at least with the win32 client) so I'll be adding only shots of particular interest. Posts below show my progress from december to early march.

Yeah, i know its poor! But there were xmas on the way, and I was sick, and WoW came out, and I had to learn some things and other very unproductive things happened along the way.
My deadline is set for may, so I plan to update the thing daily and boost my output by at least 500% ;]

Latest shot. Wireframe shot of the sector 1, or rather 1B, 1A is above, 1C is on the right (top view).

Here I've added a bit of fog for the effect, but scene quality is so poor that im almost ashamed by posting it here :)

Finally i managed to get proper lighting, but the quality of the texture, and the irradiance render method is way too low for my liking. Still shine throughs and whatnot. The low-ish framerate is caused by the 65k poly object hidden behind in camera in sector 1D , and is caused by lack of any culling implemented, I'll get that done after the texturing stage.

This on the other hand is the view from sector 1B towards sector 1C which was textured using 1024^2 texture. Lighting is non-existant here. Not mentioning these weird shine-throughs on the edges of overlapping objects, like the boulder on the right. Surface:texel ratio is too large apparently.

Ho'kay. Texture for sector 1B (the one on the shot) was rendering for about 1h on a 3.0HT. This texture here is 2048^2, looks really ugly, the texels are enomous and at the time i was really depressed by the quality/time ratio achieved. At this point I knew that my approach to texturing and sectors is wrong.

Total lighting and texturing disaster. Compare this shot with some others below.

Whole corridor, rendered using irradiance map and photons as secondary reflection.

Lamp closeup

Rendered part of corridor in sector 1

First lighting tests in Max/Vray

HDRI Lighting tests. I dropped this method because the light was too dark and it was too time-inefficient.

Rest of the cave, an modelled deco toolset

High poly model (for performance testing) in the 'outdoor' section of the cave.

Inside the tunnel.

Overview of cave sector A. Visible columns, some decorations, work in progress shot, no textures.

First shot from the cave

Working GL screenshot.

Testing texture baking and model/texture IO. Rendered pic from 3dsmax, and another from nGine. Posted by Hello

First 'viewable' screenshot from nGine. Simple VBO cave, no normals, no lighting, exponential fog. 19-12-2004 Posted by Hello

Test post

1-2-3 Test ffs.