A Shader GUI

Posted By: Nadester

A Shader GUI - 12/05/03 22:55

I see that shaders have become quite the craze around here, yet many people are having trouble creating them and implementing them. I for the most part understand shaders, and a bit of C++/DirectX. I am going to attempt to design a Shader Editor/GUI for the community, in my spare time. Is anyone interested in this? My ideas would be to iclude a shader editor/generator, direct code editor, shader library, export to .fx and .wdl, and much more. Please give me some suggestion, and ideas you want for features. Any donated shaders would really help for the library to!
Posted By: ello

Re: A Shader GUI - 12/05/03 23:25

that would be absolutely great, as i almost do some experiments which look nice, but i dont know exactly what i am doing.
i think nearly everyone here would love it
Posted By: Dix

Re: A Shader GUI - 12/05/03 23:52

Quote:

.......i think nearly everyone here would love it...




Damn right! I second that. Yes PLEASE !!

BTW Ello your shader demos rock! Thanks for the downloads.
Posted By: seb_dup1

Re: A Shader GUI - 12/06/03 02:07

Five Stars for this good idea.


Posted By: Stephan Bayer

Re: A Shader GUI - 12/06/03 02:09

Good Idea!

Greetings
Stephan Bayer
Posted By: Orange Brat

Re: A Shader GUI - 12/06/03 02:24

Excellent idea.
Posted By: Aaron_H

Re: A Shader GUI - 12/06/03 02:26

Sounds wonderful,
Can't wait if you go ahead with this.
Posted By: bupaje

Re: A Shader GUI - 12/06/03 02:29

I suggested this a few months ago for the templates and it would fit here as well. Support creating wizard code templates so that we could take someones shader code and turn it into a template and change values.

For example turn ....

my.speed = 50
etc

into

my.speed = [popup, 1, 50,"Enter a value between 1 and 50 to set speed"]

which would popup a message and accept a value between 1 and 50. The benefit of this is new users could make safe changes by starting with a template and get a bit of hand holding to what values are ok to change and in what range. The generated code could be further edited manually. By creating some simple tags like this people who create shaders might be inclined to add them to their code so that the shaders could be used by others in the shader generator.

The other consideration is whether (and I know nothing about the subject) it might be better to instead support a product like RenderMonkey which is free and maybe create a tool that would 3DGS-ify any code it produces rather than recreate everything from the ground up -just a thought not sure what is best.
Posted By: Anonymous

Re: A Shader GUI - 12/06/03 02:55

