Yes the .obj format does support texturing. Google for the spec. I found a copy a year or two back on some russian site (don't think there now, but I'm sure there's others out there) Originally the .obj format was defined by 'wavefront', which might refine your search.
Note that you can define sets of texture coordinates for each polygon. These map into the texture specified in the material file. Thus you can map a texture onto several polygons, which is handy if you want to skin a model, but more work if you're writing your own renderer. If you are using OpenGL, then this maps fairly well onto OpenGLs texture coordinate system, although some tinkering will be required to get textures the right way round.
If you don't care about texture mapping, you could stick with one texture per polygon with an arbritary orgin. This works better for wall and floor texturing anyway, as you can set the origin position to achieve seamless texturing for all polygons in the same plane. You still get discontinuities at corners, but then you can't have everything.
Happy texturing
Alan
/Edit
Example: shamelessly ripped off from somewhere...
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
| # A 2 x 2 square mapped with a 1 x 1 square # texture stretched to fit the square exactly. mtllib master.mtl v 0.000000 2.000000 0.000000 v 0.000000 0.000000 0.000000 v 2.000000 0.000000 0.000000 v 2.000000 2.000000 0.000000 vt 0.000000 1.000000 0.000000 vt 0.000000 0.000000 0.000000 vt 1.000000 0.000000 0.000000 vt 1.000000 1.000000 0.000000 # 4 vertices usemtl wood # The first number is the point, # then the slash, # and the second is the texture point f 1/1 2/2 3/3 4/4 |
The vt commands (vertex texture) define texture coordinates on the texture surface. They are referenced by the number after the '/' in the f command (face).
/Edit2: Nuts I just realised that this is posted under Java3D. I haven't tried mapping .obj textures onto java3d.
In a vain attempt to redeem myself here is some stuff scrounged from the web...
The standard FileObject loader does understand texture coords.
http://www.vrupl.evl.uic.edu/oldsite/VRLabAcc/about_vrlab/java3d/lesson08/indexa.htmlThere is also an obj file loader demo in the java3d jdk, called objLoad.
Documentation for the demo:
http://java3d.j3d.org/utilities/loaders/obj/sun.html