Bug 4967 - Support Model Format Fallback
Status: RESOLVED FIXED
Alias: None
Product: ioquake3
Classification: Unclassified
Component: Misc
Version: GIT MASTER
Hardware: All All
: P3 normal
Assignee: Zachary J. Slater
QA Contact: ioquake3 bugzilla mailing list
URL:
Depends on:
Blocks:
 
Reported: 2011-04-29 23:21 EDT by Zack Middleton
Modified: 2011-05-02 11:50:44 EDT
1 user (show)

See Also:


Attachments
Attempt to load model using it's ext, than try all supported formats. (7.45 KB, patch)
2011-04-30 01:43 EDT, Zack Middleton
Attempt to load model using it's ext, than try all supported formats. (7.59 KB, patch)
2011-04-30 23:01 EDT, Zack Middleton

Description Zack Middleton 2011-04-29 23:21:23 EDT
Model loading (in RE_RegisterModel) needs rewrite like R_LoadImage so it will try to load MDR (and future model formats) if specified model (format) is not found. Currently render only loads model cgame/ui specifically asks for, it does not fall back to other supported formats.
Comment 1 Zack Middleton 2011-04-30 01:43:04 EDT
Created attachment 2675 [details]
Attempt to load model using it's ext, than try all supported formats.

Changed model loading so it is like R_LoadImage. Attempts to load model based on the filename extension first, then attempts to load all other supported model formats.

Tries to load MDR, if RAVENMD4 is defined, and MD4 models if MD3 model is not found. Most models cannot be replace using MDR/MD4 models as most model filenames ends ".md3", which causes a MD3 model to be loaded first. If there is no MD3, it falls back to MDR and MD4.
Comment 2 Zack Middleton 2011-04-30 23:01:01 EDT
Created attachment 2677 [details]
Attempt to load model using it's ext, than try all supported formats.

Fixed some function names to use proper naming convention. Set model_t::type to MOD_BAD in R_RegisterMD3/MDR on fail instead of having RE_RegisterModel do it.
Comment 3 Thilo Schulz 2011-05-02 11:50:44 EDT
applied r1953, thanks!