Quanon Posted June 16, 2009 Share Posted June 16, 2009 I here by now open this new discussion thread! Lets gather all our info, problems and wishlisting about this handy tool here. A good focused thread will no doubt help MagnusII a bit more, then our other general thread. Link to comment Share on other sites More sharing options...
magnusll Posted June 17, 2009 Share Posted June 17, 2009 I've successfully modified the NWmax main export script to properly export lightmap data (thanks for the file Quanon ). Will soon start coding the relative importing function into KAurora. Link to comment Share on other sites More sharing options...
Quanon Posted June 17, 2009 Share Posted June 17, 2009 Wow, great news Mag! Really nice of you to put all this time and effort into this. Lets hope the game accepts this edit to... unless you've been testing like a madman. Link to comment Share on other sites More sharing options...
TheProphet Posted June 18, 2009 Share Posted June 18, 2009 Ahhhh that's great news! Now Quanon will just have to show me how to make lightmaps and we are all in buisness , Excellent work Mag. Link to comment Share on other sites More sharing options...
Quanon Posted June 18, 2009 Share Posted June 18, 2009 I'll have a look to write a bit more extensive tutorial about. Its not that difficult, to set it up all. Link to comment Share on other sites More sharing options...
magnusll Posted June 18, 2009 Share Posted June 18, 2009 Was coding the lightmap import into Kaurora today, when I was reminded of a nice sticking point: how can the engine render the UV mapping (both for normal textures and for lightmaps) if the texture face information is not stored anywhere in the .mdl and .mdx files? The only data stored about them is their vertex list info and the .tga file. This is not enough since the texture faces obviously refer to the texture vertices, and these are different (and more numerous) than the mesh vertices... aren't they? Then I remembered... <sigh> The truth is that, when you create your mesh, you always start with a number of vertices which is equal to the number of faces * 3, plainly enough; and these vertices are used for everything, from the basic mesh structure to however many textures you're UV-mapping onto it. What happens next is that Max will automatically simplify the mesh structure by deleting duplicate vertices whenever it meets them (e.g. on two faces sharing an edge, there will be 2 duplicate vertices). Of course, this deletion works differently for the basic structure and for each and every texture you're applying, so you end up with e.g. 8 vertices for the normal structure, 24 for the texture, and 16 for the lightmap. Max is not fussed about it as it stores face data for each channel; the Kotor engine, on the other hand, hasn't such a luxury and so he wants all the original vertices before Max messed them up with its simplification algorithm. Back when I wrote the code to import the "normal" textures I developed an algorithm which, while not perfect, was good enough to rebuild the original vertex list in a way which was in accordance with both the basic structure and the texture faces' data. Now the shortcut I took has come back to bite me in the ass, as I now also have a second texture (the lightmap) to contend with, with its own faces, and the way I'm using is NOT good enough to comply with this additional bit of data. So it's back to the drawing board for the "unsimplify vertex list" algorithm... Link to comment Share on other sites More sharing options...
TheProphet Posted June 19, 2009 Share Posted June 19, 2009 Yikes, that doesn't sound good, I'm sure if I knew more about what you were talking about, I would be able to sympathize easier, but as it stands, im not very techy . I have faith in you though Mag, if anyone can pull it off, its you. Link to comment Share on other sites More sharing options...
Quanon Posted June 19, 2009 Share Posted June 19, 2009 Well, Doc the fact is Max hides a lot of Vertices for you. If you make a cube, you actually have 6 planes, each with 4 verts. But 3Ds Max "deletes" ( so to speak) the verts shared by two faces. So lets say you select an edge of this cube, all there needs to be are 2 verts, but actually there are 4, because the Top plane and the side of the cube each have its own edge. Because their on the same spot, Max goes and hides this. Its the same with the Poly and Mesh thing, Editable poly hides the fact that things are all made of triangles. I'm not an expert myself, nor do these things really matter much when your modelling, it does become more important when you start to render things and export. The technical side of modelling. Sad puppy I can't help MagnusII more with this sort of things... Link to comment Share on other sites More sharing options...
magnusll Posted June 27, 2009 Share Posted June 27, 2009 Ok, so I have a build which should theoretically be able to import lightmaps. Unfortunately I've not had the time to test it yet, and I really doubt it's going to work at first try, so I will need to find my old scratch area for a few test runs. Link to comment Share on other sites More sharing options...
Quanon Posted June 27, 2009 Share Posted June 27, 2009 Great news, if you need anything, you know who to call... euh PM or e-mail. Link to comment Share on other sites More sharing options...
glovemaster Posted June 28, 2009 Share Posted June 28, 2009 Wow great work Magnus! Likewise, I wish I could help Well keep it up anyway, we're all counting on you Link to comment Share on other sites More sharing options...
Sithspecter Posted June 28, 2009 Share Posted June 28, 2009 Finally! I can't thank you enough for how good this will make our areas look. I'll be ready to test it when the time comes, though I'm still a little confused about what exactly the lightmaps add and how you create them... Link to comment Share on other sites More sharing options...
Quanon Posted June 28, 2009 Share Posted June 28, 2009 Well, what I know about Lightmaps is that they save/store shadows, lightcolors. Its sort of an extra layer, which blends with your regular texture. The benifet is that you don't need add real engine lights. All the engine needs to do is load in an extra texture. Though its kind of magic Okay I better stop jabbering about it and wright a tutorial >_> Link to comment Share on other sites More sharing options...
TriggerGod Posted June 28, 2009 Share Posted June 28, 2009 I think I might get it... So, like those red glowing things on Malachor's Academy, you'd basically copy the texture, resize it to be VERY TINY, and than make it the color you want it, am I right? Are those little boxes in the lightmap arranged in a numeric order (ie. flr_tex01-10 are the first 10 little boxes on the lightmap texture) Link to comment Share on other sites More sharing options...
Quanon Posted June 29, 2009 Share Posted June 29, 2009 Some what like that Trigger. Kotor's lightmaps are actually smaller lightsmaps all bunched together. It saves room I guess. Anyway I'll write that tutorial to day for you guys: That way you'll see it for yourself what it does Expect a linky somwhere to night or euh morning, late afternoon ( I don't know what timezone you're in ) Okay here it is: LINKY TO TUTORIAL Link to comment Share on other sites More sharing options...
Sithspecter Posted June 29, 2009 Share Posted June 29, 2009 Is there a new KAurora build? If so, where can I download it and the NWMax fixes Magnus made? Link to comment Share on other sites More sharing options...
magnusll Posted June 29, 2009 Share Posted June 29, 2009 I've not yet uploaded the new build 'cause it's completely untested. I can put it online somewhere I guess, if you're willing to give it a try, but I really doubt it's going to work until I do at least the first debugging run. I had to work on some assumptions about how the lightmap vertex data is stored in the .mdx files and until I can check whether or not it is correct, the new build is basically a shot in the dark. Link to comment Share on other sites More sharing options...
TriggerGod Posted June 30, 2009 Share Posted June 30, 2009 Some what like that Trigger. Kotor's lightmaps are actually smaller lightsmaps all bunched together. It saves room I guess. Ah, after reading through your tuto, that makes perfect sense. Those cheapskates. First they give us those tubes, than they give us a horrid robe model, and than they use 256x256 when we can use 1024x1024 + without lagging the game much/at all. Bioware cut a lot of corners, and than Obsidian used those cut corners in TSL. USE BIGGER IMAGES IN YOUR FUTURE GAMES! Link to comment Share on other sites More sharing options...
Quanon Posted June 30, 2009 Share Posted June 30, 2009 TG remember they had to fit it all on a Xbox DVD format. Plus the system of the Xbox wasn't the same like our PC's today. A lot less of memory and stuff: devellopers have to follow certain guidelines set out by Microsoft. Though I wouldn't choose for 1024x1024 all the time, since K1 and TSL areas don't look to ugly, I guess smaller formats might work OK. Link to comment Share on other sites More sharing options...
Sithspecter Posted June 30, 2009 Share Posted June 30, 2009 Ah, this is excellent. I enjoyed the tutorial very much. It opened my eyes as to why lightmaps are so important. Can't wait for Mag to get the new stuff up. Link to comment Share on other sites More sharing options...
Quanon Posted June 30, 2009 Share Posted June 30, 2009 Lets hope I found the right procedure. No doubt we'll have to look how Bioware named their lightmap. Something tells me there's still some mysteries to be solved to get it to work. But at least its a step closer Anyway don't take my word for as the ultimate truth about lightmaps. Feel free to do some research yourselfs on the matter. I got most of my info from an old tutorial for Unreal Tournament 2004 editing. Link to comment Share on other sites More sharing options...
Sithspecter Posted June 30, 2009 Share Posted June 30, 2009 Even if it's not the correct way, it really helped me understand what's going on with the lightmaps. Link to comment Share on other sites More sharing options...
disbeliever Posted July 1, 2009 Author Share Posted July 1, 2009 So forgive my ignorance, but this lightmap tutorial and explaination, will it allow shadows in your area? For example in taris middle city, I have 4 big aururalights at the top of my area lighting the way. However even after putting the shadow settings on, no shadows show up. Will this allow me to finally have moving shadows in my area? Link to comment Share on other sites More sharing options...
Sithspecter Posted July 1, 2009 Share Posted July 1, 2009 Yes, it most certainly will! Link to comment Share on other sites More sharing options...
glovemaster Posted July 4, 2009 Share Posted July 4, 2009 I'm pretty sure AuroraLight's are only used to render shadows of objects like the PC and other NPC's. Infact I'm pretty sure they arn't supposed to affect the environment at all; which is why only the nearest 3(?) AuroraLight's seem to be switched on - it doesn't make sense to render shadows from a light in another room. I'm pretty sure that the only time I've seen AuroraLight's affect the environment is when they are used to create effects such as the Sun - especially on Tatooine as I discovered ¬¬ Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.