Modifying GtkRadiant to render quake2 lightmaps in quake3

Locked
lukesmith
Posts: 21
Joined: Sat Aug 20, 2011 8:14 pm

Modifying GtkRadiant to render quake2 lightmaps in quake3

Post by lukesmith »

Hi,

I have a copy of the source code to GtkRadiant 1.5. I was just wondering how easy it would be to export a map with radiosity lightmaps like the ones used in quake2 but to save everything else along with these lightmaps in the quake3 bsp format.

Im guessing this is fairly straightforward as the editor already can render these lightmaps for a quake2 map.

This would be done in relation to a bsp loader I have written so I would then accomodate for the fact that it is no longer a greyscale lightmap.

Could anyone point me in the right direction with this?
User avatar
Eraser
Posts: 19174
Joined: Fri Dec 01, 2000 8:00 am

Re: Modifying GtkRadiant to render quake2 lightmaps in quake3

Post by Eraser »

I'm not sure if I can be of any help, but i do know that it's not GtkRadiant itself that does the compiling from .map to .bsp file but the q3map tool.

Most mappers use q3map2 which is a highly optimized and improved version of q3map. Maybe the sourcecode to that is available.
lukesmith
Posts: 21
Joined: Sat Aug 20, 2011 8:14 pm

Re: Modifying GtkRadiant to render quake2 lightmaps in quake3

Post by lukesmith »

Hey thanks yeah I have the source code to that. I just read through it and it calcualtes the lightmaps in greyscale as its for quake3. There doesnt seem to be a q2 version of this in the quake2 sourcecode. Does anybody know where I could find sourcecode for how quake2 calculates the color radiosity lightmaps?
^misantropia^
Posts: 4022
Joined: Sat Mar 12, 2005 6:24 pm

Re: Modifying GtkRadiant to render quake2 lightmaps in quake3

Post by ^misantropia^ »

It's pre-calculated in q2map. Check out a copy of gtkradiant and look for qrad.c in tools/quake2/q2map.
lukesmith
Posts: 21
Joined: Sat Aug 20, 2011 8:14 pm

Re: Modifying GtkRadiant to render quake2 lightmaps in quake3

Post by lukesmith »

Oh thanks so much. Do you know where I can get a copy of the source to gtkradiant. I realised I have the q3radiant sourcecode.
obsidian
Posts: 10970
Joined: Mon Feb 04, 2002 8:00 am

Re: Modifying GtkRadiant to render quake2 lightmaps in quake3

Post by obsidian »

[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]
lukesmith
Posts: 21
Joined: Sat Aug 20, 2011 8:14 pm

Re: Modifying GtkRadiant to render quake2 lightmaps in quake3

Post by lukesmith »

Thats awesome thanks!
Locked