99% complete. only problem is that shadows are not casting properly (recieving fine), Spring seems to be reading the alpha channel on the textures as actually transparent. not 100% sure how to fix.
Shadows fixed, but another problem has popped up to do with the displaylists, gonna quickly swing off onto a parallel track, try and get something releasable before I fall into a black hole of buggy, poorly written code :D
1)to activate the gadget for a unit, it will need a customparam in the unitdef "unitdraw" it can be any non-nil value
2)the names of the pieces to be drawn onto other models MUST be unique, be creative!
3)the pieces to be loaded need to be in the s3o of a valid unitdef, this means script and unitdef.lua (they can be rubbish values, but they have to be there)
4)the best (imo) way to organize the pieces is to group them into 'library' units, this will save on texture memory use, aswell as being much cleaner
new screens :D i think i have all the bugs pretty much ironed out.
scoutcar on the right has wheels taken from something i found on my HDD, has a 512*256 texture! The brown tank is trying on the Angletank's turret for size.
The 'Trifighter' with the gun barrel from my 'Angletank' model
The gadget grabs the geometry of a piece and the texture from a unit, and replaces the geometry of the piece(s) defined in the gadget config.
Still got work to do on the loading side (currently all the dLists are loaded at game-start which is quite seriously non-ideal) as well as setting up a debug mode and appropriate messages and a few other minor things.
It's currently totally functional, will need to test with custom texture-based shaders (normalmaps) but the "x-ray highlight" widget works fine. I'm thinking I will need to manually add in support for normal maps, but it's hard to test as I have no normal-mapped units.
It's currently totally functional, will need to test with custom texture-based shaders (normalmaps) but the "x-ray highlight" widget works fine. I'm thinking I will need to manually add in support for normal maps, but it's hard to test as I have no normal-mapped units.
on-demand loading of the displaylists is here! also added in a debug mode switch (only settable by changing a boolean in the gadget, i will consider making a "/changepiece debug" switch if its *really* wanted) and commented some of the code.
will clean up the mod file and release for testage later
Users browsing this forum: No registered users and 2 guests
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot post attachments in this forum