You are here

Texture Map Setup - PBR to CR

AlexTSK's picture
I was in the War!
Posts: 2764
Texture Map Setup - PBR to CR
#1 Submitted: Mon, 06/07/2015 - 17:32

Hey gang, I thought I'd make a little thread about a some discoveries I've made while working with textures in CR so I hope you find some useful information here even if you don't use a PBR workflow for texture creation.

First off CR doesn't use PBR(Physically Based Rendering) so when exporting your textures from say the Quxel Suite DDO plugin or the DDO legacy plugin you might find that you have too many maps.I had one extra map from my export out of the Quixel Suite which was the gloss map, and since CR doesn't use PBR I had nowhere to plug it into.

Here's a quick overview of how the textures work in CR:

- If you have a look at one of the car textures in the game, you will notice a lot of transparency happening, this is because CR uses the transparency for certain things depending on the texture map.

Here's what Carma: R uses in terms of texture inputs, and what the alphas in each map control:

Diffuse Texture
The transparency/alpha in the diffuse texture determines the amount of reflectivity

Which means : An completely white alpha map will give you 100% reflection, while a completely black alpha will give you no reflection. You can tell how opaque parts of your texture are from the converted map (read below). If you have a lot of opaque parts, those parts will be more reflective, if you have more transparent parts, those will be less reflective.

Specular Texture
The transparency/alpha in the specular texture determines the specular power

Normal Map Texture
There is no alpha in the normal maps as far as I know so you can safely use whatever normal map you have without any transparency[/u]

How do I replicate these alphas in my own textures?

For the sake of copyright and whatnot I will use my own textures as the examples in the thread.

So if you convert a TDX texture from a CR car (in this case, you'll be looking at the car paint texture) and take a look at it it will look similar to this:

The checkerboard pattern is the background of the image(in this case, its in Photoshop), this is what I mean about the transparency. Now if you're creating textures for your vehicle, chances are none of them are transparent and your output maps are the following:
(I've omitted the normal map since that doesn't need any alphas)

Albedo/Diffuse (with the AO map baked in)

Specular

Gloss

You won't find a gloss map input in any of the CR material files, but if is very useful when used as an alpha.

This is what I did to prep my textures to be converted to a TDX using Trent's Gibbed Tools(to then be used by CR).

To reiterate my earlier point about the alpha map

A completely white alpha map will give you 100% reflection, while a completely black alpha will give you no reflection. You can tell how opaque parts of your texture are from the converted map (read below). If you have a lot of opaque parts, those parts will be more reflective, if you have more transparent parts, those will be less reflective. So If I had used the specular map in my Alpha slot on the Diffuse Map I would get a less reflective map since the Specular map has a lot more grey in it.

Diffuse
1 : Plug your Gloss Map into the Alpha Channel of your base Diffuse/Albedo map
2: Make sure your Alpha channel is named Alpha 1 (this might not be necessary for non-photoshop users)
3: Save your images as a 32 bit PNG (if you're using Trent's Gibbed Tools))
4: If you've done it correctly, your PNG should have saved the transparency, if not go back and do it again correctly
5: The texture is now ready to be converted to a TDX to be used in CR

Specular
1 : Plug your Gloss Map into the Alpha Channel of your base Specular Map
2: Make sure your Alpha channel is named Alpha 1 (this might not be necessary for non-photoshop users)
3: Save your images as a 32 bit PNG (if you're using Trent's Gibbed Tools)
4: If you've done it correctly, your PNG should have saved the transparency, if not go back and do it again correctly
5: The texture is now ready to be converted to a TDX to be used in CR

Important Note
Photoshop is garbage at handling PNG as far as I understand so I suggest if you are using Photoshop that you get SuperPNG. Its a small little plug in that works its magic and is very easy to use (it comes with a manual in pdf format)

Screenshots don't really get that much across but I'll throw them up anyway. It's not 100 percent the same since a PBR environment has some other settings that don't apply to CR but I find that it looks pretty damn close. To really see the reflections work you'll obviously have to check them for yourself in-game.

Here's the car in a PBR real time renderer

And here it is in CR

Let me know if any of this makes sense and please moan if I've gotten anything completely wrong so I can learn :)

Edited by: AlexTSK on 06/07/2015 - 18:30
starbuck's picture
Velociraptor Fister
PayPal Backer
Posts: 1409
Submitted: Mon, 06/07/2015 - 18:51

