Sneak peek of the upcoming Node Material Editor ;D

From what I know, geometry shaders can also add/remove vertices dynamically before going to the vertex shader.

To add to the confusion regarding the difference between a material/shader, what is this beast:

?

art, undoubtly.

1 Like

This is almost right. Geometry shader happens after the vertex shader and can emit new vertices

3 Likes

I stand corrected!

2 Likes

You’re helpful ALL the time, JC… thanks for hanging around with us. You are kind, humble, patient, concerned, and if you are “entry level”, then that’s a level that most of us aspire to reach. You and the rest of the team are taking us all to a new level and showing us new, amazing tools. Thank you. You pilot the NME like you have been doing it all your life. That alone, tells us just how “intellectually activated” you really are, as the NME has not existed very long at all. (big hug)

In this playground, I activated a ground.getHeightAtCoordinates(0,0) in the renderLoop (lines 249-253)… outputting to console. It remains zero “altitude” constantly.

I don’t know if I am using it correctly, or if the vertexData needs a refresh-to-actual… before doing the height tests. or what else.

Also, I would enjoy a few GUI 2d sliders in this scene… to “live-adjust” some wavelength, amplitude, steepness, etc. Could we expect a requirement… to re-compile a shader, or perhaps re-install material values USED BY a shader… before we could expect a slider’s value… to be incorporated?

2 Likes

@Deltakosh && @PirateJC ------------------------------------------------------------- ~LIKE-STAR-UPVOTE-.

What do we call a COLLECTION of Shaders OR Materials?

1 Like

@Wingnut - Sincerely appreciative of your words! Big hug back at ya, and thank you so much for your continued passion for this platform and community! It’s humbling indeed to be a part of such a welcoming and inclusive group of folks…enabling everyone to learn at their own pace. This community truly is a model for making everyone feel empowered to ask any question and grow together. I love it!

Oh man…not to be a tease, but I cannot WAIT for you to see this week’s video! (hint hint…wave direction) :wink:

@aFalcon - I always thought this was hilarious: Murder of Crows - Wikipedia

group of materials/shaders? A “trove”? Like…a…treasure trove? Ok that may be a little bit of the pirate in me coming out there…hahaha.

4 Likes

Oooh, I was looking at THIS PG, and saw the ground.updateCoordinateHeights(); at line 45. I said to myself… “Self, THERE is the ‘updater’ that makes the Gerstner wave PG… start returning non-zero ground.getHeightAtCoordinates(0,0)”.

I installed it in line 251: https://playground.babylonjs.com/#4I3SIR#17

FAIL! :slight_smile: Line 252 always returning 0. scratch scratch.

I’m still leaning towards “GPU optical illusion” :slight_smile: I’m not sure Tommy Gerstner exists, either. I think this is some info about him, but I haven’t found a picture. That info might be an optical illusion, too. :slight_smile:

Hi gang. Old thread, but I’m still interested in thoughts/answers.

https://playground.babylonjs.com/#4I3SIR#21

See lines 28/29 of the playground. I am trying to determine IF/NOT… the mesh (positionKind) is ACTUALLY being oscillated, or if it is a GPU “illusion”, or something else.

In line 29, I am doing continuous ground.getHeightAtCoordinates(0,0) output to console, and the values never change. Why? I am trying an updateCoordinateHeights() in line 28 (mentioned in my previous post)… but that doesn’t change the issue.

My simpleton theory: The NME code (Node Material Editor) is manipulating the positionKind “inputs”… “down-stream” in the rendering process. We are actually oscillating the positionKind values (a uniform?) just before the GPU renders the model. This is why we see no changes at ground.getHeightAtCoordinates(0,0).

If true, the ground’s vert-positions are NOT “actually” changing/oscillating. The positionKind values are being oscillated at the inputs to the shader/renderer (downstream from the ground mesh… on the way to Renderville). Wild, huh?

https://playground.babylonjs.com/#4I3SIR#22 is the same PG… but non-snippet… so you can see the values. Line 126 amplitude.value = .75; is a value you can easily adjust. Further down, line 220 “builds” the shader (compiles it)… via line 245.


Massively off-topic prattle...

In some ways… the NME is a VISUAL (drag’n’drop-ish) version of @nasimiasl’s ShaderBuilder. In my opinion, neither system can be called “simple” or “easy”, because both systems require a knowledge of shader-coding techniques.

I don’t foresee NME gaining much traction with the youngsters… which is the same thing that happened with ShaderBuilder, unfortunately. Powerful features are fine, but they must not alienate/scare new users, or remove the “fun” of 3D art.

