Lightmaps with models
Lightmaps with models
I understand that gtkradiant will calculate shadows cast by models (md3, obj, etc) during the lighting phase. I was just wondering, will gtkradiant also create a lightmap for the model? using the uv coordinates of the model, so that static models can all be lit in the same way as the level geometry?
-
- Posts: 210
- Joined: Fri May 28, 2010 2:30 pm
Re: Lightmaps with models
You have to add the key "spawnflags" to the model via the entity menu (N-key while model is selected) and give it a value of "4".
[url=http://www.victorkarp.com]Portfolio[/url] - [url=https://victorkarp.com/tutorials/quake-3-mapping-tutorials/]My Quake 3 mapping tutorials[/url] - [url=http://www.lvlworld.com/author/DaEngineer]My Quake 3 maps[/url]
Re: Lightmaps with models
Just beware that most models will actually look better vertex lit. Lightmapped models only look good on models with large planar surfaces like terrain. First, lightmaps are projected axially; second, on most models with a relatively high level of tessellations and vertexes will actually have a better lighting fidelity than a comparatively lower resolution lightmap.
[size=85][url=http://gtkradiant.com]GtkRadiant[/url] | [url=http://q3map2.robotrenegade.com]Q3Map2[/url] | [url=http://q3map2.robotrenegade.com/docs/shader_manual/]Shader Manual[/url][/size]
Re: Lightmaps with models
I was thinking along the lines that if all static models are lightmapped I can gain even more speed by not having to calculate lighting for them and not having to calculate shadows they recieve from the level geometry. Ill try using a larger lightmap size for models and see how it looks.
Re: Lightmaps with models
Errr... vertex lighting is less system intensive than lightmaps. That's why Q3 has the option to turn off lightmaps and revert to vertex light only on lower end (circa 1999) systems.
[size=85][url=http://gtkradiant.com]GtkRadiant[/url] | [url=http://q3map2.robotrenegade.com]Q3Map2[/url] | [url=http://q3map2.robotrenegade.com/docs/shader_manual/]Shader Manual[/url][/size]
Re: Lightmaps with models
Im not doing this for quake3 but for a renderer that I have developed. So I thought it worth experimenting with lightmapping the staticmeshes otherwise any shadows that fall on the staticmesh would have to be calculated in realtime.
Re: Lightmaps with models
Ah, I see.
You may also need to play around with q3map_shadeAngle and q3map_lightmapMergable in the shader.
You may also need to play around with q3map_shadeAngle and q3map_lightmapMergable in the shader.
[size=85][url=http://gtkradiant.com]GtkRadiant[/url] | [url=http://q3map2.robotrenegade.com]Q3Map2[/url] | [url=http://q3map2.robotrenegade.com/docs/shader_manual/]Shader Manual[/url][/size]