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 Dec 28, 2010 11:32 am

Callahan wrote:Success !!!

For this, I need to know more about the nature of the phaser spots.
If they´re using a shape, I would bet on that the right shape will enable the texture positions to be placed as the phaser spots are.

Thanks for doing me a test model Thunderchero !!
The hob I sent you had been edited, I also have a hob that all the phaser slots have polygons in each special slot :wink:

write unused with 0's

h3_a.HOB

good luck

thunderchero

EDIT; could you upload or send me the hob file above so I can take a look at 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:

Post by thunderchero » Tue Dec 28, 2010 1:01 pm

Well I was able to move them.....But



lol it is a little closer

this just used the info that was stored for phaser :cry:

thunderchero

Edit;

I found original polygon used and added more this is position of polygon


this is in-game after edit lol



I like it lol

yes there is a ship in that image lol

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

Post by Callahan » Tue Dec 28, 2010 1:34 pm

I´m already after this.

Your file is exactly 12 bytes shorter than vanilla ones from the beginning to the end of the phaser array.

These 12 bytes must contain the Z value for those scars.
Using RM1 data on RM2 worked well, so once found, I think we may use some default Z values and it will be fine.
Hope I have them identified soon.

Edit:
"There´s a ship in that damage texture" - LOL - watering eyes.
Who say´s research can´t be funny ?

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 Dec 28, 2010 1:42 pm

Callahan wrote:I´m already after this.

Your file is exactly 12 bytes shorter than vanilla ones from the beginning to the end of the phaser array.

These 12 bytes must contain the Z value for those scars.
Using RM1 data on RM2 worked well, so once found, I think we may use some default Z values and it will be fine.
Hope I have them identified soon.

Edit:
"There´s a ship in that damage texture" - LOL - watering eyes.
Who say´s research can´t be funny ?
info for you slots 17-29 would be best slots (all are diferent)

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 Dec 28, 2010 6:34 pm

Callahan wrote:Your file is exactly 12 bytes shorter than vanilla ones from the beginning to the end of the phaser array.

These 12 bytes must contain the Z value for those scars.
I just double checked the phaser array area and it is the same size.

If you count the first section area yes it is missing 12 bytes this is due to new models do not use LOD (switching between 512/256/128 gifs) so that 12 bytes of data is not listed. (at least that is what I think it is for but I am not sure)

EDIT; I have been looking at hob files more and noticed at end of all new model files it has a list of object beads (phaser array) 16 bytes each 0-42 (phaser object slots used 1-43)

I also looked in hot file used during conversion and the were renamed. This file might be helpful to you, it has "NormalCoordinate" and "Coordinate" for each vertex and a list used by each polygon.

thunderchero
Last edited by thunderchero on Tue Dec 28, 2010 7:45 pm, edited 2 times in total.

User avatar
Flocke
BORG Trouble Maker
BORG Trouble Maker
Posts: 2546
Joined: Sun Apr 27, 2008 2:00 am
Location: Hamburg, Germany
Contact:

Post by Flocke » Tue Dec 28, 2010 7:22 pm

That's amazing, funny images :D
Callahan, you mentioned C++, how much do you know about it?

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

Post by Callahan » Wed Dec 29, 2010 7:25 am

I was wrong.

Thunderchero is right relating to the 12 bytes. They´re not storing Z buffer info even in vanilla HOBs.

Did some more hybrid test runs on vanilla models.

They often show the same "error" drawing texture behind a ship even if they´re located in front.

Interestingly not always the entire ship.
Using Galaxy scars on D´ridren model results in it´s "body" behind the saucer scar ( would be correct ), while it´s bridge is drawn over the scar.

It still seems to be a problem of Z buffer values.
Thunderchero, your finding of data related to the phaser array is very interesting.
If it contains data used to calculate the Z value of the scars....

@Flocke
I´m not particulary good at C++, just about enough to mod games a bit. I made an avg. "Jagged Alliance 2" mod, for example.
Join the klingon empire at www.goldentowns.com/?i=352931
Become an affiliate of Kahless himself and play for free to earn real money!

You will be protected and advised by the chancellor himself.
Long live the empire!
Q'pla!

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 » Wed Dec 29, 2010 10:20 am

Callahan wrote: It still seems to be a problem of Z buffer values.
you do understand BOTF has no idea what Z buffer is, It uses BSP (Binary separation format)

thunderchero

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

Post by Callahan » Wed Dec 29, 2010 12:52 pm

Sorry, didn´t know botf is using "Binary Separation Planes". :oops:
I´m working on botf content for just a few days now.
That info was helpfull.

Now some good news.
Due to your info on the file end array, I discovered why scars are drawn behind the model.

The T01 Cube HOB is using 3 lists / planes/ Nodes - whatever.

Every one is containing 2 entries of 16 bytes each. A total of 6 scars.
Value 13 followed by the damage slot in the phaser array.
Changing the data results in scar not to be displayed.

With the NEW HOBs, this list is complete at end of file and not divided up on the planes/nodes.
We need to include the slot poligons into the BSP layout.

