WorldViz User Forum  

Go Back   WorldViz User Forum > Vizard

Reply
 
Thread Tools Rate Thread Display Modes
  #1  
Old 09-08-2012, 06:14 AM
mhead10 mhead10 is offline
Member
 
Join Date: Mar 2012
Posts: 40
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!
Reply With Quote
  #2  
Old 09-10-2012, 04:59 PM
Jeff Jeff is offline
WorldViz Team Member
 
Join Date: Aug 2008
Posts: 2,471
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?
Reply With Quote
  #3  
Old 09-11-2012, 06:10 AM
mhead10 mhead10 is offline
Member
 
Join Date: Mar 2012
Posts: 40
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!
Reply With Quote
  #4  
Old 09-11-2012, 11:05 AM
Jeff Jeff is offline
WorldViz Team Member
 
Join Date: Aug 2008
Posts: 2,471
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.
Reply With Quote
  #5  
Old 09-11-2012, 12:13 PM
mhead10 mhead10 is offline
Member
 
Join Date: Mar 2012
Posts: 40
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
Reply With Quote
  #6  
Old 09-27-2012, 04:22 AM
mhead10 mhead10 is offline
Member
 
Join Date: Mar 2012
Posts: 40
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 <ENTER>. 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.
Reply With Quote
Reply

Tags
dae, obj, sldprt, solidworks

Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Vizard and OBJ Material Files shivanangel Vizard 3 10-04-2013 06:11 AM
Realistic Glass Material EnvisMJ Vizard 1 10-21-2011 06:32 PM
How to convert VRay material into Vizard? hengshan.li Vizard 4 01-18-2011 09:14 AM
Cal3d material problem fracture Vizard 0 09-10-2009 01:58 AM
Unable to get material onto 3d Max avatar VDong Vizard 1 03-10-2009 11:45 AM


All times are GMT -7. The time now is 03:04 PM.


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