0

Problems with textures in .obj files

Anonymous 10 years ago 0
This discussion was imported from CodePlex

soheilvb wrote at 2012-04-09 15:11:

hi again ..

http://parsaspace.com/files/1540954884/eye.rar.html

this object file is a model of eye. that needs two material: solidcolorbrush + imagebrush.

but ObjReader only recognize Solidcolorbrush ..

3ds max shows the obj file OK.

tnx


objo wrote at 2012-04-09 15:36:

I think there is some error in the model. Delete from line 1095 to the end, and you will see the image texture. Are surface normals correct? Are the two surfaces coincident?


soheilvb wrote at 2012-04-09 15:49:

this model has two texture ... from line 1095 is color texture.  i think the model is ok.

I just converted it to Xaml with Zam 3D ....

that's the result ...

<Viewbox x:Name="ZAM3DViewbox" ClipToBounds="true" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:d="http://schemas.microsoft.com/expression/interactivedesigner/2006" xmlns:c="http://schemas.openxmlformats.org/markup-compatibility/2006" c:Ignorable="d">

    <Viewport3D x:Name="ZAM3DViewport3D" ClipToBounds="true" Width="400" Height="300">
        <Viewport3D.Resources>
            <ResourceDictionary>
                <MaterialGroup x:Key="_Eye,_L_~001706NMR1" >
                    <DiffuseMaterial>
                        <DiffuseMaterial.Brush>
                            <SolidColorBrush Color="#E6E6E6" Opacity="1.000000"/>
                        </DiffuseMaterial.Brush>
                    </DiffuseMaterial>
                </MaterialGroup>
                <MaterialGroup x:Key="_Eye,_L_~00171MR2" >
                    <DiffuseMaterial>
                        <DiffuseMaterial.Brush>
                            <SolidColorBrush Color="#E6E6E6" Opacity="1.000000"/>
                        </DiffuseMaterial.Brush>
                    </DiffuseMaterial>
                </MaterialGroup>
                <Transform3DGroup x:Key="SceneTR8" >
                    <TranslateTransform3D OffsetX="0" OffsetY="0" OffsetZ="0"/>
                    <ScaleTransform3D ScaleX="1" ScaleY="1" ScaleZ="1"/>
                    <RotateTransform3D>
                        <RotateTransform3D.Rotation>
                            <AxisAngleRotation3D Angle="0" Axis="0 1 0"/>
                        </RotateTransform3D.Rotation>
                    </RotateTransform3D>
                    <TranslateTransform3D OffsetX="0" OffsetY="0" OffsetZ="0"/>
                </Transform3DGroup>
                <Transform3DGroup x:Key="Eye__L__00OR10TR9" >
                    <TranslateTransform3D OffsetX="0" OffsetY="0" OffsetZ="0"/>
                    <ScaleTransform3D ScaleX="1" ScaleY="1" ScaleZ="1"/>
                    <RotateTransform3D>
                        <RotateTransform3D.Rotation>
                            <AxisAngleRotation3D Angle="0" Axis="0 1 0"/>
                        </RotateTransform3D.Rotation>
                    </RotateTransform3D>
                    <TranslateTransform3D OffsetX="-1.47256" OffsetY="3.79339" OffsetZ="7.91067"/>
                </Transform3DGroup>
                <MeshGeometry3D x:Key="Eye__L__00OR10GR11"
                    TriangleIndices="0,1,2 0,2,3 3,2,4 3,4,5 5,4,6 5,6,7 7,6,8 7,8,9 9,8,10 9,10,11 11,10,12 11,12,13 13,12,14 13,14,15 15,14,16 15,16,17 17,16,18 17,18,19 19,18,20 19,20,21 21,20,22 21,22,23 23,22,24 23,24,25 25,24,26 25,26,27 27,26,28 27,28,29 29,28,30 29,30,31 31,30,32 31,32,33 33,32,34 33,34,35 35,34,36 35,36,37 37,36,38 37,38,39 39,38,1 39,1,0 2,1,40 2,40,41 41,40,42 41,42,43 43,42,44 43,44,45 45,44,46 45,46,47 47,46,48 47,48,49 49,48,50 49,50,51 51,50,52 51,52,10 10,52,12 50,48,53 53,48,46 53,46,54 54,46,55 54,55,56 56,55,57 56,57,58 58,57,59 58,59,16 16,59,18 57,55,60 60,55,46 60,46,61 61,46,62 61,62,63 63,62,64 63,64,65 65,64,66 65,66,22 22,66,24 64,62,67 67,62,46 67,46,68 68,46,69 68,69,70 70,69,71 70,71,72 72,71,73 72,73,28 28,73,30 71,69,74 74,69,46 74,46,75 75,46,76 75,76,77 77,76,78 77,78,79 79,78,80 79,80,34 34,80,36 40,1,81 40,81,82 82,81,83 82,83,84 84,83,85 84,85,46 46,85,86 46,86,76 76,86,78 42,40,82 42,82,87 87,82,84 87,84,46 87,46,44 87,44,42 4,2,41 4,41,88 88,41,43 88,43,89 89,43,45 89,45,47 89,47,49 89,49,90 90,49,51 90,51,8 8,51,10 16,14,58 58,14,91 58,91,56 56,91,92 56,92,54 54,92,53 50,53,92 50,92,52 52,92,91 52,91,12 12,91,14 22,20,65 65,20,93 65,93,63 63,93,94 63,94,61 61,94,60 57,60,94 57,94,59 59,94,93 59,93,18 18,93,20 28,26,72 72,26,95 72,95,70 70,95,96 70,96,68 68,96,67 64,67,96 64,96,66 66,96,95 66,95,24 24,95,26 34,32,79 79,32,97 79,97,77 77,97,98 77,98,75 75,98,74 71,74,98 71,98,73 73,98,97 73,97,30 30,97,32 1,38,81 81,38,99 81,99,83 83,99,100 83,100,85 85,100,86 78,86,100 78,100,80 80,100,99 80,99,36 36,99,38 88,89,90 88,90,6 6,90,8 88,6,4 "
                    Normals="0.369389,0.0499414,-0.927932 0.361235,-0.0803701,-0.929005 0.343073,0.0395633,-0.938475 0.312606,0.165109,-0.935423 0.291483,0.147147,-0.945191 0.225798,0.255704,-0.940016 0.210767,0.232141,-0.949573 0.11833,0.314488,-0.941857 0.110499,0.286147,-0.951793 -0.000762098,0.334409,-0.942428 -0.000585114,0.304891,-0.952387 -0.119736,0.313353,-0.942058 -0.111681,0.286425,-0.951572 -0.227711,0.255072,-0.939727 -0.212214,0.230556,-0.949636 -0.31286,0.161172,-0.936025 -0.292199,0.143357,-0.945552 -0.365028,0.0445468,-0.92993 -0.342717,0.0354851,-0.938768 -0.381984,-0.0809939,-0.920613 -0.358593,-0.0817561,-0.929907 -0.36487,-0.206285,-0.907919 -0.34213,-0.197675,-0.918625 -0.311548,-0.321136,-0.894321 -0.291858,-0.305298,-0.906428 -0.225836,-0.413278,-0.882156 -0.211393,-0.391367,-0.895626 -0.118541,-0.472166,-0.873503 -0.110234,-0.444977,-0.888732 0.000913178,-0.49136,-0.870956 0.000633217,-0.463068,-0.886322 0.11946,-0.470584,-0.874231 0.111102,-0.444647,-0.888789 0.227094,-0.412008,-0.882427 0.211564,-0.391099,-0.895702 0.314198,-0.323238,-0.892635 0.291126,-0.306613,-0.90622 0.369296,-0.207518,-0.905846 0.342846,-0.199176,-0.918034 0.387987,-0.0786016,-0.918307 0.324433,-0.0803225,-0.942492 0.308088,0.0269597,-0.950976 0.234033,-0.0803974,-0.968899 0.221669,-0.00319914,-0.975117 0.142688,-0.0798759,-0.986539 0.134144,-0.0331751,-0.990406 -0.000268032,-0.0865656,-0.996246 0.112319,0.00875091,-0.993634 0.0796357,0.0413078,-0.995968 0.13528,0.121236,-0.983362 0.0689846,0.155377,-0.985444 0.0989759,0.248559,-0.963547 -0.00141624,0.264502,-0.964384 0.0385893,0.0613806,-0.997368 -0.00528855,0.0671588,-0.997728 -0.0490705,0.0579077,-0.997115 -0.0754129,0.153215,-0.985311 -0.140807,0.116285,-0.983184 -0.19189,0.197343,-0.961371 -0.264256,0.119033,-0.957079 -0.0886039,0.0344468,-0.995471 -0.119772,-0.00176789,-0.9928 -0.138907,-0.045143,-0.989276 -0.225113,-0.0126729,-0.97425 -0.235412,-0.087537,-0.967946 -0.324389,-0.0836267,-0.94222 -0.309051,-0.187378,-0.932404 -0.14416,-0.0911193,-0.98535 -0.135448,-0.136834,-0.98129 -0.112888,-0.179355,-0.977286 -0.188391,-0.232537,-0.954167 -0.134736,-0.287803,-0.948164 -0.189,-0.361309,-0.913091 -0.098261,-0.409496,-0.907005 -0.0799498,-0.212302,-0.973928 -0.0388871,-0.232446,-0.971832 0.00521591,-0.238188,-0.971205 0.00330037,-0.333574,-0.942718 0.0752942,-0.320192,-0.944356 0.10076,-0.408974,-0.906966 0.190882,-0.360151,-0.913157 0.30901,-0.187956,-0.932301 0.223612,-0.15793,-0.961798 0.191131,-0.228462,-0.954607 0.11846,-0.170638,-0.978187 0.0880815,-0.205787,-0.974625 0.0492329,-0.228868,-0.972212 0.137334,-0.127336,-0.982306 0.260923,0.123553,-0.95742 0.187547,0.0664035,-0.980009 0.189189,0.199867,-0.961385 -0.101175,0.247015,-0.963715 -0.00361853,0.166206,-0.986084 -0.309706,0.0208301,-0.950604 -0.192608,0.0583714,-0.979538 -0.262682,-0.284172,-0.922087 -0.2234,-0.162377,-0.961107 0.00138543,-0.426042,-0.904702 -0.0689416,-0.322363,-0.944102 0.26267,-0.284486,-0.921994 0.140145,-0.284375,-0.948415 "
                    TextureCoordinates="0.947105,0.360542 0.921044,0.510559 0.900086,0.377743 0.879857,0.226574 0.84031,0.257793 0.775432,0.120644 0.746455,0.162632 0.643852,0.0524025 0.628544,0.101383 0.497875,0.0288048 0.497875,0.0805283 0.352081,0.0524025 0.367024,0.101383 0.220501,0.120644 0.249296,0.162632 0.116258,0.226574 0.156351,0.257793 0.050468,0.360542 0.0976691,0.377743 0.0275054,0.508762 0.07744,0.510559 0.050468,0.657394 0.0976691,0.643364 0.116258,0.790962 0.156351,0.763519 0.220501,0.897076 0.249296,0.858684 0.352081,0.965534 0.367024,0.919918 0.497875,0.988922 0.497875,0.940773 0.643852,0.965534 0.628544,0.919918 0.775432,0.897076 0.746455,0.858684 0.879857,0.790962 0.84031,0.763519 0.947105,0.657394 0.900086,0.643364 0.970067,0.508762 0.833931,0.51355 0.817347,0.408032 0.776707,0.515156 0.763039,0.427605 0.662076,0.516941 0.654057,0.46566 0.497875,0.518509 0.63073,0.418648 0.594464,0.381794 0.661894,0.285805 0.584076,0.245228 0.601754,0.188622 0.497875,0.171833 0.548903,0.3582 0.497875,0.350201 0.44703,0.3582 0.411856,0.245228 0.334221,0.285805 0.300505,0.237369 0.226697,0.312843 0.401468,0.381794 0.365566,0.418648 0.342968,0.46566 0.234898,0.427605 0.221959,0.515156 0.164917,0.51355 0.180589,0.619247 0.335314,0.516941 0.342968,0.568432 0.365566,0.615238 0.272987,0.682102 0.334221,0.744312 0.300505,0.789898 0.393997,0.838646 0.401468,0.652088 0.44703,0.675892 0.497875,0.683891 0.497875,0.79874 0.584076,0.785072 0.601754,0.838646 0.695244,0.789898 0.817348,0.619247 0.763039,0.602512 0.723492,0.682102 0.63073,0.615238 0.594464,0.652088 0.548903,0.675892 0.654057,0.568432 0.769782,0.312843 0.723492,0.348583 0.695244,0.237369 0.393997,0.188622 0.497875,0.231777 0.180589,0.408032 0.272987,0.348583 0.226697,0.714386 0.234898,0.602512 0.497875,0.855213 0.411856,0.785072 0.769782,0.714386 0.661894,0.744312 "
                    Positions="-1.3579,-0.0506532,7.78254 -1.35959,-0.0594957,7.78203 -1.36094,-0.0516672,7.78135 -1.36225,-0.0427568,7.78185 -1.36481,-0.0445971,7.78073 -1.36902,-0.0365129,7.78131 -1.37089,-0.0389881,7.78024 -1.37754,-0.0324907,7.78096 -1.37853,-0.0353777,7.77993 -1.38699,-0.0311,7.78084 -1.38699,-0.0341487,7.77982 -1.39643,-0.0324907,7.78096 -1.39546,-0.0353777,7.77993 -1.40495,-0.0365129,7.78131 -1.40308,-0.0389881,7.78024 -1.4117,-0.0427568,7.78185 -1.4091,-0.0445971,7.78073 -1.41596,-0.0506532,7.78254 -1.4129,-0.0516672,7.78135 -1.41745,-0.0593898,7.7833 -1.41421,-0.0594957,7.78203 -1.41596,-0.0681505,7.78406 -1.4129,-0.0673234,7.78271 -1.4117,-0.0760233,7.78474 -1.4091,-0.0744059,7.78332 -1.40495,-0.082278,7.78529 -1.40308,-0.0800152,7.78381 -1.39643,-0.086313,7.78564 -1.39546,-0.0836244,7.78412 -1.38699,-0.0876918,7.78576 -1.38699,-0.0848536,7.78423 -1.37754,-0.086313,7.78564 -1.37853,-0.0836244,7.78412 -1.36902,-0.082278,7.78529 -1.37089,-0.0800152,7.78381 -1.36225,-0.0760233,7.78474 -1.36481,-0.0744059,7.78332 -1.3579,-0.0681505,7.78406 -1.36094,-0.0673234,7.78271 -1.35641,-0.0593898,7.7833 -1.36523,-0.0596721,7.77992 -1.3663,-0.0534525,7.77938 -1.36893,-0.0597668,7.77877 -1.36982,-0.0546062,7.77832 -1.37636,-0.0598719,7.7775 -1.37688,-0.0568492,7.77724 -1.38699,-0.0599642,7.77641 -1.37839,-0.0540781,7.777 -1.38073,-0.0519061,7.77681 -1.37637,-0.0462482,7.7776 -1.38141,-0.0438561,7.77739 -1.38026,-0.04052,7.77826 -1.38699,-0.0395305,7.77817 -1.38368,-0.0505152,7.77669 -1.38699,-0.0500438,7.77665 -1.39028,-0.0505152,7.77669 -1.39256,-0.0438561,7.77739 -1.39759,-0.0462482,7.7776 -1.39977,-0.0433931,7.77851 -1.40455,-0.0478418,7.77889 -1.39323,-0.0519061,7.77681 -1.39556,-0.0540781,7.777 -1.39702,-0.0568492,7.77724 -1.40402,-0.0546062,7.77832 -1.40486,-0.0597668,7.77877 -1.40855,-0.0596721,7.77992 -1.40753,-0.0659022,7.78046 -1.39752,-0.0598719,7.7775 -1.39702,-0.0629067,7.77776 -1.39556,-0.0656657,7.778 -1.40155,-0.069607,7.77962 -1.39759,-0.0732737,7.77994 -1.39977,-0.0759609,7.78134 -1.39372,-0.0788341,7.78159 -1.39323,-0.0678377,7.77819 -1.39028,-0.0692408,7.77831 -1.38699,-0.0697124,7.77835 -1.38699,-0.0764818,7.78022 -1.38141,-0.0756762,7.78015 -1.38026,-0.0788341,7.78159 -1.37421,-0.0759609,7.78134 -1.3663,-0.0659022,7.78046 -1.36982,-0.0649157,7.77922 -1.37238,-0.069607,7.77962 -1.37839,-0.0656657,7.778 -1.38073,-0.0678377,7.77819 -1.38368,-0.0692408,7.77831 -1.37688,-0.0629067,7.77776 -1.36938,-0.0478418,7.77889 -1.37238,-0.0499485,7.77792 -1.37421,-0.0433931,7.77851 -1.39372,-0.04052,7.77826 -1.38699,-0.0430636,7.77732 -1.40753,-0.0534525,7.77938 -1.40155,-0.0499485,7.77792 -1.40455,-0.0715098,7.78095 -1.40402,-0.0649157,7.77922 -1.38699,-0.0798106,7.78167 -1.39256,-0.0756762,7.78015 -1.36938,-0.0715098,7.78095 -1.37637,-0.0732737,7.77994 "
                />
                <MeshGeometry3D x:Key="Eye__L__00OR10GR12"
                    TriangleIndices="0,1,2 0,2,3 3,2,4 3,4,5 5,4,6 5,6,7 7,6,8 7,8,9 9,8,10 9,10,11 11,10,12 11,12,13 13,12,14 13,14,15 15,14,16 15,16,17 17,16,18 17,18,19 19,18,20 19,20,21 21,20,22 21,22,23 23,22,24 23,24,25 25,24,26 25,26,27 27,26,28 27,28,29 29,28,30 29,30,31 31,30,32 31,32,33 33,32,34 33,34,35 35,34,36 35,36,37 37,36,38 37,38,39 39,38,40 39,40,41 41,40,42 41,42,43 43,42,44 34,32,45 45,32,46 45,46,47 47,46,48 47,48,49 49,48,50 49,50,51 51,50,52 51,52,53 53,52,22 53,22,54 54,22,55 54,55,56 56,55,57 56,57,58 58,57,59 58,59,60 60,59,61 60,61,62 62,61,63 62,63,64 64,63,65 64,65,66 66,65,67 66,67,68 68,67,69 68,69,70 70,69,71 70,71,72 72,71,73 72,73,74 74,73,1 53,54,75 75,54,56 75,56,76 76,56,58 76,58,77 77,58,60 77,60,78 78,60,62 78,62,79 79,62,64 79,64,80 80,64,66 80,66,81 81,66,68 81,68,82 82,68,70 82,70,83 83,70,72 83,72,84 84,72,74 51,53,75 51,75,85 85,75,76 85,76,86 86,76,77 86,77,87 87,77,78 87,78,88 88,78,79 88,79,89 89,79,80 89,80,90 90,80,81 90,81,91 91,81,82 91,82,92 92,82,83 92,83,93 93,83,84 49,51,85 49,85,94 94,85,86 94,86,95 95,86,87 95,87,96 96,87,88 96,88,97 97,88,89 97,89,98 98,89,90 98,90,99 99,90,91 99,91,100 100,91,92 100,92,101 101,92,93 47,49,94 47,94,102 102,94,95 102,95,103 103,95,96 103,96,104 104,96,97 104,97,105 105,97,98 105,98,106 106,98,99 106,99,107 107,99,100 107,100,108 108,100,101 45,47,102 45,102,109 109,102,103 109,103,110 110,103,104 110,104,111 111,104,105 111,105,112 112,105,106 112,106,113 113,106,107 113,107,114 114,107,108 34,45,109 34,109,36 36,109,110 36,110,38 38,110,111 38,111,40 40,111,112 40,112,42 42,112,113 42,113,44 44,113,114 41,43,115 41,115,116 116,115,117 116,117,118 118,117,119 118,119,120 120,119,121 120,121,122 122,121,123 122,123,124 124,123,125 124,125,126 126,125,127 126,127,128 128,127,129 128,129,130 130,129,131 130,131,132 132,131,133 132,133,3 3,133,0 1,73,2 2,73,134 2,134,4 4,134,135 4,135,6 6,135,136 6,136,8 8,136,137 8,137,10 10,137,138 10,138,12 12,138,139 12,139,14 14,139,140 14,140,16 16,140,141 16,141,18 18,141,142 18,142,20 20,142,22 73,71,134 134,71,143 134,143,135 135,143,144 135,144,136 136,144,145 136,145,137 137,145,146 137,146,138 138,146,147 138,147,139 139,147,148 139,148,140 140,148,149 140,149,141 141,149,150 141,150,142 142,150,22 71,69,143 143,69,151 143,151,144 144,151,152 144,152,145 145,152,153 145,153,146 146,153,154 146,154,147 147,154,155 147,155,148 148,155,156 148,156,149 149,156,157 149,157,150 150,157,22 69,67,151 151,67,158 151,158,152 152,158,159 152,159,153 153,159,160 153,160,154 154,160,161 154,161,155 155,161,162 155,162,156 156,162,163 156,163,157 157,163,22 67,65,158 158,65,164 158,164,159 159,164,165 159,165,160 160,165,166 160,166,161 161,166,167 161,167,162 162,167,168 162,168,163 163,168,22 65,63,164 164,63,169 164,169,165 165,169,170 165,170,166 166,170,171 166,171,167 167,171,172 167,172,168 168,172,22 63,61,169 169,61,173 169,173,170 170,173,174 170,174,171 171,174,175 171,175,172 172,175,22 61,59,173 173,59,176 173,176,174 174,176,177 174,177,175 175,177,22 59,57,176 176,57,178 176,178,177 177,178,22 55,22,178 55,178,57 32,30,46 46,30,179 46,179,48 48,179,180 48,180,50 50,180,181 50,181,52 52,181,22 30,28,179 179,28,182 179,182,180 180,182,183 180,183,181 181,183,22 28,26,182 182,26,184 182,184,183 183,184,22 24,22,184 24,184,26 39,41,116 39,116,185 185,116,118 185,118,186 186,118,120 186,120,187 187,120,122 187,122,188 188,122,124 188,124,189 189,124,126 189,126,190 190,126,128 190,128,191 191,128,130 191,130,192 192,130,132 192,132,5 5,132,3 37,39,185 37,185,193 193,185,186 193,186,194 194,186,187 194,187,195 195,187,188 195,188,196 196,188,189 196,189,197 197,189,190 197,190,198 198,190,191 198,191,199 199,191,192 199,192,7 7,192,5 35,37,193 35,193,200 200,193,194 200,194,201 201,194,195 201,195,202 202,195,196 202,196,203 203,196,197 203,197,204 204,197,198 204,198,205 205,198,199 205,199,9 9,199,7 33,35,200 33,200,206 206,200,201 206,201,207 207,201,202 207,202,208 208,202,203 208,203,209 209,203,204 209,204,210 210,204,205 210,205,11 11,205,9 31,33,206 31,206,211 211,206,207 211,207,212 212,207,208 212,208,213 213,208,209 213,209,214 214,209,210 214,210,13 13,210,11 29,31,211 29,211,215 215,211,212 215,212,216 216,212,213 216,213,217 217,213,214 217,214,15 15,214,13 27,29,215 27,215,218 218,215,216 218,216,219 219,216,217 219,217,17 17,217,15 25,27,218 25,218,220 220,218,219 220,219,19 19,219,17 23,25,220 23,220,21 21,220,19 "
                    Normals="0.387987,-0.0786016,-0.918307 0.369389,0.0499414,-0.927932 0.429182,0.0751853,-0.900083 0.451897,-0.0744032,-0.888962 0.499944,0.102787,-0.859936 0.527226,-0.0721849,-0.846653 0.60087,0.147118,-0.785691 0.634752,-0.0626055,-0.770176 0.764373,0.220353,-0.605953 0.808759,-0.0455758,-0.586371 0.897925,0.288178,-0.332693 0.950913,-0.0240149,-0.308525 0.944274,0.327995,-0.027668 1,-1.46088e-005,2.69655e-005 0.899197,0.336274,0.279936 0.950962,0.0240504,0.308373 0.766977,0.312414,0.560485 0.808919,0.0455946,0.586149 0.559297,0.257328,0.788016 0.587561,0.0626946,0.806748 0.325851,0.17882,0.928356 0.338242,0.0657332,0.938761 -3.98007e-005,0.0865859,0.996244 0.317106,-0.0452389,0.947311 0.264012,-0.143877,0.953728 0.466976,-0.302952,0.830755 0.334187,-0.435667,0.835771 0.4575,-0.632347,0.625165 0.235705,-0.741778,0.62786 0.275289,-0.888523,0.367073 -0.00205737,-0.929659,0.368416 -2.96807e-005,-0.996558,0.0828981 -0.289733,-0.953838,0.0790426 -0.27472,-0.93724,-0.214734 -0.532921,-0.81439,-0.229706 -0.455909,-0.729041,-0.510536 -0.639325,-0.553381,-0.533884 -0.504604,-0.464266,-0.727896 -0.599842,-0.279928,-0.749553 -0.497348,-0.248258,-0.831272 -0.524351,-0.075567,-0.848143 -0.445248,-0.0804893,-0.891782 -0.425894,0.0671248,-0.90228 -0.365028,0.0445468,-0.92993 -0.31286,0.161172,-0.936025 -0.560711,-0.825195,0.0682339 -0.279467,-0.887486,0.366425 -0.537844,-0.762215,0.360211 -0.24359,-0.739502,0.627535 -0.464952,-0.627458,0.624592 -0.183148,-0.514431,0.837746 -0.345084,-0.428159,0.835223 -0.117203,-0.256252,0.959478 -0.209289,-0.201694,0.956827 -0.281324,-0.118573,0.952259 -0.326028,-0.0155062,0.945233 -0.559914,-0.117171,0.820224 -0.587362,0.0774362,0.805611 -0.809017,0.0561321,0.585098 -0.763709,0.321318,0.559914 -0.897404,0.341066,0.279894 -0.749765,0.611707,0.252322 -0.788656,0.612784,-0.0501728 -0.560489,0.825354,-0.068141 -0.537708,0.762296,-0.360243 -0.279223,0.887616,-0.366296 -0.243526,0.73942,-0.627657 -0.00413025,0.777962,-0.628298 -0.00361272,0.595765,-0.803151 0.18768,0.56623,-0.802595 0.158691,0.456261,-0.875582 0.305432,0.380066,-0.873075 0.26147,0.313202,-0.912983 0.363254,0.209019,-0.907942 0.312606,0.165109,-0.935423 -0.475153,-0.292086,0.83001 -0.767976,-0.211121,0.604683 -0.950967,0.02964,0.307869 -0.944278,0.328046,-0.0269031 -0.754008,0.556178,-0.349483 -0.464845,0.627307,-0.624824 -0.1948,0.563814,-0.8026 -0.00160967,0.481809,-0.876275 0.13489,0.378698,-0.915638 0.225798,0.255704,-0.940016 -0.646899,-0.447205,0.617681 -0.899886,-0.283385,0.331509 -1,-1.97549e-005,-2.55587e-005 -0.89985,0.283371,-0.331619 -0.646824,0.447048,-0.617873 -0.369283,0.472281,-0.800363 -0.161302,0.455211,-0.875651 -0.00216587,0.402212,-0.915544 0.11833,0.314488,-0.941857 -0.753999,-0.55635,0.349228 -0.944271,-0.328075,0.0268221 -0.950948,-0.0296079,-0.307931 -0.767796,0.211042,-0.604939 -0.51081,0.326409,-0.795318 -0.307297,0.378276,-0.873199 -0.140106,0.37811,-0.915097 -0.000762098,0.334409,-0.942428 -0.78877,-0.612627,0.0502949 -0.897421,-0.341033,-0.279879 -0.808821,-0.056139,-0.585369 -0.603511,0.138768,-0.785186 -0.424407,0.255442,-0.868693 -0.264964,0.310142,-0.91302 -0.119736,0.313353,-0.942058 -0.749734,-0.6117,-0.252431 -0.763522,-0.321243,-0.560212 -0.634548,-0.0711296,-0.769603 -0.499517,0.0984093,-0.860697 -0.364482,0.202701,-0.908881 -0.227711,0.255072,-0.939727 -0.381984,-0.0809939,-0.920613 -0.423874,-0.22697,-0.876821 -0.36487,-0.206285,-0.907919 -0.36112,-0.359868,-0.860283 -0.311548,-0.321136,-0.894321 -0.26033,-0.464489,-0.84645 -0.225836,-0.413278,-0.882156 -0.134912,-0.530541,-0.836854 -0.118541,-0.472166,-0.873503 0.00204145,-0.553267,-0.833001 0.000913178,-0.49136,-0.870956 0.139703,-0.529845,-0.836509 0.11946,-0.470584,-0.874231 0.264452,-0.462145,-0.846456 0.227094,-0.412008,-0.882427 0.364932,-0.356927,-0.8599 0.314198,-0.323238,-0.892635 0.431273,-0.225139,-0.87368 0.369296,-0.207518,-0.905846 0.42284,0.258115,-0.868668 0.506064,0.332987,-0.795625 0.640742,0.454132,-0.619043 0.750754,0.559915,-0.35052 0.788795,0.612479,-0.0516868 0.753186,0.607519,0.252253 0.645732,0.54569,0.53409 0.474225,0.430035,0.768232 0.280897,0.281252,0.917602 0.363213,0.476483,-0.80065 0.457385,0.632218,-0.62538 0.533831,0.764431,-0.361482 0.560537,0.825243,-0.069084 0.53675,0.812179,0.228612 0.463724,0.724048,0.510602 0.343974,0.56429,0.750506 0.208737,0.363269,0.908 0.235416,0.7417,-0.628061 0.275294,0.888475,-0.367185 0.29005,0.953712,-0.0793997 0.278724,0.93623,0.213977 0.242774,0.83453,0.494591 0.182988,0.649041,0.738418 0.117061,0.41708,0.9013 -0.00232337,0.929518,-0.368769 -1.5357e-005,0.996558,-0.082896 0.00231729,0.97782,0.209434 0.00404479,0.87236,0.488847 0.00603826,0.679479,0.73367 0.0142402,0.438873,0.898436 -0.289989,0.953739,-0.079295 -0.274733,0.937261,0.214625 -0.234643,0.836792,0.494694 -0.17065,0.65301,0.737873 -0.0897487,0.42633,0.900104 -0.532961,0.814449,0.229403 -0.45602,0.729164,0.51026 -0.333065,0.571862,0.749694 -0.185555,0.380747,0.905871 -0.63951,0.553411,0.533632 -0.465818,0.440948,0.767189 -0.263468,0.305871,0.914892 -0.554668,0.270329,0.786934 -0.31667,0.207716,0.925513 -0.338126,0.0970141,0.936087 -0.00434736,-0.777935,0.628329 -0.00651158,-0.545087,0.838354 -0.0141267,-0.278504,0.960331 0.171286,-0.518062,0.838017 0.0895678,-0.265608,0.959911 0.18605,-0.219502,0.957708 -0.421306,-0.402628,-0.812645 -0.304347,-0.523701,-0.795682 -0.157689,-0.598843,-0.785188 0.00128573,-0.624428,-0.781081 0.160839,-0.597955,-0.785227 0.3066,-0.522331,-0.795718 0.423818,-0.400375,-0.812452 0.500472,-0.245953,-0.830081 -0.36206,-0.606322,-0.708016 -0.186863,-0.694317,-0.694987 0.00360065,-0.723498,-0.690317 0.194007,-0.692033,-0.695307 0.368638,-0.602143,-0.708188 0.510133,-0.458255,-0.727851 0.602725,-0.272074,-0.750133 -0.234854,-0.836563,-0.49498 0.00424749,-0.87206,-0.489381 0.242764,-0.834312,-0.494964 0.463638,-0.723924,-0.510856 0.64552,-0.545652,-0.534386 0.766831,-0.312341,-0.560726 0.00205793,-0.97785,-0.209295 0.278956,-0.936077,-0.214345 0.536845,-0.812058,-0.228821 0.753121,-0.607623,-0.252198 0.89918,-0.336237,-0.280037 0.289813,-0.953764,0.0796336 0.56076,-0.825102,0.0689533 0.7889,-0.612355,0.0515482 0.944269,-0.328003,0.0277421 0.53387,-0.76438,0.361532 0.750773,-0.559948,0.350426 0.897997,-0.288209,0.332471 0.640882,-0.45429,0.618782 0.764511,-0.220422,0.605753 0.555427,-0.131146,0.821158 "
                    Positions="-1.35641,-0.0593898,7.7833 -1.3579,-0.0506532,7.78254 -1.35579,-0.0499392,7.78347 -1.35416,-0.059309,7.78428 -1.35196,-0.0485752,7.78567 -1.35014,-0.0591166,7.78659 -1.3471,-0.0468454,7.78894 -1.34504,-0.0588343,7.78999 -1.33213,-0.041029,7.8043 -1.32927,-0.0575259,7.80573 -1.32247,-0.0364764,7.82384 -1.31911,-0.055881,7.82553 -1.31917,-0.0336618,7.84574 -1.31564,-0.0540547,7.84751 -1.32247,-0.0328236,7.8678 -1.31911,-0.0522287,7.86949 -1.33213,-0.0340848,7.88786 -1.32927,-0.050581,7.8893 -1.3471,-0.0372822,7.90401 -1.34504,-0.0492723,7.90505 -1.36602,-0.0421367,7.91457 -1.36493,-0.0484362,7.91512 -1.38699,-0.0481455,7.91862 -1.36602,-0.0547245,7.91566 -1.36915,-0.0604374,7.91616 -1.35306,-0.0721033,7.90704 -1.36235,-0.0806665,7.90778 -1.35307,-0.09377,7.89305 -1.36915,-0.10138,7.89371 -1.36602,-0.111959,7.87468 -1.38699,-0.115017,7.87494 -1.38699,-0.120038,7.85324 -1.40902,-0.116843,7.85297 -1.40796,-0.115611,7.83072 -1.42687,-0.106679,7.82995 -1.42089,-0.100714,7.80949 -1.43367,-0.0889194,7.80846 -1.42093,-0.0816638,7.79197 -1.42687,-0.0708354,7.79103 -1.42201,-0.0696344,7.7875 -1.42383,-0.0591166,7.78659 -1.41975,-0.059309,7.78428 -1.41814,-0.0499392,7.78347 -1.41596,-0.0506532,7.78254 -1.4117,-0.0427568,7.78185 -1.42889,-0.107439,7.85215 -1.40796,-0.111959,7.87468 -1.42687,-0.103027,7.8739 -1.40482,-0.10138,7.89371 -1.42089,-0.09377,7.89305 -1.39995,-0.0861957,7.90826 -1.41163,-0.0806665,7.90778 -1.3938,-0.0678523,7.91681 -1.39993,-0.0649326,7.91655 -1.40482,-0.0604374,7.91616 -1.40795,-0.0547245,7.91566 -1.42687,-0.0612736,7.9061 -1.42894,-0.0492723,7.90505 -1.44469,-0.050581,7.8893 -1.44186,-0.0340848,7.88786 -1.4515,-0.0328236,7.8678 -1.4419,-0.0153165,7.86628 -1.44469,-0.0152459,7.84414 -1.42889,-0.000680685,7.84287 -1.42687,-0.00508213,7.82112 -1.40796,0.00383806,7.82034 -1.40482,-0.00672698,7.80132 -1.38699,-0.00415206,7.80109 -1.38699,-0.0200253,7.78661 -1.37402,-0.0219226,7.78678 -1.3756,-0.0266871,7.78377 -1.36533,-0.0315499,7.78419 -1.3677,-0.0347431,7.78215 -1.36044,-0.041466,7.78273 -1.36225,-0.0427568,7.78185 -1.42093,-0.0721033,7.90704 -1.44186,-0.0670772,7.89073 -1.45485,-0.0522287,7.86949 -1.45481,-0.0336618,7.84574 -1.4419,-0.0189686,7.82232 -1.42089,-0.0143373,7.80198 -1.39995,-0.0219226,7.78678 -1.38699,-0.0250437,7.78363 -1.37684,-0.0304308,7.78177 -1.36902,-0.0365129,7.78131 -1.43367,-0.0819759,7.89203 -1.4515,-0.0716441,7.87117 -1.45832,-0.0540547,7.84751 -1.4515,-0.0364764,7.82384 -1.43367,-0.0261309,7.803 -1.41163,-0.0274394,7.78726 -1.39837,-0.0266871,7.78377 -1.38699,-0.0289607,7.78165 -1.37754,-0.0324907,7.78096 -1.4419,-0.0891514,7.8727 -1.45481,-0.0744364,7.84928 -1.45485,-0.055881,7.82553 -1.44186,-0.041029,7.8043 -1.42093,-0.0360162,7.788 -1.40863,-0.0315499,7.78419 -1.39713,-0.0304308,7.78177 -1.38699,-0.0311,7.78084 -1.44469,-0.0928524,7.85088 -1.4515,-0.0752957,7.82722 -1.44469,-0.0575259,7.80573 -1.42687,-0.0468454,7.78894 -1.4168,-0.0390797,7.78485 -1.40627,-0.0347431,7.78215 -1.39643,-0.0324907,7.78096 -1.4419,-0.0928042,7.82874 -1.44186,-0.0740213,7.80717 -1.42894,-0.0588343,7.78999 -1.42201,-0.0485752,7.78567 -1.41353,-0.041466,7.78273 -1.40495,-0.0365129,7.78131 -1.41745,-0.0593898,7.7833 -1.41814,-0.0686884,7.7851 -1.41596,-0.0681505,7.78406 -1.41353,-0.0771494,7.78584 -1.4117,-0.0760233,7.78474 -1.40627,-0.0838854,7.78642 -1.40495,-0.082278,7.78529 -1.39713,-0.0881846,7.78679 -1.39643,-0.086313,7.78564 -1.38699,-0.0896678,7.78692 -1.38699,-0.0876918,7.78576 -1.37684,-0.0881846,7.78679 -1.37754,-0.086313,7.78564 -1.3677,-0.0838854,7.78642 -1.36902,-0.082278,7.78529 -1.36044,-0.0771494,7.78584 -1.36225,-0.0760233,7.78474 -1.35579,-0.0686884,7.7851 -1.3579,-0.0681505,7.78406 -1.35718,-0.0390797,7.78485 -1.35306,-0.0360162,7.788 -1.34031,-0.0261309,7.803 -1.33207,-0.0189686,7.82232 -1.32927,-0.0152459,7.84414 -1.33207,-0.0153165,7.86628 -1.34031,-0.0191875,7.88657 -1.35306,-0.0264537,7.90307 -1.36915,-0.0364459,7.91408 -1.36235,-0.0274394,7.78726 -1.35307,-0.0143373,7.80198 -1.3471,-0.00508213,7.82112 -1.34507,-0.000680685,7.84287 -1.3471,-0.00142932,7.86507 -1.35307,-0.00739312,7.88554 -1.36235,-0.017879,7.90232 -1.37404,-0.03194,7.91368 -1.36915,-0.00672698,7.80132 -1.36602,0.00383806,7.82034 -1.36493,0.00872302,7.84205 -1.36602,0.0074904,7.86429 -1.36915,0.000217199,7.88488 -1.37402,-0.0123601,7.90184 -1.38018,-0.0290325,7.91343 -1.38699,0.00689673,7.82007 -1.38699,0.0119412,7.84177 -1.38699,0.0105481,7.86403 -1.38699,0.00279284,7.88466 -1.38699,-0.010464,7.90168 -1.38699,-0.0280435,7.91335 -1.40902,0.00872302,7.84205 -1.40796,0.0074904,7.86429 -1.40482,0.000217199,7.88488 -1.39995,-0.0123601,7.90184 -1.3938,-0.0290325,7.91343 -1.42687,-0.00142932,7.86507 -1.42089,-0.00739312,7.88554 -1.41163,-0.017879,7.90232 -1.39993,-0.03194,7.91368 -1.43367,-0.0191875,7.88657 -1.42093,-0.0264537,7.90307 -1.40482,-0.0364459,7.91408 -1.42687,-0.0372822,7.90401 -1.40795,-0.0421367,7.91457 -1.40902,-0.0484362,7.91512 -1.38699,-0.103967,7.89394 -1.38699,-0.0880702,7.90843 -1.38699,-0.0688176,7.91689 -1.37402,-0.0861957,7.90826 -1.38018,-0.0678523,7.91681 -1.37404,-0.0649326,7.91655 -1.4168,-0.0791645,7.78833 -1.40863,-0.0867062,7.78899 -1.39837,-0.0915561,7.78941 -1.38699,-0.0932002,7.78955 -1.3756,-0.0915561,7.78941 -1.36533,-0.0867062,7.78899 -1.35718,-0.0791645,7.78833 -1.35196,-0.0696344,7.7875 -1.41163,-0.0902286,7.79272 -1.39995,-0.0957575,7.7932 -1.38699,-0.0976322,7.79336 -1.37402,-0.0957575,7.7932 -1.36235,-0.0902286,7.79272 -1.35306,-0.0816638,7.79197 -1.3471,-0.0708354,7.79103 -1.40482,-0.108325,7.81015 -1.38699,-0.110911,7.81037 -1.36915,-0.108325,7.81015 -1.35307,-0.100714,7.80949 -1.34031,-0.0889194,7.80846 -1.33213,-0.0740213,7.80717 -1.38699,-0.118669,7.83099 -1.36602,-0.115611,7.83072 -1.3471,-0.106679,7.82995 -1.33207,-0.0928042,7.82874 -1.32247,-0.0752957,7.82722 -1.36493,-0.116843,7.85297 -1.34507,-0.107439,7.85215 -1.32927,-0.0928524,7.85088 -1.31917,-0.0744364,7.84928 -1.3471,-0.103027,7.8739 -1.33207,-0.0891514,7.8727 -1.32247,-0.0716441,7.87117 -1.34031,-0.0819759,7.89203 -1.33213,-0.0670772,7.89073 -1.3471,-0.0612736,7.9061 "
                />
            </ResourceDictionary>
        </Viewport3D.Resources>

        <Viewport3D.Camera>
            <PerspectiveCamera x:Name="FrontOR7" FarPlaneDistance="10" LookDirection="0,0,-1" UpDirection="0,1,0" NearPlaneDistance="0.1" Position="-2.85574,3.73999,16.0883" FieldOfView="39.5978" />
        </Viewport3D.Camera>

        <ModelVisual3D>
            <ModelVisual3D.Content>
                <Model3DGroup x:Name="Scene" Transform="{DynamicResource SceneTR8}"> <!-- Scene (XAML Path = ) -->
                    <AmbientLight Color="#646464" />
                    <DirectionalLight Color="#FFFFFF" Direction="-0.612372,-0.5,-0.612372" />
                    <DirectionalLight Color="#FFFFFF" Direction="0.612372,-0.5,-0.612372" />
                    <Model3DGroup x:Name="Eye__L__00OR10" Transform="{DynamicResource Eye__L__00OR10TR9}"> <!-- Eye__L__00 (XAML Path = (Viewport3D.Children)[0].(ModelVisual3D.Content).(Model3DGroup.Children)[3]) -->
                        <GeometryModel3D x:Name="Eye__L__00OR10GR11" Geometry="{DynamicResource Eye__L__00OR10GR11}" Material="{DynamicResource _Eye,_L_~001706NMR1}" BackMaterial="{DynamicResource _Eye,_L_~001706NMR1}"/>
                        <GeometryModel3D x:Name="Eye__L__00OR10GR12" Geometry="{DynamicResource Eye__L__00OR10GR12}" Material="{DynamicResource _Eye,_L_~00171MR2}" BackMaterial="{DynamicResource _Eye,_L_~00171MR2}"/>
                    </Model3DGroup>
                </Model3DGroup>
            </ModelVisual3D.Content>
        </ModelVisual3D>
    </Viewport3D>
</Viewbox>

 

as you can see, that created two Geometrymodel3d with different geometry and different textures.

maybe that's the problem ...


soheilvb wrote at 2012-04-09 16:16:

i just converted the .obj file to .3ds. your StudioReader works perfect...


objo wrote at 2012-04-09 21:30:

I see the model contains a single group with two different materials. I guess 3ds max is correct and the .obj file format should support this. I'll check in a fix in a moment.


objo wrote at 2012-04-09 21:34:

ps. the definition of the mtllib statement is

mtllib filename1 filename2

so it is probably not correct to use spaces in the filename.

The implementation in this library only supports one filename in the mtllib statement.


soheilvb wrote at 2012-04-10 00:07:

thanks for your fast response and fix ...