Rendering both sides

Posted By: Gamesaint762

Rendering both sides - 02/08/10 20:48

Ive made some trees and use single planes for leaves and branches. They have an alpha channel on the texture. Now some of the planes dont render in game, is there a script or something I can do to fix this with out making more planes? Please help!
Posted By: Slin

Re: Rendering both sides - 02/08/10 21:05

Put this into an .fx file and assign it to your trees:

technique t0
{
pass p0
{
CullMode = None;
}
}
Posted By: Gamesaint762

Re: Rendering both sides - 02/08/10 22:50

Thanks Slin but what i did doesnt seem to wor. Here is my code....

Quote:
action treefix()
{
effect = "trees.fx";
}

technique t0
{
pass p0
{
CullMode = None;
}
}

Posted By: Widi

Re: Rendering both sides - 02/08/10 23:00

You have to open your "trees.fx" and search there for "pass p0" or something. It should be near the end of the file. Include there only this line:
"CullMode = None;"

should be looks like the following:
....
....
....
technique xxx
{
pass xxx
{
CullMode = None;
....
....
}
}



Posted By: DJBMASTER

Re: Rendering both sides - 02/08/10 23:06

You also need to create a MATERIAL* which will load the effect file. You can then apply this entity in your player action by using

'my.material = (material name).
Posted By: Widi

Re: Rendering both sides - 02/08/10 23:09

You`re right, don`t see that. Here is the code:

MATERIAL* mtl_tree =
{
effect = "trees.fx";

}
action treefix()
{
my.material = mtl_tree;
}


Posted By: Gamesaint762

Re: Rendering both sides - 02/08/10 23:50

Oh I didnt post that part sorry... but it was my fault anyway cause I forgot to assign the action to the trees. Works now, thanks guys!
© 2024 lite-C Forums