Help with Sereja's specular method.

Started by 21 | Reacter, July 26, 2012, 05:06:34 PM

Previous topic - Next topic
July 26, 2012, 05:06:34 PM Last Edit: July 27, 2012, 06:53:46 AM by SleepKiller
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

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.
Beauty is, the way to perfection.

Glory to Ukraine!  :mf:

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

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...
Beauty is, the way to perfection.

Glory to Ukraine!  :mf:

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

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...
Beauty is, the way to perfection.

Glory to Ukraine!  :mf:

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 :)

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

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
Beauty is, the way to perfection.

Glory to Ukraine!  :mf:

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][/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.
Beauty is, the way to perfection.

Glory to Ukraine!  :mf:

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

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.
Beauty is, the way to perfection.

Glory to Ukraine!  :mf:

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)
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)

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)

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

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.
Beauty is, the way to perfection.

Glory to Ukraine!  :mf: