View Full Version : LightMap Challenged
legacy-Twrecks
07-01-2003, 06:46 AM
I can't seem to get my Max5 models to export to Ued3 properly.
Not only do certain faces textures distort, but getting any lightmap to fit the model just doesn't happen for me.
In Max I used a Multi/Sub-Object texture with my 3 textures, UVW mapped the surfaces, collapsing the stack between each UVW modifier. Added lights, Looks good in Max.
Okay, Render to Texture... Remove Shell Material and export selected. (I've tried exporting before RTT, same results).
In Ued3, Import my textures (load used packages). Import mesh... Hmm, most textures look okay, a few wrinkles and skewed/stretched faces. Erg >:(
Make my Shaders, down to the Lightmap for the Texture Coordinate Source. Replace default textures with coorisponding shaders... *blech*
I can't seem to get this work with one object, no less the 60+ meshes that make up my level. I would like to export all the exterior wall meshes as a group with a single lightmap, and have them as individual meshes in Ued for optimization. Same with all the interior wall meshes with a seperate light map.
Okay, you have all seen CTF-Magma. It was done there, why doesn't it work for me? I've followed the UDN content creation stuff, Gradients excellent tute and 3dBuzz's VTMs, plus a few others I could find. Maping channels all correct (1 for my textures in Max, 2 for the Lightmap), proceedures correct (I think). I've been fighting this for 3 weeks and am about to chuck it in.
here is a pic of one of the meshes done seperately: http://www.west.net/~furkids/Twrecks/wtf.jpg
legacy-Twrecks
07-01-2003, 06:59 AM
This is a render out in Max of the whole thing at present:
http://www.west.net/~furkids/Twrecks/map.jpg
legacy-Bonehed316
07-01-2003, 09:48 AM
i think lightmaps are supposed to go in the display > UV2 section of the mesh. with the UV2 operation set to lightmap. but if you have a lightmap, you might as well make your lightmap a skin, instad of having 4 or 5 materials (the base textures for the object, plus the lightmap). you could add all channels to the render to texture section. and then when you unwrap it, wrap it again with the "skin" as the only material in max. then when you import it into UED, the skin ist he only texture on the mesh. thats how ive always done it. having skin/lightmaps for each mesh, or just one, is a waste imo, when you can simply use skin and lightmap in the same texture. more effecient that way. the only time you would really want seperate lightmaps is when you want the same mesh, with the same textures, but differnet shadows.
again, its been a while since ive unwrapped, and then UVW mapped a skin onto a mesh, but i think youre going wrong after you unwrap, youre not wrapping again in max.
another problem could be that, and this is only something ive heard, onlyone set of UVW coords will go thrugh from max to UED. so if your textures are on one set, your lightmap coords wont work right. another reason to make it all one skin.
legacy-Mr Evil
07-01-2003, 10:21 AM
Originally posted by Bonehed316
...another problem could be that, and this is only something ive heard, onlyone set of UVW coords will go thrugh from max to UED...
That can't be true because I have succesfully imported meshes from Max with six different UVW maps.
legacy-Twrecks
07-01-2003, 12:47 PM
I'm using tilable textures so skinning is a no go, besides that would really up the file size. Multiple UVs, of course, however the mesh illustrated only has one UV per texture.
legacy-Bonehed316
07-01-2003, 12:58 PM
it wouldnt up anything. youve already got ONE texture, at least, due to the lightmap. if, when you MAKE the lightmap, you add ALL channels, that includes textures, lighting, and so on, in MAX, this will make a single skin, with texturing, lighting, ect all in one file. them you map THAT texture on to the model, and use that instead of the base textures (tilable) AND a lightmap. 1 texture instead of 4 or 5 is better. if you get my meaning.
legacy-Twrecks
07-01-2003, 03:08 PM
the lightmap is only 128x128 for a single mesh, maybe 2048x2048 for the entire level. Tilable textures are around 512x512. To skin out a mesh and have it look half decent each mesh would need a 2048x2048.
Look at CTF-Magma. Shane did it. Using Tilable textures WITH a level lightmap is the way to go.
I agree, I could skin every mesh. It would work. But that's not what i want. thanks
legacy-Fordy
07-01-2003, 10:26 PM
Shane only used lightmaps for the 2 castles, the rest was all normal lighting. Now if you use more than 1 texture on a model & need a light map for it, you will have to use a combimer for each material.
Im probably stating the obvious but have you had a look at Gradients static mesh tuts (http://www3.sk.sympatico.ca/kelbeau/max2ued/html/contents.html) ? its all explained in there!
legacy-Twrecks
07-02-2003, 08:49 PM
No good. I went back over the Gradient tute word by word, still jacked up :(
Even using the UVmode to UVligtmap and setting the Lightmap texture in the advanced properties resulted in the same thang, only brighter (going to the effort of Shaders is mo'better).
Aaack!!
I've attempted emailing Shane Caudle in hopes of some aid. He's the author of CTF-Magma. Who knows, the guy might answer, or tip me off to someone who can... I've lost countless hours sleep on this project and would like to see a positive outcome. Unless I can get the import part to work before this weekend will miss Phase1 of TEH contest, as it is, bot pathing et al will be a bit rushed.
legacy-Fordy
07-02-2003, 09:27 PM
I wouldnt hold your breath hehe. I emailed him with summat that turned out to be dead simple, still havent heard a thing.
legacy-Twrecks
07-02-2003, 11:03 PM
weld vertices...
What is this? Do I need to do this, if so when?
I'm reachin out here.
legacy-Fordy
07-03-2003, 08:23 AM
heheh you should always weld your verts on any finished model b4 importing it into Ued. Just select all your verts & choose weld on the roll out, just use the defaults and note the number of verts b4 & after.
legacy-Doctor7
07-03-2003, 10:02 AM
What format are you using for the lightmap image? Because one thing I noticed when saving TGA files from Lightwave is that they use the opposite line order from UEd, meaning that they come into the editor upside down. I had to load and resave them with Photoshop to get them into the correct format.
legacy-Twrecks
07-03-2003, 10:31 PM
welp, I think it is something simple. In fact, I was eporting again last night when I saw this setting called "precision". It was set to 1. So WTF, I set it to 6. Voila, lightmap and textures all align perfect. Just another problem appears, ZEBRA STRIPES. The flat floor surface has frickin ZEBRA STRIPES.
Looking around, I found this on UnrealWiki
On occasion the lighting compiler will do some funky math and make the lightmaps too small for the face they are being applied to. The effect is a rather ugly "zebra stripe" effect on surfaces as the lightmap repeats itself many times over the face of the object. I postulate that this has something to do with the maximum lightmap size, but I can't be sure.
There are a few ways to fix this so that you don't have to rebuild the map (as I had to do, many a time).
The first way to fix this is to put a ZoneInfo in the area in question and give the zone some ambient lighting. Rebuild the geometry and rebuild the lighting and the problem usually goes away (if it doesn't, which it has been known to do, use the second method). If you didn't want ambient lighting there, you can always just remove the ZoneInfo]]]] or set its Zone lighting to zero.
The second way of fixing this, which works better if the effect is only on a few surfaces, is to vertex edit the points of the surface to one position. This realigns the texture and clears the lighting. This doesn't work as often, and tends to be hard to implement in large or complex areas.
The best way to avoid this problem completely is to hold off on lighting an area until you are nearly done with the architecture. If you want to see the lighting before you finish you should save a copy of the map to some other name, then apply the lighting.
Bean: I just save, close UnrealED, restart my computer. That fixes the problem.
Cursed_Soul I only get this problem when Im rebuilding when d3d in the 3d view window is activated, if you change it to software rendering, and rebuild lighting its gone, that does the trick for me.
I will try this tomarrow when I get back to my rig. Shessh. 3 weeks hammerin my skull on this. Entries have begun and I don't have nada in Ued yet :p
legacy-Twrecks
07-05-2003, 02:10 AM
Just incase you cats wanted to know what "Zebra Stripes" looked like:
http://www.west.net/~furkids/Twrecks/zebra.jpg
legacy-Fordy
07-05-2003, 06:36 AM
I find the render to texture in Max to be extremely buggy, sometimes it works, sometimes it just throws up an unrecognised exception and when it does work, it sometimes doesnt quite get the automatic flattening of uvw's right & leaves black lines like those, though U have to move the the camera in the Perspective viewport to see the effect immediatley after RTT.
Still u a happy chappy now ?
legacy-Twrecks
07-07-2003, 12:49 PM
no.
I still have not brrn able to Light Map several meshes with one Lightmap ala CTF-Magma.
On a bright side, I actually have a few meshes in Ued :p
legacy-Twrecks
07-08-2003, 04:48 AM
Muhahahaha
I fingered it out!!!
Or atleast on a very minimal level using a few primitives with two textures and several UVWmaps.
Perhaps I will write a tute on it some time, for now I have to get this to work on my map with complex objects and additional textures. 7 days left...
Powered by vBulletin® Version 4.1.6 Copyright © 2012 vBulletin Solutions, Inc. All rights reserved.