Convergence

StandardMaterial.reflectionLevelTexture?

Recommended Posts

The StandardMaterial.reflectionTexture specifies the texture that should be reflected, which can then be controlled in intensity by its .level property or additionally by FresnelParameters. However both of those properties only influence the reflectionTexture uniformly. Is there a chance to add a reflectionLevelTexture that specifies the reflection intensity as a map? This would be handy in situations like creating furniture where only the glass part needs to reflect, but not the wood part, or buildings where the windows need to reflect but not the walls.

Now, its always possible to make two meshes or use MultiMaterials, one with a reflecting material, and one without (which is what I'm currently doing), but that adds one draw call per mesh, causes z buffer issues, and is convoluted to model.

Share this post


Link to post
Share on other sites

Else if static as it seems, instead of an expensive extra channel, why not creating your texture based on the merge of the two others at the start of your app.

Once the result has been computed you just use the one available channel normally.

You could even do it offline if there are not too many possible combinations ?

Share this post


Link to post
Share on other sites
20 hours ago, V!nc3r said:

NasimiAsl help me on a similar problem. You have to use a non-default shader

Thanks, I'll check it out.. :)

15 hours ago, jellix said:

The PBRMaterial can do that.

So maybe you could change your MaterialType fron StandardMaterial to PBRMaterial ...

Which property of the PBRmaterial controls this?

14 hours ago, Sebavan said:

Else if static as it seems, instead of an expensive extra channel, why not creating your texture based on the merge of the two others at the start of your app.

Once the result has been computed you just use the one available channel normally.

You could even do it offline if there are not too many possible combinations ?

I'm not sure I follow.. You mean to merge two materials?

Share this post


Link to post
Share on other sites

About merging the textures, If you have a normalized level texture (like black to white for none reflective to reflective) and your reflection texture, as the reflection color is always added on the other colors (diffuse, specular...) during the composition of each pixel in the standard material, you could multiply (either offline or through code) both textures together. 

Doing this offline (in PS for instance) or at load time of the app through code, you will improve your performances by preventing the shader to sample the extra texture and multiply for each pixels.

If your level texture or the reflection is dynamic on another hand, the extra channel in the shader would be better but from what I understood it is not the case.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Recently Browsing   0 members

    No registered users viewing this page.