Inside Sabertooth
Learn how Sabertooth uses 3ds Max to create 3D interactive projects, including HBO Go’s Game of Thrones interactive experience
  • 1/3
You are here: Forum Home / Autodesk 3ds® Max® / SDK / Problem with 3DXI Export UV
  RSS 2.0 ATOM  

Problem with 3DXI Export UV
Rate this thread
 
34341
 
Permlink of this thread  
avatar
  • marzoner
  • Posted: 11 September 2009 01:21 PM
  • Total Posts: 8
  • Joined: 11 September 2009 07:30 PM

I want to export uv info from a model.I added only one texture in diffuse color map in my model.
set uv in channel 1.

my code like this:

/////////////////////for block,loop by face index i,and face coner y/////
 
int Texindex gM->GetFaceTextureVertex(i,y)
 
//if(false == gM->GetMapVertex(1,Texindex,tempuv))
 
if(false == gM->GetTexVertex (Texindex,tempuv))
 {
 char str[256]
;
 
sprintf(str,"The node %s UV %d failed!!",nodname,i)
 MessageBox(GetActiveWindow()
,str"MyExp"MB_OK)
 }
 texV[i
*3+y].tempuv.x;
 
texV[i*3+y].tempuv.y;
/////////////////////////end for/////////////////////////////////////
/////////////////another for block,loop as preceding////////////////////
        
fc3d[i].tvertindex[j]=static_cast<WORD>(i*3+j)
/////////////////end for////////////////////////////////////////////////

But it just give me the wrong answer.
Any one knows why?
Thanks for you attention.



Attachment Attachment
Attachment Attachment
Attachment Attachment
Replies: 1
/img/forum/dark/default_avatar.png

And I also tried this:

//Build UV array
for(i 0;i<IGmesh->GetNumberOfTexVerts()i++)
MyuvArray[i] 
GetTexVertex(i)
//Access by FaceEx.texCoord
MyfaceArray[FcInd].UV[conerindex] curr_FaceEx.texCoord[conerindex];

but get the same result.just the same as above(The picture of dirty one).

Author: marzoner

Replied: 11 September 2009 01:37 PM  
avatar
  • marzoner
  • Posted: 11 September 2009 02:28 PM

okay,still can’t add 1188KB attachment.



Replies: 0
avatar
  • Location: West Midlands, England, UK
  • Total Posts: 14447
  • Joined: 06 August 2007 11:06 PM
  • Permlink of this post

Make sure the file is zipped (not .rar or .7z or any other alternative). Attach - Submit - do NOT preview.



Max 4.2 through 2013.
XP-64 (SP2)
NVidia 9800GTX-512 (Driver 266.58).
Core 2 Quad Q6600 2.4GHz, 8Gb Ram, DX9.0c.

Replies: 0
avatar
  • marzoner
  • Posted: 12 September 2009 08:30 PM

Steve_Curley 12 September 2009 05:24 AM

Make sure the file is zipped (not .rar or .7z or any other alternative). Attach - Submit - do NOT preview.

try again.



Replies: 1
/img/forum/dark/default_avatar.png

File size? 3.5MB limit per post.

Different browser? Had one or two people using Safari unable to attach anything - try Firefox, works fine for me.

Worst case - upload it elsewhere (YouSendIt or similar) and post a link, though this is not the preferred method and should be considered a “last resort”.

Author: Steve_Curley

Replied: 12 September 2009 10:38 PM  
avatar
  • marzoner
  • Posted: 13 September 2009 03:33 AM

Thank you.
It just 1188KB rar file.

Now ,I found the causation of this issue(the uv problem).
It because,in MAX ,the model’s UV origin in left-bottom corner.
In my GameEditor(use d3d9),it’s UV origin is in Left-Top corner.

Is there Any function in sdk Could test the UV origin states?Or set it in max?



Replies: 0
avatar
  • Location: West Midlands, England, UK
  • Total Posts: 14447
  • Joined: 06 August 2007 11:06 PM
  • Permlink of this post

Steve_Curley 12 September 2009 05:24 AM

Make sure the file is zipped (not .rar or .7z or any other alternative).

marzoner 13 September 2009 10:33 AM

It just 1188KB rar file.

Helps if you actually READ the replies. This site does not accept .rar attachments. You MUST zip it.

I can’t help directly with SDK issues - sorry. Normally a lot more folks here during the week (weekends a very quiet) - you’ll hopefully get some replies then.



Max 4.2 through 2013.
XP-64 (SP2)
NVidia 9800GTX-512 (Driver 266.58).
Core 2 Quad Q6600 2.4GHz, 8Gb Ram, DX9.0c.

Replies: 1
/img/forum/dark/default_avatar.png

Oh, It’s my fault,I miss the word ‘not’.......haha.

I think, This UV problem should not be SDK’s fault.I just wonder if there are any method in sdk could let me know which UV-coordinate being used.

Author: marzoner

Replied: 13 September 2009 05:00 PM  
avatar

Okay, I don’t really know this section of the SDK, but have you tried using 0 as your channel? I would assume that what is listed as channel 1 in the UI would be programmatically accessible as channel 0, due to convention. If this doesn’t work, I can’t help further, sorry.



Christopher Diggins, M&E SDK Specialist
For 3ds Max SDK questions also check out http://stackoverflow.com/questions/tagged/3dsmax

Replies: 1
/img/forum/dark/default_avatar.png

He’s already fixed the problem—the UV coordinate system is different in Max to DirectX. The mapping channel was correct.

marzoner, there need not be a ‘method’ in the SDK to tell you this, as it’s not state that changes, but rather a convention. This is something that is (or should be) in the docs.

Author: scorpion007

Replied: 15 September 2009 02:08 PM  
avatar
  • marzoner
  • Posted: 02 October 2009 08:23 PM

Thanks.  scorpion007,I found that in doc.



Replies: 0