-
Notifications
You must be signed in to change notification settings - Fork 223
General – UV2
For some extra details you can now add an secondary UV mapping to some of your meshes and use it for an overlaying texture. As an example, let’s say you’re working on an F1 car and have its body mesh unwrapped for a nice AO baking with evenly distributed details and everything. You’d also want to add some stickers on it, but with 2K resolution for AO texture stickers look sad, and 4K might look a bit much. With UV2 you can have a separate unwrap focused entirely on stickers, so their separate texture could use the space much more efficiently.
Currently, with existing KN5 format there is no good way to add UV2 to models directly, but, similar to VAO patch, you can generate an additional binary file for CSP to read and load UV2 from. Just use Content Manager: there is a tool on Content/Tools/Creator which can take an FBX file, filter out meshes with two unique UV sets and generate a new ”.uv2” file that you can save next to KN5 file (naming it the same).
For now the simplest way is to use a shader replacement and load the texture from there (and if you don’t want “extension” folder to end up with hundreds of textures, keep in mind you can always put them all in a zip file and refer to them as “SOMETHING = textures.zip::path/in/zip.dds”).
There are currently three shaders supporting UV2:
-
nePerPixelMultiMap_AT_NMDetail_stickers
; -
smCarPaint
(and derivatives); -
stPerPixelMultiMap_specular
(and stPerPixelMultiMap_specular_damage_dirt).
Shader smCarPaint
is easier to configure using “materials_carpaint.ini”, and that also includes stickers. Just look for StickersTexture, StickersMapsTexture and StickersCoverDetails parameters (just a reminder, with those material_… things you can always open the files themselves, they are fully documented in their first halves).
For others, a shader replacement might look something like this:
[SHADER_REPLACEMENT_...]
MATERIALS = …
SHADER = nePerPixelMultiMap_AT_NMDetail_stickers
PROP_... = extStickersMode, 1
RESOURCE_0 = txStickers
RESOURCE_FILE_0 = my_texture_pack.zip::stickers.dds
Property extStickersMode
is a bunch of flags, as in, just sum the values you need to get the required behaviour. Currenly supported:
-
1
: activate the stickers layer (although any other flag activates it too, and it’s always active withnePerPixelMultiMap_AT_NMDetail_stickers
shader); -
2
: alpha of stickers will affect alpha of diffuse texture too, meaning details texture will be hidden by stickers; -
4
: use additionaltxStickersMaps
slot to altertxMaps
as well (only in places where alpha oftxStickersMaps
is non-zero); -
8
: available tonePerPixelMultiMap_AT_NMDetail_stickers
only, use additionaltxStickersNormals
slot to altertxNormal
, added in v0.1.80-preview446.
So if, for example, you want to use both details hiding and txStickersMaps
, just sum them all together giving you 1+2+4=7
. If you only need details hiding, use 1+2=3
.
- While cars LOD generator in CM supports UV2, it might still get somewhat messed up, use carefully. Some models might even require further tweaking of Simplygon rules.
- UV2 uses half precision, should be all right in 0…1 range, but going outside of it too far might introduce artifacts.
- When looking for UV2 patch files, CSP checks skin folders first, so that can be used for creating some advanced skins.
If you have any question or suggestions, please feel free to add a new issue.
- Enabling Extended Physics
- Aerodynamics
- Body Flex
- Custom Suspension Joints
- Driver Weight Shift for Karts
- Extra Turbo Options
- More Clutch Damage
- New Inputs for Dynamic Controllers
- Physics Scripts
- Setup Items Driven By Controllers
- Suspension
- Cosmic Suspension
- Tyre Types
- Enabling Extended Physics
- General Options
- Custom Raycasting
- Collision Parameters
- Dynamic Physics Objects
- Geometric colliders
- Surface Tweaks
- Extra FX Flags
- Extra FX Emissive
- Mesh Adjustments
- Model Replacements
- Shader Replacements
- Scene Queries
- UV2
- General Options
- Analog Instruments
- Animations
- Digital Instruments
- Emissive Objects
- Extra Switches
- Inputs
- LED panels
- Multichannel Emissives
- Vintage Tachometers
- Audio
- Brake Disc FX
- Deforming Bonnets
- Driver Model
- Exhaust Smoke
- Exhaust Flames
- Extra Lights
- Fake Shadows FX
- Local Cubemaps
- Mesh Splitting
- Miscellaneous Options
- Neck FX
- Node Adjustments
- Smart Mirror
- Sparks
- Tyres FX
- Visually Adjustable Wings
- Wheels
- Wobbly Bits
- Wobbly Wipers