twoSided material

twoSided material

Anonymous
Not applicable
709 Views
5 Replies
Message 1 of 6

twoSided material

Anonymous
Not applicable

i made face and add material to it and need to made material twosided (front and back take same material)

 

fn drawRoof vertices =
(
obj = convertToPoly (mesh vertices:vertices faces:#())
polyOp.createPolygon obj #(1,2,3,4)
img_path = "C:\Users\Abdo\Desktop/roof.jpg"
mat=standardmaterial();
mat.diffuseMap = bitmapTexture filename:(img_path)
showtexturemap mat true

/*
uvw to adjust texture mapping
*/
polyop.applyUVWMap obj \
#face \

mat.twosided=on
obj.material=mat

obj.extrudeFaces .02

)

 

but result as in image 
how can i solve this

error.PNG

0 Likes
710 Views
5 Replies
Replies (5)
Message 2 of 6

Swordslayer
Advisor
Advisor

The order of the verts matters, if you make it clockwise, it will be flipped (and dark in viewport), so keep that in mind - basically when one polygon has edges 1->2, 2->3 etc., the neighbor face of the 1->2 edge will have the edge reversed, i.e. it will be 2->1.

0 Likes
Message 3 of 6

Swordslayer
Advisor
Advisor

The order of the verts matters, if you make it clockwise, it will be flipped (and dark in viewport), so keep that in mind - basically when one polygon has edges 1-2, 2-3 etc., the neighbor face of the 1-2 edge will have the edge reversed, i.e. it will be 2-1.

0 Likes
Message 4 of 6

Anonymous
Not applicable
Are you mean ine face darm and one with material
My question need two gave same narerial
0 Likes
Message 5 of 6

Swordslayer
Advisor
Advisor
Just saying why does it appear black in the viewport and how to fix that. When the face is flipped, it will give you all sorts of problems when rendering and even more so if you want to manually adjust the geometry as it results in unwelded verts and broken mesh.
0 Likes
Message 6 of 6

Anonymous
Not applicable

i solved it by copying face but changing it's normal as texture drawn in direction of norma

0 Likes