3 registered members (AndrewAMD, VoroneTZ, 1 invisible),
1,578
guests, and 7
spiders. |
Key:
Admin,
Global Mod,
Mod
|
|
|
Re: Modelle und Detailmaps
[Re: Lutz_G]
#161017
10/15/07 15:53
10/15/07 15:53
|
Joined: May 2005
Posts: 2,713 Lübeck
Slin
Expert
|
Expert
Joined: May 2005
Posts: 2,713
Lübeck
|
Ich glaube nicht, das dies automatisch von der Engine unterstuetzt wird, aber mit einem simplen FFP oder Shader Effekt sollte es kein Problem sein. Ich habe im wiki gerade dies entdeckt: http://www.coniserver.net/wiki/index.php/DetailMappingDieser Effekt ist fuer Levelgeometrie gedacht sollte aber mit simplen aenderungen auf Modelle anpassbar sein. Wenn du das nicht hinbekommst, poste einfach und ich werde mich mal darann versuchen.
|
|
|
Re: Modelle und Detailmaps
[Re: Lutz_G]
#161019
10/15/07 23:45
10/15/07 23:45
|
Joined: May 2005
Posts: 2,713 Lübeck
Slin
Expert
|
Expert
Joined: May 2005
Posts: 2,713
Lübeck
|
Es scheint zumindest zu funktionieren^^: Code:
material mtl_lightmap { effect= " texture entSkin1; texture entSkin2; texture entSkin3;
technique t0 { pass p0 { Texture[0] = <entSkin2>; Texture[1] = <entSkin1>; Texture[2] = <entSkin3>; // mix light map with dynamic lighting TexCoordIndex[0] = 1; ColorArg1[0] = Texture; ColorOp[0] = AddSigned; ColorArg2[0] = Diffuse; resultarg[0] = temp; // output to temp register colorarg1[1] = Texture; // color map colorop[1] = selectarg1; texcoordindex[1] = 0;
colorarg1[2] = Texture; // detail map colorarg2[2] = current; // color map colorop[2] = addsigned; // add detail map to color map texcoordindex[2] = 0; texturetransformflags[2] = count2; texturetransform[2] = { 8.0,0.0,0.0,0.0, // detail map u scale 0.0,8.0,0.0,0.0, // detail map v scale 0.0,0.0,0.0,0.0, 0.0,0.0,0.0,0.0}; magfilter[2]=linear; minfilter[2]=linear; mipfilter[2]=linear;
colorarg1[3] = temp; // (shadow map + vertex lighting) colorarg2[3] = current; // (color map + detail map) colorop[3] = modulate2x; // modulate (color map + detail map) with (shadow map + vertex lighting) magfilter[3] = linear; minfilter[3] = linear; mipfilter[3] = linear; } } "; }
|
|
|
Re: Modelle und Detailmaps
[Re: Nems]
#161021
10/16/07 08:34
10/16/07 08:34
|
Joined: Jul 2007
Posts: 103
Lutz_G
OP
Member
|
OP
Member
Joined: Jul 2007
Posts: 103
|
@Slin: Funktioniert prima. Vielen Dank. Bei texturetransform[2] habe ich die beiden 8.0 auf jeweils 2.0 gesetzt. Damit konnte ich ein gewisses Rauschen reduzieren. Und colorop[3] = modulate2x; habe ich auf colorop[3] = modulate; geändert. Damit wirkt das Ergebnis nicht ganz so hell. Wenn ich jetzt doch statt entSkin eher mtlSkin nehmen möchte... müsste das so aussehen? Code:
bmap bmap_skin1 = "colormap.dds"; bmap bmap_skin2 = "lightmap.dds"; bmap bmap_skin3 = "detailmap.dds";
material mtl_lightmap { skin1 = bmap_skin1; skin2 = bmap_skin2; skin3 = bmap_skin3;
effect= " texture mtlSkin1; texture mtlSkin2; texture mtlSkin3;
technique t0 { pass p0 { Texture[0] = <mtlSkin2>; Texture[1] = <mtlSkin1>; Texture[2] = <mtlSkin3>;
|
|
|
Re: Modelle und Detailmaps
[Re: Lutz_G]
#161022
10/17/07 00:43
10/17/07 00:43
|
Joined: May 2005
Posts: 2,713 Lübeck
Slin
Expert
|
Expert
Joined: May 2005
Posts: 2,713
Lübeck
|
@Lutz_G: Klar, kein Problem und zu deiner Frage: Due wirst es doch ausprobiert und gemerkt haben, dass es so funktioniert oder Hast du fuer die Detailmap Mipmaps erstellt? Denn dies reduziert das Rauschen ziemlich heftig. (Dies kann man auch im Script mit bmap_to_mipmap() machen.) Die 8 die du auf 2 gesetzt hast bestimmt ja, wie oft die Detailmap gekachelt wird, also kein Wunder, dass das Rauschen reduziert wurde. Das modulate2x hatte ich aus dem Wiki uebernommen, wenn das einfache dir besser gefaellt ist dies ja gut^^. @Nems: Yeah this is for detailmapping with models but also includes a shadowmap using the second UV set with ventilators plugin. The models first skin is the diffiuse(?) texture, the second a lightmap and the third a detailmap. You should create mipmaps for each texture. If you don`t want the lightmap, tell me and I`ll try to get rid of it in the effect. Slin
|
|
|
Re: Modelle und Detailmaps
[Re: Nems]
#161024
10/17/07 07:34
10/17/07 07:34
|
Joined: Jul 2007
Posts: 103
Lutz_G
OP
Member
|
OP
Member
Joined: Jul 2007
Posts: 103
|
@Slin: Nein, ich habe es nicht probiert. War nur eine Idee, dass es so funktionieren könnte. Mipmaps sind für alle 3 Skins vorhanden.
|
|
|
Re: Modelle und Detailmaps
[Re: Lutz_G]
#161025
10/17/07 22:34
10/17/07 22:34
|
Joined: May 2005
Posts: 2,713 Lübeck
Slin
Expert
|
Expert
Joined: May 2005
Posts: 2,713
Lübeck
|
Here you go Nems: Code:
material detailmap_mtl { effect= " texture entSkin1; texture entSkin2;
technique t0 { pass p0 { Texture[0] = <entSkin1>; Texture[1] = <entSkin2>; colorarg1[0] = Texture; // color map colorop[0] = selectarg1; texcoordindex[0] = 0; colorarg1[1] = Texture; // detail map colorarg2[1] = current; // color map colorop[1] = addsigned; // add detail map to color map texcoordindex[1] = 0; texturetransformflags[1] = count2; texturetransform[1] = { 8.0,0.0,0.0,0.0, // detail map u scale 0.0,8.0,0.0,0.0, // detail map v scale 0.0,0.0,0.0,0.0, 0.0,0.0,0.0,0.0}; magfilter[1]=linear; minfilter[1]=linear; mipfilter[1]=linear;
colorarg1[2] = Diffuse; // (shadow map + vertex lighting) colorarg2[2] = current; // (color map + detail map) colorop[2] = modulate; // modulate (color map + detail map) with (shadow map + vertex lighting) magfilter[2] = linear; minfilter[2] = linear; mipfilter[2] = linear; } } "; }
The first skin is the texture and the second the detailmap. Since I`ve got some time today, I plan to make it easier to insert and to add it to the wiki... Slin
Last edited by Slin; 10/17/07 22:37.
|
|
|
|