Jump to content

CustomMaterial and edit textureDynamique


Dad72
 Share

Recommended Posts

@NasimiAsl before, I could paint my terrain using CustomMaterial, but now when I paint, it happens strange thing when the dynamic texture is updated. (with texture.update(); line : 151)

Bug with CustomMaterial : http://www.babylonjs-playground.com/#FC4IX#96

By using StandardMaterial, it works. I think CustomMaterial has some concern to update the changes after compiling or adding light like the previous bug ..

Work with StandardMaterial http://www.babylonjs-playground.com/#1OQFOC#60

 

Link to comment
Share on other sites

  • 2 weeks later...

My previous PG does not work anymore, I do not know why. So I redid a PG or I reduced everything to the bare minimum with only one texture.

The bug this product always. As soon as a light is created, either the texture disappears or becomes black, or the first light is no longer taken into account.

Maybe @Deltakosh has an idea of what's going on to help you @NasimiAsl if you can not do it. But this seems like a major bug, CustomMaterial should not live with this bug that has been around since version 3.0. :(

http://www.babylonjs-playground.com/#FC4IX#105

Link to comment
Share on other sites

@NasimiAsl  An idea of what is missing to solve this bug?

I think it's because you have blocked re-compilation when it was compile. so this does not update. in "CustomMaterial.prototype.Builder"

I'm sure this bug is not much. A material.update () function to recompile would not solve the problem easily?

 

Link to comment
Share on other sites

it is nice idea to make it standard material customizable ( that is good for keep both in current version )

actually standardmaterial is a custommaterial ( in class design system ) but for now we make it wrong we can fix it now but i know that happen  again after  we change standard material

anyway i  just want make useful tools but for now wrong dependency damage that tools 

i can fix this bug but when i was start debug it i look to next what happen if that method change in standard material :( 

so for my recommend a one material  system is best solution but you notice that is just my  personal opinion

Link to comment
Share on other sites

So do you leave CustomMateriel as it is with this problem? I'm not sure I understand everything you say.

Why not add a simple function material.update ()? Should we continue to use CustomMateriel or should it be removed because abandoned ?

Currently, there are no materials that can create up to 8 textures, there is an extension that allows 3 textures max, but not 8 as can CustomMateriel.

I feel that CustomMateriel is a bad idea to use if it is not maintained now.

 

Link to comment
Share on other sites

21 minutes ago, Deltakosh said:

I can add more observables if you want for instance?

The problem is that CustomMaterial does not use the StandardMaterial changes, but a version_old (StandardMaterial_OldVer) directly embed in the CustomMaterial file, so any changes made in the parent class, create problems in CustomMaterial. 

I do not think that the addition of observables is taken into account in CustomMaterial. On the other hand an observable in CustomMaterial to recompile would be useful to solve this problem or redo this class with extend StandardMaterial. 

Link to comment
Share on other sites

@Deltakosh  that can possible if we Split  Standard material Shader code to some part and append  Custom material methods between them

but for step 1 standard material most can create  different shader for any instance ( if that required )  and we test all bugs for that 

and the step 2 is much easer than  because we just migrate custom material method inside of standard material

 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...