SWBFGamers

Modding for the Original SWBF1 and SWBF2 => SWBF1 Modding => Topic started by: 21 | Reacter on July 26, 2012, 05:06:34 PM

Title: Help with Sereja's specular method.
Post by: 21 | Reacter on July 26, 2012, 05:06:34 PM
Hey,

I think everybody knows the "Jabba Map"

If u chosse a trooper u will see that the unit is "shiny".
Well, ik SK had posted a tut, but what is NOW the best way, to make rly good Shiny (Sleepkillers or serejas method?!)
Maybe u can post (if needed) a updated tut.

Thx
Title: Re: Re: Guide To Making a Specular Model aka Shiny model
Post by: Sereja on July 26, 2012, 11:32:54 PM
I think, "Jabba Map", use stock infantry, and only shiny thing in there, it is Jabba and rancor themselfs. And the only stock shiny trooper, it is dark trooper, and he using my method. (from him, I get the code ;)).
So, the difference is next: if you need quick make, some static model a little shiny, it will be enough to use simple code, by Sleepkiller. But if you wish to make shiny, some special infantry, like imperial stormtrooper, this method will has no any effect.
So, if you need to make static model very shiny, you have to use my method. By using it, you can even change level of shiness, by this line:
00 00 80 40 = Specular Intensity (4)
You can change it to this, for example:
00 00 80 90 = Specular Intensity (9)
Also, as I say before, some of infantry, can "feel" only my method.
Title: Re: Re: Guide To Making a Specular Model aka Shiny model
Post by: 21 | Reacter on July 27, 2012, 06:04:11 AM
Hm, well, i've made it step by step with gimp like SK, and hexedited it like Sereja, but it had no effect, sry, i think im to stupid for this :(
xD
Title: Re: Re: Guide To Making a Specular Model aka Shiny model
Post by: Sereja on July 27, 2012, 06:33:14 AM
Don't give up! Here the simple test for you: you shold just copy tga from assets, which already have alpha channel, so, you no need to use some paint editor for this testing. For example: copy dark trooper skin, and rename it, for adding to some static prop, or infantry, you wish to make shiny. Then, use my hex editor code (it surely works for everything).
If after this, you still have no result - your mistake in hexediting.
If you got a success, so the problem is, in uderstanding "gimp".
I am not familiar with this paint editor (I am using Paint Shop Pro 7, and with it, is very easy process), but as I see, from this tutorial, it is realy, very complicatad programm, and hard to understand...
Title: Re: Re: Guide To Making a Specular Model aka Shiny model
Post by: 21 | Reacter on July 27, 2012, 06:48:14 AM
Lol?! (Thanks for tip^^)

In DarkTrooper Mesh: ATRB (in front 80 40)
In Imp_ScoutTrooper Mesh: HBATRB (in front: 00 00) ?!

why the sniper has not the same like dt? xD

And how i have to edit the sniper for beeing shiny?

Sniper: http://www.uploadagent.de/files/1343396871/sniper.png

DT: http://www.uploadagent.de/files/1343396846/dt.png
Title: Re: Help with Sereja's specular method.
Post by: Sereja on July 27, 2012, 08:06:51 AM
Well, I think, the code for imperial scout, is different, because creators, probably never planing to make him shiny, like the most of the other infantry. All, you have to do, to make him shiny, it is copy, and overwright his code lines, to all my code, from dark trooper, and make sure, his tga skin, have alpha channell.

SleepKiller, I am sorry, I post in your topic (again), but I just try help, to make this game better. Hope for you, it is also mean something...
Title: Re: Help with Sereja's specular method.
Post by: SleepKiller on July 27, 2012, 08:12:00 AM
Quote from: Sereja on July 27, 2012, 08:06:51 AM
SleepKiller, I am sorry, I post in your topic (again), but I just try help, to make this game better. Hope for you, it is also mean something...
I only split it to keep things originized and uncluttered :)
Title: Re: Help with Sereja's specular method.
Post by: 21 | Reacter on July 27, 2012, 09:39:43 AM
Okay, wel :)

can u sent me a edited darktrooper? So that i'm able reconstruct it?

