Shader Inj......Nah... Shader Nodes!

Hurray… JME’s version of “Duke Nukem Forever” is finally released. :slight_smile:

2 Likes

I’m stuck with 24 hours a day… how many do you peeps have over there?

Omg, I’m turning into a cheerleader.

This is very intresting, great work. Will play around a bit with this later.

this is awesome!!! great work!!!

I love the idea and I think this is an amazing addition to the jME Platform.
Thanks to all the guys that helped in doing this feature for jME.
It really will make my life easier.

…LOVE IT…

Thank Nehon, he essentially did it solo although a bunch of us did weigh in on the design docs and I think Normen gave him some help with the SDK/visual editor side of things.

Words cant express how happy i am right now. I literally jumped off my chair!

@kwando said: This is (notice the big A -->) A w e s o m e !! I will for sure take this for a spin as soon as possible =) Really great work nehon!
I know what you're doing this weekend xD
@pspeed said: Hurray... JME's version of "Duke Nukem Forever" is finally released. :)
That can be offensive, since the game failed badly XD
@Setekh said: Words cant express how happy i am right now. I literally jumped off my chair!

I know what you’re doing this weekend xD

That can be offensive, since the game failed badly XD

Heheh. I meant the proverbial “Duke Nukem Forever”. The hastily-released-just-to-get-it-finally-done one doesn’t count. :slight_smile:

I do not want to be a party pooper but where should I report bugs/issues about this? (Oh yes, I’ve already broken the ShaderNode editor =P).

hehe, yeah the editor is still in a wip state really, there is still a long todo list for it including issues (here it is if you’re interested ShaderNodeTodo - Google Docs).
You can report issues in JME tracker (just add my mail to cc so I’m notified)

Cool,
More friendly shader creation for newbie shader developers (like me). Thanks.
…Maybe i’ll could make a shader…one day…

@nehon , GOOD JOB MAN!!!
Just a question, when are you going to finalize the shaderNodes? I just want to imagine when i should move shaderBlow to shaderNodes.

Well I guess once the Lighting shader is done, it’ll be ok.
But we’ll talk about it.

Ok, i get you.

Really n1ce! :-o Gotta check it out at home.

@nehon:
Agrrrrrrrrrrrr, you 've done what I also try to do for months… Make me feel like a fool!!!
But AWESOMMMME !!! This made my day!
Now we have this shader editor !!!

Now to tell you the true, I’m also working on the same thing you show here for a while.
I don’t have good architect aproach like the built- in syntax to jm3d but only focus in making shader, cause I also want to use it some where else :stuck_out_tongue:

Please take a look in my post may be it give you some ideas:

My implementation:
is really generic, in sense of it was made for code generation ( all kind of GLSL,HSLS groovy and also java)…

  • Also use Netbean visual lib to visualize node,
  • Since I use a lot of groovy magic in my code base, I also use groovy template (GString) to make Code template.
  • Groovy also do a lot interesting things. like running the code to do something…
  • I trying to have preview working but it’s really difficult. It required code generation for a sub-graph to generate node-specific code or use java graphics to made the fake preview (which I prefer not to)
  • I will introduce Scope and Group… which I will describle below

In fact, I’m working with an “in house” tool in my company. They have node based tool to generate GLSL Cg ans HLSL. Cause some of the generated GLSL code is very hard to read, even if the generated code should be a whole program but it’s a “one block mess” cause it wasn’t divived into blocks!
And So the development team of the tool introduce a Scope. What an artist see is he can select a bunch of nodes, make a group and let them in a scope called a “FunctionA”. Then all link ouside of the Scope give their inputs and outputs to the Scope, now the “FunctionA” consider a Block or a Big Node!

That’s the awesomeness of that tool, it push Shader code reusable into a whole new level. And we can also convert GLSL back to Node-based (with simple shader) but we rather do it cause the opposite method is way more cooler!

Your tool is excelent I have to admit! Super quality already…
But if I can give my opinions about it, wish it has:

  • Preview for each Node which can be enable or disable if needed
  • QuadCurveConnection ( cause they are pretty )
  • Add a Node by Drag in the middle of the Link
  • Check if an Input is compatible with an Output

I definitely want to see the code once it out.

@atomix said: Agrrrrrrrrrrrr, you 've done what I also try to do for months... Make me feel like a fool!!!
Well...I'm sorry, I wasn't aware of it.
@atomix said: + Preview for each Node which can be enable or disable if needed + QuadCurveConnection ( cause they are pretty ) + Add a Node by Drag in the middle of the Link + Check if an Input is compatible with an Output
1. It could be done for nodes that output a color....but it doesn't always make sense. 2. Actually that's what I hate the most with blender's node editor...it's all messy :p. 3. Yeah why not It can be done with connection guessing... 4. That's already done. you can't connect variables of different types, except if there is a swizzling solution for it. for example if you try to connect a vec2 variable foo with a vec3 variable bar, the editor will allow it and will automatically compute the swizzle and give : bar.xy = foo. Of course you're able to edit the swizzle in the property panel afterward and have bar.zz = foo for example. The editor won't allow to connect a float with a sampler2D for example.

Your Group approach sounds interesting indeed.

@nehon said: 1. It could be done for nodes that output a color....but it doesn't always make sense.

The preview is for the Texture. Even if you blended two texture nodes together, you can preview it in the result Node. Did you try UDK Shader Editor. I don’t want to say that we should copy it but it was kind of artist friendly in my POV. Because of the previews, one with basic knowledge about coding can make good quality shader in no time.

In my implementation. I can not get node-preview to work because I think we have to travel sub-graph for each node and make a sub-shader for that each node and render out, or using Java2D to fake the preview but I prefer not to.

Anyway , I think you can find my ideas interesting somehow. Thank for your reply!

@nehon, this is great stuff! Thank you so much for taking the time to implement such an inspiring feature-set into the SDK.

As an educational technologist, my mind runs wild at the thought of using this to teach shader theory and programming. Can you comment on the feasibility of using such for geometry shaders in the future?

On an unrelated note, I’m also a big fan of the visual programming style. How hard was it to implement the draggable panels with inputs, outputs, connections, and the like?

best regards!

Thanks for the nice comment.

@jagwire said: As an educational technologist, my mind runs wild at the thought of using this to teach shader theory and programming. Can you comment on the feasibility of using such for geometry shaders in the future?
I kept this in mind all the time. I'm not saying it will be a breathe to add a new type of shader to the system, but it's gonna be straight forward. Also I hope it will come to this, and more.
@jagwire said: On an unrelated note, I'm also a big fan of the visual programming style. How hard was it to implement the draggable panels with inputs, outputs, connections, and the like?
Well first it was fun, and fun makes things easier :p. Then netbeans is based on swing so , i guess it would have been easier if i had more swing experience. I use a lot GWT at work and swing looks old next to it, with old patterns and many "do it yourself" features :p. for example event propagation in GWT is all handled by the Framework. But swing is very very very widely used, so for every question you can find an answer by hitting "i'm lucky" on google (usually stack overflow btw :p)
1 Like