damage textures again

using damage textures with new ship models -> trek.exe basics; support/discussion/questions

Moderator: thunderchero

User avatar
thunderchero
Site Administrator aka Fleet Admiral
Site  Administrator aka Fleet Admiral
Posts: 6058
Joined: Fri Apr 25, 2008 2:00 am
Location: On a three month training mission, in command of the USS Valiant.
Contact:

Post by thunderchero » Tue Jan 04, 2011 8:12 pm

Dr_Breen wrote:there has to be a way how it's done in creator, as the original botf creators sure did it that way as well
creator may be the problem it self original BOTF models were created in "GameGen II by MultiGen (1996)" good luck finding this program. And I have looked.

The Creator we use has 8 years of progress ahead of what BOTF modelers used so that feature may be no longer supported.

I hope someone proves me wrong :wink:

thunderchero

User avatar
Callahan
Lieutenant-Junior Grade
Lieutenant-Junior Grade
Posts: 78
Joined: Sat Mar 13, 2010 3:00 am

Post by Callahan » Wed Jan 05, 2011 9:15 am

thunderchero wrote:I think you are correct about 4,5,6 Just have no clue yet best way to set this value.

8 - stretch X correct size port-starbord
9 - roll around Y axis my test showed roll on X higher port lower starboard
10 - stretch Y correct size bow-stern
12 - roll X axis my test showed roll on Y higher stern lower bow

7 & 11 I saw no change switching from known good values 00 00 00 00 may work for all new scars?

thunderchero
Rolling around the Y axis (bow-stern line) does lift-lower port/starbord edges.
Same for 12: X axis ( line port-starbord) rolling around it will result in lower/higher bow/stern edges.

At least I think so, but geometry was not my favorite.

User avatar
Callahan
Lieutenant-Junior Grade
Lieutenant-Junior Grade
Posts: 78
Joined: Sat Mar 13, 2010 3:00 am

Post by Callahan » Sun Jan 09, 2011 10:14 am

Just had time to do some more tests.



Seems like the original crew had problems with overlapping, too.

User avatar
Dafedz
Lieutenant-Commander
Lieutenant-Commander
Posts: 109
Joined: Mon May 05, 2008 2:00 am

Re: damage textures again

Post by Dafedz » Sat May 31, 2014 8:57 am

Don't know if anyone's reading this anymore, but I did some experiments with this a while ago, and came to the conclusion that the only way this can effectively be done is with Creator (or better still, Gamegen.)

Image

I had this info from Christian Ingle way back in the day when Jig and I were trying to make phasers work. It provides a snippet of how it was done in Gamegen.

SeaBee-T
Lieutenant-Junior Grade
Lieutenant-Junior Grade
Posts: 74
Joined: Fri May 23, 2008 2:00 am

Re: damage textures again

Post by SeaBee-T » Tue Jun 03, 2014 10:54 am

Hey, as long as it's posted, I'm pretty sure someone will stumble on it in the future and thank you profusely for it! ;)

User avatar
thunderchero
Site Administrator aka Fleet Admiral
Site  Administrator aka Fleet Admiral
Posts: 6058
Joined: Fri Apr 25, 2008 2:00 am
Location: On a three month training mission, in command of the USS Valiant.
Contact:

Re: damage textures again

Post by thunderchero » Wed Feb 04, 2015 10:04 am

Hi Everyone,

I know old topic, why, ect

but working on another project I noticed a few things that got me to here.
close.jpg
close.jpg (119.62 KiB) Viewed 2175 times
I have done all this with creator but I can not get the "damage billboard" orientation correct.

anybody got any ideas....

thunderchero

User avatar
thunderchero
Site Administrator aka Fleet Admiral
Site  Administrator aka Fleet Admiral
Posts: 6058
Joined: Fri Apr 25, 2008 2:00 am
Location: On a three month training mission, in command of the USS Valiant.
Contact:

Re: damage textures again

Post by thunderchero » Fri Feb 06, 2015 4:19 pm

This is just bugging me now...... :evil: :evil: :evil: :evil: :evil:

here is info I have collected

phaser slots data in hobs files

