Creating an FPS Map

rubasurex

23-04-2006 01:44:32

Hi, I'm new to the forums and I've been playing around with oFusion trying to make a simple map to use in a basic FPS I've been working on.

What I want to do is create a flat plane, add a number of shapes to it (like boxes, etc...), then put textures on everything, add a light source and create a light-map. Then I want to export the whole lot out and load it into Ogre so I can fly around it. Sounds simple enough?

I know the basics of 3dsmax, so I can create the plane and add the shapes, no problem. I've been through the tutorials on the oFusion website, so I know how to add the light, set up textures and create the light-map. However, I just don't know how to fit all this knowledge together to make a complete map. Do you know what I mean? I can do each step on its own, but how to integrate the steps together is where I'm having trouble.

One of the key concepts I don't understand is how the textures work in relation to the light-map. Let me run you through some examples. Assume I have a scene with a textured object in it and a light source.

1. I select the object and create a light-map for it. The light-map is then created as a Self-Illumination map in the material. If I convert the material to an OgreMaterial, I have two passes, one for the diffuse and one for the light-map. Is this how it is supposed to work?

2. If I try and use an OgreMaterial directly, I can't seem to create the light-map. I need to use a Standard material first, then convert it to an OgreMaterial. Why is that?

3. If I add a second object to the scene and apply the same material to it (as the first object), I cannot create the light-map as the drop-down list that allows you to select Self-Illumination is empty. Why is this? Am I not able to share materials across different objects?

I have several different textures (such as a brick texture, grass texture, concrete texture, etc...) When I'm creating my scene, I just assign each object a material that it should have. Which means all the grass areas share the same grass material. Then I want to create a light-map across the whole map. This process isn't working for me (since I can't select Self-Illumination as mentioned above), so I'm wondering what I'm doing wrong.

How do you guys create your scenes, texture them and light-map them? Is there anywhere I can find a step-by-step how to for a simple scene with a box and a plane with texturing? The tutorial on the oFusion website doesn't use textures, so it doesn't help me.

Lioric

23-04-2006 03:31:49

1. The result you should have is a pass with two texture unit, not two passes

Lightmap is a multitexture technique, so yes, you should have a diffuse and a lightmap textures

2. You can use Ogre materials in the bake process if they has the "Max Viewport/Render" material set, but for now (if you are starting) i recommend you to first use max materials to create the light maps and then upgrade

Ogre materials are very specialized materials that cant be used while baking as they have specific features for the ogre engine

The benefit is that you have specialized tools for your specialized jobs, i.e you can use MentalRay or Raytraced materials for baking illumination and then upgrade to Ogre materials to fine tune your scenes and use advanced features


3. See this thread, you will find more information on baking and links to useful baking tools:

http://www.ogre3d.org/phpBB2addons/viewtopic.php?t=479[/ur]

BergBoy

23-04-2006 05:30:05

I couldnt work out how to self illuminate (Dont even know know what that means...) so I just baked the lightmaps and made a modulate pass with the lightmap and a second UV set (that I got via my baking unwrap). That thread is gold and will give u links to some great tools.

Evak

23-04-2006 07:22:40

hopefully Ofusion will get some extended blendmodes like 2x modulate somewhere along the road, this allows for some much richer lightmaps than regular fullbright providing you with richer colour detail and depth in shadow areas, and the possiblilty of Prince of persia like bloom in highlights without using shaders.

For now can do this by hand in ogre by editing the .material script and adding the 2xmultiply in your pass.

modulate_x2

Multiply source1 and source2 together, then by 2 (brightening).

You can adjust the effect of the lightmaps by tweaking the grey value if it comes out too bright, but can produce a lovely sunny bloom effect in brightly lit areas, and some real richness to shadows.

IFASS

23-04-2006 11:07:18


2. You can use Ogre materials in the bake process if they has the "Max Viewport/Render" material set, but for now (if you are starting) i recommend you to first use max materials to create the light maps and then upgrade



Wouldn't it be an idea that when you upgrade your materials that the previous (max) material is automatically put (or well, maybe an option for it at least) in the "Max Viewport/Render" material?

In that case you can upgrade all your max materials to ogre and still easily bake all your lightmaps without having to set all the "Max Viewport/Render" materials first..

Lioric

24-04-2006 17:39:59

The process is automatic, the max material is set to the "Max Viewport/Render" of the Ogre Material automatically

I did that suggestion to users starting with max

IFASS

24-04-2006 22:42:30

The process is automatic, the max material is set to the "Max Viewport/Render" of the Ogre Material automatically

I did that suggestion to users starting with max


Okay :)