WorldViz User Forum

WorldViz User Forum (https://forum.worldviz.com/index.php)
-   Vizard (https://forum.worldviz.com/forumdisplay.php?f=17)
-   -   Obj unable to find material ' ' (https://forum.worldviz.com/showthread.php?t=4345)

mhead10 09-08-2012 06:14 AM

Obj unable to find material ' '
 
Hello,

I can't see to load my .obj model, and I know it worked previously in Vizard 3.0. I'm sure it's something silly and easily fixable.

The python file and .obj file are in the same folder, so I'm not sure why the .obj file cannot be found.

My troubleshooting code is quite simple:

Code:

import viz
viz.go()

temp = viz.add('temp_1.obj')

Thanks in advance!

Jeff 09-10-2012 04:59 PM

What's the error message you are getting in Vizard? Can you attach the model to this thread or upload here for us to look at?

mhead10 09-11-2012 06:10 AM

Jeff,

I receive the following error message when loading my temp_1.obj file with:
Code:

marker = viz.add('temp_1.obj')
Loading File: temp_1.obj
Obj unable to find material ''


Unfortunately the file will not attach here, but my uploaded reference code is 864102.

Thanks for your help!

Jeff 09-11-2012 11:05 AM

The file loads and the geometry is there. The problem is that the scale is off and you don't see it. Try running the following:
Code:

import viz
viz.go()

viz.add('temp_1.obj',pos=[0,2,2],euler=[0,-90,0],scale=[0.01,0.01,0.01])

The error message indicates there are no associated material files found.

mhead10 09-11-2012 12:13 PM

I've actually gotten the temp_1.obj file to load, from my code and yours, and I can see it, but I continue to get the same error (aka- it still says:

Loading File: temp_1.obj
Obj unable to find material '').

Even though everything appears to be okay, I would still like to get rid of this glaring red error.

In response to your "The error message indicates there are no associated material files found." comment, is this just something that should have been included when the .obj was saved? I'm unclear exactly what association is missing.

Thanks

mhead10 09-27-2012 04:22 AM

Sometimes my .obj and .wrl files would load, and sometimes they would not. Therefore, to always get my 3d files to load (with their respective texture), I did the following to yield successful results:

http://www.javelin-tech.com/blog/201...w-to-sketchup/

.obj load correctly if they come from Google Sketchup (and not Solidworks directly)

1. Thus, save ACIS (.sat) in Solidworks
2. Next, download draftsight
3. In DraftSight’s command line type: “IMPORTSAT” and press . Locate the ACIS file you saved at step #1 and import it in DraftSight.
4. Save this file again in DWG format.
5. Open SketchUp
6. Import the DWG file you saved at STEP #4.
7. Save sketchup model as .dae
8. import into vizard using:
viz.add('name.dae',pos=[x,y,z],euler=[0,0,0],scale=[1,1,1])


Hopefully this will be helpful to others who do not have Blender.


All times are GMT -7. The time now is 07:05 AM.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2019, vBulletin Solutions, Inc.
Copyright 2002-2018 WorldViz LLC