wireframe + pointframe

Posted By: Chris3D

wireframe + pointframe - 05/24/07 17:56

Hi!

Ich weis, es ist nichts besonderes, aber es hat mir sehr für mein plugin weitergeholfen, vielleicht bringt es euch auch irgendetwas:

Code:
 
function mtl_wire_init()
{
vec_set(mtl.emissive_blue, mat_model.emissive_blue);
vec_set(mtl.ambient_blue, mat_model.ambient_blue);
vec_set(mtl.diffuse_blue, mat_model.diffuse_blue);
vec_set(mtl.specular_blue, mat_model.specular_blue);
mtl.power = mat_model.power;
mtl.albedo = mat_model.albedo;
}

material mtl_wire
{
event = mtl_wire_init;
effect =
"
technique t0
{
pass p0
{
FillMode = point;
PointScaleEnable=true;
PointSize =0.005f;
ColorArg1[0] = Texture;
ColorOp[0] = modulate;
ColorArg2[0] = diffuse;
}
pass p1
{
FillMode = wireframe;
TextureFactor = 0x00FF8800;
ColorArg1[0] = TFactor;
ColorOp[0] = modulate;
ColorArg2[0] = diffuse;

}

}
technique fallback
{
pass p0
{
}
}
";
}

action Wire_Player
{
my.material = mtl_wire;
}




CU Chris3D

Posted By: broozar

Re: wireframe + pointframe - 05/24/07 18:57

nice. you could add a 3rd, solid pass (as first one, to be rendered unter the point and wireframe pass) with a soild color, to make it even more tron-like.
Posted By: Nems

Re: wireframe + pointframe - 05/24/07 20:05

Thank you, its fabulous!
Been wanting to make a wireframe game for a while now, based on one of the 'Mars' movies where, to kill boredoom, the actor pilots play an air combat game rendered all in wireframe.

5 Stars man, its all I got to give back .
Posted By: Germanunkol

Re: wireframe + pointframe - 05/24/07 20:24

very cool!
I've never looked into materials at all... is there an easy way to change colors, or is it difficult?

thx for sharing!
Posted By: Nems

Re: wireframe + pointframe - 05/24/07 20:55

Code:
 pass p1
{
FillMode = wireframe;
TextureFactor = 0x00FF8800 ;
ColorArg1[0] = TFactor;
ColorOp[0] = modulate;
ColorArg2[0] = diffuse;
}


Posted By: Germanunkol

Re: wireframe + pointframe - 05/25/07 11:52

Riiight... sorry, I was looking for an RGB part like c_script uses normally... thx!
Posted By: frazzle

Re: wireframe + pointframe - 05/25/07 19:33

Nice, this is very helpfull

Cheers

Frazzle
Posted By: Scorpion

Re: wireframe + pointframe - 06/01/07 12:30

hey thats a really cool contribution, i didn't know that this is possible with hlsl!
but i swapped the passes so that the dots wil be rendered on top, guess it looks a bit better...
Posted By: ello

Re: wireframe + pointframe - 06/01/07 12:39

Quote:

...i didn't know that this is possible with hlsl!




its ffp not hlsl
Posted By: Scorpion

Re: wireframe + pointframe - 06/01/07 13:02

oh yeah..i through with words around me, right ffp

but it would be possible to combine it with hlsl?
© 2024 lite-C Forums