Page 1 of 9

2009-11-06 snapshot (updated again and again...)

Posted: Sat Nov 07, 2009 4:45 am
by jlv
Changes:
- Normal and specular maps.
- Added 'Skip' key - jumps ahead one second. Defaults to '/'.

To find the normal and specular maps, the game will remove .png from the texture and replace it with _norm.png or _spec.png. If that fails, it will then try removing .jm from the model and replacing it with _norm.png or _spec.png, but only for statues. For bikes and riders, it will fall back to the base texture name with .png replaced (e.g. rm125_norm.png).

The normal maps are tangent space normal maps. The tangent vectors should match the ones that Blender uses.

The specular maps should have the specular color for the RGB values and the shininess for the alpha. If the alpha is fully opaque (alpha=255) it will use the specular value from the model, otherwise, alpha=0 sets the specular exponent to 0, and alpha=254 sets the exponent to 128.

Simple! :D

Update 2009-11-07:
- Don't use "half" for variable names as it is a reserved word in ATI's compiler.
- Filter norm/spec maps out of the skin list.

Update 2009-11-07a:
- Fixed tangent vector bug for weighted meshes.

Update 2009-11-07b:
- Fixed bug where texture unit 1 was left on after drawing statues.
See? I told you these aren't well tested...


Windows users: http://mxsimulator.com/snapshots/mx-2009-11-07b.exe
Linux users: http://mxsimulator.com/snapshots/mxbin-2009-11-07b

Replace mx.exe or mxbin with one of the above files. I'd keep a backup of the originals since these aren't well tested.

Re: 2009-11-06 snapshot

Posted: Sat Nov 07, 2009 4:48 am
by DJ99X
YEEEESSSSS :shock: :shock: :shock: :shock:

Time to try this baby out!

Re: 2009-11-06 snapshot

Posted: Sat Nov 07, 2009 4:50 am
by yzmxer608
Think I'll have to learn some new things now :D, can't wait to see what this can do.

Re: 2009-11-06 snapshot

Posted: Sat Nov 07, 2009 4:50 am
by Goardy
excellent work jlv, this will be a significant step forward for the visual aspects of the game

Re: 2009-11-06 snapshot

Posted: Sat Nov 07, 2009 5:06 am
by Wes Wamsley
thanks!

Re: 2009-11-06 snapshot

Posted: Sat Nov 07, 2009 5:14 am
by DJ99X
Woot!

Here is a test on my Broadmeadow fences. Just throw the unzipped files into the Broadmeadow folder. Yeah, they are pretty dodgy maps, but its just to show you the shaders in action

Re: 2009-11-06 snapshot

Posted: Sat Nov 07, 2009 5:25 am
by yomo
I haven't tried it out yet.

But thank you so much! amazing work!
Whats the go with the models? do they still work in there current state and are just not using the normal mapping? (I tried to de-cypher the explanation but with limited luck)

Lets crank out some normal models/textures and show the world what MXS can do :D

Awesome work again JLV!

Re: 2009-11-06 snapshot

Posted: Sat Nov 07, 2009 5:27 am
by DJ99X
Yes. Nothing will look different until you start adding the maps.


BTW, those maps also work for Cypress Hollows

Re: 2009-11-06 snapshot

Posted: Sat Nov 07, 2009 5:30 am
by yomo
Ahh I think I understand now.

Is the normal map just a png file that you drop into the personal folder as you normally would?
Also say for bike skins would the whole skin be "converted" or what ever you do to it to make it normally mapped or would it just be the shading template?

Re: 2009-11-06 snapshot

Posted: Sat Nov 07, 2009 5:33 am
by Wes Wamsley
Oh wait so the reason nothing looks shiny like it did in the snapshot before this is because maps haven\'t been added? explain this to me please?

Re: 2009-11-06 snapshot

Posted: Sat Nov 07, 2009 5:34 am
by kwic73
This snapshot finally finshed of my graphics card. I guess this is a good reason to get a new one.

Re: 2009-11-06 snapshot

Posted: Sat Nov 07, 2009 5:36 am
by DJ99X
JLV. Question about defaulting for the rider and bike models. So it will not default to rider_body-ddmxv2 or yz250f-race, if our skins are called rider_body-ddmxv2-thorblue and yz250f-race-Samedi if the equivalent normal maps for these skins are missing?

Re: 2009-11-06 snapshot

Posted: Sat Nov 07, 2009 5:40 am
by jlv
That fence is way cooler than the shiny/lumpy cube I was testing with...

Yomo, typically you create two meshes, one low detail mesh that you will actually use, and another super detailed mesh that you use to create the normals for the less detailed mesh. Look up texture baking for more info.
Wes Wamsley wrote:Oh wait so the reason nothing looks shiny like it did in the snapshot before this is because maps haven\'t been added? explain this to me please?
No the original per pixel shader is still there. Post lastlog.txt so I can see the shader compiler errors.
DJ wrote:JLV. Question about defaulting for the rider and bike models. So it will not default to rider_body-ddmxv2 or yz250f-race, if our skins are called rider_body-ddmxv2-thorblue and yz250f-race-Samedi if the equivalent normal maps for these skins are missing?
Unless I messed something up, "rm125-ktm125sx-2010 stock.png" should look for "rm125-ktm125sx-2010 stock_norm.png" then "rm125-ktm125sx_norm.png".

Re: 2009-11-06 snapshot

Posted: Sat Nov 07, 2009 5:41 am
by DJ99X
OK, that is excellent to know!

Re: 2009-11-06 snapshot

Posted: Sat Nov 07, 2009 5:45 am
by yzmxer608
FF works pretty good too ;).