0 registered members (),
1,459
guests, and 9
spiders. |
Key:
Admin,
Global Mod,
Mod
|
|
|
FXED - Effect Editor - BETA
#335155
07/27/10 00:38
07/27/10 00:38
|
Joined: Nov 2007
Posts: 1,143 United Kingdom
DJBMASTER
OP
Serious User
|
OP
Serious User
Joined: Nov 2007
Posts: 1,143
United Kingdom
|
Hey guys, here's my entry for the tool contest. In keeping with gamestudio's naming style (WED, MED, SED) this one is called FXED. It's an effect editor allowing you to write and preview shaders along with changing skins, setting skills and editing materials at runtime. It uses a 'component' model where each pass, variable, vector, sampler, etc is treated as a seperate object with customizable properties... Or for those who prefer the traditional way, individual .fx files can be edited... Additionally an effect library is included with contributions from the wiki, massive shader collection, etc. You can also add any of your own shaders to the library and share them with each other. For now I've just added some basic shaders for this BETA test, in case there are major flaws in the file format. Many others will be added before the contest deadline... Also included is a 'HLSL Primer' which is a mini workshop on the basics of the shader language. It is written how I personally understand HLSL, and as I'm not really a shader programmer, any gurus who find anything wrong with it please don't hesitate to correct me. And here is the download link... FXED Effect Editor V1.0 It's written in C# so you will need the .NET framework (3.5+) if you don't already have it. Please read the included help file for a complete description of the features. For now I've just included some basic models to test. It's quite a complex piece of software so bound to have a few bugs. I'd appreciate any feedback on bugs, features, etc. This gives me just under a week to fix anything... Hope it works, knowing my luck it'll crash on startup! Thanks, DJB.
Last edited by DJBMASTER; 07/27/10 01:10.
|
|
|
Re: FXED - Effect Editor - BETA
[Re: DJBMASTER]
#335160
07/27/10 03:51
07/27/10 03:51
|
Joined: Jul 2010
Posts: 129
bk9iq
Member
|
Member
Joined: Jul 2010
Posts: 129
|
Great contribution bro... However as u said knowing my luck it'll crash on startup! Hehehe.. you are right ... I tried it and once I clicked on one of the library files it crashed... I have .NET framework 4 ... but I use 3DGS free edition ... Does it depend on the version?? because if yes then this is why as the free and extra editions don't support shaders... Thanks again
|
|
|
Re: FXED - Effect Editor - BETA
[Re: DJBMASTER]
#335164
07/27/10 04:42
07/27/10 04:42
|
Joined: Mar 2006
Posts: 3,538 WA, Australia
JibbSmart
Expert
|
Expert
Joined: Mar 2006
Posts: 3,538
WA, Australia
|
I haven't produced anything yet, as I have other stuff on my plate at the moment. But I snooped around the interface and absolutely love it. Everything is laid out in front of me, and it is really nice to have a list of intrinsic functions, render states, default.fx functions and what-not.
I was debating in my head the usefulness of such a program for multi-stage pp effects, and then I remembered how many times I've wanted to be able to see the output of each individually anyway, so I see its use there.
The preview window is very helpful, and being able to load in my own model and see the effects straight away was very gratifying. However, there are sorting errors for complex models, and changing the render states (making sure ZEnable and ZWriteEnable are True, and setting ZFunc to LessEqual) did nothing to help. Setting a Sky Cube makes the preview model invisible -- but only with the Normal Mapping example. Sorting errors are prevalent in all examples I tried. I wish I could tell you more.
Three additions that would be nice: 1. Multiple Techniques. I might be blind, and just couldn't find it, but there didn't seem to be a way to have multiple techniques in the one file. Fallbacks can be really useful, as well as the automatic LOD system with techniques, so it's a shame that isn't there. 2. Rotating the model in the preview window with mouse can be really awkward. The panning works great, but the tilting only corresponds appropriately with mouse motion when the model faces the camera. You may want to use quaternions to remedy this, or perhaps it's no big deal. But one more thing that's related to this: When loading new media (or perhaps just when clicking "reset camera"), it would be nice if the camera position took the model's bounding box into account (it can be a little annoying to load a large model and have it either fill the screen, or overlap the camera). Also, it doesn't seem to detect smallish mouse movements -- I suspect this is because of an enormous framerate causing time_step to round down to zero. Perhaps there should be a cap on the framerate? 3: For pp effects, it would be really nice to be able to use a preview image instead of a preview model.
Anyway, well done! This contest is already earning some really cool tools for the community! I can see myself enjoying it as a .fx editor more than anything else; being able to separate the pixel and vertex shaders into their own independent windows is tidy and charming, but I found myself lost not being able to see the input and output at a glance. I'm sure shader programmers who learn in this software will be able to appreciate it more than I can at the moment.
Jibb
Formerly known as JulzMighty. I made KarBOOM!
|
|
|
Re: FXED - Effect Editor - BETA
[Re: JibbSmart]
#335169
07/27/10 05:46
07/27/10 05:46
|
Joined: Nov 2007
Posts: 1,143 United Kingdom
DJBMASTER
OP
Serious User
|
OP
Serious User
Joined: Nov 2007
Posts: 1,143
United Kingdom
|
Thanks for your feedback. @bk9iq > I'm not quite sure why it would crash when loading a library file? Maybe you could provide a more detailed explanation? It doesn't take your gamestudio version into account at all, it uses its own version of the engine so everyone can use it @JulzMighty > Setting a skycube shouldn't affect the model at all. I just tried setting a sky image on the normal mapping shader and I didn't see anything abnormal. Maybe I'm blind! As for your additions... 1) Yes currently only 1 technique is generated, but a fallback is also written so it's not all bad! . Maybe if I add an option that allows you to assign a technique name to each pass to allow different versions? 2) As tilting I assume you mean dragging with the left mouse button? I use this small code...
model.pan += orbit_speed * mouse_left * mouse_force.x * time_step;
model.tilt -= orbit_speed * mouse_left * mouse_force.y * time_step;
I agree with the 'bounding box' issue. I didn't implement any mechanism to adjust the camera based on the size of the model. This is due to my poor testing and using models with similar size. Thank you for bringing this to my attention. The small mouse movements is because the camera is moved at a fixed rate, so the bigger the model the smaller the movement. 3) Assuming I understand you correctly, I'll add an option to load an image as a panel on the screen. The 'component' model approach may be a little akward for a more mature programmer but I feel newcomers to the shader programming scene will appreciate a visual interface more. So I suggest that shader newcomers should use the designer to get a feel with how each bit fits in and then maybe branch off into writing .fx files from stratch. Regardless, the overall goal is to get more people interested in shader programming because, in my opinion, there tends to be a sort of fear of shader programming because of how complex and mathematical they can get. I'm a noob myself but I feel learning something new is much more interesting with a visual app. Thanks for your suggestions.
Last edited by DJBMASTER; 07/27/10 06:38.
|
|
|
Re: FXED - Effect Editor - BETA
[Re: DJBMASTER]
#335173
07/27/10 06:35
07/27/10 06:35
|
Joined: Mar 2006
Posts: 3,538 WA, Australia
JibbSmart
Expert
|
Expert
Joined: Mar 2006
Posts: 3,538
WA, Australia
|
@JulzMighty > Setting a skycube shouldn't affect the model at all. I just tried setting a sky image on the normal mapping shader and I didn't see anything abnormal. Maybe I'm blind! I just started again in the hopes of showing you a screenshot, and the skycube is no longer causing any trouble. That's just weird. But good But the sorting errors are still there: You should be able to see it with the normal mapping example and using the marine (since it has overlapping parts), regardless of whether or not a skycube is present. Here's what I mean: Notice how the back leg appears over the front leg. 2) As tilting I assume you mean dragging with the left mouse button? I use this small code...
model.pan += orbit_speed * mouse_left * mouse_force.x * time_step;
model.tilt -= orbit_speed * mouse_left * mouse_force.y * time_step;
Yup, I thought it would be something like that. It works great when the model faces the camera (up tilts it up, down tilts it down), but when the model faces side-on from the camera, or away from it, tilting the front of the model up when the mouse moves up is unintuitive. It's really just a minor nit-pick. Regardless, the overall goal is to get more people interested in shader programming because, in my opinion, there tends to be a sort of fear of shader programming because of how complex and mathematical they can get. Too right. It's especially sad here since shader programming is IMO a big strength of GS's. I think your tool would be a great way to start and get an interest, and also to continue developing. Good luck in the contest. Jibb
Formerly known as JulzMighty. I made KarBOOM!
|
|
|
Re: FXED - Effect Editor - BETA
[Re: JibbSmart]
#335180
07/27/10 07:02
07/27/10 07:02
|
Joined: Nov 2007
Posts: 1,143 United Kingdom
DJBMASTER
OP
Serious User
|
OP
Serious User
Joined: Nov 2007
Posts: 1,143
United Kingdom
|
Ok, At first look I though it was a render state being set by accident but it is this piece of code...
model.alpha = [alpha value from material settings];
set(model,TRANSLUCENT);
But by default the material alpha is 100, and even when the model is translucent and alpha is 100, it should still be completely opaque. Strange.
|
|
|
Re: FXED - Effect Editor - BETA
[Re: Rei_Ayanami]
#335221
07/27/10 10:14
07/27/10 10:14
|
Joined: Nov 2007
Posts: 1,143 United Kingdom
DJBMASTER
OP
Serious User
|
OP
Serious User
Joined: Nov 2007
Posts: 1,143
United Kingdom
|
The Default alpha Value in 3dgs is 50. Yeh I know, but it makes no sense that setting alpha to 100 along with the TRANSLUCENT flag results in seeing some of the backfaces.
|
|
|
|