我尝试在脸部外面给出蓝色,在同一张脸部内部给出绿色。我添加了这个标签。
<TwoSidedMaterial diffuseColor="0 0 1" shininess="0.0" backDiffuseColor="0 1 0" backShininess="0.0" separateBackColor="true" backTransparency="0.0"></TwoSidedMaterial>
diffuseColor =蓝色和backDiffuseColor =绿色但它在两侧(内部和外部)仅显示蓝色。 backDiffuseColor未应用。 This is a refrence link
答案 0 :(得分:0)
库中可能存在错误,因为the reference example也显示单个素材(红色)而不是两个(红色和蓝色):
<x3d>
<scene>
<transform rotation='-1 0 0 -1.571' translation='0 13.03 0'>
<shape>
<appearance>
<TwoSidedMaterial diffuseColor="1 0 0" shininess="0.0" backDiffuseColor="0 0 1" backShininess="0.0" separateBackColor="true" backTransparency="0.0"></TwoSidedMaterial>
</appearance>
<indexedFaceSet DEF='Plane002-3-FACES' normalIndex='92 76 65 -1 56 65 76 -1 65 56 30 -1 120 30 56 -1 30 120 103 -1 69 103 120 -1 103 69 85 -1 13 85 69 -1 85 13 33 -1 20 33 13 -1 33 20 83 -1 46 83 20 -1 83 46 102 -1 89 102 46 -1 102 89 60 -1 6 60 89 -1 60 6 105 -1 113 105 6 -1 105 113 136 -1 122 136 113 -1 136 122 3 -1 138 3 122 -1 3 138 81 -1 36 81 138 -1 81 36 125 -1 72 125 36 -1 125 72 90 -1 26 90 72 -1 90 26 7 -1 35 7 26 -1 7 35 39 -1 116 39 35 -1 39 116 49 -1 137 49 116 -1 49 137 61 -1 53 61 137 -1 61 53 24 -1 112 24 53 -1 24 112 98 -1 66 98 112 -1 98 66 77 -1 4 77 66 -1 77 4 28 -1 11 28 4 -1 28 11 75 -1 37 75 11 -1 75 37 93 -1 80 93 37 -1 93 80 55 -1 1 55 80 -1 55 1 47 -1 54 47 1 -1 47 54 70 -1 58 70 54 -1 70 58 82 -1 73 82 58 -1 82 73 27 -1 117 27 73 -1 27 117 62 -1 19 62 117 -1 62 19 32 -1 107 32 19 -1 32 107 87 -1 114 87 107 -1 87 114 119 -1 57 119 114 -1 119 57 109 -1 21 109 57 -1 41 92 52 -1 65 52 92 -1 52 65 22 -1 30 22 65 -1 22 30 104 -1 103 104 30 -1 104 103 135 -1 85 135 103 -1 135 85 97 -1 33 97 85 -1 97 33 17 -1 83 17 33 -1 17 83 5 -1 102 5 83 -1 5 102 115 -1 60 115 102 -1 115 60 129 -1 105 129 60 -1 129 105 25 -1 136 25 105 -1 25 136 10 -1 3 10 136 -1 10 3 100 -1 81 100 3 -1 100 81 14 -1 125 14 81 -1 14 125 29 -1 90 29 125 -1 29 90 95 -1 7 95 90 -1 95 7 134 -1 39 134 7 -1 134 39 118 -1 49 118 39 -1 118 49 44 -1 61 44 49 -1 44 61 15 -1 24 15 61 -1 15 24 99 -1 98 99 24 -1 99 98 131 -1 77 131 98 -1 131 77 88 -1 28 88 77 -1 88 28 9 -1 75 9 28 -1 9 75 0 -1 93 0 75 -1 0 93 111 -1 55 111 93 -1 111 55 63 -1 47 63 55 -1 63 47 106 -1 70 106 47 -1 106 70 91 -1 82 91 70 -1 91 82 40 -1 27 40 82 -1 40 27 94 -1 62 94 27 -1 94 62 110 -1 32 110 62 -1 110 32 34 -1 87 34 32 -1 34 87 68 -1 119 68 87 -1 68 119 101 -1 109 101 119 -1 130 41 132 -1 52 132 41 -1 132 52 48 -1 22 48 52 -1 48 22 38 -1 104 38 22 -1 38 104 86 -1 135 86 104 -1 86 135 50 -1 97 50 135 -1 50 97 8 -1 17 8 97 -1 8 17 133 -1 5 133 17 -1 133 5 128 -1 115 128 5 -1 128 115 67 -1 129 67 115 -1 67 129 16 -1 25 16 129 -1 16 25 108 -1 10 108 25 -1 108 10 79 -1 100 79 10 -1 79 100 71 -1 14 71 100 -1 71 14 139 -1 29 139 14 -1 139 29 45 -1 95 45 29 -1 45 95 123 -1 134 123 95 -1 123 134 64 -1 118 64 134 -1 64 118 124 -1 44 124 118 -1 124 44 42 -1 15 42 44 -1 42 15 31 -1 99 31 15 -1 31 99 78 -1 131 78 99 -1 78 131 43 -1 88 43 131 -1 43 88 2 -1 9 2 88 -1 2 9 127 -1 0 127 9 -1 127 0 121 -1 111 121 0 -1 121 111 12 -1 63 12 111 -1 12 63 96 -1 106 96 63 -1 96 106 51 -1 91 51 106 -1 51 91 23 -1 40 23 91 -1 23 40 18 -1 94 18 40 -1 18 94 74 -1 110 74 94 -1 74 110 126 -1 34 126 110 -1 126 34 59 -1 68 59 34 -1 59 68 84 -1 101 84 68 -1' coordIndex='35 0 36 -1 1 36 0 -1 36 1 37 -1 2 37 1 -1 37 2 38 -1 3 38 2 -1 38 3 39 -1 4 39 3 -1 39 4 40 -1 5 40 4 -1 40 5 41 -1 6 41 5 -1 41 6 42 -1 7 42 6 -1 42 7 43 -1 8 43 7 -1 43 8 44 -1 9 44 8 -1 44 9 45 -1 10 45 9 -1 45 10 46 -1 11 46 10 -1 46 11 47 -1 12 47 11 -1 47 12 48 -1 13 48 12 -1 48 13 49 -1 14 49 13 -1 49 14 50 -1 15 50 14 -1 50 15 51 -1 16 51 15 -1 51 16 52 -1 17 52 16 -1 52 17 53 -1 18 53 17 -1 53 18 54 -1 19 54 18 -1 54 19 55 -1 20 55 19 -1 55 20 56 -1 21 56 20 -1 56 21 57 -1 22 57 21 -1 57 22 58 -1 23 58 22 -1 58 23 59 -1 24 59 23 -1 59 24 60 -1 25 60 24 -1 60 25 61 -1 26 61 25 -1 61 26 62 -1 27 62 26 -1 62 27 63 -1 28 63 27 -1 63 28 64 -1 29 64 28 -1 64 29 65 -1 30 65 29 -1 65 30 66 -1 31 66 30 -1 66 31 67 -1 32 67 31 -1 67 32 68 -1 33 68 32 -1 68 33 69 -1 34 69 33 -1 70 35 71 -1 36 71 35 -1 71 36 72 -1 37 72 36 -1 72 37 73 -1 38 73 37 -1 73 38 74 -1 39 74 38 -1 74 39 75 -1 40 75 39 -1 75 40 76 -1 41 76 40 -1 76 41 77 -1 42 77 41 -1 77 42 78 -1 43 78 42 -1 78 43 79 -1 44 79 43 -1 79 44 80 -1 45 80 44 -1 80 45 81 -1 46 81 45 -1 81 46 82 -1 47 82 46 -1 82 47 83 -1 48 83 47 -1 83 48 84 -1 49 84 48 -1 84 49 85 -1 50 85 49 -1 85 50 86 -1 51 86 50 -1 86 51 87 -1 52 87 51 -1 87 52 88 -1 53 88 52 -1 88 53 89 -1 54 89 53 -1 89 54 90 -1 55 90 54 -1 90 55 91 -1 56 91 55 -1 91 56 92 -1 57 92 56 -1 92 57 93 -1 58 93 57 -1 93 58 94 -1 59 94 58 -1 94 59 95 -1 60 95 59 -1 95 60 96 -1 61 96 60 -1 96 61 97 -1 62 97 61 -1 97 62 98 -1 63 98 62 -1 98 63 99 -1 64 99 63 -1 99 64 100 -1 65 100 64 -1 100 65 101 -1 66 101 65 -1 101 66 102 -1 67 102 66 -1 102 67 103 -1 68 103 67 -1 103 68 104 -1 69 104 68 -1 105 70 106 -1 71 106 70 -1 106 71 107 -1 72 107 71 -1 107 72 108 -1 73 108 72 -1 108 73 109 -1 74 109 73 -1 109 74 110 -1 75 110 74 -1 110 75 111 -1 76 111 75 -1 111 76 112 -1 77 112 76 -1 112 77 113 -1 78 113 77 -1 113 78 114 -1 79 114 78 -1 114 79 115 -1 80 115 79 -1 115 80 116 -1 81 116 80 -1 116 81 117 -1 82 117 81 -1 117 82 118 -1 83 118 82 -1 118 83 119 -1 84 119 83 -1 119 84 120 -1 85 120 84 -1 120 85 121 -1 86 121 85 -1 121 86 122 -1 87 122 86 -1 122 87 123 -1 88 123 87 -1 123 88 124 -1 89 124 88 -1 124 89 125 -1 90 125 89 -1 125 90 126 -1 91 126 90 -1 126 91 127 -1 92 127 91 -1 127 92 128 -1 93 128 92 -1 128 93 129 -1 94 129 93 -1 129 94 130 -1 95 130 94 -1 130 95 131 -1 96 131 95 -1 131 96 132 -1 97 132 96 -1 132 97 133 -1 98 133 97 -1 133 98 134 -1 99 134 98 -1 134 99 135 -1 100 135 99 -1 135 100 136 -1 101 136 100 -1 136 101 137 -1 102 137 101 -1 137 102 138 -1 103 138 102 -1 138 103 139 -1 104 139 103 -1'>
<coordinate DEF='Plane002-3-COORD' point='-50.42 0 -9.972 -47.45 -1.832 -9.803 -44.48 -3.602 -9.299 -41.52 -5.25 -8.479 -38.55 -6.718 -7.37 -35.59 -7.958 -6.01 -32.62 -8.927 -4.445 -29.66 -9.592 -2.729 -26.69 -9.93 -0.9201 -23.72 -9.93 0.9201 -20.76 -9.592 2.729 -17.79 -8.927 4.445 -14.83 -7.958 6.01 -11.86 -6.718 7.37 -8.897 -5.25 8.479 -5.931 -3.602 9.299 -2.966 -1.832 9.803 0 0 9.972 2.966 1.832 9.803 5.931 3.602 9.299 8.897 5.25 8.479 11.86 6.718 7.37 14.83 7.958 6.01 17.79 8.927 4.445 20.76 9.592 2.729 23.72 9.93 0.9201 26.69 9.93 -0.9201 29.66 9.592 -2.729 32.62 8.927 -4.445 35.59 7.958 -6.01 38.55 6.718 -7.37 41.52 5.25 -8.479 44.48 3.602 -9.299 47.45 1.832 -9.803 50.42 0 -9.972 -50.42 0 -3.324 -47.45 -0.6108 -3.268 -44.48 -1.201 -3.1 -41.52 -1.75 -2.826 -38.55 -2.239 -2.457 -35.59 -2.653 -2.003 -32.62 -2.976 -1.482 -29.66 -3.197 -0.9097 -26.69 -3.31 -0.3067 -23.72 -3.31 0.3067 -20.76 -3.197 0.9097 -17.79 -2.976 1.482 -14.83 -2.653 2.003 -11.86 -2.239 2.457 -8.897 -1.75 2.826 -5.931 -1.201 3.1 -2.966 -0.6108 3.268 0 0 3.324 2.966 0.6108 3.268 5.931 1.201 3.1 8.897 1.75 2.826 11.86 2.239 2.457 14.83 2.653 2.003 17.79 2.976 1.482 20.76 3.197 0.9097 23.72 3.31 0.3067 26.69 3.31 -0.3067 29.66 3.197 -0.9097 32.62 2.976 -1.482 35.59 2.653 -2.003 38.55 2.239 -2.457 41.52 1.75 -2.826 44.48 1.201 -3.1 47.45 0.6108 -3.268 50.42 0 -3.324 -50.42 0 3.324 -47.45 0.6108 3.268 -44.48 1.201 3.1 -41.52 1.75 2.826 -38.55 2.239 2.457 -35.59 2.653 2.003 -32.62 2.976 1.482 -29.66 3.197 0.9097 -26.69 3.31 0.3067 -23.72 3.31 -0.3067 -20.76 3.197 -0.9097 -17.79 2.976 -1.482 -14.83 2.653 -2.003 -11.86 2.239 -2.457 -8.897 1.75 -2.826 -5.931 1.201 -3.1 -2.966 0.6108 -3.268 0 0 -3.324 2.966 -0.6108 -3.268 5.931 -1.201 -3.1 8.897 -1.75 -2.826 11.86 -2.239 -2.457 14.83 -2.653 -2.003 17.79 -2.976 -1.482 20.76 -3.197 -0.9097 23.72 -3.31 -0.3067 26.69 -3.31 0.3067 29.66 -3.197 0.9097 32.62 -2.976 1.482 35.59 -2.653 2.003 38.55 -2.239 2.457 41.52 -1.75 2.826 44.48 -1.201 3.1 47.45 -0.6108 3.267 50.42 0 3.324 -50.42 0 9.972 -47.45 1.832 9.803 -44.48 3.602 9.299 -41.52 5.25 8.479 -38.55 6.718 7.37 -35.59 7.958 6.01 -32.62 8.927 4.445 -29.66 9.592 2.729 -26.69 9.93 0.9201 -23.72 9.93 -0.9201 -20.76 9.592 -2.729 -17.79 8.927 -4.445 -14.83 7.958 -6.01 -11.86 6.718 -7.37 -8.897 5.25 -8.479 -5.931 3.602 -9.299 -2.966 1.832 -9.803 0 0 -9.972 2.966 -1.832 -9.803 5.931 -3.602 -9.299 8.897 -5.25 -8.479 11.86 -6.718 -7.37 14.83 -7.958 -6.01 17.79 -8.927 -4.445 20.76 -9.592 -2.729 23.72 -9.93 -0.9201 26.69 -9.93 0.9201 29.66 -9.592 2.729 32.62 -8.927 4.445 35.59 -7.958 6.01 38.55 -6.718 7.37 41.52 -5.25 8.479 44.48 -3.602 9.299 47.45 -1.832 9.803 50.42 0 9.972'></coordinate>
<normal vector='0.2028 0.2688 -0.9415 -0.4858 0.0228 -0.8737 0.4858 0.4405 -0.7548 -0.2028 0.4372 0.8761 -0.4858 0.6055 -0.6303 0.2028 -0.2688 0.9415 -0.4858 -0.0228 0.8737 -0.2028 0.9134 0.3529 0.4858 -0.4405 0.7548 0.2028 0.4372 -0.8761 0.2028 0.4356 0.8769 -0.4858 0.4793 -0.7308 0.4858 -0.0228 -0.8737 -0.4858 -0.6055 0.6303 0.2028 0.723 0.6603 0.2028 0.9134 -0.3529 0.4858 0.1829 0.8546 0.2028 -0.4372 0.8761 0.4858 -0.6055 -0.6303 -0.4858 -0.6834 -0.5447 -0.4858 -0.4793 0.7308 -0.5256 -0.8507 0 0.2028 -0.9134 0.3529 0.4858 -0.4793 -0.7308 -0.2028 0.9127 -0.3545 0.2028 0.2671 0.942 -0.4858 0.7719 0.4098 -0.2028 -0.5908 -0.7808 -0.2028 0.5893 -0.7819 0.2028 0.832 0.5162 -0.2028 -0.9127 0.3545 0.4858 0.7719 -0.4098 -0.2028 -0.833 -0.5147 -0.2028 -0.5893 0.7819 0.2028 -0.9127 -0.3545 -0.4858 0.8341 0.261 -0.4858 0.5717 0.661 -0.4858 0.3369 -0.8064 0.4858 -0.7719 0.4098 -0.2028 0.9627 0.179 0.2028 -0.5893 -0.7819 0.255 -0.9647 0.0647 0.4858 0.8341 -0.261 0.4858 0.5717 -0.661 0.2028 0.9627 -0.179 0.4858 0.7923 0.369 -0.4858 -0.3369 0.8064 -0.2028 -0.0912 -0.9749 0.4858 -0.8341 0.261 -0.2028 0.9792 -0.0008 0.4858 -0.5717 0.661 0.4858 -0.3369 -0.8064 0.2028 -0.9627 0.179 -0.4858 0.8466 -0.2171 -0.4858 -0.138 -0.863 -0.2028 0.0894 -0.9751 -0.4858 -0.8466 0.2171 -0.4858 -0.8678 -0.1033 -0.4858 -0.2943 -0.8229 0.4858 -0.8466 -0.2171 -0.2028 -0.0894 0.9751 -0.2028 0.9623 -0.1808 -0.2028 -0.7242 -0.659 0.2028 -0.0894 -0.9751 0.4858 0.8721 0.0578 -0.2028 -0.9623 0.1808 -0.4858 0.711 -0.5083 0.4858 0.0228 0.8737 0.2028 -0.9623 -0.1808 -0.4858 -0.711 0.5083 -0.2028 -0.2688 -0.9415 0.4858 0.6055 0.6303 -0.4858 0.6834 0.5447 -0.4858 -0.4405 -0.7548 0.4858 -0.711 -0.5083 -0.2028 0.4356 -0.8769 -0.4436 -0.8887 0.1152 -0.2028 0.723 -0.6603 0.4858 0.6834 -0.5447 0.4858 0.4793 0.7308 -0.4858 0.1829 -0.8546 -0.2028 0.5908 0.7808 -0.2028 -0.4372 -0.8761 -0.2028 -0.4356 0.8769 0.4436 -0.8887 -0.1152 -0.2028 -0.723 0.6603 0.4858 -0.6834 0.5447 -0.2028 -0.9134 -0.3529 0.2028 0.5908 -0.7808 -0.4858 -0.1829 0.8546 -0.2028 0.833 0.5147 0.2028 -0.4356 -0.8769 -0.149 -0.9865 0.0664 -0.2028 0.2671 -0.942 0.2028 -0.723 -0.6603 0.2028 0.9127 0.3545 0.4858 -0.1829 -0.8546 0.2028 -0.5908 0.7808 -0.2028 0.832 -0.5162 0.2028 0.833 -0.5147 0.2028 0.5893 0.7819 0.149 -0.9865 -0.0664 -0.2028 -0.2671 0.942 -0.2028 -0.832 0.5162 0.2028 -0.833 0.5147 -0.2028 0.0912 0.9749 0.2028 -0.2671 -0.942 -0.4858 -0.7719 -0.4098 0.4858 0.3369 0.8064 -0.255 -0.9647 -0.0647 0.2028 -0.832 -0.5162 0.2028 0.0912 -0.9749 -0.4858 0.7923 -0.369 -0.4858 0.138 0.863 -0.4858 -0.8341 -0.261 0.2028 -0.0912 0.9749 -0.4858 0.8678 0.1033 -0.4858 -0.5717 -0.661 0.2028 0.9792 0.0008 -0.2028 -0.9627 -0.179 -0.4858 -0.7923 0.369 0.4858 0.138 -0.863 -0.4858 0.2943 0.8229 0.4858 0.8466 0.2171 0.4858 0.8678 -0.1033 -0.2028 0.7242 0.659 0.4858 -0.7923 -0.369 0.4858 0.2943 -0.8229 0.4858 -0.138 0.863 0.2028 0.0894 0.9751 0.5256 -0.8507 0 0.2028 0.7242 -0.659 0.4858 -0.8678 0.1033 0.4858 -0.2943 0.8229 0.2028 0.9623 0.1808 0.2028 -0.7242 0.659 -0.2028 0.2688 0.9415 -0.4858 0.8721 -0.0578 -0.4858 0.4405 0.7548 0.4858 0.711 0.5083'></normal>
</indexedFaceSet>
</shape>
</transform>
...
</scene>
</x3d>