sama 67 Posted October 7, 2015 Hello modders Got into terrain building and have the need for new buildings (we dont need another greek island do we?) and have moved into addon making.Ive become proficient enough with blender and OB to be able to make some structures and get them working in game with uv mapped textures but have found that i should be using multi.rvmats for quality texturing.Im a bit lost with this.Ive looked at mondkalbs tut and looked through sample models and the rest. Heres how i believe it works? I uv unwrap my model in blender ,export this to gimp ,paint say the exterior walls red,interior black.These colours then get linked to _co.paa textures via text in a multi.vmat file.The coloured uv map is referenced in the rvmat as _mask.paa Is that part correct? .....Is the one uv map made in blender enough or do in eed to make 2 and combine them in o2 like in mondkalbs tut, or is this outdated? ..Ive noticed that in the tut he uses what looks like a standard textured uv map tagged as _mc aswell,and from what i can gather is the base texture and the mask is like an overlay?Is that correct? But if i look into A3 models and there textures ,they use _mlod as a textured uv map and _mc is like a grayscale or some shit...more questions to come!!! Share this post Link to post Share on other sites
PuFu 4600 Posted October 7, 2015 if you edit you post with punctuation and proper english i'll write a proper english tut based answer 2 Share this post Link to post Share on other sites
PuFu 4600 Posted October 8, 2015 I'll list the difference between using a multimat over the normal way of doing an UVs and textures for game assets, especially the ones that are pretty big when it comes down to size. A. The advantages of Multimat 1. you can work with, in 99% of the cases, with a library of seamless textures at higher resolution than one would use for say a single 2k texture. You can also mix-match different with supershaders 2. The game will consider one Multimat.rvmat as a single section. To get a similar texel resolution out of a 0 to 1 UVW space, you would need to have multiple supershader.rvmats for each UV, that would increase the section count (section count is in direct relation with draw calls for RV engine) 3. You can also have non-tilable textures for things like accessories - handles, doors, frames, windows etc B. The disadvantages: 1. there is no setting for Fresnel (N/K) In short: a. All your multi-mat textures are getting the Uv information of UV space 0 (some call it 0, some call it 1 - either way that is the FIRST UV space). b. The UV space 1 (some call it 1 some call it 2 - it is the SECOND UV space) is used for the special maps - those are: ADS (Ambient Detail Shadow), MC (Macro Overlay or alike) and MASK (used to specify what texture belongs where) c. A single multi-mat can handle 4 separate textures. Of course you can use more multimats if you need more textures per mesh. Think of it as a Muti/Sub-Object shader (3ds max jargon here: this is assigned based on Material ID. Since RV cannot assign or read Material ID per face or vertex, a MASK is needed). One for each RGB + Black channel. Each of the RGB+Black channels (the reason you need a MASK texture) should contain: 1 CO texture, 1 DTSMDI (similar to SMDI but the R channel can take another texture that is overlayed on the SMDI - a normal SMDI has G channel for specular, B for gloss or as BI calls it Specular Power) and 1 NOHQ texture d. ADS map (RGB map) - It is similar to the basic AS map (R White, G AO, B White) but with an added Blue channel that is used as a fake shadow (shadowbuffer) for distances over 100m. It needs to be said here that instead of the normal way AO is done (black to white), this needs to be done from 50% grey (RGB 128,128,128) to white. e. MC map (RGBA map) - There are 2 reasons for it's existance: 1. You can use it to overlay color (tint) certain areas - the RGB is used for the overlay. The Alpha is used for telling the power of this overlay from RGB channels is used over the CO textures in the multimat 2. Where there is no visible light source (overcast, bad weather, etc), the ADS map is not shown. So for better occlusion this MC can be used (advisable). In this case leave the RBG black, and use the inverted B channel lightmap in the Alpha (white for what is occluded, black for what is not). 3. Of course you can use the 2 together, just bear in mind that the colors from the RGB channels of MC map should never bee too "electric" if you want to use the Lightmap technique as well. Please try and ask question in a genera manner. I for once don't use Blender or GIMP, i use max and photoshop, so as you can see the reply doesn't focus on a particular software package. When i'll have the time (and mood), i'll write a proper tutorial in more detail than Mondklab did, especially when it comes down to maps used in UV space 2 1 Share this post Link to post Share on other sites
sama 67 Posted October 8, 2015 Thanks for that pufu it explains alot,tho i am confused with there being 2 uv spaces.From your reply Tilable textures like "concrete_co" etc,that will be used to texture the model,they need to be painted to the sections on a uv space (0)?What is uv space 0 called in the rvmat?Currently i have a mask uv (model of a simple test cube unwrapped and painted with black,red,green,blue colours) and that is all,with the textures referenced to these colours via the rvmat.I have mc,smdi etc parameters set to default numbers in the rvmat.I am just trying to get the multi mat textures to tile on model.When i can ill post pics etc. Share this post Link to post Share on other sites
PuFu 4600 Posted October 8, 2015 For textures, you can use Planar mapping, simple UV Maps if you need to (i'm sorry, i am not sure what blender terminology is). Those UV shells don't need to be inside the 0-1 UVW space (the square). Once you are done, unwrap everything to a second UV set inside the UVW 0-1 space. Paint a mask - or simply bake a diffuse map via render to texture (or transfer maps or render baking or whatever is called in blender), using the colors for each texture. You need to fit that one in the multimat i'll try to setup an example laters today Share this post Link to post Share on other sites
PuFu 4600 Posted October 8, 2015 here is an example: https://goo.gl/C5hLcZif you have the correct (mikeros way) setup for your P drive, just drag and drop the example_multimat folder in your P drive if you don't have mikeros way setup for your P drive (containing unpacked A3 data IE: P:\A3\), do so before dragging it over :D Share this post Link to post Share on other sites
sama 67 Posted October 9, 2015 Thanks pufu,ill take a look. Share this post Link to post Share on other sites
ewaldt 13 Posted October 15, 2015 Thanks too. i begin to understand the multimaterial. I need to us it for a house. Share this post Link to post Share on other sites
emoglobinsky 149 Posted November 30, 2015 Hey, I jump into this thread because I need some answers about the multimaterial step : I followed mondkab tutorials and it says we can have 4 textures masked by RGB+black, but the black area do not render the texture (It gives me back the default greyish shader). So my question is : is it possible do draw 4 textures with one mask ? Or do I have to create another multimaterial ? Second question : AS is for ambient shadow and is meant to be a pinkish/whitish file ? And MC texture file is a "bakeset" low-res of the entire object based on SECOND uvset ? Also, not relative but is there any tools that can fasten up the process of setting up materials (pretty harassing to manually edit a text file in 2015 to link texture files). Thanks ! Share this post Link to post Share on other sites
PuFu 4600 Posted December 1, 2015 Hey, 1. You can have a maximum of 4 individual textures (CO, (DT)SMDI, NOHQ) per |RBG + Black| indeed, one for each color (in short you can use 12 texture maps, 3 per color mask). The .mask file works as an Material_ID of sorts. If Black doesn't show, maybe it is because it has not been properly defined in the rvmat. 2. .AS is in fact an AO texture map, with all color channel but green, white. ADS is a more complicated texture map, composed of 2 individual AO passes, one of is used for low light environment (the blue one). I have explained it in post #4 of this thread, there is even an example file provided. 3. MC texture can be used to simple overlay color information. This is a RGBA (32bit) texture map, where RGB defines color, and Alpha defines intensity (bear in mind that the Alpha is used this way - black no intensity, white full intensity). It is also used to drive some sort of shadow buffer (in case of RGB black and Alpha inverted ADS color) to drive shadows at range (over 50 or 100m away IRC). 4. ADS, MC, MASK are supposed to be driven by a second uv set (UVset1 / tex1 in rvmat). there is a material editor inside OB that you can use instead of a text editor, but i would advise against that Share this post Link to post Share on other sites
emoglobinsky 149 Posted December 1, 2015 Thanks Pufu, I somehow just use a basic shader for the part that wasn't showing up in back mask. Will check later if I have the opportunity to try different settings. I manage to have all my material correctly setup ingame so right now I'm happy, but the MC texture seems to work in a strange way : It seems to multiply itself on top of the other _co textures. I tried to enlighten it a bit to remove those undesired satured and darkened result, but the render ended up bleached. Once again, i'll need to investigate this further later. One but not least question, is there a tool that can write custom rvmat without editing those text files manually ? (I know I can edit rvmat in Object builder, but I don't really know what stage are really are, if they have a precise order and how I can customize those). For example, i would like to had specular to my multimaterials, how should I proceed ? I'm following mondkab tut and he don't use speculars but : class Stage8 { texture = "#(argb,8,8,3)color(0.5,0,1,1,DTSMDI)"; texGen = "3"; Does that mean it will add these specular info to these "texgen" id ? //Blue texture="CA\structures\Data\Concrete\concrete_bare2_co.paa"; texGen = "3"; }; + class Stage14 { texture="CA\structures\Data\Stucco\stucco_001_NOHQ.paa"; texGen = "3"; }; Hey, 1. You can have a maximum of 4 individual textures (CO, (DT)SMDI, NOHQ) per |RBG + Black| indeed, one for each color (in short you can use 12 texture maps, 3 per color mask). The .mask file works as an Material_ID of sorts. If Black doesn't show, maybe it is because it has not been properly defined in the rvmat. 2. .AS is in fact an AO texture map, with all color channel but green, white. ADS is a more complicated texture map, composed of 2 individual AO passes, one of is used for low light environment (the blue one). I have explained it in post #4 of this thread, there is even an example file provided. 3. MC texture can be used to simple overlay color information. This is a RGBA (32bit) texture map, where RGB defines color, and Alpha defines intensity (bear in mind that the Alpha is used this way - black no intensity, white full intensity). It is also used to drive some sort of shadow buffer (in case of RGB black and Alpha inverted ADS color) to drive shadows at range (over 50 or 100m away IRC). 4. ADS, MC, MASK are supposed to be driven by a second uv set (UVset1 / tex1 in rvmat). there is a material editor inside OB that you can use instead of a text editor, but i would advise against that Share this post Link to post Share on other sites
PuFu 4600 Posted December 1, 2015 Thanks Pufu, I somehow just use a basic shader for the part that wasn't showing up in back mask. Will check later if I have the opportunity to try different settings. I manage to have all my material correctly setup ingame so right now I'm happy, but the MC texture seems to work in a strange way : It seems to multiply itself on top of the other _co textures. I tried to enlighten it a bit to remove those undesired satured and darkened result, but the render ended up bleached. Once again, i'll need to investigate this further later. One but not least question, is there a tool that can write custom rvmat without editing those text files manually ? (I know I can edit rvmat in Object builder, but I don't really know what stage are really are, if they have a precise order and how I can customize those). For example, i would like to had specular to my multimaterials, how should I proceed ? I'm following mondkab tut and he don't use speculars but : Does that mean it will add these specular info to these "texgen" id ? + Have a look over the example i did for sama here is an example: https://goo.gl/C5hLcZ if you have the correct (mikeros way) setup for your P drive, just drag and drop the example_multimat folder in your P drive if you don't have mikeros way setup for your P drive (containing unpacked A3 data IE: P:\A3\), do so before dragging it over :D Share this post Link to post Share on other sites
emoglobinsky 149 Posted December 1, 2015 Okay, thanks, I see how you are building your rvmat, every map under the same class, that makes more senses to me ^^ here is an example: https://goo.gl/C5hLcZif you have the correct (mikeros way) setup for your P drive, just drag and drop the example_multimat folder in your P drive if you don't have mikeros way setup for your P drive (containing unpacked A3 data IE: P:\A3\), do so before dragging it over :D Share this post Link to post Share on other sites