WorldViz User Forum  

Go Back   WorldViz User Forum > Vizard

Reply
 
Thread Tools Rate Thread Display Modes
  #1  
Old 10-13-2010, 10:28 AM
Dave Dave is offline
Member
 
Join Date: Jun 2007
Posts: 26
Missing textures in an executable

Hi – I am having a problem with missing textures for one model amongst many when a routine is published as an executable (and only then). The model loaded is a 10Mb obj file (there are other obj models in the scene as well as 3ds ones) with 11 different textures (jpeg, bmp and dds).

When the model is run in Vizard it is fine. When published as an exec the model again looks fine after hitting the run key. When escape is hit and the file lists appear all of the 11 relevant textures appear in the list and it says that the executable has saved successfully. However, when the executable is run this particular model in the scene has no textures at all and just appears grey.

I don’t think it can be anything to do just with the textures – they are all there in the publish list and indeed some are used in other models that show ok.

Any thoughts would be very much appreciated as I hope to demonstrate the executable on Friday!!

Thanks
Dave
Reply With Quote
  #2  
Old 10-17-2010, 12:37 AM
dwaik dwaik is offline
Member
 
Join Date: Feb 2010
Posts: 26
Exclamation

when publishing exe, vizard only gather the assests loaded at the beginning of the the application, other dynamically loaded (ex on event x viz.add(y)) you must specify them by adding them while publishing, drag the textures and drop them into the list which appears at step 2 of publishing
hope that helps
Reply With Quote
  #3  
Old 10-17-2010, 03:31 PM
Dave Dave is offline
Member
 
Join Date: Jun 2007
Posts: 26
Thanks Dwaik but..

Hi Dwaik - thanks for that but that isn't the problem I'm afraid. The textures are loaded at the beginning with the model - as I said they do appear in the assets list at step 2 and they do appear in the runtime visualisation. This is what confuses me - the textures do seem to be there but just not making it into the executable. I have even tried dragging the textures in again at step 2as you suggest but no joy!

Additionally - the textures for the model used to load fine and all was great. I then made a few small alterations to the model (in 3Ds Max) and re-exported and lo and behold the problem started.

I am just going to start running through exporting bits of the model at a time but hoped that someone may have come across something similar before. My betting is that it is something else simple that I have overlooked.

Cheers

Dave
Reply With Quote
  #4  
Old 10-18-2010, 01:35 AM
dwaik dwaik is offline
Member
 
Join Date: Feb 2010
Posts: 26
are your textures included with the model?
maybe it reads the texture from a reference, try to export without a texture and apply it into vizard, unfortunately i dont use 3ds max here, i use the way above with obj files from maya and for 3Ds format i use "deep exploration"
Reply With Quote
  #5  
Old 10-18-2010, 08:59 AM
farshizzo farshizzo is offline
WorldViz Team Member
 
Join Date: Mar 2003
Posts: 2,849
Is the model file in the same directory as the Vizard script?

Can you post the Virtual Path of the model and texture files that appear in the asset list?
Reply With Quote
  #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:	1219
Size:	51.8 KB
ID:	394   Click image for larger version

Name:	Resources2.JPG
Views:	1219
Size:	51.9 KB
ID:	395  
Reply With Quote
  #7  
Old 10-21-2010, 01:54 AM
dwaik dwaik is offline
Member
 
Join Date: Feb 2010
Posts: 26
Lightbulb hi

if your textures are embedded within the obj, the obj keeps a link on texture, i had that problem before, and i fixed it by apply textures in vizard if the number of texture is not huge or by exporting the model into 3Ds format
hope that helps
Reply With Quote
  #8  
Old 10-22-2010, 07:59 AM
Dave Dave is offline
Member
 
Join Date: Jun 2007
Posts: 26
Hi dwaik - thanks - yes, your method does work but there are a lot of models and trextures - the model has too many fces to save as a 3ds file. Also, the whole model is resized and translated in Vizard. If I input all of the parts of the large model as individual small models so that I can apply the textures within Vizard the centre of each model will be different to that of the overall model and I will need to re-calculate all of the translations! I did hope that I may be able to apply the textures to the model children, but the obj file doesn't appear to have any children.

Unless anyone comes up with a possible fix I think I am either going to have to use the method you suggested (and re-calculate the transformations of each model) or try and reduce the face count to save it as a 3ds.

Many thanks
Reply With Quote
Reply

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
Textures not loading properly and offset window TarkaDahl Vizard 2 05-18-2010 01:54 PM
Textures Scrambled lionfish Vizard 3 02-26-2010 01:42 AM
.osg/.ive import - missing geometry & some textures jde Vizard 3 09-04-2009 03:18 PM
Multiple Textures for Diffuse and Specularity Shader Issue shivanangel Vizard 1 05-11-2009 10:44 AM
Max -> Vizard, Two Sided Textures shivanangel Vizard 5 12-04-2008 03:15 AM


All times are GMT -7. The time now is 10:13 AM.


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