Page 1 of 1
lightmaps/radiosity/textures/ladders - helpp
Posted: Thu Mar 22, 2007 9:52 am
by mister2
i've generated a few questions recently and am hoping the answers are simple, i just havent found them.
1. i textured a whole map in 3dsmax with 9 textures and it looked pretty nice, ran radiosity with a quality of 0 in sapien, and it was all textured with glossy whiteness. on that map i had given all the textures my own names, instead of using the filename, minus the tif extension. would this be the cause? i've since redone the maps, and i don't know if the different names were the reason it ended up working.
2. my grass texture won't end up on the final map. in tool, it asks me to specify what type of shader, with 9 choices. wtf does this mean?!
3. i wanted more textures than what came with the HEK collection, so i extracted some bitmaps from xbox map files, converted them to tif's in photoshop, and used them to texture in 3dsmax. it looked fine in 3ds, but by time i got it running on pc, the texture decided to change itself. it wasn't a blank color, it was just a completely different halo texture, one that i hadn't even used in my material editor... WTF?
4. in my first or second trial map while learning the whole map-making process, radiosity just went to 0.000000 instantly and didn't really do anything. i rebuilt the map and retextured everything, and radiosity went fine, but the map was dark, really dark. and thats been the case for every one of my maps. the only light source i have is the sun from the clear_afternoon sky, shining through any ceiling holes i have in the map. if im making an indoor map, how would i light the whole map? is there a scenery item. or a way to flood the whole indoor area with light?
5. ladders - where and in what application do i assign a certain face/polygon/surface with the ladder property? i assume it's sort of like the walk-on-wall feature, but just for the ladder portion of the map, but i don't know if i tag it somehow in 3ds, geurilla, sapien... im a nub
6. where in geurilla do i specify the spawn time of certain weapons and powerups? im not home right now to check, but i dont think i remember seeing an obvious spot for spawn time when adding weapons.
sorry for the lengthiness, but any help anywhere would be appreciated.
anyone wanna clue me in?! i'll be home shortly to look further for solutions to these things, but most importantly, i dunno how to light my maps up so i can see without my flashlight when im in a tunnel.
thanks guys <3
Posted: Thu Mar 22, 2007 11:42 am
by Malolo420
You need to have shaders and have them named to them in the material editor.
Posted: Thu Mar 22, 2007 11:51 am
by mister2
that sounds like fun, but i'm not sure what you mean when you say "have them named to them"
and i dont see much in the material editor about shaders
i didnt do anything different than what i've seen in tuts, and my textures are coming through ok, for the most part. so what would shaders fix? the grass? the darkness? the custom textures? thanks for the reply, but can you please specify?
Posted: Thu Mar 22, 2007 11:57 am
by Malolo420

