WorldViz User Forum  

Go Back   WorldViz User Forum > Vizard

Reply
 
Thread Tools Rating: Thread Rating: 12 votes, 5.00 average. Display Modes
  #1  
Old 04-17-2013, 08:26 AM
cgsong58 cgsong58 is offline
Member
 
Join Date: Apr 2013
Posts: 7
How to load *.jpgx file? (not jpg)

I have download the following pdf file and resouces:
"Vizard Teacher in a Book and Vizard free art resources"
It is very interesting for me to follow the example in Vizard Teacher in a Book.
Some examples require the image with jpg file format.
But I found that some provided images at free resource are jpgx file format (not jpg file format) so that I could not run some examples.

Please let me know how to load jpgx file format or how to convert jpgx format to jpg format.
Reply With Quote
  #2  
Old 04-18-2013, 10:05 AM
Jeff Jeff is offline
WorldViz Team Member
 
Join Date: Aug 2008
Posts: 2,455
Which examples did you have trouble running? Vizard should be able to load the .jpgx files included with Teacher in a Book. Those files can be referenced without the 'x' added to the extension in the script.
Reply With Quote
  #3  
Old 04-21-2013, 09:34 PM
cgsong58 cgsong58 is offline
Member
 
Join Date: Apr 2013
Posts: 7
I think I have refer to files in correctly.

Quote:
Originally Posted by Jeff View Post
Which examples did you have trouble running? Vizard should be able to load the .jpgx files included with Teacher in a Book. Those files can be referenced without the 'x' added to the extension in the script.
Balloon example (p19)
Even though I hace used 'art/balloon.IVEx'
I have the following error message:

Traceback (most recent call last):
File "<string>", line 11, in <module>
File "C:\WorldViz\Vizard1.py", line 10, in <module>
balloon = viz.add( 'art/balloon.IVEx' )
File "C:\Program Files (x86)\WorldViz\Vizard4\python\viz.py", line 9407, in add
raise ValueError, 'Unrecognized file extension: '+fileType
ValueError: Unrecognized file extension: IVEX
** Load Time: 0.08 seconds
Reply With Quote
  #4  
Old 04-22-2013, 01:20 PM
Jeff Jeff is offline
WorldViz Team Member
 
Join Date: Aug 2008
Posts: 2,455
Although the model has a .ivex extension, load the model without the x in the script:
Code:
balloon = viz.add( 'art/balloon.ive' )
Reply With Quote
  #5  
Old 04-22-2013, 06:39 PM
cgsong58 cgsong58 is offline
Member
 
Join Date: Apr 2013
Posts: 7
Yes. Thanks, Jeff.
Reply With Quote
  #6  
Old 04-22-2013, 06:57 PM
cgsong58 cgsong58 is offline
Member
 
Join Date: Apr 2013
Posts: 7
Problem in loading *.jpgx file in art folder

Quote:
Originally Posted by Jeff View Post
Which examples did you have trouble running? Vizard should be able to load the .jpgx files included with Teacher in a Book. Those files can be referenced without the 'x' added to the extension in the script.
Jeff,

