Guidance for best method to create an asset that will be spawned in game with 6 color variants.

 Hello all, I have a 3d model of a Cow That I have gotten off of Fab. It Comes with 65 Animations, and 6 color Variants.  I am looking for guidance on what might be the best options to compile into an asset that will be used to spawn into a game I am currently working on. 
 End game mechanics for this cow would be players can interact the same as one would their "player owned horse" like in Red Dead Redemption.

I have been getting general advice from GrokAI and will include the information I have received.

"To create a cow in Unreal Engine for Fortnite (UEFN) with six different variations using PNG files for base color textures, here’s an approach focused on memory efficiency:

  1. Texture Compression

    Use PNG with Lossless Compression: PNGs are already compressed, but ensure you’re using the most efficient settings. Higher compression levels in tools like Adobe Photoshop can reduce file size without losing quality.
    Convert to DXT/BCn Formats: If the PNG is used for textures, consider converting to DXT (BC1-3) formats which are more optimized for real-time applications like UEFN. These formats compress textures significantly while maintaining good visual quality for most applications.

  2. Texture Atlas

    Create a Texture Atlas: Instead of having six separate texture files, combine them into one large texture atlas (or sprite sheet). This atlas would contain all six variations side by side or in a grid. This reduces the number of texture binds and draw calls, which can be more efficient for memory usage.
    Atlas Layout: Arrange your textures in a way that minimizes wasted space. Tools like TexturePacker or even manual arrangement in Photoshop can help optimize this.
    UV Mapping: Adjust the UV coordinates in your 3D model to correspond with the correct part of the atlas for each variation. This means setting up UVs so they reference different parts of the atlas for each cow variation.

  3. Material Instances

    Base Material with Parameters: Create a base material that uses parameters for texture selection. Set up your material so that it can switch textures using a parameter like an index or UV offset.
    Material Instance Per Variation: Create six material instances from this base material, each pointing to the appropriate part of the texture atlas via UV offset or texture coordinate manipulation. This setup allows for one base material but multiple instances, which is memory efficient as only the base material’s shader needs to be loaded into memory.

  4. LOD (Level of Detail)

    Implement LODs: Even if you’re using high-res textures, consider creating lower resolution versions for further away LODs. This can save memory when the cow is viewed from a distance.

  5. Mipmaps

    Use Mipmaps: Mipmaps are pre-calculated, optimized sequences of textures, each one smaller than the last. They help in rendering quality at various distances, reducing memory usage by not loading full-resolution textures for distant objects.

  6. Streaming Textures

    Texture Streaming: If UEFN supports it, ensure textures are set to stream rather than load all at once. This means textures are only loaded into memory when needed, which can be especially useful for large environments or when multiple variations are not immediately visible.

Implementation in UEFN:

Material Setup: In UEFN's material editor, set up your base material with a texture sampler node that can be offset based on a parameter to select different parts of your atlas.
Blueprint or Actor Configuration: Use Blueprints or actor properties to switch between material instances based on gameplay conditions or simply to cycle through the variations.

By following these steps, you can achieve a cow model with six variations in UEFN while keeping memory usage efficient. Always test your setup in-engine to ensure performance meets expectations, as real-world performance can depend on many factors including hardware capabilities and scene complexity."

 I am leaning towards pursuing #3, creating a "CowBaseMaterial" with parameters for texture selection, to be able to create 6 different color variations in game. 

The files I have available for the 3d model include:

  • 3d object CowFBX: Anim_IP, Anim_RM, LOD, LowPoly, NoAlpha, NoAnim
  • PNG Textures: 6 color Variants
  • All animations are included in FBX files.

Thanks to any and all in advance, Guidance and advice is greatly appreciated. I am starting to get involved with more advanced work within UEFN, to which using GrokAI has been helping a lot, but would like some input from other Devs so I don’t get mislead by an AI :sweat_smile:

Hello,

You can ignore AIs advice about texture atlasing. (In your setup you’d either have 1 material and change the texture reference, or a more straightforward way might be to just have 6 materials)

For working with materials in UEFN, you’ll currently need to use Verse. So I’d start by trying to grok the basics of materials + Verse.

1 Like