Page 3 of 4
Re: Attaching *models* onto *units*
Posted: 23 Jun 2012, 14:21
by Pressure Line
edit: with some help from jK i have it loading (and rendering!) the changed geometry. now for textures
Re: Attaching *models* onto *units*
Posted: 24 Jun 2012, 14:14
by Pressure Line
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.
woohoo!
Re: Attaching *models* onto *units*
Posted: 24 Jun 2012, 15:44
by smoth
perhaps JK may be able to give insight on it?
Re: Attaching *models* onto *units*
Posted: 25 Jun 2012, 08:27
by Pressure Line
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
Re: Attaching *models* onto *units*
Posted: 26 Jun 2012, 07:34
by Pressure Line
Fixed the screwyness, but no show/hide
So here it is :)
Read me before downloading wrote: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
Re: Attaching *models* onto *units*
Posted: 26 Jun 2012, 12:32
by Pressure Line
new version, should be 100% functional.
Re: Attaching *models* onto *units*
Posted: 26 Jun 2012, 12:47
by knorke
acuelly is 99%
Re: Attaching *models* onto *units*
Posted: 26 Jun 2012, 13:56
by Pressure Line
knorke wrote:acuelly is 99%
rubbish

it's some other funky lua you got running probably.
testmod works fine.
Re: Attaching *models* onto *units*
Posted: 26 Jun 2012, 14:10
by knorke
can you upload the tutorialgame with the draw stuff inserted?
to test if it is a mod or computer thing.
Re: Attaching *models* onto *units*
Posted: 26 Jun 2012, 21:14
by Pressure Line
Download this and it should work out of the box.
Re: Attaching *models* onto *units*
Posted: 27 Jun 2012, 13:03
by Pressure Line
getting some of the weird errors you reported last night knorke, no idea wtf is causing them

Re: Attaching *models* onto *units*
Posted: 28 Jun 2012, 13:55
by knorke
Pressure Line wrote:Download this and it should work out of the box.
this works.
just stupid guess, but could the problems be because not all textures have the same dimensions?
Re: Attaching *models* onto *units*
Posted: 28 Jun 2012, 14:17
by Pressure Line
nope, that aint it.
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
Re: Attaching *models* onto *units*
Posted: 28 Jun 2012, 16:01
by smoth
Is this just the texture attachment or actual piece attachment?
Re: Attaching *models* onto *units*
Posted: 28 Jun 2012, 22:39
by Pressure Line
You can keep your toys in the cot smoth.
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.
Re: Attaching *models* onto *units*
Posted: 28 Jun 2012, 23:29
by smoth
still it is a lot further than you were thinking you'd get to a few days ago! Keep up the good work man, this is pretty cool.
Re: Attaching *models* onto *units*
Posted: 29 Jun 2012, 00:05
by Pressure Line
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.
Re: Attaching *models* onto *units*
Posted: 29 Jun 2012, 01:44
by Pressure Line
I still feel the gadget needs a less 'general' name. Currently called "unit_draw.lua" not sure what else fits though

Re: Attaching *models* onto *units*
Posted: 29 Jun 2012, 03:16
by smoth
Pressure Line wrote: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.
s44 has a few.
Re: Attaching *models* onto *units*
Posted: 29 Jun 2012, 12:13
by Pressure Line
woo!
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