Page 1 of 1
.ASE Model Patch lighting
Posted: Thu Mar 11, 2010 8:40 pm
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
}
}
Re: .ASE Model Patch lighting
Posted: Thu Mar 11, 2010 8:58 pm
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
Re: .ASE Model Patch lighting
Posted: Thu Mar 11, 2010 9:11 pm
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....
Re: .ASE Model Patch lighting
Posted: Fri Mar 12, 2010 4:22 am
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.
Re: .ASE Model Patch lighting
Posted: Fri Mar 12, 2010 11:21 am
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...
Re: .ASE Model Patch lighting
Posted: Fri Mar 12, 2010 10:57 pm
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.
Re: .ASE Model Patch lighting
Posted: Sun Mar 14, 2010 6:46 pm
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.