I have run the texture example demo ("texture coordinates demo.py) but I couldn't have correct images, foliage.jpg, and pine needles.jpg.
My code is as follows:

import viz
viz.go()
viz.clearcolor([.3,.3,.3])
viz.mouse( viz.OFF )
viz.MainView.setPosition(0,0,-1.5)

#Add the texture quad and the texture to put on it.
quad = viz.addTexQuad()
textures = []
files = ['foliage.jpg','pine needles.jpg' ]
for i in range(len(files)):
texture = viz.addTexture( 'art/' + files[i] )
texture.wrap( viz.WRAP_S, viz.CLAMP_TO_EDGE )
texture.wrap( viz.WRAP_T, viz.CLAMP_TO_EDGE )
quad.texture( texture, '', i )
textures.append( texture )

#.... I have cut at this point
Reply With Quote
  #7  
Old 04-22-2013, 07:52 PM
cgsong58 cgsong58 is offline
Member
 
Join Date: Apr 2013
Posts: 7
How to fix the error in link demo in Teacher in a book

I found that the link does make an error the following:

Traceback (most recent call last):
File "<string>", line 11, in <module>
File "C:\WorldViz\teacher in a book demos and examples\teacher in a book code snippets (R4)\p44_example.py", line 46
head_bone = male.getBone( 'Bip01 Head' )
^
SyntaxError: invalid syntax

I know that viz.eyeheight(0) makes an error also.
My code in page 46 in Teacher in a Book is as follows:

#Link the view to the male's head.
head_bone = male.getBone( 'Bip01 Head' )
view_link = viz.link( head_bone, viz.MainView )
#Set the eyeheight at 0 (so the default
#eyeheight is not added to the data).
viz.eyeheight( 0 )
Reply With Quote
  #8  
Old 04-22-2013, 08:36 PM
cgsong58 cgsong58 is offline
Member
 
Join Date: Apr 2013
Posts: 7
I fixed the error.

Just before, I have fixed error.
Due to missing the right parenthesis in the previous statement.
Thanks.
Reply With Quote
  #9  
Old 04-30-2013, 10:33 PM
cgsong58 cgsong58 is offline
Member
 
Join Date: Apr 2013
Posts: 7
Fail to load 'art/balloon.ive' files.

Quote:
Originally Posted by Jeff View Post
Although the model has a .ivex extension, load the model without the x in the script:
Code:
balloon = viz.add( 'art/balloon.ive' )
Jeff,

I have run two WorldViz 4.0 (32bit version) on two PC with the same Windows 7. I have tested the same demo programs in page 19 in Vizard Teacher in a Book with two PCs.
But one of PC failed to load 'art/balloon.ivx' file but the other has no problem in loading files. Please let me know why this happen.

The code is as follows:

import viz
viz.go()

#Add an empty array for the balloons.
balloons = []

#Use a loop to add 3 balloons to the world.
for i in [-1,0,1]:
#Add a model.
balloon = viz.add( 'art/balloon.IVE' )
#Set the position of the balloon.
balloon.setPosition( i, 1.8, 3 )
#Append the balloon to our array.
balloons.append( balloon )

#Change each balloon's color.
balloons[ 0 ].color( viz.GREEN )
balloons[ 1 ].color( viz.RED )
balloons[ 2 ].color( viz.BLUE )

... I have cut at this point

I have the following error messages:

************************************************** ****************************
** Loading p18.py
************************************************** ****************************
Loading File: art/balloon.IVE
** ERROR: Failed to load model: 'art/balloon.IVE'
Loading File: art/balloon.IVE
** ERROR: Failed to load model: 'art/balloon.IVE'
Loading File: art/balloon.IVE
** ERROR: Failed to load model: 'art/balloon.IVE'
** Load Time: 0.21 seconds
Reply With Quote
  #10  
Old 05-02-2013, 09:54 AM
Jeff Jeff is offline
WorldViz Team Member
 
Join Date: Aug 2008
Posts: 2,455
Perhaps the file is missing or the script is not saved in the same folder so the relative path to the file is incorrect.
Reply With Quote
  #11  
Old 10-14-2014, 03:29 PM
amahmud amahmud is offline
Member
 
Join Date: Oct 2014
Posts: 1
I also have the similar problem with executing the texture example demo ("texture coordinates demo.py), it loads the program but shows nothing because of that .jpgx extension, what could be the solution in this case?
Reply With Quote
  #12  
Old 10-14-2014, 05:43 PM
Jeff Jeff is offline
WorldViz Team Member
 
Join Date: Aug 2008
Posts: 2,455
You won't be able to open those files in an image editor but Vizard should be able to display them. Are you getting error messages when you run the script?
Reply With Quote
  #13  
Old 10-16-2014, 12:52 PM
Rusol Ali Rusol Ali is offline
Member
 
Join Date: Oct 2014
Posts: 1
http://forum.worldviz.com/

when i tried to insert gif photo that have animation,the photo already inserted but

there is no any motion
is this right method to add animation photo?
is there any method to insert animation photo?please help me urgently.
Reply With Quote
  #14  
Old 10-16-2014, 05:42 PM
Jeff Jeff is offline
WorldViz Team Member
 
Join Date: Aug 2008
Posts: 2,455
You could try converting the GIF file to a standard video format and then apply that as a video texture in Vizard.
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
Help with File Reading/Writing Lynnifer Vizard 2 03-12-2012 06:51 AM
Closing of an imported .py file Uttama_vizard Vizard 2 05-04-2010 06:18 AM
IVEx file extenstion unrecognised. sindi Vizard 2 12-10-2009 01:20 AM
Read file....many issues Uttama_vizard Vizard 9 07-08-2008 02:16 PM
File Management Uttama_vizard Vizard 2 07-01-2008 09:44 AM


All times are GMT -7. The time now is 07:17 PM.


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