View Single Post
  #6  
Old 10-19-2010, 01:30 PM
Dave Dave is offline
Member
 
Join Date: Jun 2007
Posts: 26
Hi - the model file (PenycloddiaTrial.obj) is in the Vizard Resources folder, along with the texture - see attached files showing virtual path for both. The Vizard script is in a subdirectory of the Vizard examples folder. On previous occasions this always seemed to work fine and it still does, with the exception of the executable.

The attached are for a much simplified version of the model with only one simple part of the whole model and one texture (Ground2) for which I am seeing the same problem.

If in this case I attach the texture with viz.addTexture within the script (as Dwaik suggested) then it does work ok but the model has many subcomponents and it would be a pain to add import them all and add the textures individually.

Because of this I thought it may be something in the way I am exporting the obj file from 3DsMax - though I haven't changed any settings and I cannot see why Vizard would see it in Step 1 of the Save to Executable but then lose the texture on step 2.

I am still sure that it is something really simple and obvious but at the moment I am just going slowly mad!!

Thanks for any help

The simplified script is:-

import viz

viz.go(viz.FULLSCREEN)

env = viz.add(viz.ENVIRONMENT_MAP,'sky.jpg')

sky = viz.add('skydome.dlc')
sky.texture(env)

Penycloddiau = viz.add('PenycloddiauTrial.obj')
Penycloddiau.scale(0.0018,0.0018,0.0018)
Penycloddiau.translate(50,450,0)
Penycloddiau.setAxisAngle( [0, 1, 0 , 23] )
Penycloddiau.appearance(viz.DECAL)
#Penycloddiau.add(fadeout)
#Penycloddiau.disable(viz.INTERSECTION)


view = viz.get(viz.MAIN_VIEWPOINT)
view.translate(50,500,-250)
Attached Thumbnails
Click image for larger version

Name:	Resources.JPG
Views:	1259
Size:	51.8 KB
ID:	394   Click image for larger version

Name:	Resources2.JPG
Views:	1256
Size:	51.9 KB
ID:	395  
Reply With Quote