PDA

View Full Version : Handling of .jpg files


Uttama_vizard
03-27-2009, 09:48 AM
Hello,

I am facing a typical problem in texturing using .jpg files.
As an example, I am first calling an area and then trying to add a texture so as to simulate a different situation.

import vizinfo #For info box
import viztask #For wait time
import vizmat #Matrix in v2.0
import vizact
import math
viz.go()
room = viz.add('panorama.ive')
#Add a texture.
sky = viz.addTexture( 'hall1.jpg' )
#Apply the texture to the object.
room.texture( sky )

Now, I am copying the picture and pasting it to paintbrush, where I am changing the pixel dimensions of the picture and saving it as a hall1.jpg file.

Then, when I am executing my vizard file, it seems to me that the picture is coming as pasted blocks (no matter how much I increase the pixel dimensions of my picture in paintbrush) and the edges formed by pasting of the blocks is making the picture look inappropriate.

If someone can suggest me a way of overcoming this problem, it would be really great.

Thanks

Uttama

Jeff
03-31-2009, 10:17 AM
Can you post the .jpg you are using?

Gladsomebeast
04-01-2009, 09:22 PM
Yeah, pictures and screenshots would help us diagnose whats wrong.

Just a guess, but it sounds like panorama.ive has some interesting texture coordinates. What does your .jpg look like when you put it on a boring old tex quad? If you are not familar with texture coordinates, check out the "Tutorial: Applying Textures."

Uttama_vizard
04-03-2009, 11:29 AM
Hello,

Surely. Yes, I am using panorama.ive. Then, I downloaded a hall.jpg and trying to add as a texture to it.

I am using the following code:
import vizinfo #For info box
import viztask #For wait time
import vizmat #Matrix in v2.0
import vizact
import math

viz.go()

#Add an object.
room = viz.add('panorama.ive')

#Add a texture.
sky = viz.addTexture( 'hall.jpg' )

#Apply the texture to the object.
room.texture( sky )

On running these lines of code, what I am getting is that there are as if two halls (seems like the picture has been split). I tried to edit its pixels in paintbrush, but, it does not work out.

I am enclosing the hall.jpg file.

Thanks for your time.

Uttama

Jeff
04-06-2009, 04:20 PM
I don't quite understand what you are trying to accomplish. Do you want this one image to wrap around the whole model or are you trying to eliminate the seams?

Uttama_vizard
04-07-2009, 01:06 PM
Hello,

I am trying to wrap the jpeg onto the panorama.ive and at the same time remove the seams.

In fact, what I want is, to obtain a different social scenario. But, when the picture has seams, it does not look proper.

Are the seams due to jpeg pixel size (of the original picture)? Suggestions would be really helpful. Is it possible to overcome this problem using vizard?


Thanks

Uttams

Jeff
04-10-2009, 02:37 PM
If you want to create your own panorama, instead of using the panorama.ive model and applying a texture to it take a look at the Vizard tutorial: 360 panoramas. You need to create an environment map made of six images and apply this map as a texture to a dome created with Vizard's built in skydome plug-in.