Argh! Mesh texturing 'mare!

Blitz3D Forums/Blitz3D Programming/Argh! Mesh texturing 'mare!

Shifty Geezer(Posted 2005) [#1]
This problem is driving me potty, and can someone please help! This a modelling/texturing problem, not coding.

I have a cylinder .3ds mesh and texture, created in RealSoft3D. This is a raytracer and though it's raytracing and modelling functions are pretty great, it's support for realtime apps is pretty poor.

The cylinder can be thought of as a rectangle rolled into a tube, with two separate caps. Where the edges of the rolled rectangle meet, Blitz uses the wrong UV coords and a 'seam' appears of the whole texture compressed into one triangle.

I have spent MONTHS on and off trying to solve this issue with getting .3ds objects out of RealSoft3D and into Blitz without this bizarre UV mess. If I load the .3ds object back into RS, it renders the texture properly. I don't know if RS is exporting wrong, or Blitz is importing wrong, or what. I do know that RS outputs the texture upside-down, easily fixed in a paint package.

I've also tried about a zillion different ways of modelling a cylinder, but every way this UV compression occurs along one edge.

Could someone with the relevant skills and knowhow please take a look at the following...

http://www.davidcoombes.f2s.com/please_fix_me.zip

It's a zip with .3ds mesh, texture .png, and .jpg of the problem when rendered in Blitz. Opening the .3ds in a differnt application (say Milkshape) does the problem exist? Is it a fault with the .3ds output of RS?

All help and advice much appreciated!


VIP3R(Posted 2005) [#2]
Just tried it in Wings3D, your UV mapping is wrong...

There are 12 quads on the side of the cylinder but only 11 quads are showing on the UV map.

Hence one quad has a compressed/deformed UV mapping.


Shifty Geezer(Posted 2005) [#3]
Thanks. Looks like an export problem then.


jfk EO-11110(Posted 2005) [#4]
Maybe better download Lithunwrap 1.3 and outsource UV mapping entirely. (at least that's what I did). Tho - you still need to weld Lithy-exported .3ds with some app.


Tom(Posted 2005) [#5]
The UVs are there for the problem quad but they're easy to miss if you don't look carefully :)



If you move the UVs along as I've done it fixes the problem.



The reason for this lies with how your 3D program creates the UVs, I'm guessing you or the program used a Cylindrical projection when creating the UVs? Sometimes their algorithms don't know how to handle 'seams', that is, the main body of your cylinder shares the vertices at that seam, but to have 'discontinuous' UVs, vertices need to be unwelded else there's no where to store the extra UV info.

Hope I didn't lose you there :) It's not an easy concept to grasp (took me a while)

Feel free to ask any questions if you get stuck.

Oops, forgot this: http://www.tomspeed.com/cylinder.x
couldn't export to .3ds, LW complained about texture filename lengths, but hopefully if you understand what's happening above you'll be able to remedy it yourself within your 3D program.

Cya
Tom