Have that circled part the same name as the shader for the bitmap you want.
Then just have the bitmap referenced for the base map in the shader.
Posted: Mon Apr 02, 2007 12:22 pm
by mister2
k im still having trouble with 3 distinct areas.
lighting - i can't seem to find out where to light up an indoor map without blowing out the ceiling and relying on the single sun in the sky. how do i go about adding dynamic lighting, or whatever it is i need to do?
equipment/spawn times - i can place weapons, but they have no ammo, and they disappear after about 20 seconds and don't come back. what gives? i think i need a thorough explanation on placing 'usable' weapons around the map. powerups/healthpacks vanish as well
ladders - where do i tell the map file that a certain portion of the wall needs to act like a ladder?
Posted: Mon Apr 02, 2007 5:23 pm
by Malolo420
In your shaders you can make it give off radiosity, you'll have to run it again.
For MP weapons you use netgame equipment instead of weapons in sapien.
And for ladders have ^ after the name of the shader in the material editor in 3ds max. And you might need to add % depending on how you placed it.
Posted: Tue Apr 03, 2007 10:07 am
by mister2
thanks man. i appreciate the help.
what would i do to a shader to make it give off radiosity?
Posted: Tue Apr 03, 2007 12:08 pm
by Malolo420
At the top of the shader theres radiosity properties, set the power to 10 or something then just set the colour to what you want.
Posted: Tue Apr 03, 2007 12:21 pm
by mister2
awesome.
and i thought id be able to add teleporters with sparkedit afterwards, but i guess custom xbox maps wont open in sparke.
what tag in sapien adds teleporters? im actually trying to find it this time, and im sucking
edit: nvm i found it <3 <3
Posted: Tue Apr 03, 2007 12:29 pm
by kwazy
make sure you set the Netgame Flags with the teleporters, because the teleporters are just scenery
Posted: Tue Apr 03, 2007 12:36 pm
by mister2
yea i had been using the scenery teleporters for visual reference during testing,
but then i went looking for the actual teleporter tag, and couldnt find it, then found it, and got it workin. thanks
update:
got most everything working. i dont think upping the radiosity is doing much, if anything. if i close off the ceiling completely, the map is still dark.
also, im getting random crazy collision models that i didnt make. flat surfaces in the air that bullets and grenades hit, but mc's dont. anyone have a clue?
Posted: Sun Apr 08, 2007 1:57 pm
by mister2
k... been working here and there on a few things.
i still cant get the map to give off light. i dont really mind if i hafta put actual lights everywhere, and light up each room, but id rather the map just BE bright... if anyone knows how to do this, please let me know.
i also haven't solved the mystery of the invisible floating faces that come from nowhere... i don't even know how to troubleshoot this, because they are coming up in random places. please, if anyone has ever dealt with this, let me know what could be causing it.
other than that i'm all set... lights/radiosity and phantom faces... helppp
Posted: Tue Apr 10, 2007 6:27 am
by The_Chaos_Chief
Possible solutions for your questions.
1: It's best to name your bitmaps with underscores (_) instead of spaces. For example: A bitmap called "generic diffuse" should be named "generic_diffuse". Your files must be in the tif extension, and equal to or less than 32-bit quality. Don't render a UVW template from 3ds Max using a 48-bit quality setting, for example.
2: Your shader problem regards to the fact that you haven't created a shader for the bitmaps in your Material Editor. Every single bitmap (except player clipping geometry, portals, skybox, etc) needs a shader file for reference. This is done by launching Guerilla and creating a new shader_environment, a typical choice. Then, you can use Tool.exe to compile your tif files, and specify how they will be used in the shader tag. keep in mind that all materials need a shader tag assigned to them, and it's name should always be the same name as the base diffuse bitmap file.
For example: A shader called "generic_diffuse.shader_environment would have the bitmap tag "generic_diffuse" as the base diffuse map. If you have questions on how to create a shader_environment, ask me and I'll explain a typical procedure I use, which includes bump mapping and alpha channel masking/blending with detail/micro bitmaps.
3: As for your Halo 2 Xbox bitmap anomalies, you might want to go into the utilities panel in 3ds Max 9 and click the "More..." box. Use the UVW Remove tool, get rid the the materials and UVWs the faces possess, then remap and reapply the texture coordinates. The material needs ot be a multi-sub object one. The name of the referenced bitmap needs to be placed in the diffuse map ellipsis box near the color swatch for diffuse. So, do this: Bring up the Material Editor, press "Standard", select "Multi-Sub Object" from the material/map browser, then click the diffuse map button right next to the diffuse color swatch. There, click on Bitmap from the material/map broswer, then locate and select your tif image. Copy it's file name, or just remember it, then click open. Now, press "Go To Parent" in the Material Editor, located next to "Show Map in Viewport". Next, toggle "Show Map in Viewport" on, and paste/type the name of the bitmap without it's extension into the text box located above "Shader Basic Parameters". Your image is now properly referenced in 3ds Max, and Tool.exe will look for a corresponding shader tag when the map compiles after you use the BlueStreak Model Exporter, so make sure you use Guerilla to create a shader for each bitmap file that will appear in the game.
4: Your lighting issue can be resolved by offsetting faces in the mesh, to create a static light. Do this by selecting faces, holding shift, and moving them, which will create a clone that can be part of the mesh. Now you can assign a bitmap with light emiting properties, such as the ones in the HEK tutorial, or you can make your own using the HEK light shaders as guides on how lights are properly created. Make sure when you reference a light you place the shader flag "!" after the file name in 3ds Max. For example: base_lights.tif would be named "base_lights!" in the 3ds Max 9 Material Editor above Shader Basic Parameters.
5: This is how you create a ladder for Halo CE... Offset faces, just like you would with faces that will produce light, or you can just create them from scratch, but make sure that they form a seal with the surrounding geometry. I haven't experimented with ladders not forming seals, so I wouldn't know. A good ladder is made this way, and you can convert your geometry to an editable poly if you'd like to take advantage of more modeling features, but remember to reconvert it all to an editable mesh when you're done. Take for instance, a box-like structure you want people to climb up on, with a ladder: Collapse/convert object to editable poly, then use the inset tool and inset faces. Then scale them properly making sure your coordinate system is set to "Local" for a uniform scale, or even Gimbal or Parent for a less symmetrical inset, all depending on the topology and orientation of your faces. Now, bevel the polygons a bit. Then, use the extrude tool to extrude a few faces inward. If you're happy with your creation you can convert back to an editable mesh. Now, go into sub-object 3 mode, Face. Click Create, and make a few triangles where the bevel ended and where the extrude started. Make sure to weld any duplicate vertices. These newly created faces will be assigned a Material with 2 shader flags. The shader flag "%" means 2-sided. The ladder will be seen from both sides and it's normals will be ignored while in Halo. The "^" flag means the player can walk up the surface, like a ladder. You can create your own ladder in Photoshop, or use the one provided with Halo CE. A ladder will be referrenced like this: ladder_diffuse.tif = ladder_diffuse%^ in 3ds Max's Material Editor. Keep in mind that you can do all your modeling in mesh mode, but I prefer sometimes to convert to an editable poly, or just work with polygons the entire phase of modeling, then collapsing the object to a mesh in the end when I'm ready to export or adjust UVWs using the Unwrap UVW modifier. It all depends on your workflow technique. Polygons can sometimes cause problems when you convert them to a mesh because your triangulation or even topology can change in an undesirable way, which might hurt your previous UVW adjustments, but it all depends on what you want to do.
6: There's a way to adjust spawns for weapons in Guerilla, but I just use Sapien for that. In Sapien, there's a spawn time option near the item collection, the weapon tag or powerup tag you specify.
And remember, to light your indoor map, you need to offset faces and reference them to a bitmap, which in-turn is referrenced to a shader with the same name, which has light-casting properties. The shader flag "!" will be used, so that the Halo game engine will understand that the object is "render only", that is doesn't have to conform to the sealed world rules. Hopefully all this typing I did wasn't in vain, as you will find the solutions to every one of your problems not just from me, but from other people/resources as well, or yourself. When I have a error or anomaly, I google it and find the answers quick, or I just use trial & error techniques, which also work too. Good luck on you map!
Posted: Tue Apr 10, 2007 8:05 am
by mister2
ur a champion typist
thanks for all the in-depth responses. i will certainly be coming back here to get some answers from that post.
i got ladders working, but i just modeled them from scratch, and made two faces about a millimeter apart, cuz i didnt know halo would ignore the normals if you used %. someone mentioned that flag, but didnt explain it, so i did what i thought was logical.
but if i have a face sticking out perpendicularly from a surface, i can leave the one side open? is that kinda how glass works?
as for lighting, i upped the radiosity and changed the color of emitted light to white, which worked like a charm. i'll add 'lamps' later if i want to spice it up.
right now my biggest issues are custom bitmaps (but i will use your response to give it another go) and these freakin invisible surfaces that i didnt create. google doesnt help there, cuz all i find is stuff about intentional invisible walls with collision in halo 1 and 2 tricking and whatnot. cept mine werent created by me, theyre random, and only projectiles collide with them. and its driving me nuts.
anyways thanks a million... i definitely appreciate your time spent. <3
Posted: Tue Apr 10, 2007 9:46 am
by The_Chaos_Chief
You'd have to post a picture of your ladder and a perpendicular surface, so I could give an accurate answer. I'm sorry you have to deal with random surfaces. I've never had that problem... yet, he he. Anyway, here's how you make a custom shader. Yes, I'm going to type it all out.
Let's say you have terrain that will be rocky and have many patches of grass. Go grab a copy of "detail grass.tif" and a rock detail map from the Halo CE data directories. Make sure they're tileable, and paste them in the "bitmaps" folder of your level. (Rename "detail grass.tif" to "detail_grass.tif", just to make sure you'll not confuse tool.exe)
Keep in mind: You should use Unwrap UVW and render a UVW template. Make sure your UVW rendered image is of 32-bit depth or less. Pelt mapping is useful for getting rid of texture coordinate distortions in organic surfaces, like terrain. You can export a UVW template as a guide for your image editor. If you want me to explain pelt mapping in detail, or how to prepare a UVW template, I will.
Now, open your image editor, or Photoshop, and make a new image, or import your UVW image from 3ds Max. It needs to be measured in pixel dimensions, a square, and in powers of two: 256x256, 512x512, 1024x1024, I think up to 2048x2048. Go ahead and paint an idea of how the ground should look, or maybe the shades of color you want your rock/grass textures to appear as.
Now, create an alpha channel for your image in Photoshop by clicking Channels, New Channel. In that layer, you can paint where exactly, the grass and rock patches will apprear on your terrain. After all that is done, save your image as a tif, with compression set to none. Compile it with tool. An optional choice is to create a bump map for your texture. Do this simply by adding a Noise filter in Photoshop, smooth it with a Gaussian Blur, or make it exactly black/white by adjusting the Threshold of the image, useful for materials like metal where you want only certain crevices to stand out. Your bump map should be black and white, or in a grayscale gradient. To do this, go to the Image menu, Adjust, Hue/Saturation/Value (HSV). Now, you can turn the saturation all the way to zero, making the image not show any other color except black/white and shades or gray. Save the bump map as a tif. Compile it with tool. Now you're ready to make a shader.
In Guerilla; File, New, shader_environment. In radiosity properties, you can select "Simple Parameterization" for a terrain shader. I don't know what it does really, but from trial-error sessions I had, it removes all rough edges your shader might create. Select this if you're applying this shader to a surface you want to render smoothly, like terrain. The detail level can be set to "medium". That's a preset for how many pixels the lightmap file will be for your shader when the radiosity solution is saved, thus meaning its quality.
In the "Physics" section, you can say dirt, maybe stone, what you wish. I use "metal (thick)" for most of my shaders, because the collision geometry is simulated as being thicker than normal, or at least it seems that way. Vehicles crashing into a base won't get stuck inside the faces if you make a thick metal shader. At least, from my experience.
For now, you can leave the other properties alone. In your situation, if you're making a terrain shader, choose "blended" as the environment shader type, or you can leave it the default or "normal", but blended works for me better, and for the purpose of this explanation.
Diffuse properties:
Base map: click the ellipsis [...] and find your compiled bitmap file, the one where you just sketch either just an alpha channel, or both shades of color and an alpha channel, or just one with shades of colors only. Click Open. Now, there are a lot of options, but make sure your format is correct. If you ever experience grenades exploding on a green grassy ground, yet blow up with blue or another color of smoke, then you have this setting wrong most likely. In my example of a terrain shader, just select "Compressed With Explicit Alpha". At times, you may select 32-bit color. If that's the case, scroll down to the bottom of the bitmap tag and uncheck the "compressed" flag. Your base diffuse map is done. Recompile it, to update the settings you changed for it, or you can compile it later. Sapien will load and crash if you forget to recompile your bitmap with these new settings, because the shader tag and bitmap tag will have contradicting settings.
Technically, at this point, you're done with the most basic environment shader, but let's add some detail with those grass and rock textures you grabbed from the Halo CE data directory. You can save your shader now, but make sure it's name is the same as the base diffuse map. For example: "ground_shades.tif", a bitmap as your base diffuse, is referenced in the shader "ground_shades.shader_environment". Even if you use other bitmaps like the "detail_grass.tif", rocks, and a bump map, or even a cube map for reflection properties, you still need to make sure the shader's name is the same as the base diffuse bitmap's file name.
So now, applying a bump map is a common texture enhancement. When a dynamic light shines on a bump map surface, the face renders as if it has height to it. To apply your bump map, do this: Scroll down to "bump properties" in the Shader tag, in Guerilla. Click the ellipsis [...], and find your bump map. Click Open. Change it's settings to this: Format is "32-bit color", it's usage is "height map", check the flag "disable height map compression", and at the bottom of the bitmap tag, uncheck the flag "compressed". In the "post-processing" area of the bitmap tag, change the "bump height" to a generic number, or one for testing purposes. I use 0.25 almost all the time. The bump height will be how deep the bumps look when you shine your flash light on the surface of the shader. The bump map is done now. Save the bitmap tag, and recompile it using tool.
Now for the detail maps. These will show up in the shader where you painted your alpha channel in Photoshop, or your image editor. Since the environment shader type is set to "blended", the alpha channel will be your primary detail map. So, click the ellipsis for the primary detail map [...] It's properties aren't anything too special, so long as if it's a 32-bit image, it needs to not be compressed (uncheck "compressed" flag at bottom). For example: Here's the setting for a grass texture I just made, and you can explore the variations, seeing that most will work properly: Format: "compressed with color-key transparency". Usage: "detail map" (or you can just leave it as default, depending on the results you want), and "compressed" is checked at the bottom of the tag only if the image's usage says it's to be compressed. If it's to be 32-bit color, uncheck the "compressed" flag. Save the bitmap tag and recompile it with tool. As for your secondary detail map, the same rules apply, but this time, you can use a rock-like detail map, for example. After adjusting bitmap tag settings, don't forget to compile the bitmaps again with tool.exe
The detail map scale refers to how many times the bitmap will be tiled across the model's surface, or material ID. It shouldn't be too much or too little and can vary by exactly how large your texture will be in the game, with relations to its size compared to the Master Chief. For this time, just try a setting of 20, for both primary and secondary detail maps. Once you see them in the game, you'll understand the settins better, and how much you should adjust them to get the results you prefer.
As for your micro detail map, the same rules apply as for the primary/secondary/base diffuse maps. This map is also tiled (by the scale setting) across the base diffuse map. I haven't found out exactly how alpha affects it though, but I see that in "blended" mode, it seems to appear everywhere, but maybe only on the RGB channel, the one without any alpha assigned. Experiment a little on that if you want. For now, just grab another rough-looking rock texture for you micro detail map, change it's settings, and recompile it with tool.
At this time, make sure you save your shader_environment tag, and re-compile all your bitmap tags you worked with in this shader. If you don't recompile them, sapien won't load, so make sure you do that. Again, make sure that your shader has the same name as the base diffuse bitmap tag file. So that's basically it.
Go ahead and load your base diffuse tif image in the Material Editor in 3ds Max, apply it to your model's IDs, adjust UVWs, etc. Now, you won't recieve the shader prompt when compiling the map in tool. It won't ask because now the material already has a shader referenced and tagged.
I hope this information helps not only you, but anyone with custom shader creation issues or concerns.