As mentioned in the screenshot discussion thread, lots of models are set up with a number of separate graphics mapped to the model skin at one time. eg, the one in the screenshot discussion thread has 4 graphics mapped to it in its original game UT (one each for the face, chest, legs and hands or the model IIRC).
However, GZdoom only supports single graphic model skins. Lots of models that I have downloaded use multiple graphics, as described, but to make them usable in GZdoom, I have to stitch the graphics together as one file in a graphics program, then remap the model to the newly combined graphic - and it can be quite a pain to do it.
Can multiple graphic skins be added to GZdoom please?
Multiple graphics for a model skin
Moderator: Graf Zahl
- Enjay
- Developer
- Posts: 4748
- Joined: Tue Aug 30, 2005 23:19
- Location: Scotland
- Contact:
- Nash
- Developer
- Posts: 1226
- Joined: Sun Sep 25, 2005 1:49
- Location: Kuala Lumpur, Malaysia
- Contact:
- Enjay
- Developer
- Posts: 4748
- Joined: Tue Aug 30, 2005 23:19
- Location: Scotland
- Contact:
For the original request, from what I can tell, MD3 models can allocate the faces of a model into different groups. These groups certainly have names - perhaps they also have a group index number?
Anyway, I was envisaging something like this:
eg
Would something like that be workable?
Anyway, I was envisaging something like this:
Code: Select all
Model ModelName
{
Path "whatever"
Model "#" "whatever.md3"
GroupSkin "#" "groupname" "skinname1.png"
GroupSkin "#" "groupname" "skinname2.png"
GroupSkin "#" "groupname" "skinname3.png"
(etc)
Scale 1.0 1.0 1.0
FrameIndex POSS A 0 0
}
Code: Select all
Model Test01
{
Path "models"
Model 0 "testmodel.md3"
GroupSkin 0 "face" "face.png"
GroupSkin 0 "body" "body.png"
GroupSkin 0 "feet" "feet.png"
Scale 1.0 1.0 1.0
FrameIndex POSS A 0 0
}
- Nash
- Developer
- Posts: 1226
- Joined: Sun Sep 25, 2005 1:49
- Location: Kuala Lumpur, Malaysia
- Contact:
I like your makeshift implementation, Enjay. Plain and simple.
Using the keyword "Group" should be enough and technically correct term-wise.
Using the keyword "Group" should be enough and technically correct term-wise.
Code: Select all
model HiPolyDoomGuy
{
path "models/doomguy"
model 0 "doomguy.md3"
group 0 "head" "head.png"
group 0 "body" "body.png"
group 0 "gun" "gun.png"
scale 1.0 1.0 1.0
}
-
- Posts: 12
- Joined: Thu Feb 02, 2006 15:43
I don't know about MD2, but MD3 definetly has more groups ( called surface in it's case ) which do have their own texture mapping
ofcourse Q3 engine render is a little like framework, using scripts called 'shaders' ( though these have nothing to do with hardware shaders ), these are just lists of commands that render should do ( however the biggest part is still the same for engine whatever you do ). they can set map, lightning, vertex effects ( deformations ) etc.
for example
will change handling of surfaces which do have their skin set to 'models/players/common/specGlow' in this way ( pulsing size, white texture, coloured by gamecode->engine sources, with additive blending )
generaly it's bad idea to implement this without going same way as Q3 is, which might be really long term job redoing of the most of renderer
so value of this post is well... zero
ofcourse Q3 engine render is a little like framework, using scripts called 'shaders' ( though these have nothing to do with hardware shaders ), these are just lists of commands that render should do ( however the biggest part is still the same for engine whatever you do ). they can set map, lightning, vertex effects ( deformations ) etc.
for example
Code: Select all
models/players/common/specGlow
{
deformVertexes wave 1000 sin 1.75 1 0 .5
cull none
{
map $whiteimage
blendFunc gl_one gl_one
rgbGen entity
}
}
generaly it's bad idea to implement this without going same way as Q3 is, which might be really long term job redoing of the most of renderer
so value of this post is well... zero