A shader editor? Yes! That would be great as I have no experience with C++ (except that I have 50% of the knowledge of C#) and 3DGS only support C++ (and of course, Delphi). With the shader editor, I don't have to have experience with shader language (HLSL for DirectX 9.0).
Posted By: Doug

Re: A Shader GUI - 12/06/03 03:40

There is a free program from ATI called "RenderMonkey" which is quickly becoming the industry standard for making shaders. If you can come up with a easy method to export shaders from RenderMonkey to A6 then you would have a very powerful tool.
Posted By: Nadester

Re: A Shader GUI - 12/06/03 04:51

I am going to download RenderMonkey and check out the format that they use. Maybe something like a code converter would do the trick... or make my tool have the ability to import RenderMonkey shaders. I'll check it out and get back to you all.

@bupaje, I was actually thinking of doing a wizard to accompany it that would driectly insert your created shaders into your wdl file, and then come up with a list that lets you choose which actions have which shaders. Just an idea..
Posted By: Drew

Re: A Shader GUI - 12/06/03 08:43

all of the above sounds excellent...to me shaders are the holy grail, but with no programming experience its out of reach... I am working on getting some shader professionals I work with into it, like I did with Newton...

Posted By: Homey

Re: A Shader GUI - 12/06/03 10:45

I've been playing around with render monkey abit,it exports .fx files and then I use the c-script command
effect_load(material,string name);
"Loads an effect file in Microsoft .fx format from the work folder into the given material
Example:
effect_load(mtl_bump,"specularbump.fx");"

But it has errors because of the naming conventions used in render monkey I assume. Heres an simple .fx file exported from it.
Code:
//**************************************************************//

// Effect File exported by RenderMonkey
//
// - For this version, exporting to FX file is not perfect.
// There are many informations doesn't get exported.
// Currently, exporter does not try to resolve naming conflicts
// ( functions, variables etc )
// Please fix these issues before using this Effect file
//**************************************************************//
//--------------------------------------------------------------//
// Effect Group 1
//--------------------------------------------------------------//
//--------------------------------------------------------------//
// Effect 1
//--------------------------------------------------------------//
matrix matWorldViewProj;
string ModelData = "G:/Programming/ATI Technologies/RenderMonkey/v1.0/Examples/Media/Models/ElephantBody.3ds";

//--------------------------------------------------------------//
// Single Pass
//--------------------------------------------------------------//
struct VS_OUTPUT
{
float4 Pos: POSITION;
};
VS_OUTPUT vs_main( float4 inPos: POSITION )
{
VS_OUTPUT Out;

Out.Pos = mul(matWorldViewProj, inPos);

return Out;
}

float4 ps_main( float4 inDiffuse: COLOR0 ) : COLOR0
{
// Output constant color:
float4 color;
color[0] = color[3] = 1.0;
color[1] = color[2] = 0.0;
return color;
}

//--------------------------------------------------------------//
// Technique Section for Effect Group 1
//--------------------------------------------------------------//
technique Effect_1
{
pass Single_Pass
{
VertexShader = compile vs_1_1 vs_main();
PixelShader = compile ps_1_1 ps_main();
}

}


It would be great if someone could make a program to seemlessly convert these files so they could be loaded right up, with the effect_load() c-script command.
Posted By: Orange Brat

Re: A Shader GUI - 12/06/03 11:07

Quote:

all of the above sounds excellent...to me shaders are the holy grail, but with no programming experience its out of reach... I am working on getting some shader professionals I work with into it, like I did with Newton...




That sounds cool. Whether you go that route, or someone cranks out a Rendermonkey convertor..the future seems bright for all of us that can't wrap our noggins around this. I took an Assembler class a few years ago so it isn't totally Greek to me, but this looks 10 times more complicated than that basic junk.
Posted By: bupaje

Re: A Shader GUI - 12/06/03 11:22

I'd like to see more of a collaberation between the 'artist types' and 'programmer types' -not that they are mutually exclusive but there are some people that are more comfortable in one camp than the other. I for one can see myself spending lots of time creating shaders as that is just the side of my brain I favor. Working together I could see a large library of quality shaders, along with an easy way of implementing them in 3DGS which will benefit all levels of the community and the product as a whole.
Posted By: Nadester

Re: A Shader GUI - 12/06/03 12:24

Please take this poll. Would you rather have the tool made in 3dgs or programmed from scratch with C++?

Benefits:
3DGS:
-The shader will be native to the shader program, thus showing you exactlly what it will look like in game.
-I am more familiar with wdl, allowing me to make it more advanced and as many features as possible, plus more current updates.

C++:
-A more professional look




Thanx!
Posted By: bupaje

Re: A Shader GUI - 12/06/03 12:31

Just for clarification are you speaking about a product that is free standing as opposed to a converter for RenderMonkey?
Posted By: Nadester

Re: A Shader GUI - 12/06/03 12:41

Still deciding, though a 3DGS specific tool would be funner.
Posted By: Matt_Aufderheide

Re: A Shader GUI - 12/06/03 12:46

If you are williong to put the time into it.. a 3dGS tool would be more helpfull than a rendermonkey converter.. for one thing, render monkey and all its examples are geared toward directX9 i think... in any case having our own shader program would also be a way to distribute shaders develoed by the people in the community...
Posted By: bupaje

Re: A Shader GUI - 12/06/03 13:22

What I wonder is if a RenderMonkey tool wouldn't allow us to benefit from what Doug suggests is rapidly becoming an industry standard; in other words there are likely to be many site's producing free and commercial shaders among a user base that will be many times larger than 3DGS. I guess there is no reason why you couldn't produce what you prefer and maybe have room later to have a converter added as I think I read somewhere in the RenderMonkey documentation that all shaders can be exported in an XML format that can be easily parsed by the free MS XML parser.

By the way on a side issue when I try to view a sample shader I get

ATI RENDERMONKEY
Compiling pixel shader API(D3D) /Fire Effects/Fire/Single Pass/Pixel Shader/ ... success
FAILED to create 'Fire/Single Pass/Pixel Shader' pixel shader, selected compile target isn't supported by user's hardware.
The maximum pixel shader target that your hardware supports is 0.0
Compiling vertex shader API(D3D) /Fire Effects/Fire/Single Pass/Vertex Shader/ ... success

and don't see anything. I have DX9.0b installed so does this mean my hardware doesn't support this? Haven't found an answer in the documentation yet ....
Posted By: Drew

Re: A Shader GUI - 12/07/03 16:29

Shaderworks just released an Alpha version shader editor...

Shaderworks
Posted By: msKEN

Re: A Shader GUI - 12/08/03 03:13

Drew,

That's an awesome tool, but unfortunately that is for DX9 Shaders.
Posted By: Aaron_H

Re: A Shader GUI - 12/08/03 03:26

You know if A6 supported DirectX 9, then would shaders created in RenderMonkey work without editing?

If this is true then I'm going to be looking around for a DirectX 8.1 shader GUI .

Would it work if I did that, and I could get it converted to the right file format...
Posted By: Aaron_H

Re: A Shader GUI - 12/08/03 04:32

How about this guys, it something I found...

I don't know if it works or how reliable it is as I've not tried or tested it yet as I have little/no knowledge of shaders.
Maybe a more advanced user could try it?

ShaderStudio

Posted By: Nadester

Re: A Shader GUI - 12/08/03 11:24

I looked into Shaderstudio, and tried it. Its a great tool but unfortunately it is only a shader code editor + preview window, with some bonus features. So unless you already know shader programming, it’s of no use to you.

Also, regardless of the poll, I have decided to do the GUI in MSVC++ rather than 3DGS. Why? Because ultimately it would be much more useful+powerful that way. But I have just realized that I cannot complete this task all on my own. If I were going to put tons of my time into it, I would want it to be a helpful product. I am looking for any volunteers, as this is a volunteer project to benefit the community and help make the engine more powerful.

First I am looking for an experienced C++ programmer to do a lot of the core programming. They would need to be experienced in directX as well as shader programming. I am looking for another person to be in charge of creating a wide variety of shaders for the included shader library. This person will also be in charge of creating samples and templates for the editor. I will be in charge of directing the team, creating all needed graphics, design/layout, documentation, and assistant programming.

So far for the editor I am working off one of the DirectX 8.1 samples. What I currently have: A directX window, a .x mesh can be loaded. Texture+Animation are displayed. There is also a menu set up, though most of the options aren’t functional. I also have a couple of the dialogs done, although they for the most part are not functional either.

So if anyone can be of assistance, please step foreword. I as well as the rest of the community would appreciate it!

Posted By: Aaron_H

Re: A Shader GUI - 12/08/03 21:16

Well, that's very nice and I wish you good luck with it. To be honest, I was very unsure of which you should have gone with, but I think C++ is a good choice. It will be more powerful, and much more professional.

I did however vote for the 3DGS plugin as I thought it would be eaiser to impliment and will be much more custom to the engine. But then again, I guess the decision is much more up to the author and what he/she has a better preference to.
Posted By: Nadester

Re: A Shader GUI - 12/09/03 22:57

Still no one... any volenteers? I know your out there!
Posted By: ventilator

Re: A Shader GUI - 12/09/03 23:20

i don't want to discourage you but writing a really useful visual shader editor is an enormous task. and i think maybe it would make sense to wait until the engine is a dll. then you could build a windows application around it and preview the shaders directly in the engine.
Posted By: Aaron_H

Re: A Shader GUI - 12/09/03 23:21

I would love to help, but there's not really much that I can do.
If there's anything that you think I could do please email me.

[Email]cobra_kai[at]ntlworld.com[/Email]
Posted By: Anonymous

Re: A Shader GUI - 12/10/03 05:57

Hey Nadester, if you wait a couple of months, then there will be a features implemented in 3DGS.

Quote:

New Engine Architecture (priority: medium)
The engine will be split into a platform independent EXE module that contains the C-Script compiler, and a DLL part for renderer, sound and multiplayer. A defined DLL interface allows using the renderer from other programs or programming languages, like Visual Basic, as well as adapting 3rd party open source engines for GameStudio.





@All, if you want to use the shader editor which uses DX9, you will have to wait for the feature to be in 3DGS's Acknex engine:

Quote:

DirectX 9 Interface (priority: low)
Offers new possibilities in combination with the latest 3D hardware generation, like a C-based shader language. However, requires manual installation of DirectX 9 on all target systems.



Posted By: Nadester

Re: A Shader GUI - 12/10/03 06:07

@ventilator/Grayson,
That is a very good idea. I do agree.. it is an enormous task. That is mainlly why I am looking for help. But now that I think of it, I am going to put it on hold until it is a dll.

Still looking for help btw...
Posted By: Aaron_H

Re: A Shader GUI - 12/10/03 06:36

>Grayson.

To me DX9 would be a wonderful thing, I would just love for A6 to reach these levels, and maybe then I'll be able to see what I want to see with my new computer. But the fact is, most of the people that will play my games most likely won't be running a 3.2Ghz P4, they may be running a 900Mhz pc, so I think it is good for Conitec to keep the engine at this for now, and maybe upgrade later, when dx9 is more common.

Also, In light of these views, would it be possiable for conitec to update the engine, but use dx9 as an alternate method. They could just update the engine to dx9, but also keep the current one, and maybe link the two together in some way. Like there could be 2 MEDs, SEDs and WEDs.

That would just be great.
Then it shows people that A6 isn't a lower class engine as it uses the latest technology (I just hate people that talk like that.)
Posted By: Anonymous

Re: A Shader GUI - 12/10/03 10:11

Ah... I kinda hate DirectX 8.

For me, DirectX 9 rocks!
Posted By: Aaron_H

Re: A Shader GUI - 12/10/03 19:42

I don't hate it, I would just love to put my machine to the test with custom levels etc. And I would love to be able to make effects that show off the latest technology. But I just hope Conitec have the time to do it soon. Hopefully as an alternate method as many of my gamers may not have dx9
Posted By: Doug

Re: A Shader GUI - 12/11/03 04:15

Quote:

DirectX 9 Interface (priority: low)




Depending on how quickly Microsoft moves we may skip DX9 and jump right to Direct X "Next" (Microsoft gave a 'sneak peak' of it last week). I'm hoping DXNext will "play nice" with older hardware...
Posted By: Drew

Re: A Shader GUI - 12/11/03 09:44

by older you mean pre-dx9 cards? I would assume the radeon cards are still in the picture...
Posted By: Aaron_H

Re: A Shader GUI - 12/11/03 19:02

Thanks Doug,
I knew it may have ben comming soon, but priority can increase if people want it more.

The main things I would like to have are:

Stencil Buffer Shadows,
DirectX (9+) as an alternate method..
New light management (for 8+ dynamic lights)
...*There are a few others, but these are the main things I would love to see soon (Hopefully still in A6 )
Posted By: Beorn

Re: A Shader GUI - 12/11/03 23:47

Aaron,
I think all those things you mentioned already are on the forecast page. except DX9, but doug told us they might skip it in favour of "next".

Posted By: Doug

Re: A Shader GUI - 12/12/03 03:23

Just a follow up, I don't know when "Next" is coming out. I'm starting to have a feeling it may be released about the same time as Longhorn and XB2 (~2006).

The other features mentioned are all supported under DX8 (better shadows, 8+ light sources, etc.). In fact, one of the benefits of the XBox's fixed hardware is that a lot of developers are spending much more time with DX8 then the previous DXs. As a result, there are a lot of more tricks and a much greater understanding of DX8's strengths and weaknesses.
Posted By: Aaron_H

Re: A Shader GUI - 12/12/03 03:52

Thanks,
but I knew it was on the forcast page
I was just stating that these were the features that I wanted most.

Doug, I don't mind dx8, and I know what you are talking about and why conitec has chosen to keep 3dgs at dx8 for now.
I agree with all of these points, and that was why I was thinking of doing it as an alternate method (if possible).

I would rather have dx9 functionalty soon (or now) rather than have to wait for "next"...

On the forcast page it says the dx8 only suports 8 dynamic lights at a time, so this is where I got the info from and it was one of the reasons that I would love to have new light management in the next version.

To me, the main thing I really want (as soon as possiable) is stencil buffer shadows :P. (But again alternate.)
Light management is 2nd.
And dx9 is 3rd.

The reason that I brought up dx9, is that it would make shaders a whole lot easier to create, as we could just use rendermonkey to create these effects. (If I am correct in saying that.)

Thanks anyway,
Posted By: Drew

Re: A Shader GUI - 12/12/03 07:50

My requests for fx (dx 8 or 9) but yes, Dx9 please!!!

- Depth of field
- Glowing auras
- interactive water fx
- Fur
- toon
Posted By: ventilator

Re: A Shader GUI - 12/12/03 09:24

@nadester: instead of a shader editor you could try to do a fixed function effect editor. it would be helpful too but easier to do. and you would gain some experience which you will need for the shader editor!
Posted By: Nadester

Re: A Shader GUI - 12/12/03 10:29

How about a fixed function editor + effect library combo? Seems much more reasonable. But I am going to need to advance more in my fixed function skills. Any one know any decent resources/tutorials out there?
Posted By: Marco_Grubert

Re: A Shader GUI - 12/13/03 09:50

RenderMonkey is supposed to offer an SDK allowing you to write your own file exporters. I have been bugging ATI about this for months but they say it will take a while before it's going to be available.

Fly3D or Qube Engine have a simple shader editor which is nice in that it allows you to add/preview/toggle layers of effects. RenderMonkey has similar features but is clumsy in that respect.
© 2024 lite-C Forums