the location will slightly vary depending on how many textures are used by model (scar texture are not listed in hob)

all slots are 48 bytes.
during model conversion of flt to hob,
only the location of polygon center and basic scale (1.0) is written to hob.

the slot number in creator is very important
slots 1 - 16 are main phaser slots (16 max)
slot 17 is 48 byte space between types
slots 16 - 30 I think are b.gif phaser slots or maybe plasma (12 max)
slot 31 is 48 byte space between types
slots 32 - 43 are for damage slots (12 max)

Note; a 1 vertex polygon is used 1 per slot. this is a special polygon
the location where data is written in hob depends on slot number
example my current test
I have slot 01 - 08 for phasers, but next slot is 32 - 35 for damage slots. this give a large space between last phaser and start of damage data (1104 bytes 23 slots @ 48 bytes each)
if I re-number damage slots to 09 - 12 (or any thing between 9 -31) this give a no space/wrong space between last phaser and start of damage slot and game will crash since damage slot are not in proper location for trek.exe to find them.

here is image of my test model
oriantation.jpg
oriantation.jpg (153.14 KiB) Viewed 2162 times
Z = front to back
X = side to side
Y = top to bottom

slot data

48 bytes
12 - float (4 bytes) type values
first value "location position" X- left to right from center of model to center of polygon used for slot.
second value "location position" Y- top to bottom from center of model to center of polygon used for slot.
third value "location position" Z- front to back from center of model to center of polygon used for slot.

with these 3 values it will locate the graphics for damage spot. (slot polygon is only used for location, shape or size does not matter).
note; these values can be found by running "getloc.exe" from conversion files.

here is info from getloc.exe for polygon below
0.452817, -0.053557, -0.000000

fourth value is a mystery, if set to 0.0 or negitive damage will not display but all positive values show no effect.
note; this value is set during conversion to 1.0, vanilla damage slot has varying values

the next 2 values look to have no effect
fifth value is unknown (set to 0.0 during conversion, vanilla damage slot has varying values)
sixth value unknown (set to 0.0 during conversion, vanilla damage slot has varying values)

The next 6 values are based on the center of damage spot using edges.
I will be mainly using images to explain them

here is the orientation (values unedited) after conversion.
damage.jpg
damage.jpg (73.11 KiB) Viewed 2162 times
I added green line when damage could not be seen from prospective.

keep in mind edges are moved parallel to center of damage not rotated.
value 7 set to 0.0 during conversion
value shown 1.0
if you could center on damage ft view damage would look unchanged
value 7.jpg
value 7.jpg (65.48 KiB) Viewed 2162 times
value 8 set to 1.0 during conversion
value shown 2.0
if viewed from side damage would look unchanged
value 8.jpg
value 8.jpg (28.68 KiB) Viewed 2162 times
value 9 set to 0.0 during conversion
value shown 1.0
if viewed from top damage would look unchanged
value 9.jpg
value 9.jpg (30.1 KiB) Viewed 2162 times
value 10 set to 0.0 during conversion
value shown 1.0
if you could center on damage ft view damage would look unchanged
value 10.jpg
value 10.jpg (25.02 KiB) Viewed 2162 times
value 11 set to 0.0 during conversion
value shown 1.0
if viewed from side damage would look unchanged
value 11.jpg
value 11.jpg (30.14 KiB) Viewed 2162 times
value 12 set to 1.0 during conversion
value shown 2.0
if viewed from top damage would look unchanged
value 12.jpg
value 12.jpg (34.36 KiB) Viewed 2162 times
I am thinking with a little geometry calculations this might be able to be automated?

also you can create list with the vertex locations (all 3 corners of polygon used) using the "GetCoord.exe" from conversion files.

here is info from GetCoord.exe for vertex of polygon used

{ 0.452817, -0.053557, -0.000000 },
{ 0.369722, -0.053557, -0.000000 },
{ 0.437387, -0.053557, -0.116025 }

anybody good at geometry?

thunderchero

Post Reply

Return to “using damage textures with new ship models -> trek.exe basics”

Who is online

Users browsing this forum: No registered users