=)  sorry for annoying, but i try to learn so much cool things how is possible...
Title: Re: Help with Sereja's specular method.
Post by: Sereja on July 27, 2012, 10:46:10 AM
Well, I am not sure, I ever edit darktrooper, but you can easy explore my already released, edited deathstar gunner:
http://www.swbfgamers.com/index.php?action=downloads;sa=view;down=679 (http://www.swbfgamers.com/index.php?action=downloads;sa=view;down=679)
Title: Re: Help with Sereja's specular method.
Post by: Sereja on January 22, 2013, 04:13:28 PM
Well, since, for some people, it's hard to understand, how my specular code, should look's like, so, I post a pic, with it, right from my HEX editor:
[spoiler](https://www.swbfgamers.com/proxy.php?request=http%3A%2F%2Fi52.fastpic.ru%2Fbig%2F2013%2F0123%2Fe7%2Ff291fb672681acc524a26eea8b3989e7.jpg&hash=57af8ff5b7fa8cf39d20dcdd5d4689b97686f965)[/spoiler]
By the way, some tips of the day: if you try change name, of the tga, with hex editor, and change count of letters (change length of string), it's possible to do, and easy to fix, with MSH_TAG_SIZE_VALIDATION_TOOL, by tripider.
Title: Re: Help with Sereja's specular method.
Post by: AreĀ§ on January 22, 2013, 04:41:12 PM
Hey sereja, I used your code today in my storm trooper skin, and i was wondering what i could do to make it less shiny than that, because it is very shiny lol
Title: Re: Help with Sereja's specular method.
Post by: Sereja on January 22, 2013, 06:40:15 PM
QuoteSo, if you need to make static model very shiny, you have to use my method. By using it, you can even change level of shiness, by this line:
00 00 80 40 = Specular Intensity (4)
You can change it to this, for example:
00 00 80 90 = Specular Intensity (9)
So, you may try to decrease number:
00 00 80 10 = Specular Intensity (1)
Also, do not forget, to be sure, your tga has alpha channell, so you can make it more transparent, with some texture editor.
Title: Re: Help with Sereja's specular method.
Post by: tirpider on January 22, 2013, 06:59:33 PM
Lots of folks speculating on Specular these days. But no one is mentioning the format of the tags.
I don't know Specular from Ford or Fiat, but I know the file format.

Hope the following information helps.

From Ande's Render Types information: (link: Specular Render Type on .MSH File Format Render Types (http://www.ande.pytalhost.eu/rendertypes.htm#spec))
QuoteRender Specular. Enables Specular. Specular Flag doesn't seem to be needed for it to work. Specular power is affected by material color and Specular Decay(gloss).

The DATA chunk that precedes the ATRB chunk holds all the material colors and the specular intensity.
All 13 values are single precision (32-bit) floating points.
The color related ones range from 0.0 to 1.0 so a value like 128 would need to be 0.5 or somewhere close since valid colors are 0 to 255.

The last one(which is the 4 bytes just before ATRB) is specular intensity(Ande calls it "sharpness") and I've seen it around 50.0 in several MSH files, but can't say what an appropriate range would be to increase or decrease the "shineyness".

DATA chunk format on Ande's site: (link:DATA chunk on .MSH File Format Information (http://www.ande.pytalhost.eu/reorganized_msh_tables.htm#matd.data))

To hex the values in you need to encode your floating point number to hex then replace (NOT INSERT) the value that is already there. Most all hex editors have some sort of tool to encode values. Just remember to replace, not insert the hex. Inserting will add bytes, mess up the size fields, and break the format of the chunk, breaking the msh.

And just because,
ATRB chunk format on Ande's site: (link:ATRB chunk on .MSH File Format Information (http://www.ande.pytalhost.eu/reorganized_msh_tables.htm#atrb))

And... I hate to do this, but I can't let it go. You can't just randomly put hex in a float. It needs to be encoded.
The example values just provided are incorect.
00 00 80 40 = 4 (This one is right)

00 00 80 90 = -5.04870979341448E-29
00 00 80 10 = 5.04870979341448E-29

1 and 9 look like :
1 = 00 00 80 3F
9 = 00 00 10 41
Title: Re: Help with Sereja's specular method.
Post by: Sereja on January 23, 2013, 05:37:52 AM
Well, it seems binary codes, is much more complicated, then I even cud imagine. Since, my own logic, just dosn't work's here :P.
EhPortal 1.34 © 2024, WebDev