Jump to content

CustomMaterial and onBindObservable loop to infinity


Dad72
 Share

Recommended Posts

I drop like everyone else, CustomMateriel which is far too bugger. I do not understand that it is made public with so much bug and without being maintained. It has not even been tested before being validated.
I closed all my projects that depended on it. I will take a big pose to recover before opening a new one.
I think CustomMateriel should be removing materials : not usable, not maintained.
Nasimi, if CustomMaterial is bugger, you say it's because of StandardMaterial, but for me StandardMaterial works fine.
This is the first time I see this on Babylon, a bugger feature for so long without it being fixed and worrying anyone.
In short, I have more project with Babylon, they are all unusable because everything is based on CustomMaterial. I now need a big pose.

It's always nice to ask questions and to be ignored. But it's the hard law of the internet that I'm often told.

Link to comment
Share on other sites

@Dad72 don't give up my friend! I know this could be hard and this is why I always recommend only depending on core features as they will always be fixed and maintained.

CustomMaterial is a great idea but I'm not sure @NasimiAsl can dedicate his free time as much as I can :)

Link to comment
Share on other sites

I have no choice but to abandon my current projects, which are based entirely on CustomMaterial. Rebuilding them would require a lot of things to be rewritten.I also lost everything the users whom I had.

I only need something like TerrainMateriel, but I would need at least the double diffuse textures (or at least 6) CustomMaterial in addition to ShaderBuilder allowed me up to 8 textures which was perfect. For HeroonEngine (MMORPG editor) this requires a minimum of 6 mandatory textures on the ground.

I built my editor based on 8 textures for my editor HeroonEngine (sand, ground, rock, grass, snow, path ...) everything was there. It worked fine at first, but now it's breaking down everywhere.

I see TerrainMaterial that does not seem to need to be now with every StandardMaterial update. Maybe it's a material like this one as an example that should be used and multiply by 2 the number of permissive textures. But I do not feel able to do that myself. I do not yet master shaders and materials.

In short, I have for my idea of next project need only TerrainMaterial and adapt according to him. CustomMaterial has too much major bug to be used by anyone here. The lights added or deleted bug after is extremely annoying and the setVector2 no longer works, we can no longer resize textures. 

In short, why keep CustomMateriel in its present state if it can not be maintained or corrected once, without the need to have to return to it.

PS: Sorry for my dissatisfaction, but I see some years of working in the trash, so I have a heart ache. But I'm going to bounce, I'm still bouncing.

Link to comment
Share on other sites

I was thinking of a minimum of 6 textures. 8 being the ideal, but 6 would be a satisfactory minimum.

Currently terrainMaterial mix 3 diffuse textures and a mixMap. Maybe the same thing can be done using more color in the mixMap than RGB.

We could add black, white and yellow (or 3 other colors) + red, blue, green (total: 6 textures diffuses)

terrainMateriel makes it possible to have the shadow and the fog and the lights (what I suppose), which is what I look for, but it misses 3 textures additionally.

To create the mixMap, I use a Dynamic texture to hang the colors. it allows me to paint directly on the field dynamically (as does my terrain editor)

 

 

Link to comment
Share on other sites

What if you just verbatim copied the GLSL code for the default material after it was compiled and for now just use a shaderMaterial and custom edit it.

It would be like 1k+ lines unfortunately, but you might be able to fix your old projects "easier" this way.

Link to comment
Share on other sites

A new material will allow up to 6 to 8 textures to come out soon and will be much better for the texture mix at the borders. and will be much more stable and maintained.

I would re-adapt my projects based on that for better stability and a better blend of textures that I never managed to have with CustomMaterial.

https://github.com/BabylonJS/Babylon.js/issues/4219#issuecomment-385008496

Link to comment
Share on other sites

are we going to be able to inject custom parts as well?

I need to be able to custom defined sections that can control the end output but still keep the main functionality of the standard material like light/shadow/fog/normal support.

Link to comment
Share on other sites

Nasimi said he was on it for CustomMaterial. I hope that it will be able to correct the few bugs that it contains not to leave a publicly available material with the problems.

What are the bugs you get with CustomMaterial to look at?

Link to comment
Share on other sites

you cant use custom samplers, the binding issue, you cant use a custom UV,  and a few other problems. 

I've actually broken it a myriad of ways. 

I posted a link to the other discussion on it earlier in this thread, where I demonstrate some of the bug's and some of them are on provided examples for how to use the material.

There is some odd behavior for sure,  if you need an official list of bugs that I have found I can write that up later today if people in the real world leave me alone for a little bit (I never get a moments peace haha someone always needs something).  


https://www.babylonjs-playground.com/#UXCB15#8 <- UV bug
https://www.babylonjs-playground.com/#UXCB15#41 <- Results Bug
https://www.babylonjs-playground.com/#UXCB15#40 <- Sampler Bug

and of course we all know about the binding issue.

Link to comment
Share on other sites

Hi @Dad72, I created a custom terrain material with 6 textures and a mix texture, I need it for an interesting demo, but unfortunatelly I don't have too much time for this, so it's still on developping, so sorry for ugly code and consoles and unnecesarelly coments :) .
The interesting part starts at line #176, and the modified js file and shader is here.
Unfortunatelly if I add a shadowCaster, the effect doesn't compile with succes,  I get this error. 

image.png.68281124bec7d3fa3601fc18a6e484cf.png
I don;t know if this help you, but it's a start :)

Link to comment
Share on other sites

i am close to fix ( 2 day or less ) it and i will try check after any changes in standard material :( 

but for keep stable result after any build you most keep that version ( i think )

and a long solution for fix all material problem make pluginMaterial ( a shaderbuilder rewrite to babylon core without shader Stuff)

in that we make plug in for material and users can attach them 

(unlimited)texture+shadow + reflect (support PBR) + light + fog + ... 

and we just make plugin  ( like fire and lava and water material ) i have design pattern to make it but that is so big project 

 

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...