Beta release 1.9.7b

All topics about ZGameEditor goes here.

Moderator: Moderators

User avatar
y offs et
Posts: 418
Joined: Wed Apr 22, 2009 4:26 pm
Location: BC, Canada

Post by y offs et »

I unzip a copy of ZGameEditorBeta, the current or previous, it doesn't matter.
I open editor and go directly to the FPSdemo, load and <start>. Runs normal.
I shut down the editor, it creates its .ini file. I open the editor; it opens at the FPSdemo, and I <start>. Black walls!
I go to Content/Wall/WallTexture : Bitmap - click. Nodes, and grey with black rect. Leftclick / RightClick each node to activate in preview window. Then <tab>. You'd think fixed. <start> Black walls! Go back to Bitmap. grey with black rect.

Huh! I close editor, delete .ini file.

Go to first "I open..." for repeat cycle.

The finished .exe runs normally.
I have no problem with last stable release.
User avatar
VilleK
Site Admin
Posts: 2277
Joined: Mon Jan 15, 2007 4:50 pm
Location: Stockholm, Sweden
Contact:

Post by VilleK »

I can't reproduce the texture bug in FpsDemo that "y offs et" describe. Can someone else please try and see if they get the same problem?

Beta updated today with the work-in-progress convolution-based Blur.

- removed BitmapBlur_GPUTest
- removed BitmapBlur "Passes"-property, instead there is "Kind" which selects between different kinds of blur
(note that the settings for blur-direction seems to be switched at the moment, i.e. horizontal means vertical and vice versa)

Also copied the Bitmap graph editor and made a Mesh graph editor. So now meshes are edited in the same way as bitmaps.
kattle87
Posts: 402
Joined: Wed Sep 26, 2007 9:06 am
Location: Italy

Post by kattle87 »

Nice job Ville! =)
Probably tomorrow I will sync the code and if I can found anything that can be made easier, I'm going to change the code a little.
We must decide when finalyzing the beta, too ^^
In the fall of 1972 President Nixon announced that the rate of increase of inflation was decreasing. This was the first time a sitting president used the third derivative to advance his case for reelection.
-=Hugo Rossi=-
User avatar
VilleK
Site Admin
Posts: 2277
Joined: Mon Jan 15, 2007 4:50 pm
Location: Stockholm, Sweden
Contact:

Post by VilleK »

Sounds good Francesco. Yep, you are right we should finish this beta soon. I suggest we do so when everyone is happy with the new blur-component, so if no bugs in other areas of ZGE appears maybe we can release in next week depending on the time you have with blur. If it proves tricky to create a general Convolution-component then we can leave that until next beta (that we can start immediately after releasing current beta).
User avatar
VilleK
Site Admin
Posts: 2277
Joined: Mon Jan 15, 2007 4:50 pm
Location: Stockholm, Sweden
Contact:

Post by VilleK »

Beta updated:

- BitmapBlur-component should now be stable
- New BitmapConvolution component that uses a DefineArray as a matrix for convolution
- Log-window updated so that it is easier to distinguish between normal messages and warnings. Also displays full message on mouse-over.

Please test this as this is a candidate for a proper 1.9.7 release.
kattle87
Posts: 402
Joined: Wed Sep 26, 2007 9:06 am
Location: Italy

Post by kattle87 »

rought example (not so clear I know) about using the convolution.
Attachments
ConvoBlur.zgeproj
(1.6 KiB) Downloaded 573 times
In the fall of 1972 President Nixon announced that the rate of increase of inflation was decreasing. This was the first time a sitting president used the third derivative to advance his case for reelection.
-=Hugo Rossi=-
User avatar
y offs et
Posts: 418
Joined: Wed Apr 22, 2009 4:26 pm
Location: BC, Canada

Post by y offs et »

I like it. About FPS bug. Still the same. The way my open window fixes on this file make me think its a file specific thing. This file only one with rect upon rect. Every other demo works and displays perfect in preview.

The preceeding post file causes same atioglxx.dll error AND LOCKS EDITOR. TaskManager to kill.

After examining xml I tried to create. Add Content / Bitmap / BitmapRect no problem. Add BitmapBlur - error and lock immediately.

Hmm... It seems using BitmapRect as base of group causes these problems.

Add Content / Bitmap / BitmapCells / BitmapRect / BitmapBlur is accepted.

Bitmap / BitmapFromFile / BitmapRect / BitmapBlur no issue. As soon as I break File and Rect - immediate lockup.

Adding it in middle of chain works but blanks preview upon re-organize. I've built immense chains with everything else without issue as long as I omit it.
"great expectations"
User avatar
VilleK
Site Admin
Posts: 2277
Joined: Mon Jan 15, 2007 4:50 pm
Location: Stockholm, Sweden
Contact:

Post by VilleK »

Oh no, the dreaded ATI-errors are back again... :cry: ;)

Is it still just inside the editor? No crashes when you run the application with F9-key?
User avatar
y offs et
Posts: 418
Joined: Wed Apr 22, 2009 4:26 pm
Location: BC, Canada

Post by y offs et »

Not sure which application you refer to. The FPSdemo is the same as I posted much earlier. My last post referred to the file posted by kattle87 just before. Just loading in the editor locks it up. I've never run it.

Apparently using bitmapRect as a base and stacking bitmapBlur directly upon it reveals the problem in its most violent form; as I found in my posted experiments.
Last edited by y offs et on Fri May 15, 2009 2:46 pm, edited 1 time in total.
"great expectations"
User avatar
jph_wacheski
Posts: 1005
Joined: Sat Feb 16, 2008 8:10 pm
Location: Canada
Contact:

Post by jph_wacheski »

