Thank you Eric very much!<br>Your advise is very important for me, I have searched the old mailing list, but most of the problem about 3DSImpoter is no result. I think you are right, the designer need send me another file format.<br>

<br>Yun<br><br><div class="gmail_quote">2010/9/26 Eric E. Monson <span dir="ltr">&lt;<a href="mailto:emonson@cs.duke.edu">emonson@cs.duke.edu</a>&gt;</span><br><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">

Hey Yun,<br>
<br>
I&#39;ve never used the vtk3DSImporter (or dotnet), but I would guess that if the importer has problems with textures, then probably it&#39;s not just losing the textures, but it&#39;s also not importing the texture coordinates. So, when you try to apply a texture manually there is nothing to tell the system where to put the texture.<br>


<br>
I have a feeling, looking back on old mailing list postings, that the 3DSImporter really just grabs the most basic geometry, and computes Normals, but it&#39;s not designed to pull in anything more than the polygons. I&#39;m sure this will disappoint you, but maybe there&#39;s a chance someone else has another solution for converting your file into another format...?<br>


<br>
Good luck,<br>
-Eric<br>
<br>
------------------------------------------------------<br>
Eric E Monson<br>
Duke Visualization Technology Group<br>
<div><div></div><div class="h5"><br>
<br>
On Sep 25, 2010, at 11:22 AM, quengzi wrote:<br>
<br>
&gt; Hi all,<br>
&gt;<br>
&gt; I&#39;m a newer of VTK, I use VTK Dotnet to open a 3ds file, someone tell me that vtk3DSImpoter do not support texture, so I want to draw it by manual, but it failed, I cannot see any different after add the texture by manual, below is my code:<br>


&gt;             string fileName = @&quot;E:\VTK\3D Module\Mickey\Mickey.3ds&quot;;<br>
&gt;             vtk3DSImporter importer = new vtk3DSImporter();<br>
&gt;             importer.ComputeNormalsOn();<br>
&gt;             importer.SetFileName(fileName);<br>
&gt;             importer.Read();<br>
&gt;             importer.GetRenderer().ResetCamera();<br>
&gt;             importer.DebugOn();<br>
&gt;<br>
&gt;             //Add or Remove this section, no differents<br>
&gt;             vtkPNGReader pngReader = new vtkPNGReader();<br>
&gt;             pngReader.SetDebug(1);<br>
&gt;             pngReader.SetFileName(@&quot;E:\VTK\3D Module\Mickey\l.png&quot;);<br>
&gt;             vtkTexture texture = new vtkTexture();<br>
&gt;             texture.SetInput(pngReader.GetOutput());<br>
&gt;             texture.InterpolateOn();<br>
&gt;             vtkActor actor = new vtkActor();<br>
&gt;             actor.SetTexture(texture);<br>
&gt;             importer.GetRenderer().AddActor(actor);<br>
&gt;<br>
&gt;             //Below is add a light, and it&#39;s okay<br>
&gt;             vtkLight light = new vtkLight();<br>
&gt;             light.SetColor(1,1 , 1);<br>
&gt;             light.SwitchOn();<br>
&gt;             light.SetIntensity(0.9);<br>
&gt;             light.SetAmbientColor(1, 1, 1);<br>
&gt;             light.SetPosition(importer.GetRenderer().GetActiveCamera().GetPosition());<br>
&gt;             light.SetFocalPoint(importer.GetRenderer().GetActiveCamera().GetFocalPoint());<br>
&gt;<br>
&gt;             importer.GetRenderer().SetBackground(0.1,0.2,0.4);<br>
&gt;             importer.GetRenderer().AddLight(light);<br>
&gt;<br>
&gt;             renderer[0] = importer.GetRenderer();<br>
&gt;             AddRendererToRenderWindow(renWin);<br>
&gt; ...<br>
&gt; Any suggestions will be appropriated.<br>
&gt;<br>
&gt; Thanks,<br>
&gt; Yun<br>
</div></div>&gt; _______________________________________________<br>
&gt; Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
&gt;<br>
&gt; Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
&gt;<br>
&gt; Please keep messages on-topic and check the VTK FAQ at: <a href="http://www.vtk.org/Wiki/VTK_FAQ" target="_blank">http://www.vtk.org/Wiki/VTK_FAQ</a><br>
&gt;<br>
&gt; Follow this link to subscribe/unsubscribe:<br>
&gt; <a href="http://www.vtk.org/mailman/listinfo/vtkusers" target="_blank">http://www.vtk.org/mailman/listinfo/vtkusers</a><br>
<br>
</blockquote></div><br>