Author Topic: Vertex paint, transparent textures (water, glass) and other strange things  (Read 2760 times)

The Very End

  • *
  • *
  • Posts: 1402
Oh well, not explode, but increase ;p But I will agree on that :) Two quickies:

1: Transparent textures I have managed with using occapasy channel, however,  is ther a way to set level if transparent? Mine is on / off, nothing between :D
2: You mention color map, how does it differ from splat map / blend maps? Where you fit that when you have material with 3 different textures, one blend map, one macro map on bump slot? Got to be one cluster material haha!

Thumbs up!

1. You need to have a texture with alpha channel and texture name needs to have an extension _c1 (alpha test) or _c5 (alpha blend). And in Max, _c1 goes to the diffuse slot or if you are using _c5, it goes to the diffuse and opacity slot. Level of transparency comes from alpha channel, so if you need fully transparent map, then paint it black.

2. Blend/splat map defines where and how 3 albedo maps are blended together. With color map you can add additional color variation to those 3 maps. You only need to put blend map and 3 albedo maps in the material editor slots, rest of the maps are loaded by the engine.

« Last Edit: October 21, 2016, 11:46:39 AM by Petri Alanenpää »

The Very End

  • *
  • *
  • Posts: 1402
Thanks :)

I guess it's just the way I explain it, that makes things a bit difficoult. But, let's use last example over:
If I chose 1,2 and 3th material with any other name than track_blend_xxx it will throw the error mentioned earlier - hence I was so caugth up in the naming thing. I am fairly sure I do the exact same as above, other than that I have the extended material veiw aswell as 3ds max 2016. Could the compiler cause problems for the 2016 version, or is it the usual PEBCAK (Problem Exists Between Chair And Keyboard) syndrom?

Either way, I'm really thankfull for the insight you share! It gives a good impression on just how complex track making for a developer is compared to us petty modders. But thanks to your insight, how knows - maybe some of my work will turn out allright eventually? ;) 

Hmm okay I need to check if there's something broke with the naming. Can you take a screenshot of your material setup? I've only tested it with max 2015 and standard material editor.

The Very End

  • *
  • *
  • Posts: 1402
Thanks :)

Error code:
CommandLine: "D:/Programmer/Steam/steamapps/Common/Bugbear Entertainment/tools/bGeometry.exe"  -v -input "D:/Programmer/Steam/steamapps/Common/Bugbear Entertainment/mods/TrackPack/data/track/test2/test.bgo3" -output "D:/Programmer/Steam/steamapps/Common/Bugbear Entertainment/mods/TrackPack/data/track/test2/test.scne"
Assert failed! src\btoolcore\Bgo2Scne.cpp(1527): "strstr(get_relative_path(blend_c->file).c_str(), "_blend_c.tga")" invalid terrain blend material
Press any key to continue . . .

Picture of an material (for the sake of testing I just used the same texture to see what happens, same happens if I add 3 different textures:

blend_c needs to be in the end  :D  In your case texture name should be derby1_blend_c.tga

The Very End

  • *
  • *
  • Posts: 1402
Oh, goodie, thanks..... for now ;)

The Very End

  • *
  • *
  • Posts: 1402
So, I got it to work, or compile that is ;)
But, no matter what blend maps I use (I use the ones you use for testing), I get it something like this:


In my experiement I called the blend map test1_blend_c , and for the other 3 textures I called  them test1_groundxx_blend_c. Like this:

Couple of things.

1. Don't put *blend_c in the names of those 3 textures. They can be named whatever you want except *blend_c, *macro_ns, *color_c, *clutter_mask_t, *clutter_color_t. You just need to remember to put the _c in the end.

2. You need to create second uv channel to your object. Otherwise you'll see pink and other weird stuff.

3. You need to create *macro_ns and *color_c textures. Also *_ns textures for those 3 albedo textures. Otherwise you'll see pink colors and other weird stuff.

