PDA

View Full Version : CTF-Magma: How was it made?


inio
19th Jul 2003, 02:06 AM
CTF-Magma shows off two things that I have yet to figure out how to create: 1. multi-texturing (ActorX for Maya refuses to export more than one UV set), and 2. light maps on static meshes. I'm assuming these are 3DSMax features missing from Maya/MayaActorX.

If 3DSMax can indeed export a ASE file with multiple UV sets, I would be very interested in seeing such a file so that I can write my own exporter. I've looked for info on how multitexturing is represented in ASE files and haven't found any.

inio
19th Jul 2003, 04:33 AM
By looking at the strings in UnrealEd and crashing it a couple dozen times by guessing wrong, I think the following format is near what it wants (it seems to work, I'm just not sure if this is the real way it's supposed to look). This is what would appear inside the *MESH object:


... geometry specification ...
*MESH_NUMTVERTEX 4
*MESH_TVERTLIST {
*MESH_TVERT 0 0.000 0.000 0.500
*MESH_TVERT 1 1.000 0.000 0.500
*MESH_TVERT 2 1.000 1.000 0.500
*MESH_TVERT 3 0.000 1.000 0.500
}
*MESH_NUMTVFACES 2
*MESH_TFACELIST {
*MESH_TFACE 0 3 0 2
*MESH_TFACE 1 1 2 0
}

*MESH_MAPPINGCHANNEL {
*MESH_NUMTVERTEX 4
*MESH_TVERTLIST {
*MESH_TVERT 0 0.000 0.000 0.500
*MESH_TVERT 1 4.000 0.000 0.500
*MESH_TVERT 2 4.000 4.000 0.500
*MESH_TVERT 3 0.000 4.000 0.500
}
*MESH_NUMTVFACES 2
*MESH_TFACELIST {
*MESH_TFACE 0 3 0 2
*MESH_TFACE 1 1 2 0
}
}

... other MESH stuff ...

Dr. Nick
19th Jul 2003, 02:20 PM
(excess info was removed)

*MESH {
*MESH_NUMVERTEX 4
*MESH_NUMFACES 2
*MESH_VERTEX_LIST {
*MESH_VERTEX 0 -384.0000 -640.0000 0.0000
*MESH_VERTEX 1 -256.0000 -640.0000 0.0000
*MESH_VERTEX 2 -384.0000 -512.0000 0.0000
*MESH_VERTEX 3 -256.0000 -512.0000 0.0000

*MESH_NUMTVERTEX 4
*MESH_TVERTLIST {
*MESH_TVERT 0 -0.0000 0.3750 0.5000
*MESH_TVERT 1 1.0000 0.3750 0.5000
*MESH_TVERT 2 0.0000 0.6250 0.5000
*MESH_TVERT 3 1.0000 0.6250 0.5000
}
*MESH_NUMTVFACES 2
*MESH_TFACELIST {
*MESH_TFACE 0 0 1 3
*MESH_TFACE 1 3 2 0
}
*MESH_MAPPINGCHANNEL 2 {
*MESH_NUMTVERTEX 4
*MESH_TVERTLIST {
*MESH_TVERT 0 0.3750 0.3750 0.5000
*MESH_TVERT 1 0.6250 0.3750 0.5000
*MESH_TVERT 2 0.3750 0.6250 0.5000
*MESH_TVERT 3 0.6250 0.6250 0.5000
}
*MESH_NUMTVFACES 2
*MESH_TFACELIST {
*MESH_TFACE 0 0 1 3
*MESH_TFACE 1 3 2 0
}
}


Thats exported from max. It looks like you were close, I think the only difference is that you forgot to specify the map channel number after MESH_MAPPINGCHANNEL.

inio
19th Jul 2003, 05:03 PM
It looks like you were close, I think the only difference is that you forgot to specify the map channel number after MESH_MAPPINGCHANNEL. Thanks for confirming that.

Now the question is: how are the vertex alpha values specified? CTF-Magma uses vertex alpha info to blend between textures, but I don't see any identifiers in UnrealEd's strings that allow for vertex color specification (*NUMSUBMTLS is the only one I don't recognize, and I assume it's for something related to materials). I would very much like to be able to use this functionality. I suppose I could use a 3rd UV set and a texture map with an alpha ramp, but that seems like a decidedly sub-optimal option.

CaSCaDe
19th Jul 2003, 05:30 PM
http://udn.epicgames.com/pub/Content/VertexBlendingTutorial/

look there, its easier then trying to explain it my self

inio
19th Jul 2003, 07:01 PM
http://udn.epicgames.com/pub/Content/VertexBlendingTutorial/

look there, its easier then trying to explain it my selfI spent close to an hour looking though the UDN stuff for a hint at how this works. How'd I miss that?

Weird, *MESH_VERTCOL/*MESH_CFACE work, but they shouldn't. neither of those strings shows up in unrealed.exe, where the rest of the ASE parsing strings show up.

/me wanders off to patch the hell out of OpenGL, happy but confused.

Dr. Nick
20th Jul 2003, 12:16 PM
Huh? Whats OpenGL got to do with anything...
Oh, and do you need an example ase exported from max that uses vertex coloring? Just let me know and I'll post one.

inio
20th Jul 2003, 06:49 PM
Huh? Whats OpenGL got to do with anything...I could tell you but then I'd have to shoot you.
Oh, and do you need an example ase exported from max that uses vertex coloring? Just let me know and I'll post one.Nope, the linked UDN article contains a perfect sample at the bottom. Apparently Unreal uses the red channel of color information as the alpha.

However, I am having some trouble getting UnrealEd to recognize a model that uses two different materials. If you could produce a sample of that I'd be much obliged.

inio
22nd Jul 2003, 07:42 AM
However, I am having some trouble getting UnrealEd to recognize a model that uses two different materials. If you could produce a sample of that I'd be much obliged.
Alright, I'm having no luck at all getting multiple materials working. If someone could export a max/maya model to ASE that has two materials applied to different parts of it, I would very much like to see it. Maya probably would work for this as I know it works for unEditor, which is based on ActorX.

CaSCaDe
22nd Jul 2003, 07:48 AM
how much materials do you want? you can use about 9 off them on one mesh...
do you need different uv mappings?

inio
22nd Jul 2003, 07:51 AM
how much materials do you want? you can use about 9 off them on one mesh...
do you need different uv mappings?
Two's enough, and I don't need separate mappings. I just need to see how the ASE format represents it. The most important part is the *MATERIAL_LIST block, but there may be other portions of the file that change, so if you could just attach the file that'd be best.

CaSCaDe
22nd Jul 2003, 08:11 AM
here yah go

inio
22nd Jul 2003, 08:15 AM
Aha! Thank you so much. You're definitely getting a shout-out in the readme for the map I'm working on :).

CaSCaDe
22nd Jul 2003, 08:17 AM
:D tnx, oh and np

Phennim
25th Jul 2003, 04:27 AM
Vertex colors were used for the blending of 2 textures on one mesh like in Magma.
look here: http://www3.sk.sympatico.ca/kelbeau/max2ued/html/contents.html