Beta release 2.0.0b

Information and change log about the latest ZGameEditor release.

Moderator: Moderators

User avatar
Kjell
Posts: 1876
Joined: Sat Feb 23, 2008 11:15 pm

Post by Kjell »

8)

Another important animation feature .. morph. Since the current Mesh component doesn't expose the vertex identity, all rendering is done using opengl32. Attached is a basic example using linear interpolation and 2 targets ( + base ) .. normally you'd use this in combination with F-Curves for facial animation / muscular deformation etc.

K
Attachments
Morph.zip
(29.21 KiB) Downloaded 776 times
User avatar
Kjell
Posts: 1876
Joined: Sat Feb 23, 2008 11:15 pm

Post by Kjell »

:roll:

Just messing around .. bloom shader based on gaussian blur & FBO mipmap ( + effect in overdrive ).

K
Attachments
Overdrive.jpg
Overdrive.jpg (38.2 KiB) Viewed 24917 times
Bloom.jpg
Bloom.jpg (36.52 KiB) Viewed 24917 times
User avatar
jph_wacheski
Posts: 1005
Joined: Sat Feb 16, 2008 8:10 pm
Location: Canada
Contact:

Post by jph_wacheski »

Hay, that looks real nice! Care to share the .zgeproj for the curious?
iterationGAMES.com
User avatar
VilleK
Site Admin
Posts: 2274
Joined: Mon Jan 15, 2007 4:50 pm
Location: Stockholm, Sweden
Contact:

Post by VilleK »

Yeah Kjell you are just teasing us with your skills if you won't share the source ;)
Or at least an exe so we can see it in motion. The stills look very nice!
User avatar
Kjell
Posts: 1876
Joined: Sat Feb 23, 2008 11:15 pm

Post by Kjell »

:)

Reason I didn't post a exe was because I have no idea whether it works on a ATI card or not ( and don't need to know either ), plus the effect is not resolution independent ( and there's a issue with the AspectRatio of FBO's using AutoPowerOfTwo ) .. just experimenting with different techniques.

Anyway, see attached.

K
Attachments
Bloom.zip
(32.4 KiB) Downloaded 779 times
User avatar
jph_wacheski
Posts: 1005
Joined: Sat Feb 16, 2008 8:10 pm
Location: Canada
Contact:

Post by jph_wacheski »

Does not work on ATI,. at least here. :(
Stupid vidcard inconsistancies.
iterationGAMES.com
User avatar
Kjell
Posts: 1876
Joined: Sat Feb 23, 2008 11:15 pm

Post by Kjell »

:?

My guess is that this is similar to the Accumulation / Stencil situation. Since ZGE doesn't explicitly enables these features ( FBO mipmaps in this case ), they will fail on ATI .. while NVIDIA is a little more forgiving.

K
User avatar
VilleK
Site Admin
Posts: 2274
Joined: Mon Jan 15, 2007 4:50 pm
Location: Stockholm, Sweden
Contact:

Post by VilleK »

It does not work here either. It displays a small rectangle in the middle of the screen where you can barely see moving colored cubes that looks like those in the picture.

What is the FBO mipmap issue? Zge already makes the glGenerateMipmapEXT-call which is supposedly only needed on ATI.
User avatar
Kjell
Posts: 1876
Joined: Sat Feb 23, 2008 11:15 pm

Post by Kjell »

:?

Are you sure? Google doesn't find anything when I search for glGenerateMipmapEXT in the repository.

K
User avatar
VilleK
Site Admin
Posts: 2274
Joined: Mon Jan 15, 2007 4:50 pm
Location: Stockholm, Sweden
Contact:

Post by VilleK »

That's odd because searching is what google usually do best :)

If you do a normal google search for "glGenerateMipmapEXT zgameeditor" it finds the code:

http://code.google.com/p/zgameeditor/so ... nderer.pas
User avatar
Kjell
Posts: 1876
Joined: Sat Feb 23, 2008 11:15 pm

Post by Kjell »

Ok,

Then I might have scr*wed up somewhere .. here's the fragment shader ( perhaps u / v / offset need to be part of main .. or bloom set to vec4(0.0) ).

Code: Select all

uniform sampler2D tex1;

uniform float canvasWidth;
uniform float canvasHeight;

const float kernel[9] = {1.0/12.0,1.5/12.0,1.0/12.0,
                         1.5/12.0,2.0/12.0,1.5/12.0,
                         1.0/12.0,1.5/12.0,1.0/12.0};

float u = 16.0/canvasWidth;
float v = 16.0/canvasHeight;

vec2 offset[9] = {vec2(-u,  v),vec2(0.0,  v),vec2(u,  v),
                  vec2(-u,0.0),vec2(0.0,0.0),vec2(u,0.0),
                  vec2(-u, -v),vec2(0.0, -v),vec2(u, -v)};

void main()
{
  vec4 bloom;

  for(int i=0; i<9; ++i)
  {
    bloom += texture2D(tex1, gl_TexCoord[0].xy+offset[i],4.0)*kernel[i];
  }

  gl_FragColor = texture2D(tex1, gl_TexCoord[0].xy)+bloom*4.0;
}
K
User avatar
VilleK
Site Admin
Posts: 2274
Joined: Mon Jan 15, 2007 4:50 pm
Location: Stockholm, Sweden
Contact:

Post by VilleK »

It complains about the syntax of initializing constant arrays.

This compiles ok:

Code: Select all

//...

const float kernel[9] = float[](1.0/12.0,1.5/12.0,1.0/12.0,
                         1.5/12.0,2.0/12.0,1.5/12.0,
                         1.0/12.0,1.5/12.0,1.0/12.0);

//...

vec2 offset[9] = vec2[](vec2(-u,  v),vec2(0.0,  v),vec2(u,  v),
                  vec2(-u,0.0),vec2(0.0,0.0),vec2(u,0.0),
                  vec2(-u, -v),vec2(0.0, -v),vec2(u, -v));
User avatar
Kjell
Posts: 1876
Joined: Sat Feb 23, 2008 11:15 pm

Post by Kjell »

Ok,

Guess that's good to know :)

Something completely different, quick experiment using a QTVR type of approach. Move with left mouse button, look around with right.

K
Attachments
QTVR.zip
(154.55 KiB) Downloaded 765 times
User avatar
VilleK
Site Admin
Posts: 2274
Joined: Mon Jan 15, 2007 4:50 pm
Location: Stockholm, Sweden
Contact:

Post by VilleK »

Haha, that's a very cool effect. Works fine here.
User avatar
y offs et
Posts: 418
Joined: Wed Apr 22, 2009 4:26 pm
Location: BC, Canada

Post by y offs et »

Watch your step!
Works here too, although minor jerky.
7Z seems to take an unusual long time to unzip it.
"great expectations"
Post Reply