I think we will see youngsters/new-folk… avoid NME in exactly the same way they avoided ShaderBuilder. Both systems… are counter-RAD (rapid app dev), in my opinion. I, as a 3d experimenter… appreciate all the attempts made by @nasimiasl and local admin… to TEACH us ShaderBuilder and NME… but I think concentration on such things… has harmed the “simple fun of 3D” for the beginners. The race to powerful… has damaged “something” along the way. The “simple” of BJS has somehow been lost, in my off-topic opinion.

Let’s branch away in a new topic thread… and talk about the loss-of (or hiding-of) “simple”… if anyone wishes-to. Did “powerful”… (appear-to) run-over “simple”, leaving it laying in the road to die?

2 Likes

I beg to differ regarding the NME.

First, it is an addition to the Babylon engine, not a replacement of something, so you can still use Babylon as you did without ever using the NME. So, in this regard, it is still as easy / simple to use as before, you doesn’t loose anything.

What is the counterpart of the NME in the existing engine? It is the ShaderMaterial class, which lets you create any shader you want if the standard shaders of Babylon are not enough (StandardMaterial, PBRMaterial, all materials from the material library, etc).

Now, to use the ShaderMaterial class, you need to know the GLSL language because shaders are written in this language. For the youngsters, I would bet it is easier to create some nodes and some links in the NME than learning a whole new language as well as how everything does work in the shader eco-system (the language is not enough, you need to be aware of how Babylonjs interfaces with the shader, for eg).

Of course you will still need to learn a bit of things to use the NME and be able to create more advanced shaders, but in my view, for people not knowing GLSL (and even for those who know it), it simplifies creating new shaders compared to using the ShaderMaterial class.

I can’t agree with this, as I have said above, the NME did not remove anything from Babylon, NME is a new tool in your bag but you are free to not use it… Babylonjs is still as simple to use as before when the NME did not exist, and I would say it’s easier than before for people wanting to create custom shaders for the reasons explained above, because the only option you had before NME existed was to create a ShaderMaterial.

2 Likes

Hi EP! Yeah, that is true. I can’t quite fig WHAT changed, if anything. Perhaps it was me. The amount of newbie questions went down… but maybe that was due to the docs improving (and they have). Not sure. That’s why I said “appear-to”… at the end.

Something is different, somewhere, somehow. But I think you are correct… not caused by the NME. It is difficult to pinpoint what happened to the child-like spirit that WAS once nearby. Perhaps I imagined it, or perhaps it is still alive and well. I don’t see it, though. Thx for the reply… well said. hmm.

3 Likes

i work on NME Code this week it is not complete yet I guess
i dont mean i cant find a tool in that (i miss a lot function) but we look for easy and fast way to build shader (Point1) it is not fast . (Point 2) it is not easy too not easy for stater developer

but i believe that can be a good tools in some next version

i try work on it for make it more usable the foundation is so nice but it is just foundation not so familiar with mathematical yet

i have covid-19 too the progress go so slow :frowning:

look we most try back to road The target is make easy and simple engine
normally i can make so complicated code in a min ( in a sec ) so the hard task is make simple BABAYLONJS

the ShaderBuilder in BABYLON Extension is a complete counterpart that is fast way for make shader but not so easy

1 Like

Sorry I did not mention ShaderBuilder, I thought it was a proprietory project you did for your own use, I didn’t know it was in the Babylon extensions!

1 Like

Sorry to hear that. Please take care of yourself and don’t work too hard.

2 Likes

when you work that help :slight_smile: i passed it maybe

1 Like

look for make simple code like
’ Simplex3D(WorldPosition * 100.0 )*0.5+0.5 ’ i take suffering in NME

then i need rotate WorldPosition in Y axias by camera direction for make float-able noise in ShaderBuilder i use

’ noise( r_y( wpos , atan(dot(camera , pos))) * 100.0 )*0.5+0.5 ’

so when we have some math tools and PlaceHolder part like definition function
we can collect a lot steps

but in final version for make it easy we can have floatableNoise as tested way for beginner

1 Like

it took me 2mins :wink:
https://nme.babylonjs.com/#EQP8F6

And it is easy to read and understand and manipulate

But I do not think we are on a race or a war. We have several options and tools available to everyone.

For instance @PatrickRyan who is our tech artist will not want to use Shadermaterial or ShaderBuilder for sure. But he loves NME

So a tool for everyone :slight_smile:

3 Likes

yes but i guess who wanna do that most know math so we can have math editor
because when everyone wanna make it they need math

for example if i can use math in NME editor like command on the NME block that take just sec and we can edit that in sec too

also you do this Simplex(WorldPosition)*100. * 0.5+0.5
try Simplex(WorldPosition * 100.) *0.5+0.5 so you see what i suffer for that

you can:) but again not everyone can. This is the point of NME: making shaders more accessible