5 Replies Latest reply on Jan 26, 2015 11:12 PM by Patrick Girvin

    Unable to import VRML with image textures

    Douglas MacKenzie
      I am using SolidWorks 2007, SP4 on Windows XP.

      A program I have written writes a 3D model to a VRML file for import into SolidWorks. I am using IndexedFaceSet objects with triangulated faces, and attaching an image texture to the object. The models load fine, but I have been unable to figure out how to embed an image texture into the VRML that SolidWorks will import. It always quietly drops the textures and I get grey objects. Standard VRML viewers load the files fine.

      Under the "Import Options" dialog I am selecting "Solid Body" and "import textures". We have also tried all the other combinations of the import options without success.

      Does anyone have an example VRML file with an image texture that SolidWorks can load that I could use as a file format reference? Or, documentation on the VRML subset that SolidWorks can parse? I have also been unable to get SolidWorks to export a vrml file that contains image textures so I could have an example of the syntax. Any suggestions to get that to work would also be helpful.


        • Unable to import VRML with image textures
          Neil Larsen
          So far as I know SW does not import/export textures in VRML at all.

          So far as I know only VRML97 supports textures in its spec but SW doesnt use/include the UV info or textures in its files.

          I dont think SW envisaged anyone reallly needing textures in or out for CAD so they neglected it. Probably the translators date to a time before Realview.

          I have to ask what it is you are trying to do that you want vrml and textures inside SW for anyway? triangulated meshes inside SW are not very useful...let alone textured ones

          Possibly Scan to 3d has some functionality to import textures?...3ds? obj?

          If you find out differently from my belief let us know

          BTW SW Labs are due to release a Collada exporter with colours and texture suppport soon - early December - perhaps also soon, import?
          probably wont be very heavy duty though...
          • Unable to import VRML with image textures
            Douglas MacKenzie
            Thanks. I was afraid of that. I used VRML because it is an open standard and we have experience using it. I'll have to move on to a different file format.

            We are generating a 3D model and overlaying photos on the surfaces to allow "walk through". Importing into SolidWorks allows generating measured drawings from the model.

            Do you know if SolidWorks can import a 3ds file with image textures? I see it is also an open file format.
              • Unable to import VRML with image textures
                Neil Larsen
                I see in the SW help notes it does actually say .vrml and .stl will import textures but, elsewhere, only in the Graphics Body option - but that texture capability if it is functional is news to me.
                I am pretty certain, as I said, exporting with textures is not available at all.
                I guess you need to ask your VAR to find out the official requirements for import -perhaps they need to be put in a sub folder called 'textures' or something and/or be jpeg only?? or who knows..
                Really it is not clear from the help notes how this is intended to work if it does.
                Possibly it should even get an SPR? or be revised in the help notes...

                According to the 09 help notes ScanTo3d will import .3ds, .obj and vrml with textures but in that case you actually nominate the texture directory in the import dialogue
                btw ScanTo 3d is only in SW Premium

                I think there maybe a 3rd party plugin available to import .3ds and .obj but I dont know about textures with it - probably not at a guess

                As an alternative approach how about reversing your work flow and making your model in SW for accurate easy drawings and exporting as dxf or even perhaps Collada via the new plugin to use in Sketchup Free for your viz/walkthrough?
                AFAIK .kmz files (Google Earth) are just zipped Collada format - although I am not sure which versions
                Sketchup handles textures/materials well I think and it will import dxf/dwg, and 3ds with textures + .skp for any other props you might need
                I think you can display dimensions in Sketchup
                Sketchup does bog down a bit with a large number of mesh faces but it does have the walkthrough/presentation capability you seek

                Really I think trying to get triangulated meshes esp with textures into SW and make drawings from it is an ungainly mission
                If texture import does work with Graphic Body I dont think you can use it in any way other really other than as a fairly slow 3d viewer - ie I dont think there is any way to make a drawing from the object

                HTH but possibly not

              • Re: Unable to import VRML with image textures
                Blandine Ganivet


                I know this subject is a little bit old but I am facing the same problem, I would like to import VRML with texture and I load the model but no texture. Finally did you found how to do?


                  • Re: Unable to import VRML with image textures
                    Patrick Girvin

                    According to the help file, you can only import textures if you import as a graphics body (no selectable or editable geometry).  You can't even reorient it.  I've tried this, and the image does not show up, although One of the images I used was a .png with a transparent alpha channel, and sure enough, that part shows up clear.  So, it must be reading the file, but perhaps there is a specific requirement for type of image.  Normally, SW has no problem reading .jpg's, .png's or .tif's. 

                    That's as far as I've gotten.