Need UV Atlas help

I'm very interested in learning how to use the new UVAtlas class on the most basic level. The DX documentation talks about all the steps of usage on an abstract level, but I need an explicit step-by-step example (I am very dense).

Can anyone help out? Any examples would be appreciated. But specifically I'm looking to do something as simple as taking the "tiny.x" sample and generating a new UVAtlas for it.

Thanks much!

[428 byte] By [Skyser] at [2008-2-23]
# 1
Okay, here I am responding to my own post, but this is a bit more clarification...

I'm a managed DX junkie so, ideally, any examples would be in C#. Although _any_ working code samples would be welcome. Especially around the

IntegratedMetricTensor

class because I have absolutely no idea what is going on here.

Anybody have a clue? Dave? Tom? ... Bueller? =)

Thanks,

--Skyser

Skyser at 2007-9-9 > top of Msdn Tech,Game Technologies: DirectX, XNA, XACT, etc.,Game Technologies: Graphics...
# 2
Skyser wrote:
I'm a managed DX junkie so, ideally, any examples would be in C#. Although _any_ working code samples would be welcome. Especially around the IntegratedMetricTensor class because I have absolutely no idea what is going on here.

Try reading the C++ documentation. There's a section there called "Using UVAtlas" that doesn't seem to be in the Managed documentation. It seems to have a good explaination of what's going on with Integrated Metric Tensors.

RossRidge at 2007-9-9 > top of Msdn Tech,Game Technologies: DirectX, XNA, XACT, etc.,Game Technologies: Graphics...
# 3
Thanks Ross, but I've read all the dox and also scoured the web for samples. I have yet to find any working code.

Has anybody successfully used this class?

Skyser at 2007-9-9 > top of Msdn Tech,Game Technologies: DirectX, XNA, XACT, etc.,Game Technologies: Graphics...
# 4
Skyser wrote:
Thanks Ross, but I've read all the dox and also scoured the web for samples. I have yet to find any working code.

Has anybody successfully used this class?


The UV Atlas stuff is pretty new, I don't know if anyone has seriously tried using it in managed code. It's still seems to in state of flux and it does have some issues, but there are people are using it in C++. You might try playing around with the uvatlas command line tool in the SDK and see if that gives you any insight on how things are supposed to work. If you have any specific problems with using UV Atlas in managed code, if you've tried using it and it's not working the way you expect it to, you should post them here and maybe someone can help you out.
RossRidge at 2007-9-9 > top of Msdn Tech,Game Technologies: DirectX, XNA, XACT, etc.,Game Technologies: Graphics...
# 5
okay, i've been messing with the uvatlas C++ command-line tool.
i understand that it generates a new mesh with optimal UV mappings, but is it possible to have it output a texture map that corresponds to those settings?
the closest i've been able to come is to have the tool use the /t option and output an .x file that has unwrapped the mesh onto a single plane.
_anybody_ who has messed with this please let me know so I don't feel sooooooooo all alone. WAAAAAAAAAH!!!!!
--s
Skyser at 2007-9-9 > top of Msdn Tech,Game Technologies: DirectX, XNA, XACT, etc.,Game Technologies: Graphics...
# 6
_anybody_ who has messed with this please let me know so I don't feel sooooooooo all alone. WAAAAAAAAAH!!!!!

I can't help as such right now... but, time permitting this week, I'm planning on having a look at getting it to work.

If I have enough time to get something useful working I'll probably post it in my developer journal if you're interested Smile

hth
Jack

JHoxley at 2007-9-9 > top of Msdn Tech,Game Technologies: DirectX, XNA, XACT, etc.,Game Technologies: Graphics...
# 7

What exactly are you asking for? Do you want a texture map output with the mesh drawn on a texture? Are you asking for it to combine existing textures on the object into one texture?

Regards,
Dave

DaveAronson at 2007-9-9 > top of Msdn Tech,Game Technologies: DirectX, XNA, XACT, etc.,Game Technologies: Graphics...
# 8
Skyser wrote:
i understand that it generates a new mesh with optimal UV mappings, but is it possible to have it output a texture map that corresponds to those settings?

Hmm... no, it doesn't look like the uvatlas command line tool can do that. You can however generate an appropriate texture in your own code by using the TextureGutterHelper.ResampleTexture method.
RossRidge at 2007-9-9 > top of Msdn Tech,Game Technologies: DirectX, XNA, XACT, etc.,Game Technologies: Graphics...
# 9
"Do you want a texture map output with the mesh drawn on a texture?"
Yes, precisely. I would like to be able to output a texture template that I could draw on in Photoshop.
Skyser at 2007-9-9 > top of Msdn Tech,Game Technologies: DirectX, XNA, XACT, etc.,Game Technologies: Graphics...
# 10
Thanks, Ross. I'll see what kind of trouble I can get into with that...
Skyser at 2007-9-9 > top of Msdn Tech,Game Technologies: DirectX, XNA, XACT, etc.,Game Technologies: Graphics...