View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0002137DarkRadiantModelspublic06.02.2010 23:5321.05.2010 13:16
Reportermattn 
Assigned Togreebo 
PrioritynormalSeveritynormalReproducibilitysometimes
StatusconfirmedResolutionno change required 
PlatformOSOS Version
Product Version1.1.0 
Target VersionFixed in Version1.2.0 
Summary0002137: picomodel md2 texture coords broken
Descriptioni know this is not really a dr issue - as darkmod does not support md2 anymore - but still, loading such a model can result (for some models) in broken texcoords. maybe other models are affected, too - or maybe md2 is affected. haven't investigated any further.

maybe it's an option for you to switch to a model library that is in active development - e.g. something like libg3d, making dr support more model formats or import/export them from several formats into several other formats would be a cool feature imo.
TagsNo tags attached.
Attached Files? file icon truck.md2 [^] (39,088 bytes) 07.02.2010 15:09
? file icon truck.tga [^] (624,302 bytes) 07.02.2010 15:09
diff file icon skins.diff [^] (16,543 bytes) 07.02.2010 15:13 [Show Content]
diff file icon md2.diff [^] (8,224 bytes) 08.02.2010 19:18 [Show Content]

- Relationships

-  Notes
User avatar (0002913)
greebo (administrator)
07.02.2010 14:24

Is there any test model I can use to debug this? I don't have any MD2 files lying around.
User avatar (0002916)
mattn (reporter)
07.02.2010 15:10

attached a model and its texture
User avatar (0002917)
mattn (reporter)
07.02.2010 15:15

attached a diff that adds support for different skins for md2 models

(if you ignore all those trailing whitespace stuff the patch is at the end of the file ;)
User avatar (0002918)
greebo (administrator)
07.02.2010 16:16

This model has a strange appearance in DarkRadiant. When forcing it to load in the ModelSelector, it looks something like this:

http://img697.imageshack.us/img697/6112/trucki.png [^]

It's not just the UV map messed up, the vertices are mangled too. Does this work for you at all?
User avatar (0002925)
mattn (reporter)
08.02.2010 19:19

attached a new patch that should fix the vertices - but i wasn't able to fix the uv map
User avatar (0002926)
mattn (reporter)
08.02.2010 19:21

ups - the compile error can be easy fixed with removing the NULL assignment - sorry
User avatar (0002927)
greebo (administrator)
08.02.2010 20:52

The patch is there - I haven't looked into the UV issues yet.
User avatar (0002928)
greebo (administrator)
08.02.2010 21:07

I see that the skinWidth/skinHeight values in the md2 are set to 256, but the attached image is 512, hence the UV coords are wrongly normalised. Could that be the issue?
User avatar (0002929)
mattn (reporter)
09.02.2010 09:28

yes, you are right - that sounds reasonable.
User avatar (0002930)
greebo (administrator)
09.02.2010 11:33

Ok. I know nothing about MD2, but I assume this is an error happening during MD2 creation?

Feel free to close this issue in that case, if there are no other MD2 (texcoords) problems.
User avatar (0003012)
mattn (reporter)
19.05.2010 21:57

http://sourceforge.net/apps/trac/ufoai/changeset/30076/ [^]

here is a correct fix for the texcoord issue.
User avatar (0003013)
greebo (administrator)
20.05.2010 14:18

Hm, the unified DIFF patch is not quite compatible with my SVN version. I tried downloading the entire file from your repo, but it seems to be largely different.

I'm a bit hesitant to just replace the file, as I don't know how if there are any ufo-specific changes in your MD2 loader.

If somebody is willing to merge only the relevant changes into the DarkRadiant codebase, I'm happy to apply that patch to SVN.
User avatar (0003014)
mattn (reporter)
21.05.2010 08:40

there are no ufo-only changes in that file - but i will try to merge it against the dr codebase to get it in.
User avatar (0003016)
greebo (administrator)
21.05.2010 13:16

Ok, thanks in advance. :)

- Issue History
Date Modified Username Field Change
06.02.2010 23:53 mattn New Issue
07.02.2010 14:24 greebo Note Added: 0002913
07.02.2010 14:24 greebo Status new => acknowledged
07.02.2010 15:09 mattn File Added: truck.md2
07.02.2010 15:09 mattn File Added: truck.tga
07.02.2010 15:10 mattn Note Added: 0002916
07.02.2010 15:13 mattn File Added: skins.diff
07.02.2010 15:15 mattn Note Added: 0002917
07.02.2010 16:16 greebo Note Added: 0002918
08.02.2010 19:18 mattn File Added: md2.diff
08.02.2010 19:19 mattn Note Added: 0002925
08.02.2010 19:21 mattn Note Added: 0002926
08.02.2010 20:52 greebo Note Added: 0002927
08.02.2010 21:07 greebo Note Added: 0002928
09.02.2010 09:28 mattn Note Added: 0002929
09.02.2010 11:33 greebo Note Added: 0002930
14.02.2010 07:56 greebo Status acknowledged => resolved
14.02.2010 07:56 greebo Fixed in Version => 1.1.1
14.02.2010 07:56 greebo Resolution open => no change required
14.02.2010 07:56 greebo Assigned To => greebo
19.05.2010 21:57 mattn Status resolved => confirmed
19.05.2010 21:57 mattn Note Added: 0003012
20.05.2010 14:18 greebo Note Added: 0003013
21.05.2010 08:40 mattn Note Added: 0003014
21.05.2010 13:16 greebo Note Added: 0003016


Copyright © 2000 - 2010 MantisBT Group
Powered by Mantis Bugtracker