The bad news:
I have no idea on how they could be included.

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 » Wed Dec 29, 2010 2:16 pm

Callahan wrote:Sorry, didn´t know botf is using "Binary Separation Planes". :oops:
I´m working on botf content for just a few days now.
That info was helpfull.

Now some good news.
Due to your info on the file end array, I discovered why scars are drawn behind the model.

The T01 Cube HOB is using 3 lists / planes/ Nodes - whatever.

Every one is containing 2 entries of 16 bytes each. A total of 6 scars.
Value 13 followed by the damage slot in the phaser array.
Changing the data results in scar not to be displayed.

With the NEW HOBs, this list is complete at end of file and not divided up on the planes/nodes.
We need to include the slot poligons into the BSP layout.

The bad news:
I have no idea on how they could be included.
This depends

the polygons I used in phaser array are cloned polygons from the model (that have been separated).

this is what I tried before coping the data from the original polygons to the damage array. finding them is hard part and placement was on edge of polygon used? but I may have gotten wrong data.

thunderchero

Dr_Breen
Commodore
Commodore
Posts: 889
Joined: Wed Apr 30, 2008 2:00 am
Location: Zurich, Switzerland
Contact:

Post by Dr_Breen » Wed Dec 29, 2010 2:16 pm

i guess they're included the same way as the phaser slots:

viewtopic.php?name=Forums&file=viewtopic&p=6#6

shows you how to do it with a hot file

viewtopic.php?name=Forums&file=viewtopic&p=4250#4250

shows how you do it with an flt file.

Edit:

oops somebody was faster than me :oops:
Public BotF / EF2 Teamspeak 3 Server: 83.169.13.55

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 » Wed Dec 29, 2010 3:08 pm

from working on this project this is my thoughts

I think damage textures are some kind of "switch"
from HowTo.txt of Converter.exe wrote: - Switch beads must be named swn where n is a number between 1 to max sw
Note: Switches in Gamegen must have unique number. In order to have switches
with the same number, you have to use 5 digits format as follow:
sw1XX## where:
1 is the flag to indicate that this switch will use XX as its number
XX is the switches number
## is number to make the 5 digits unique
i.e: sw10101, sw10102, and sw10103 means all of these switches will be
renamed sw1 during HotToHob conversion.
- The maximum number of elements in a switch bead is 32 elements
- To use transparent texture (chromakey) on polygons, set 'Fixed/Alpha' in Face
Attribute. ChromaKey color is assumed to be color index 0 for 8 bit textures
or 0,0,0 for 24 bit textures.
- To use billboard type polygons, set 'XYZ/Alpha' in Face Attribute.
- To use billboard tree type polygons, set 'Z/Alpha' in Face Attribute.
- Billboard type and Billboard Tree type will use transparent texture only.
I think we need to use "billboard type polygons"

I have not found a way to add a polygon to a "switch" I can create an object and rename to a switch but has different attributes.

When done this way data in switch are treated like regular slots.

later in HowTo.txt it talks about using script and setting X, Y, Z on switches and animations.

But I have no idea how to set this up.

any thoughts

thunderchero

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

Post by Callahan » Thu Dec 30, 2010 7:50 am

All I know yet on the slots and poligons is that the phaser/object slots are using a value of 13 followed by the ID of the slot.
Poligons seem to use a value of 4 followed by a marker to a file position.

In the old HOB files all slot entries are divided up on several lists. Think this defines when they are covered or covering other parts of the model.

In the new files the slots are listed at end of file, even the phaser slots.

I just read parts of the converter txt. It talks about registering the object list.

I also tried to open the links from the tutorial page, but the "Multigens Creator" and ultraedit sites are not opening.

Where else can I get those tools ?
I surely need to dig into this to make any more progress.

Edit:
Provided I understood what I read so far I have an idea.
After the BSP calculation is done, the objects slots are added and then all is converted to HOB.
If we would do a second BSP calculation after adding the objects they may be included in the HOB listings at the right positions.

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 » Sat Jan 01, 2011 4:37 pm

I noticed something when playing with this last night,

The model I created had 3 exact matching phaser data :?

note; 2 other had different data but also matched exactly to each other.

so I went back and looked at what slots the polygon used and I can only presume that phasers do not use polygons they select a random vertex from that polygon and use that only. The image below shows the vertex that was shared for all 3 phaser spots in the array.



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 » Sun Jan 02, 2011 2:25 pm

This project I feel is very close,

I was sure last night my last attempt would work :cry:

But it did not. I had all data I thought I needed (all 4 vertex positions of new scar) I added data to first 48 bytes and got the expanded scar again.

I thought the data needed was;

48 bytes per scar (12 bytes per vertex) (4 bytes X, 4 bytes Y, 4 bytes Z Coordinates) for each corner of scar. I had this?

So now I do not understand what we need to make them work :?:

I was able to get the Coordinates of each vertex from info in the hot file of the exact polygon that was used. (I had to convert model at 1.0 scale to get values to match in the hot and hob files).

any suggestions?

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