| 
		
		#828 posted by necros  on 2012/08/07 20:58:41actually, I guess it sort of makes sense.
c just stops reading strings when it reaches the first \0, but I guess they didn't want to bother with a dynamically allocated char array so those junk bytes are actually whatever was on the guy's memory when he saved the file...
 
		 Yup #829 posted by Preach  on 2012/08/07 21:12:49You have permission to zero all of that out nicely when you export though! Also, don't forget to test your code with grouped frames and grouped skins before you're through - it always seems to be going so well until that point...  
		
		#830 posted by necros  on 2012/08/07 22:19:38I wasn't really going to bother with that for now.
Mostly, I just wanted to redo that "qcStarter" program I made so you could load a model and generate some basic monster code complete with a spawn function.
 But now I'm thinking it'd be pretty cool to make a modern mdl editing program.
 
		
		#831 posted by mh  on 2012/08/08 01:00:04c just stops reading strings when it reaches the first \0, but I guess they didn't want to bother with a dynamically allocated char array so those junk bytes are actually whatever was on the guy's memory when he saved the file... 
 Yup, that's it.  The struct in the C code is defined as follows:
 
 typedef struct {
 trivertx_t	bboxmin;	// lightnormal isn't used
 trivertx_t	bboxmax;	// lightnormal isn't used
 char		name[16];	// frame name from grabbing
 } daliasframe_t;
 
 Reason why is when loading an MDL you can just load the entire file into a single buffer, then walk through the data setting and incrementing pointers as needed.  If every daliasframe_t is the same size the job becomes much easier.
 
 Same basic principle applies to other model data that contains a string name; e.g. textures have a fixed 16 char array for their names.
 
		
		#832 posted by necros  on 2012/08/08 01:24:32Makes sense, they would design the format to make it easy on themselves, not some guy digging into it 15 years later. :P
 Now to see if I can draw it to screen!
 I think understanding exactly what the heck is going on with the so called 'compressed coordinates' is going to be the really hard part. o.0
 
		 Hahaha #833 posted by necros  on 2012/08/08 01:37:30 
		 This Is Interesting #834 posted by RickyT33  on 2012/08/08 01:40:40I always wondered what the algorithm was for drawing point to point in 3D.
 Also I'm stunned that I am following this.  It actually makes sense to me(!) now that I can program a little.
 
		
		#835 posted by mh  on 2012/08/08 01:58:44they would design the format to make it easy on themselves
 
 ...and they even failed at that!!!  http://www.team5150.com/~andrew/carmack/johnc_plan_1997.html#d19970707 (section beginning "anatomy of a mis-feature").
 well, it was supposed to be a fiend...
 
 It's real close though, and a whole ton better than my first attempt at doing this with C# 8 or so years back.
 
		
		#836 posted by necros  on 2012/08/08 02:19:08http://necros.slipgateconstruct.com/temp/nowthatsafiend.jpg
 
 Silly mistake... tried reading in verts on the frames directly. :P  
		 Oh Thanks For That Link #837 posted by necros  on 2012/08/08 02:20:12It's nice that that .plan stuff is archived.  I never had internet back then (plus I was too young) but that seems very interesting now. :)  
		
		#838 posted by mh  on 2012/08/08 02:36:41Good stuff with the fiend.  You gonna take this all the way and do texturing too?
 The .plan archive is essential reading, it's a great window into the thinking behind why much of Quake is the way it is, and can be very informative for decisions of the "should I add/remove/change this feature?" kind.
 
		 Skinzz #839 posted by necros  on 2012/08/08 08:03:07 
		 Good Job, Necros... #840 posted by generic  on 2012/08/08 13:24:43I can see its eye in that shot :)  
		 Heresy! #841 posted by jt_  on 2012/08/08 14:13:18Fiends don't have eyes.  
		 Yes They Do! #842 posted by negke  on 2012/08/08 18:29:46You guys don't do a whole lot of looking at things, do you?
 http://www.lunaran.com/pics/fiends...
 
 And now, shambler will argue that those aren't actually eyes:
 
		 Herp Derp #843 posted by Shambler on 2012/08/08 18:32:40 
		
		#844 posted by Spirit  on 2012/08/08 18:41:26I thought those were nipples?  
		 Coding-related Questions #845 posted by Tronyn on 2012/08/09 00:15:04 Now that the RMQ project has split up, what's happening with the BSP2 format? Will it still be updated? Do any engines other than the RMQ Engine support it yet?
 Also, is anyone willing to do some coding for new boss monsters? PM is currently cleaning up and debugging Drake, but doesn't want to spend time adding entirely new monsters/features/etc. I totally understand this POV but it'd be nice if Drake had a unique final boss of some sort.
 
 Looks like eyes to me. Now the Shambler, on the other hand...
 
		 Can Someone Make Me A Demon Skin #846 posted by Drew  on 2012/08/09 03:16:37With no eyes? This is horrible.  
		 Hm #847 posted by madfox  on 2012/08/09 08:54:41Glases are fine, horns another question.
http://members.home.nl/gimli/gdemon.jpg 
		
		#848 posted by necros  on 2012/08/09 09:57:54maybe I'm just tired, but that was hilarious. :D  
		 @Tronyn #849 posted by gb on 2012/08/09 12:35:33 Since I was linked here from IRC, I might as well answer to Tronyn:
 FTE and Darkplaces (and Hmap2) support BSP2, but DP's version is slightly different.
 
 I would guess that DirectQ also supports it, and Baker and Rook's engines might as well.
 
 I have switched to Warsow's FBSP for my project, so BSP2 will get no updates from me. The Schism team would probably be the ones to maintain it now. Perhaps ask at their forum.
 
 You should talk to MH, Spike and Lordhavoc to get the BSP2 support in those engines harmonised.
 
 Quakespasm did not want to support BSP2 when I asked.
 
 I don't normally read this forum anymore, but I'm willing to help where I can. Poke me per mail or IRC if someone wants to talk to me.
 
		 OBJs + PCX! #850 posted by necros  on 2012/08/10 01:11:24http://necros.slipgateconstruct.com/temp/objdrawing.jpg
 
 Thanks to preach for his pcx loading code in the md3tomdl converter.  The runlength encoding stuff was confusing the crap out of me.
  Also, I had to flip the pcx data on the x axis AND reverse the pixel array order after loading it...  is that normal?  If it's not then I must have messed up the UVs on the OBJ...  
		 Heh #851 posted by necros  on 2012/08/10 01:18:40actually, flipping x axis and reversing the order is basically just flipping y axis right? :P  
		 Triple Post #852 posted by necros  on 2012/08/10 01:38:41looks like it's a thing with obj... just flipped v component when loading the obj instead of goofing with the pcx.  |