map models and light

Ask questions about mapping in general, and show off your in-progress work.
User avatar
Posts: 3
Joined: Wed Jan 29, 2014 2:29 pm UTC
Location: Germany

map models and light

Postby PadPlayer » Tue Dec 01, 2015 1:26 pm UTC

User avatar
Project Head
Posts: 2137
Joined: Fri Aug 03, 2012 11:50 pm UTC
Location: Berlin

Re: map models and light

Postby Viech » Wed Dec 02, 2015 2:00 pm UTC

I don't know the ASE format but I could imagine that, since it has its own "shader" format where stuff like a diffuse map is specified (as opposed to just a shader name understood by the game engine), it may not offer all the features that the BSP format together with its external files (lightmaps) offers. It may also be that not all of ASE's existing features are supported by q3map2. In particular, normal and specular mapping uses deluxe maps generated as external textures by q3map2. As far as I know not even the BSP format supports them internally.

With regards to other model formats, the future clearly is IQM. However, I do not know if there is support for IQM map models 1) in the game engine 2) in q3map2 or 3) in any map editor at this point in time… In any case you should refrain from using MD3 if they are not baked into the BSP properly as engine support will need to be dropped eventually. Similiarly, we may or may not continue to support MD5 but our focus will be on IQM.
Responsible for: & , (map), (map texture editor), (material file generator), gameplay design & programming, artistic direction
User avatar
Posts: 36
Joined: Thu Mar 22, 2012 3:09 pm UTC
Location: Belgium

Re: map models and light

Postby Ingar » Sat Dec 05, 2015 2:07 pm UTC

As far as I know. q3map 2 ignores material settings on any model (OBJ, ASE, ..). The materials your model references should be defined in the Unvanquished shader files.

Use the OBJ format instead of ASE if possible, OBJ has more support in 3rd party 3D tools. Both ASE and OBJ are text file formats, so you can open edit them in notepad if necessary.

Here is an example from my map vega:

The ASE file models/mapobjects/vega/ceilinglight/ceilinglight1.ase contains

I'm not sure if q3map2 uses MATERIAL_NAME, MAP_NAME or BITMAP so I just set
all of them to the approriate shader name.

scripts/vega_models.shader contains the following:

The OBJ file models/vega/table/table01.obj contains the following:

Your 3D editor probably generated a .mtl file which contains the material definitions
for the OBJ file. This is ignored by q3map2.

In the OBJ file, a mesh can start with a usemtl directive. The example ceilinglight
contains the following:

This means the mesh defined below it will be render using the textures/shared_vega/base03a
shader, as defined in scripts/shared_vega.shader[/i].

Things to keep in mind:

- As Viech already mentioned, the ASE and OBJ models are baked into the BSP by q3map2. This means that,
to the game engine, there's no difference between brushwork or ASE or OBJ models.
- MD3, MD5 and IQM models are read by the game engine itself.
- By default, models are noclip. Set the CLIPMODELS flag on the misc_model entity to enable auto-clipping. If your
model has complicated geometry, it might be better to manually add clip brushes.
- By default, models will be rendered fullbright. Set the FORCEMETA flag on the misc_model entity to enable
lightmap lighting.
User avatar
Posts: 3
Joined: Wed Jan 29, 2014 2:29 pm UTC
Location: Germany

Re: map models and light

Postby PadPlayer » Tue Dec 08, 2015 6:59 pm UTC

Found the problem:
I used ".jpg" instead of ".tga" for the *BITMAP in my ASE model.
Leaving out the extension might work either while ".jpg" does not.

The main reason why I want to have some brushes in models is that q3map2 seems to have some problems with many small brushes. It is messing up some random triangles by putting single vertices somewhere far away. So i'm fine with the models in the BSP as long as q3map2 can handle them properly - and now it does. :thumbup:

Thanks! :smile: :ckit:

Return to “Level Design”

Who is online

Users browsing this forum: No registered users and 1 guest