Home Technical Talk

n/a

sargentcrunch
polycounter lvl 10

Replies

  • leleuxart
    Options
    Offline / Send Message
    leleuxart polycounter lvl 10
    As far as I know, yes. Dirt/blend layers are really only good for breaking up textures with new ones. You could do vertex colors, but that would require a new mesh for each color. The best way I've done it is just a new material for each color. Use a grayscale diffuse texture(mostly light values) and color it with the Diffuse Color option.
  • sargentcrunch
    Options
    Offline / Send Message
    sargentcrunch polycounter lvl 10
  • leleuxart
    Options
    Offline / Send Message
    leleuxart polycounter lvl 10
    Yeah. Same textures, different materials with different colors applied. As far as it being moreefficient, probably not. It's definitely the easiest solution for the artist from my experience.

    CryEngine is a Deferred Renderer(I believe it's fully Deferred?) and from what I understand of them, materials are stored in the G-Buffer, along with all of the lighting info gathered in the first pass, so a few extra materials won't hurt, but I definitely wouldn't do multiple materials for every surface in a level.
  • sargentcrunch
    Options
    Offline / Send Message
    sargentcrunch polycounter lvl 10
  • leleuxart
    Options
    Offline / Send Message
    leleuxart polycounter lvl 10
    Yeah, I understand, I went with this method for some pipes. I'm not sure how many different colors you plan on using, but you could also do a large atlas sheet of each wall that's already colored.
  • sargentcrunch
    Options
    Offline / Send Message
    sargentcrunch polycounter lvl 10
  • leleuxart
    Options
    Offline / Send Message
    leleuxart polycounter lvl 10
    In the engine? Not that I know of. You can tile your textures, but it wouldn't really work that well with an atlas. You're right though, you'd just have to break up your meshes and tile them that way.
  • sargentcrunch
    Options
    Offline / Send Message
    sargentcrunch polycounter lvl 10
  • divi
    Options
    Offline / Send Message
    divi polycounter lvl 12
    Maybe im being a bit thick in the Head right now but what exactly is stopping you from tinting the walls with vertex color? Unless you need fancy transitions between colors or dont want to tint the texture uniformly its probably the most efficient approach. Worst case it might need some extra geometry if you want sharp transitions between connected geo.
  • leleuxart
    Options
    Offline / Send Message
    leleuxart polycounter lvl 10
    Wouldn't vertex colors require a separate mesh for each color? I thought when you check the 'vertex colors' box, it's letting CryEngine use whatever color/alpha is applied to the mesh. So if he wanted walls that are white, brown, tan, red, etc. that would be 4 more meshes to color and export. Either way, I don't think the extra materials or extra meshes are "efficient", but whatever works. :thumbup:
  • sargentcrunch
    Options
    Offline / Send Message
    sargentcrunch polycounter lvl 10
  • divi
    Options
    Offline / Send Message
    divi polycounter lvl 12
    technically you can only color vertices and it will then create a Gradient between adjacent vertices. So to color an entire Face all vertices that make up that Face need to have that color assigned. Depending on 3d package you can do that on a per-Face basis. Keep in mind that vertex colors are multiplied, so only darker values than the textures' will have much Impact. Not Sure if that's still true, but vertex Colors were not gammacorrected so check the Colors asap in the engine.
  • sargentcrunch
    Options
    Offline / Send Message
    sargentcrunch polycounter lvl 10
  • divi
    Options
    Offline / Send Message
    divi polycounter lvl 12
    Which is why i said you might need extra geometry for sharper transitions. Or you break the mesh apart which may or not may be a better Option.
  • sargentcrunch
    Options
    Offline / Send Message
    sargentcrunch polycounter lvl 10
  • divi
    Options
    Offline / Send Message
    divi polycounter lvl 12
    do you have a screenshot of an example that would need it?
  • bac9-flcl
    Options
    Offline / Send Message
    bac9-flcl polycounter lvl 10
    Erm, I think you can use one single neutral gray stucco material colored from vertices. The statement that you'll need to separate stuff into multiple meshes to use vertex colors is incorrect.

    If you don't want wall vertices to influence the color of e.g. walls or a ceiling, which should retain the original look of their diffuse textures, - well, then just split the stucco-covered surfaces into a separate object in your DCC package, paint the vertices you want in safety, and attach that part back to the building without welding. You'll have some duplicated vertices along the edges, but that would've been the case anyway as you have the edge of the material going there.

    Alternative or supportive method would be to use the Blend Layer feature that allows beautiful transitions between two textures using a depth mask: look at how painted wood is done on the sample Forest level or read up the documentation on the subject of it.
  • divi
    Options
    Offline / Send Message
    divi polycounter lvl 12
    nobody said anything about using multiple meshes...
  • leleuxart
    Options
    Offline / Send Message
    leleuxart polycounter lvl 10
    divi wrote: »
    nobody said anything about using multiple meshes...

    I did around the beginning of this thread. From the way that I understand using vertex colors for coloring meshes, you'd need separate meshes for each color. If you apply red to the vertices of the mesh and tick 'Vertex Colors' in the material, does it not apply the red in engine? So what if he wanted to use the same wall mesh, but with blue or another color?

    I still think having a mostly white/light gray texture and doing a new material for each wall color is the easiest to manage.
  • divi
    Options
    Offline / Send Message
    divi polycounter lvl 12
    different color for the "same" mesh requires a different mesh. its a shame really that cryengine still won't allow you to somehow color vertices in editor.
  • lukepham101
    Options
    Offline / Send Message
    lukepham101 polycounter lvl 7
    Hey man, like previously said before there's a bunch of ways you can do it provided your stucco texture is not already tinted in the texture. You're gonna have to separate them into separate material ID's for the first and third to work however.

    1) Just change the diffuse colour of the material, however I would not recommend this to be the best way as it will change the colour of EVERYTHING on the texture, which is not what you want since the chips and cracks would not be green/red etc.

    2) Like the others said, you can do technically do it through vertex color and it would tint it uniformly, but this would make it very difficult and annoying if you needed to change this later, and you'd need to do for every mesh you'd wanna tint, so that's a bad option too.

    3) Best option is doing it in the Dirt layer in order to tint it. Essentially it's pretty much making a mask layer for what you want tinted in the texture and what you don't want to be affected. This helps you accurately give it that painted stucco look and still have the chips and such not being affected. Furthermore it's an easy value to change on the fly if you need it. Read up on documentation dude, it helps! :)

    image005.jpg?version=1&modificationDate=1313159786000

    http://freesdk.crydev.net/display/SDKDOC3/Dirt+Layer

    http://freesdk.crydev.net/display/SDKDOC2/Basic+Material+Parameters
  • bac9-flcl
    Options
    Offline / Send Message
    bac9-flcl polycounter lvl 10
    Actually, the Dirt Layer feature is obsolete and was replaced by the Blend Layer.

    http://freesdk.crydev.net/display/SDKDOC2/Blend+Layer
    divi wrote: »
    different color for the "same" mesh requires a different mesh. its a shame really that cryengine still won't allow you to somehow color vertices in editor.

    Diffuse color is changing the appearance of all geometry using an affected material and you will need two materials applied to separate parts of the mesh or two meshes if you want to achieve two colors with the diffuse color material property.

    However, that is completely unrelated to the vertex colors and you can paint any amount of differing colors you want without splitting anything into multiple materials or meshes. Example being a rainbow-colored wall using one material, one mesh and 64 vertices with different stored color values.
  • divi
    Options
    Offline / Send Message
    divi polycounter lvl 12
    the issue is that he doesn't want a smooth transition between colors or use extra geometry to create very small gradients. would be great if there is any other way to achieve that other than actually splitting the geometry, but i haven't heard of any as of yet.
  • bac9-flcl
    Options
    Offline / Send Message
    bac9-flcl polycounter lvl 10
    Ah, alright then. Sharp transitions can be achieved with Blend Layer and a depth mask, or, indeed, if a plain and simple straight line is required, with additional geometry (additional edge loop close to an existing one a separated edge with duplicate vertices on each side).
Sign In or Register to comment.