humm this convolution is interesting,. Kattle's sample however, does not work,. ?
It was showing an error; "Graph can not be displayed for this bitmap." I have not yet seen that one. :?
I moved the ZExpression out of the Bitmap to get the graph going., OK fine.

I do really like the new Blur methods (kind),. very nice addition!

However I am needing a little explination for how the Convolver Array is set up,. from Kjells GLSL version;

Code: Select all

kernel[SIZE] = {1,2,1,
                2,4,2,
                1,2,1};

I understood to be the values taken around each pixel with the 4 being the current pixel,. right? with this,. you are useing only 5 values so how does this map? Also, what do the Devisor and Bias values represent? I got some interesting effects messing with them in your example and it is very fast,. so I see a large potential here,. :D

On a related but different issue;
Could we define array values with a similar form? i.e. array[9]=1,2,1,2,4,2,1,2,1; or array[2,2]=0,0,1,2; ?? this is quite effecent for the user,. however I suppose this would be a bunch of work on the editor to get that functionality ?

And/Or my other old suggestion for a StaticArray component that has an editable value table in the editor would be also very slick for this as well,. . see attached pic
Attachments
editor screen mockup,. .
editor screen mockup,. .
array_grid.jpg (59.18 KiB) Viewed 14899 times
iterationGAMES.com
kattle87
Posts: 402
Joined: Wed Sep 26, 2007 9:06 am
Location: Italy

Post by kattle87 »

Ok here we go with some maths then ^^
as you said, the numbers used in the matrix are the multipliers of every single pixel around the centered pixel (in this case the central is multiplied by "4"). All the adiacent pixels are multiplied by the corresponding value in the matrix including the "DIAGONAL neightborhood" ones, then all the multiplications are summed toghether to obtain the new value of the central pixel. This "multiply the adiacents and sum" is done for every pixel in the image. This is the main reason for it being quite slow (like the old blur was! The code for the old blur is convolution with a NxN matrix full of ones).

The divisor and bias are 2 standard features of the convolution filter used by other programs (like Gimp or Photoshop). The divisor tells you how much the final value of the central pixel is divided by, while the bias tells you how much is added or subtracted.

It would be the exact same thing to add a BitmapExpression containing:

Code: Select all

this.Pixel.R /= divisor;
this.Pixel.R += Bias;
for every one of the R,G and B colors.

The tricks:
-separable convolution: if you have some kind of convolutions, you can rework them in order to get them made in 2 passes: (like the blur behaves now under the hood): first horizontally (with a 1xN matrix), then vertically (with a Nx1 matrix). The gain in speed is HUGE when it comes to large radius (the dimension of the convolution matrix is equal to radius*2+1).
-Use intelligently computed values: the 3x3 matrix used by kjell is a small example of a gaussian blur filter. when you choose the "gaussian" from the blur kind property, the code automatically creates a filter similar to the Kjell one but computes the value needed for the NxN matrix the component is going to use. This means no hardcoded values and same execution speed for the good 'n old "squared" blur and the brand new "gaussian" blur.

I hope I was clear enough ^^ I hope you will come in handy with that soon!
In the fall of 1972 President Nixon announced that the rate of increase of inflation was decreasing. This was the first time a sitting president used the third derivative to advance his case for reelection.
-=Hugo Rossi=-
User avatar
VilleK
Site Admin
Posts: 2277
Joined: Mon Jan 15, 2007 4:50 pm
Location: Stockholm, Sweden
Contact:

Post by VilleK »

The bitmap graph editor can only display producer-components so it can't make a diagram of a bitmap containing expressions or loops. This is "by design" at the moment and will not be fixed in this version. Editing arrays in the editor is a great idea, I'll definitely look into that.
User avatar
jph_wacheski
Posts: 1005
Joined: Sat Feb 16, 2008 8:10 pm
Location: Canada
Contact:

Post by jph_wacheski »

ok found a problem,. I was hacking out some interesting bitmaps with the new convolution and was finding some great stuff,. however today when I open the .proj as soon as I click on any of those bitmaps the editor throws this error and must be killed to move on,. . see image for the error and the attached .proj for you investigation. I do hope this one is easily fixed as I was very excited by the cool effects possible through this component.

Ville- cool! I can think of many good uses for those editable "DefineCostantArray"s such as easy editing/visualizing of note values for a tracker like setup,. and as Kattle said a slider, or a couple arrow buttons to move in the 3rd dimention would rock,. but this would still be uesfull even if 2d is only working,.

Kattle- I am getting more info from yor post (devisor and bias,. good) however i still don't quite understand how in your example those 5 values in the array work,. i.e. are maped to the image. Should there not be at least 9? (for the center and the 8 around it,..) perhaps i need a diagram :?
Attachments
Convoluted_000.zgeproj
.zgeproj will crash your editor!
(2.36 KiB) Downloaded 654 times
ZGE_convolv_err.jpg
ZGE_convolv_err.jpg (54.47 KiB) Viewed 14863 times
iterationGAMES.com
User avatar
VilleK
Site Admin
Posts: 2277
Joined: Mon Jan 15, 2007 4:50 pm
Location: Stockholm, Sweden
Contact:

Post by VilleK »

Found the problem. In your project the ZExpression that initializes the array is placed directly under Content so it doesn't get executed. If you move it to OnLoaded it will work. I updated the beta so it doesn't crash if the array isn't initialized.

I've noticed another problem: sometimes applications using convolution that are run with F9 suddenly exits without error. This is likely because of an invalid floating point operation, such as division by zero or overflow. Perhaps we need to guard against that.
User avatar
jph_wacheski
Posts: 1005
Joined: Sat Feb 16, 2008 8:10 pm
Location: Canada
Contact:

Post by jph_wacheski »

You really are good detective! Thanks ;)
iterationGAMES.com
Post Reply