.ASE Model Patch lighting

Discussion for Level editing, modeling, programming, or any of the other technical aspects of Quake
Post Reply
Kaz
Posts: 1077
Joined: Wed Mar 08, 2006 3:43 am

.ASE Model Patch lighting

Post by Kaz »

I cannot find the specific answer to my question, although it seems as though it's been asked a million times.

The basic problem would be that when I compile a cylinder with a shader on it into an .ASE model, and lightmap it, there is no longer any smoothing.

I've tried using q3map_nonPlanar/q3map_shadeAngle to no avail. Here's the shader:

Code: Select all

textures/kazdm4_lights/tubelight_w
{
	qer_editorimage textures/kazdm4_lights/tubelight_w.tga
	//q3map_splotchfix
	//q3map_nonplanar
	//q3map_shadeangle 100
	q3map_forcemeta
	surfaceparm nomarks
	{
		map $lightmap
		rgbGen identity
	}
	{
		map textures/kazdm4_lights/tubelight_w.tga
		blendFunc GL_DST_COLOR GL_ZERO
		rgbGen identity
	}
	{
		map textures/kazdm4_lights/tubelight_w_add.tga
		blendfunc GL_ONE GL_ONE
	}
}
obsidian
Posts: 10970
Joined: Mon Feb 04, 2002 8:00 am

Re: .ASE Model Patch lighting

Post by obsidian »

Make sure your model has smoothing groups attached to it. On models, this determines whether the model is smoothed or faceted.

In the ASE, you may see something like:

Code: Select all

*MESH_FACE    0:    A:    1 B:    8 C:    2 AB:    0 BC:    1 CA:    1	 *MESH_SMOOTHING 3 	*MESH_MTLID 0
[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]
Kaz
Posts: 1077
Joined: Wed Mar 08, 2006 3:43 am

Re: .ASE Model Patch lighting

Post by Kaz »

All of the numbers that follow MESH_SMOOTHING are 0. Should I import this into 3ds and set the smoothing groups myself?

Edit: I'll try it and report back....
obsidian
Posts: 10970
Joined: Mon Feb 04, 2002 8:00 am

Re: .ASE Model Patch lighting

Post by obsidian »

BTW, importing ASE files into Max is a pain in the ass, even though the ASE format is something created by Autodesk. You have to find a ASE or ASC (and rename the file extension) import module, but most are for much older versions of Max. Getting brushes into Max, I just convert the brushes into .obj with GtkRadiant 1.5.0's export plug-in. Then do whatever manipulations I need in Max and then export to ASE. You might lose texture information, but the UVW-coord remain, so it shouldn't take longer than 5 minutes to point the surfaces to textures in the material editor.

Other issues might be the lightmaps themselves, if it's creating breaks in the lightmap pages along edges. You may even want to consider vertex lighting the models, if the model has relatively small triangles, it may actually look better vertex lit. I'd say a good 90% of models should be vertex lit (light fixtures, jump pads, weapon spawns, etc., the only stuff that should be lightmapped are large architectural stuff like terrain or chunks of walls and stuff.
[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]
o'dium
Posts: 11712
Joined: Sun Mar 25, 2001 8:00 am

Re: .ASE Model Patch lighting

Post by o'dium »

Yeah .ase are both a blessing and a pain... If you can export them correctly, awesome. They ar so easy to work with, and if you make a mistake in a file name, just open that bad boy up with word and change it, lol. But if you need to re-import it, theres oddly not many ways to do it 100% perfectly, which is strange...
MrLego
Posts: 67
Joined: Tue Jul 21, 2009 11:00 pm

Re: .ASE Model Patch lighting

Post by MrLego »

It may be a conversion problem rather than a shader one.

I use the following q3map2 command line options for enemy territory (via batch file) when I export brushwork to ase - curves come out nice and smooth.

Step 1 - create the bsp file
q3map2 -meta -patchmeta -subdivisions 2 -v -game et -fs_basepath E:/Rtcw_ET/ e:\rtcw_et\etmain\maps\map2ase.map

Step 2 - create the ase file
q3map2 -convert -format ase -v -game et -fs_basepath E:/Rtcw_ET/ e:\rtcw_et\etmain\maps\map2ase.bsp

Items in orange will vary for game and game path.
[color=#4040FF][b]www.mrlego.com[/b][/color]
jal_
Posts: 223
Joined: Mon Mar 24, 2008 4:13 pm

Re: .ASE Model Patch lighting

Post by jal_ »

Hmm... this is actually pretty strange because picomodel does smooth the meshes on load. The only explanation I can imagine is that at exporting, each face is saved as an individual mesh. But this shouldn't happen if you are exporting a patch mesh, are you?

If you are exporting brushes in a prism to make a tube, make sure the prism is a single brush. Also it may work better if the shader when exporting (you can change it back when the model is ready to be used) has surfaceparm nolightmap. I'm not sure this last part will have any effect, tho, but at having no lightmap there's less chances q3map2 will split it.
Post Reply