Gamestudio Links
Zorro Links
Newest Posts
Zorro Beta 2.61: PyTorch
by jcl. 06/10/24 14:42
New FXCM FIX Plugin
by flink. 06/04/24 07:30
AlpacaZorroPlugin v1.3.0 Released
by kzhao. 05/22/24 13:41
Free Live Data for Zorro with Paper Trading?
by AbrahamR. 05/18/24 13:28
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
3 registered members (AndrewAMD, VoroneTZ, 1 invisible), 1,578 guests, and 7 spiders.
Key: Admin, Global Mod, Mod
Newest Members
AemStones, LucasJoshua, Baklazhan, Hanky27, firatv
19058 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Page 1 of 2 1 2
Modelle und Detailmaps #161016
10/15/07 07:40
10/15/07 07:40
Joined: Jul 2007
Posts: 103
L
Lutz_G Offline OP
Member
Lutz_G  Offline OP
Member
L

Joined: Jul 2007
Posts: 103
Hi

Bei Terrains hat man ja die Möglichkeit, diese durch Detailmaps etwas detaillierter zu gestalten. Ist dies auch mit Modellen machbar?
Wenn ja, wie?

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 Offline
Expert
Slin  Offline
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/DetailMapping

Dieser 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: Slin] #161018
10/15/07 17:30
10/15/07 17:30
Joined: Jul 2007
Posts: 103
L
Lutz_G Offline OP
Member
Lutz_G  Offline OP
Member
L

Joined: Jul 2007
Posts: 103
Ja, gerne nehme ich Dein Angebot an. Wäre es möglich, dass Du diesen FFP-Effekt mit dem für Ventilator's MeshPlugin kombinierst?
Sozusagen eine Kombination aus DetailMap-FFP und Lightmap-FFP.

Wobei ich nicht weiss, ob entSkin oder mtlSkin besser ist.

Skin 1: Colormap (UV-Set 1)
Skin 2: Lightmap (UV-Set 2)
Skin 3: Detailmap (UV-Set 1)

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 Offline
Expert
Slin  Offline
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: Slin] #161020
10/16/07 04:53
10/16/07 04:53
Joined: Mar 2003
Posts: 4,264
Wellington
Nems Offline

.
Nems  Offline

.

Joined: Mar 2003
Posts: 4,264
Wellington
Hope this is about detail maps on models, if not just ignore but if it is, how do I implement the above?

Re: Modelle und Detailmaps [Re: Nems] #161021
10/16/07 08:34
10/16/07 08:34
Joined: Jul 2007
Posts: 103
L
Lutz_G Offline OP
Member
Lutz_G  Offline OP
Member
L

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 Offline
Expert
Slin  Offline
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: Slin] #161023
10/17/07 03:29
10/17/07 03:29
Joined: Mar 2003
Posts: 4,264
Wellington
Nems Offline

.
Nems  Offline

.

Joined: Mar 2003
Posts: 4,264
Wellington
Thanks Slin, my old one needs serious updating and Im not up to it.
Would very much appreciate one without the light map Thank you for the kind offer

Re: Modelle und Detailmaps [Re: Nems] #161024
10/17/07 07:34
10/17/07 07:34
Joined: Jul 2007
Posts: 103
L
Lutz_G Offline OP
Member
Lutz_G  Offline OP
Member
L

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 Offline
Expert
Slin  Offline
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.
Page 1 of 2 1 2

Moderated by  HeelX, rvL_eXile 

Gamestudio download | chip programmers | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1