View topic - Attaching *models* onto *units*



All times are UTC + 1 hour


Post new topic Reply to topic  [ 61 posts ]  Go to page Previous  1, 2, 3, 4  Next
Author Message
PostPosted: 23 Jun 2012, 13:21 
Battletech Developer
User avatar

Joined: 21 May 2007, 01:09
Location: New Zealand
edit: with some help from jK i have it loading (and rendering!) the changed geometry. now for textures


Top
 Offline Profile  
 
PostPosted: 24 Jun 2012, 13:14 
Battletech Developer
User avatar

Joined: 21 May 2007, 01:09
Location: New Zealand
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.

Image

woohoo!


Attachments:
screen00000.jpg [356.9 KiB]
Downloaded 2 times
Top
 Offline Profile  
 
PostPosted: 24 Jun 2012, 14:44 
Content Developer
User avatar

Joined: 13 Jan 2005, 00:46
Location: ModalitÃ
perhaps JK may be able to give insight on it?


Top
 Offline Profile  
 
PostPosted: 25 Jun 2012, 07:27 
Battletech Developer
User avatar

Joined: 21 May 2007, 01:09
Location: New Zealand
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


Top
 Offline Profile  
 
PostPosted: 26 Jun 2012, 06:34 
Battletech Developer
User avatar

Joined: 21 May 2007, 01:09
Location: New Zealand
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


Attachments:
unit_draw.7z [2.06 KiB]
Downloaded 21 times
Top
 Offline Profile  
 
PostPosted: 26 Jun 2012, 11:32 
Battletech Developer
User avatar

Joined: 21 May 2007, 01:09
Location: New Zealand
new version, should be 100% functional.


Attachments:
UnitDraw.7z [2.07 KiB]
Downloaded 23 times
Top
 Offline Profile  
 
PostPosted: 26 Jun 2012, 11:47 
Moderator
User avatar

Joined: 22 Feb 2006, 01:02
Location: cheap kitchen
acuelly is 99%


Top
 Offline Profile  
 
PostPosted: 26 Jun 2012, 12:56 
Battletech Developer
User avatar

Joined: 21 May 2007, 01:09
Location: New Zealand
knorke wrote:
acuelly is 99%


rubbish :wink: it's some other funky lua you got running probably.

testmod works fine.


Top
 Offline Profile  
 
PostPosted: 26 Jun 2012, 13:10 
Moderator
User avatar

Joined: 22 Feb 2006, 01:02
Location: cheap kitchen
can you upload the tutorialgame with the draw stuff inserted?
to test if it is a mod or computer thing.


Top
 Offline Profile  
 
PostPosted: 26 Jun 2012, 20:14 
Battletech Developer
User avatar

Joined: 21 May 2007, 01:09
Location: New Zealand
Download this and it should work out of the box.


Top
 Offline Profile  
 
PostPosted: 27 Jun 2012, 12:03 
Battletech Developer
User avatar

Joined: 21 May 2007, 01:09
Location: New Zealand
getting some of the weird errors you reported last night knorke, no idea wtf is causing them :|


Top
 Offline Profile  
 
PostPosted: 28 Jun 2012, 12:55 
Moderator
User avatar

Joined: 22 Feb 2006, 01:02
Location: cheap kitchen
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?


Top
 Offline Profile  
 
PostPosted: 28 Jun 2012, 13:17 
Battletech Developer
User avatar

Joined: 21 May 2007, 01:09
Location: New Zealand
nope, that aint it.

new screens :D i think i have all the bugs pretty much ironed out.

Image
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.

Image
The 'Trifighter' with the gun barrel from my 'Angletank' model


Attachments:
screen00002.jpg [281.86 KiB]
Downloaded 2 times
screen00001.jpg [348.57 KiB]
Downloaded 2 times
Top
 Offline Profile  
 
PostPosted: 28 Jun 2012, 15:01 
Content Developer
User avatar

Joined: 13 Jan 2005, 00:46
Location: ModalitÃ
Is this just the texture attachment or actual piece attachment?


Top
 Offline Profile  
 
PostPosted: 28 Jun 2012, 21:39 
Battletech Developer
User avatar

Joined: 21 May 2007, 01:09
Location: New Zealand
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.


Top
 Offline Profile  
 
PostPosted: 28 Jun 2012, 22:29 
Content Developer
User avatar

Joined: 13 Jan 2005, 00:46
Location: ModalitÃ
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.


Top
 Offline Profile  
 
PostPosted: 28 Jun 2012, 23:05 
Battletech Developer
User avatar

Joined: 21 May 2007, 01:09
Location: New Zealand
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.


Top
 Offline Profile  
 
PostPosted: 29 Jun 2012, 00:44 
Battletech Developer
User avatar

Joined: 21 May 2007, 01:09
Location: New Zealand
I still feel the gadget needs a less 'general' name. Currently called "unit_draw.lua" not sure what else fits though :?


Top
 Offline Profile  
 
PostPosted: 29 Jun 2012, 02:16 
Content Developer
User avatar

Joined: 13 Jan 2005, 00:46
Location: ModalitÃ
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.


Top
 Offline Profile  
 
PostPosted: 29 Jun 2012, 11:13 
Battletech Developer
User avatar

Joined: 21 May 2007, 01:09
Location: New Zealand
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


Top
 Offline Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 61 posts ]  Go to page Previous  1, 2, 3, 4  Next

All times are UTC + 1 hour


Who is online

Users browsing this forum: No registered users and 1 guest


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

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group

Site layout created by Roflcopter et al.