Blender and STMR

@kingpinn said in Blender and STMR:

Another thing that specular maps are good for is windows.. You can have a pretty simple grey square for the window diffuse texture, and then use the window texture that has all the dirt and smears or what ever for the specular layer, I find it gives a better look and is slightly easier to see out of!

Hey Kingpin,
Any hints on how to make the image files needed to get the glass to be clearish in the game. All of mine look like solid grey painted metal. ☹

I don't have Photoshop so I use Paint.net and Gimp for my images/painting.

@justafordguy, This is from the Kraz255. This goes in the meshes/mesh.xml

<Material
Blending="alpha"     <--- needed for glass
DiffuseMap="trucks/kraz255_glass__d_a.tga"
MeshParts="chassis 0"
SpecularMap="trucks/kraz255_glass__s_d.tga"
/>

Then go into the MeshCache.zip and open the glass texture to see how the Alpha channel is.

last edited by Tattoo

@tattoo said in Blender and STMR:

@justafordguy, This is from the Kraz255. This goes in the meshes/mesh.xml

<Material
Blending="alpha"     <--- needed for glass
DiffuseMap="trucks/kraz255_glass__d_a.tga"
MeshParts="chassis 0"
SpecularMap="trucks/kraz255_glass__s_d.tga"
/>

Then go into the MeshCache.zip and open the glass texture to see how the Alpha channel is.

@Tattoo ,
So I can just use the Diffuse and Specular images from the Kraz255 in the game?

Not sure I understand the part about the alpha channel from the MeshCache.zip file. Once I open the glass texture file from the .zip what do I do with it?

@justafordguy If what Tattoo has suggested doesn't work, I think your issue could be to do with the Alpha layer on the texture used for the windows.

I can't remember off the top of my head, but I believe a black alpha layer means none of your windshield texture will appear in-game aka completely see-through window. If the alpha layer is white, opposite will happen. The thing I can't remember is which way round that is, so just try it out and I'm sure you'll figure it out.

If you open the image that Tattoo has mentioned ("trucks/kraz255_glass__d_a.tga") you can check the alpha layer in that texture which will give you an idea as to how you would like yours to be.

@justafordguy said in Blender and STMR:

So I can just use the Diffuse and Specular images from the Kraz255 in the game?

No, I'm not saying that. I pointed to the blending=alpha to make the window texture see thru.

@justafordguy said in Blender and STMR:

Not sure I understand the part about the alpha channel from the MeshCache.zip file. Once I open the glass texture file from the .zip what do I do with it?

You can look at the alpha channel to see how it's done in that texture image so you can do something similar in your texture image.

@kingpinn said in Blender and STMR:

@justafordguy If what Tattoo has suggested doesn't work, I think your issue could be to do with the Alpha layer on the texture used for the windows.

I can't remember off the top of my head, but I believe a black alpha layer means none of your windshield texture will appear in-game aka completely see-through window. If the alpha layer is white, opposite will happen. The thing I can't remember is which way round that is, so just try it out and I'm sure you'll figure it out.

If you open the image that Tattoo has mentioned ("trucks/kraz255_glass__d_a.tga") you can check the alpha layer in that texture which will give you an idea as to how you would like yours to be.

So for glass I need to adjust the alpha layer of my Diffuse image to be similar to the one from the .ZIP? And if I use the ones from the Kraz255 (or any other in game truck) I shouldn't need my own images at all, I just refer to them in my mesh.xml file like Tattoo showed.

@justafordguy said in Blender and STMR:

So for glass I need to adjust the alpha layer of my Diffuse image to be similar to the one from the .ZIP?

Correct. When you say .zip I assume you mean the Kraz texture. Just use it as a reference as to how your window textures alpha layer should be, i.e. how black or white it is.

You should use your own images, the Kraz ones wouldn't look right on your truck plus the UV's will be different too. Tattoo is showing how the code should appear in your trucks mesh file. All you need to do is replace the kraz textures with your own.

@kingpinn said in Blender and STMR:

@justafordguy said in Blender and STMR:

So for glass I need to adjust the alpha layer of my Diffuse image to be similar to the one from the .ZIP?

Correct. When you say .zip I assume you mean the Kraz texture. Just use it as a reference as to how your window textures alpha layer should be, i.e. how black or white it is.

You should use your own images, the Kraz ones wouldn't look right on your truck plus the UV's will be different too. Tattoo is showing how the code should appear in your trucks mesh file. All you need to do is replace the kraz textures with your own.

Oh, OK. So I just need a grey image (which I map my UVs to) with the alpha set correctly and referenced in my mesh.xml like Tattoo showed.

@justafordguy, You actually CAN use an existing image for your mod. I didn't think about that. You just have to UV map it to the image that works best for your mod. That'll work too.

@tattoo said in Blender and STMR:

@justafordguy, You actually CAN use an existing image for your mod. I didn't think about that. You just have to UV map it to the image that works best for your mod. That'll work too.

@Tattoo, You are correct, I wasn't able to figure out how to create a texture file that works from scratch but I found one in the game files that I just copied/edited a little and mapped my UVs to it and it works fine. My windows don't look great but at least they are clear'ish. 😁

I did run into one more question, Is there a way to make the glass in an addon item (removable hard top) clear? I tried to use the same image file and changed the mesh.xml file for the top but it didn't work for some reason.

@justafordguy said in Blender and STMR:

I did run into one more question, Is there a way to make the glass in an addon item (removable hard top) clear? I tried to use the same image file and changed the mesh.xml file for the top but it didn't work for some reason.

Yes, that's what I do to the default window textures because I don't like how dirty they are. Just delete the alpha channel.

@tattoo said in Blender and STMR:

@justafordguy said in Blender and STMR:

I did run into one more question, Is there a way to make the glass in an addon item (removable hard top) clear? I tried to use the same image file and changed the mesh.xml file for the top but it didn't work for some reason.

Yes, that's what I do to the default window textures because I don't like how dirty they are. Just delete the alpha channel.

I can't get the windows of the addon removable hardtop to look clear. I used the same window texture that works fine on the truck and added the same stuff to the tops mesh.xml file but the tops windows are not showing up clear.

Still no luck getting the glass in an add-on item (removable hard top) to be translucent. Any idea if it's even possible?

its like making normal glass on mods (sorry for not answering i been out ot the forums lately)

use the Blending="Alpha" and point it at your mesh part that you want to be rendered as glass

@justafordguy it is possible, I make my windshields addons as well because I prefer a kind of wirewindshield myself because normal windshields are getting full of mud (in reallife and in-game). Just make it like forces said and it should be fine.

That's what I did but no luck. I must have a typo I missed somewhere. Back at it I guess.

@justafordguy Strange, it worked for me, I can post my .XML when I'm home, but that could be tomorrow

last edited by wrangmog

@wrangmog said in Blender and STMR:

@justafordguy Strange, it worked for me, I can post my .XML when I'm home, but that could be tomorrow

Cool, thanks.

Hey guys, I deleted the .XMLs associated with the removable hard top and built them again and now it works. I must have had a typo somewhere. Thanks for all the help.

0_1528572464687_20180609151937_1.jpg

@justafordguy glad you fix it and thats a nice looking Bronco

p.d. you should change the tires tho, make yours