由用户创建的信息 moonatic
08 May 2020 18:48
Hi,
I'm very new to b4w and loving it! Just my luck, while experimenting and fooling around, I stumbled upon this unexpected behaviour.
Unfortunately, (or fortunately from the other side of the coin), I managed to solve it as well, but I have no idea how, and now I can't reproduce it.
So, what happened:
I added a value node to control the glow factor of a b4w_glow_output with js.
Worked absolutely fine!
Added a second value node, basically to store a boolean as a number. The node was not connected to anything else.
Didn't work. First value node kept working fine.
After some time of madness, I realized that the get_nodemat_value was returning an object, but only for that particular value node. (I checked this with javascript's typeof)
I tried connecting the faulty node to the alpha of… something, thinking it might have to do with it being unconnected. No luck.
I created a new value node. In js it returned as an object as well, the other two kept returning the same type as before.
I have only used shader nodes.
As I said, I am very much at the experimenting and fooling around stage, so at the time I thought I had somehow triggered a to-me-unknown feature (in which case I would love to know what it is ). I searched the web for any clue, but could find absolutely nothing relevant to this.
And then to complete the madness, about five minutes after having last tried it out, everything started working as expected. get_nodemat_value returned numbers for both the value nodes (and any other I wanted to add).
But I can't remember what exactly I did, or which settings I may have touched (if any), in those five minutes. (nothing that I remember being particularly relevant to that value node though, I had basically gotten bored with it, and started fooling around with something else.)
Also, I can't remember whether the faulty value node started working by itself, or whether I added a new one, and it then worked ever since. (Sorry about that, it was pretty late last night, but I'm pretty sure I didn't dream this!)
I don't really see the point of taking screenshots now or attaching the .blend file, because as I said it all now works as expected, and I've worked on that file a couple of hours longer last night. (Sorry about not reporting it straight away, I wasn't thinking.)
Of course, should it happen again, I'll try to remember to at least take some screenshots. (If my brain's with me, I may even remember to make a copy of the .blend file.)
Also, sorry about the length of this post, I've got writer's blood…
moonatic
I'm very new to b4w and loving it! Just my luck, while experimenting and fooling around, I stumbled upon this unexpected behaviour.
Unfortunately, (or fortunately from the other side of the coin), I managed to solve it as well, but I have no idea how, and now I can't reproduce it.
So, what happened:
I added a value node to control the glow factor of a b4w_glow_output with js.
Worked absolutely fine!
Added a second value node, basically to store a boolean as a number. The node was not connected to anything else.
Didn't work. First value node kept working fine.
After some time of madness, I realized that the get_nodemat_value was returning an object, but only for that particular value node. (I checked this with javascript's typeof)
I tried connecting the faulty node to the alpha of… something, thinking it might have to do with it being unconnected. No luck.
I created a new value node. In js it returned as an object as well, the other two kept returning the same type as before.
I have only used shader nodes.
As I said, I am very much at the experimenting and fooling around stage, so at the time I thought I had somehow triggered a to-me-unknown feature (in which case I would love to know what it is ). I searched the web for any clue, but could find absolutely nothing relevant to this.
And then to complete the madness, about five minutes after having last tried it out, everything started working as expected. get_nodemat_value returned numbers for both the value nodes (and any other I wanted to add).
But I can't remember what exactly I did, or which settings I may have touched (if any), in those five minutes. (nothing that I remember being particularly relevant to that value node though, I had basically gotten bored with it, and started fooling around with something else.)
Also, I can't remember whether the faulty value node started working by itself, or whether I added a new one, and it then worked ever since. (Sorry about that, it was pretty late last night, but I'm pretty sure I didn't dream this!)
I don't really see the point of taking screenshots now or attaching the .blend file, because as I said it all now works as expected, and I've worked on that file a couple of hours longer last night. (Sorry about not reporting it straight away, I wasn't thinking.)
Of course, should it happen again, I'll try to remember to at least take some screenshots. (If my brain's with me, I may even remember to make a copy of the .blend file.)
Also, sorry about the length of this post, I've got writer's blood…
moonatic