Wrapping a texture around an object ?

Have jReality programming problems or questions? Post them here.
Post Reply
tiofredo
Posts: 40
Joined: Mon 2. May 2011, 15:04

Wrapping a texture around an object ?

Post by tiofredo » Mon 4. Jul 2011, 09:53

Hey guys.
Lots of progress have been made!
I'm stuck with applying textures to objects I'm loading from obj files.
We had some students building the objects, providing obj and mtl files, and also providing png files for textures.
I've loaded the files, rescaled the geometry by a 2.5 factor (students, grrrr), and applied the texture.
Didn't look good. I cropped the png file as I noticed it had large useless blank parts, but it's still not quite right.
Ergo,
is it possible to apply an unfolded texture to a 3D object in order to have it wrapped around the object,
or is it a foolish attempt ?
Thanks for the help guys!

PS:
I can provide obj, mtl and png if needed

Andre
Posts: 226
Joined: Fri 18. Sep 2009, 11:30

Re: Wrapping a texture around an object ?

Post by Andre » Tue 5. Jul 2011, 13:40

Hi tiofredo,

I don't know much about texture. All I know is, that your geometry object has to be "open" to be able to put a texture on it. In jReality it is not possible to put texture on a closed surface. For Example imagine a torus if the torus is closed (starting points = end points), then you are not able to put a texture on it, but if you cut into the torus (eg end points are copies of starting points (2 points at the same position)), then you are able.

I hope that helps you a bit.

User avatar
gunn
Posts: 323
Joined: Thu 14. Dec 2006, 09:56
Location: TU Berlin
Contact:

Re: Wrapping a texture around an object ?

Post by gunn » Thu 7. Jul 2011, 13:17

It's not strictly true that jReality doesn't support texturing on closed surfaces. Check out this tutorial:

http://www3.math.tu-berlin.de/jreality/ ... _a_factory

I haven't myself used the method described in this tutorial, but I know it was designed to deal with the problem you appear to be confronting.
jReality core developer

Post Reply