Global alpha map for materials to speed up render

Forums Wish List Global alpha map for materials to speed up render

This topic contains 11 replies, has 2 voices, and was last updated by Jeremy Hill 5 months ago.

Viewing 12 posts - 1 through 12 (of 12 total)
  • Author
    Posts
  • #2190
    Eric
    Eric

    The first question when a ray hits a poly, should be, “are you there?”

    If there is a global alpha map which has a pixel value of 0 then the conversation is over. If the value is above 0 then load the rest of the material. Therefore the global alpha filename + coords,etc, should exist in the ‘header’ of the material.

    There is no problem with existing holes/alpha built into the material they will still be there rendering at regular speed.

    The user should know to use a sensible resolution for the global alpha to get the best render speed.

    #2192
    Jeremy Hill
    Jeremy Hill

    I think you are looking for what Bella refers to as Opacity; every material type has a set of common attributes, one of which is Opacity, which may be controlled using either a scalar value, or a map:

    #2194
    Eric
    Eric

    Yes Opacity.

    I’m asking for an Global opacity map in the UI, which obviously only subtracts from the existing opacity that’s already in the material, it wont reveal new areas.

    From the renderers point if view, this data should be read and interrogated before the whole material is read. I expect this will speed up rendering trees 10x.

    Btw. the term opacity is annoying, it means ‘lack of transparency’ so saying ‘less opacity’ sounds like a double negative.

    Visibility sounds rubbish but makes more sense, erm….

    #2195
    Jeremy Hill
    Jeremy Hill

    Thanks for the feedback, but it is unlikely at this point we would change the terminology, as it would break files.

    As for the addition of yet another opacity value, which operates on the current one (which is already global to the material), the general way to accomplish this would be to modulate the opacity value or map. However there is yet another way, and that would be to reference the material in a blend or stack material, and apply the second opacity there (this could be done using either the per-material opacity in the blend/stack, or at the global level in the blend/stack). This can be a useful method of working in general, since it allows defining one material, and yet using it slightly differently in different places, by inclusion in different blend/stack materials.

    As for how any of this affects performance, provided we are doing our job right, we will not require any specially-privileged extra opacity — the system is very generic (hence the consistent usage of “opacity” in the various places it appears), so regardless how many levels of opacity are applied, if they sum to zero for a given impact, the relevant optimizations will be applied — and if they are not, that would indicate we have coding work to do, not the need for extra parameters.

    #2196
    Eric
    Eric

    Surely you mean ‘specially-privileged opacity remover’ instead of ‘specially-privileged extra opacity’

    I feel like there’s a confusion here, Just want to remove visibility, never add any.

    Want to avoid interrogating the whole material, esp. for leaf type geometry, where half the area is clipped.

    #2197
    Jeremy Hill
    Jeremy Hill

    Sorry, I meant “extra” in the sense of “additional” — that we would not gain performance by an additional opacity attribute.

    #2198
    Eric
    Eric

    Ok thanks, I understand better now.

    However what you wrote does suggest that, where appropriate, there is a big speedup, because the query, are you there? is a quick one, which half-the time will save you any further query.

    Think about sky drums, this is where we put a tree-line/city skyline/mountain ridge image mapped onto a cylinder. Maybe its a hdr, but the point is the upperhalf of the cylinder will be invisible… no need to read the hdr.

    #2200
    Eric
    Eric

    opacity
    /ə(ʊ)ˈpasɪti/

    -the quality of being obscure in meaning.

    Similar:
    lack of clarity
    obscurity
    abstruseness
    unclearness
    density

    Is funny?

    #2201
    Jeremy Hill
    Jeremy Hill

    Yep .. I guess I can just say, you have to get up pretty early in the morning to beat Albert to an optimization idea, and he has had this particular one in mind since first beginning to design the Bella material model.

    #2202
    Jeremy Hill
    Jeremy Hill

    Heh, now that response sounds funny since you posted while I was writing. For us it is just terminology, either a material (or a portion of it, in UV space, to be precise) is fully opaque, or it is something less than fully opaque.

    #2209
    Eric
    Eric

    Sounds good, if I get up too early my reading comprehension is even worse.

    #2212
    Jeremy Hill
    Jeremy Hill

    By the way, thanks for asking these questions, it caused me to notice a couple of opacity-related bugs that are now fixed (I am working on getting a new build out today).

Viewing 12 posts - 1 through 12 (of 12 total)

You must be logged in to reply to this topic.