Jump to content

Custom Shader names problem


danilo2

Recommended Posts

Hi!

I'm building now my custom shader and please help me with one issue - I've attached my hip file and I don't understeand why when I add empty "properties" node in /shop/wd_shader it shows errors.

Without this "properties" node everything works ok, but I want now to add some properties to this shader.

Additional I see one more problem -my names of parameters in my material are default very long (the attach the name of vop vex surface sop), for exeample, when I move my mouse over "Base Color" I can see:

vopsurface1_baseColorr vopsurface1_baseColorg vopsurface1_baseColorb vopsurface1_baseColora

and not

baseColorr baseColorg baseColorb baseColora

?

(normally materials have got shorter parameter names)

How can I fix it?

Thank you very much :)

xx_shaders_learning3_447.hipnc

Edited by danilo2
Link to comment
Share on other sites

Hi!

I'm building now my custom shader and please help me with one issue - I've attached my hip file and I don't understeand why when I add empty "properties" node in /shop/wd_shader it shows errors.

Without this "properties" node everything works ok, but I want now to add some properties to this shader.

Cześć !

No to jest nas dwóch :). I also don't know why this error occurs.

Additional I see one more problem -my names of parameters in my material are default very long (the attach the name of vop vex surface sop), for exeample, when I move my mouse over "Base Color" I can see:

vopsurface1_baseColorr vopsurface1_baseColorg vopsurface1_baseColorb vopsurface1_baseColora

and not

baseColorr baseColorg baseColorb baseColora

?

A co do tego, to jest chyba normalne. Prawdopodobnie po to jest tak zrobione aby uniknąć sytuacji gdy masz na dwóch nodach parametry tak samo nazwane, tak ci je automatycznie różnicuje.

I think it's standard behavior. This is propably because you can have the same named parameters on different nodes (surface, diplacement etc.) and this is to difference them automatically.

Edited by SWANN
Link to comment
Share on other sites

Hej Swann! Dziękuję Ci za odpowiedź.

Ale zastanawiam się nad jedną rzeczą - jak wezmę standard material - to on ma zwykłe, krótkie nazwy - basecolrr itp.

Jak kliknę na materiale i dam -> Promote Material Parameters - to te nazwy zostają krótkie.

Natomiast jak zrobię swój własny materiał, dodam parametry, kliknę "Promote Material Parameters" i pozmieniam nazwy (Gear->edit parameter interface) na krótkie i znowu kliknę "Promote Material Parameters" - to te nazwy wracają do swoich długich wymiarów - i tutaj pojawia sie kolejne pytanie - jak to zrobić żeby zostały krótkie?

Hi Swann! Thank you for yours reply.

I'm considering one additional thing - for example the Standard Material. This material has got short names, as basecolorr etc.

When I click on it and pick -> Promote Material Parameters - then these names are still short.

But when I have my own custom material, add there parameters , click "Promote Material Parameters", change names of these parameters (Gear->edit parameter interface) and again click "Promote Material Parameters", the these names will be long again.

And here is my next question - how can I prevent these names (after change) not to reset when the button "Promote Material Parameters" is pressed?

Edited by danilo2
Link to comment
Share on other sites

Zauważ że jak wywalisz wszystko ze standardowego materiału, zostawisz tylko suboutput i zrobisz promocje to się nic nie zmienia, cały interrfejs zostaje pomimo tego że środek już nie istnieje, czyli interfejs jest w dużej mierze sztucznie przygotowany i pewnie dlatego tak działa na przygotowanych fabrycznie materiałach.

If you delete everything from standard material and leave only suboutput and then do promote materials, nothing will change in interface. It mean's that it's preprogramed and this gives it possibility to have short names. I think.

Edited by SWANN
Link to comment
Share on other sites

Ale w każdym materiale tak się dzieje - w moim własnym jak zrobiłem dużo parametrów w dużej ilości folderów jest dokładnie tak samo.

Zauważyłem też, że jak weźmiemy ten standard material i klikniemy (gear-> delete all spare parameters) i teraz zrobimy mu promocje - to wtedy jemu też dodawane są te długie nazwy! :)

więc to raczej nie jest jakoś specjalnie "przedprogramowany" materiał. Wydaje mi się żę to musi dać się w każdym ustawić żeby zachował nazwy.

Robiłęm teraz trochę testów i nie mogę tego powtórzyć z własnym materiałem ale wiem że raz mi się udało - zee własnie promocja nie zmieniała mi nazw jednego parametru. Nie mogłem potem tego powtórzyć dla reszty więc pomyślałem ze musi być jakaś magiczna zależność ;]

I've noticed that this behavior is related to all materials, not only standard. When I've builded a custom material from scratch and added a lot of parameters and tabs in there - the behavior was exactly the same.

Additional I noticed, that when we are modyfying the standard material and click (gear-> delete all spare parameters) and then do promotion - then he's got long names too (with prefixes) ! :)

So I think, this is not "preprogrammed" in these materials and there has to be somewhere ability to save these short names.

I've made some tests and I cannot find the way to make custom material, that will not delete its interfece when promoting with only suboutput within. But I'm sure that It is possible, becouse a few days ago I accidently made 1 of parameters in my custom material with short name, that was not changing when promoting. So I've thought that there have to be some magical connection ;]

Edited by danilo2
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.

×
×
  • Create New...