Cool tutorial.

Looks like the trees on a really big plastic model kit. :)

2 questions.(more like 12 :) )

!) What image format works best in the 3d program that you use. Can you also detail the output settings so we dont get weird issues ? Can you link to a zip file containing the original and final images ?

2) Is it better to have separate images of each texture or would it be best to make those images in the collages that you showed ?

And 3) what are each of those images exactly. Are they merged into one ?. Really sorry for this one because it really lost me, which I am sure is probably me being stupid again.

Edited by: starbuck on Mon, 06/07/2015 - 18:53

Why is it that when you are a child at the dinner table you can get punished asking for someone to please pass you the fork and knife ?

hazardic's picture
Cunning Stunt Licker
Kickstarter Backer
Posts: 499
Submitted: Mon, 06/07/2015 - 19:00

thanks for this tut, i was a lil bit confused about how reflections work and was running in the dark here

AlexTSK's picture
I was in the War!
Posts: 2764
Submitted: Mon, 06/07/2015 - 19:09

starbuck wrote:
1) What image format works best in the 3d program that you use. Can you also detail the output settings so we dont get weird issues ? Can you link to a zip file containing the original and final images ?

As long as your maps are using a lossless format like say Targa(TGA) The image format that you use to preview your textures in the 3D app don't really matter. What you should end up is a 32 bit PNG file with transparency.

starbuck wrote:
2) Is it better to have separate images of each texture or would it be best to make those images in the collages that you showed ?

That depends. You'll have to think about laying out your texture sheets beforehand and it takes some planning. You want to think about the fact that you'll probably want to use a damaged version of the texture as well (for when the car gets hit, CR blends between a 'undamageed' and a 'damaged' texture to give the illusion of paint peeling and crumpled panels and such) What i've done above is laid out all the bodywork as well as the undebody on a single texture sheet because it's easier to keep track of just a single high res texture rather than having say 2 or 3 different textures. You also want to think about minimizing the number of textures on the car to save memory for the people using your mod. Thats not to say you shouldn't have multiple textures, because you will need more than one texture, just keep the numbers down when possible. Essentially you can have as many textures and damage textures as you want mapped to one piece or multiple pieces of geometry.

starbuck wrote:
3) what are each of those images exactly. Are they merged into one ?. Really sorry for this one because it really lost me, which I am sure is probably me being stupid again.

Which images exactly?

The Diffuse map contains the color information, the Specular map contains reflectivity and the Gloss map is used in a PBR workflow to determine the roughness of material on an object. The rougher the material the more blurred the reflection becomes.

I hope that made sense, feel free to ask anything and I will do my best to answer :)

Edited by: AlexTSK on Mon, 06/07/2015 - 19:10
starbuck's picture
Velociraptor Fister
PayPal Backer
Posts: 1409
Submitted: Mon, 06/07/2015 - 19:38

Which images exactly?

"The Diffuse map contains the color information, the Specular map contains reflectivity and the Gloss map is used in a PBR workflow to determine the roughness of material on an object. The rougher the material the more blurred the reflection becomes."

For the past few days I have been really disoriented than normal. Right now NONE of that makes sense to me.

I THINK you are talking about the image settings in 3DsMax for example , right ? Cause I know some about diffuse and specular. But dont remember seeing a "gloss" setting. Or at least I used to know about them. Some times I get headaches to where I dont understand how to tie my shoes It takes a long time staring at my monitor going "Huh" ? :)

So they are 3 different images that you edited in your "Paint shop" ?
Or are they like the C2 image files that you used to make transparencies. If you remember I think it was separating the RGB (?) and making one of them black (or was it white ?)
Or are these material settings used for example in 3dsMax ?

Reason I ask was because I was going to make a simple soapbox today and start from scratch in 3dsMax to try and get my own test car into the game (SOME day).

Thanks of course for replying so quick.

Why is it that when you are a child at the dinner table you can get punished asking for someone to please pass you the fork and knife ?

AlexTSK's picture
I was in the War!
Posts: 2764
Submitted: Mon, 06/07/2015 - 20:51

The images in question don't really have anything to do with my 3d program of choice but yes you can plug them into your Colour/Diffuse slot in 3Dsmax or any other similar 3d software. All the maps are generated in the Photoshop plugin I use and yes they are 3 different images :)