Page 1 of 1

Q3ToReflex .map converter - Texture Orientation

Posted: Mon Dec 15, 2014 9:02 pm
by AEon
Darkcaulk texture placed in GTKradiant 1.6.4, texture lock off, no rotation, no scale, no offset, so textures are default placed:
radiant164 2014-12-15 21-20-04-10.jpg
radiant164 2014-12-15 21-20-25-73.jpg
And how the textures end up in Reflex's editor after converting the file by using Q3ToReflex r10:
reflex 2014-12-15 21-34-27-30.jpg
reflex 2014-12-15 21-35-12-47.jpg
As can be seen several faces are differently orientated. As I read the conversion code still needs to work on the texture orientation.

Added both .map files, just in case:
ae_texture_map_q3a_r10_reflex.zip
Hope that helps to track down what needs to be done. Thanks.

Re: Q3ToReflex .map converter - Texture Orientation

Posted: Tue Dec 16, 2014 10:14 pm
by Shrinker
The projective math can be hard to grasp and is very frustrating to fiddle around with. I think Radiant basically has a mapping function of normal to texture orientation spanning vectors that is fixed, whereas the HL2 .vmf format defines the spanning vectors independently, allowing for easy planar projection of textures on slopes and stuff.

Now if we could predict the spanning vectors in Radiant and in Reflex, it should be possible to transform the parameters with some fancy matrix math.
And now, if nobody is able to improve the conversion tool, it should even be possible to add an additional transformation between Radiant and the converter so that the end result is much closer to Radiant.

On the other hand, it's also possible that Reflex uses its own function for mapping normals to spanning vectors that can't be changed... At worst, both in Radiant and in Reflex, you have no control about how the two spanning vectors per face relate to each other, so we could end up with a situation where a texture would have to be skewed or something similar done to it in the target platform, and the target platform doesn't support that kind of transformation.

I've seen some good pictures about these texture mapping issues today here: http://www.cryengine.com/community/view ... p?p=819235 - starting at "4.3."

Re: Q3ToReflex .map converter - Texture Orientation

Posted: Tue Dec 16, 2014 10:24 pm
by AEon
I added this thread since to try to help the programmer of

Q3 .map -> Reflex .map converter

over at the Reflex forum track down what is happening between GTKradiant, his converter, and what Reflex makes of it. I have no web site any longer, so I am using the image upload feature of this forum.