To create "empty" _ns texture, create small texture using values R:128 G:128 B:255 A:255. For color map use RGB:128.


Something like this:

myTrack_blend_c.tga
myTrack_macro_ns.tga
myTrack_color_c.tga
myGrass01_c.tga
myGrass01_ns.tga
myGrass02_c.tga
myGrass02_ns.tga
mySand01_c.tga
mySand01_ns.tga
« Last Edit: October 21, 2016, 04:25:17 PM by Petri Alanenpää »

The Very End

  • *
  • *
  • Posts: 1402
Oh sweet lord! Right, will test it out and see how it turns out. Thanks! :)

Edit: Success! Or well - kinda!


Some of the issues (other than what's vissible in picture):

1: There are several "lines" that suggest something is a bit off with textures, my guess - I'v done something wrong on the NS textures?
2: How to get a right ressolution on the textures? If I do an unwrap of the texture / uvm map it the textures repeats itself (as it should), but how could I prevent if from repeating the blend texture, errr.. the layout? Do I have to somehow unwrap the textures on different textures channels?

Meanwhile I'll do further trial and error'ing ;)
« Last Edit: October 21, 2016, 06:39:38 PM by The Very End »

1. Double check that all NS maps has necessary data on the correct channels (see modding document). Repeating lines suggests that the problem is most likely on the normal or AO.

2. With terrain blend material you can use standard material's texture tiling values to control tiling (works only on the three main textures controlled by the splat map).

Blend texture (ie. splat map) always uses mesh UV channel 2 and should have a basic planar mapping on that channel ie. the whole UV should fit inside the 0-1 UV space (square frame in the UV editor). It's usually a good idea to use same type of mapping on channel 1 too.
« Last Edit: October 21, 2016, 08:18:54 PM by Petri Alanenpää »

The Very End

  • *
  • *
  • Posts: 1402
Thanks yet again! Will check them NS maps, I suspect that converting them from bmap - png - tga - bmap has made something go bad with it, like an alpha or two lost in the process ;)

When it comes to texture tiling, you thinking of offset / tiling / angle selection in materials right? Never got those to work right when doing one material - one texture. The textures allways seems to be stretched and only way to fix that is to use unwrap / uwm map the shit out of it. Guess the magic of blend materials solves that aswell, haha!

Great to see you sharing knowledge here, we (the mod community) is happily to suck up all the information we can get!

Edit: It worked! Well not the NS but that's my bad somewhere. So, tilin on blend materials works, great :)
« Last Edit: October 21, 2016, 08:34:51 PM by The Very End »

Yeah actually we failed to mention in the document that you can't use those tiling values when creating normal (non-blend) material. They only work in blend material..  :D 

If you are converting from bmap, those channels are probably wrong. If I remember correctly, bmap switches red and alpha around for better quality.

Edit: Tested ns map with breckfest and it lost the alpha channel (originally red channel, so it lost normal map data)
« Last Edit: October 21, 2016, 08:49:37 PM by Petri Alanenpää »

The Very End

  • *
  • *
  • Posts: 1402
Oh, nice catch there.
How would you go about getting those textures? I know it's a bit in the grey zone as I understand you want to protect your assets, but well..What about releasing the textures as tga butwatermarking them / code them in a way the game engine would remove the watermark to prevent theft? Or even better, a database / place to reach out for the textures all-togheter without having to use shady 3d. party tools? :)

If I make a new one, it need to be "R:128 G:128 B:255 A:255. For color map use RGB:128"? Is A:255 the color given to the alpha channel?

The Very End

  • *
  • *
  • Posts: 1402
Meanwhile, a completely other question:

Do you support vertex animation, or flex animation? I'm thinking of flag animations and such by doing flex modifier. The animation is / can be stored on the timeline (autotime or setkey / time in 3ds max), but unless other animations it won't work in-game. Closest I can get is to make a lot of small invidual polygons that work as their own, but that's not ideal or precise enough.

Enlighten me :D