donderdag 31 januari 2019

FlowEdit Progress

donderdag 10 januari 2019


Voxel & Flow Editor WIP

donderdag 30 november 2017







Some work, on Quake3 shaders & raycasting

maandag 3 november 2008

XML

i'm thinking of converting my data formats to XML, while i'm not an advocate of such a format( to bloated) it is certainly usefull. My scenegraph is mostly contained of nodes, which have their global attributes, like the transformation matrix, number of childs they reference, it suits perfectly in an xml based style for parsing, also the data i depend on heavily relies on big file sets, and we generally want to only have one set floating around on the medium. so instead of storing files locally it should be better to store file references, i havent' studied a lot of xml, but it's format is almost the same as mine..counting parentheses, and parse the data inside the current frame. Something more important, i've ported almost everything to the new code base, and added occlusion queries, combined with the octree-based structure it should give a HUGE speed up( the paper is covered in detail in gpu gems2)

paul

dinsdag 12 augustus 2008

OpenGL 3.0


Today i've read the opengl 3.0 specs, it was a little bit dissapointing,and that is big understatement, opengl 3.0 has been in development for how many years now?! It was even delayed for another year to clean up the mess that opengl has become. but back to reality today they published it, but it are just some new extensions that got approved by the ARB, nothing of the OO type of thing that was promised, functions are called deprecrated now, but since they want backwards compatibility everything of the old GL is still included. I'm wondering if ATI/AMD are going to update their drivers to the new specs.

update: found a comparision picture of the opengl drivers :)




Paul

woensdag 9 juli 2008

Shader Editor


I started the other night creating a shader editor, because editing the material files by hand, is a tedious job, everything has to be spelled correctly, otherwise textures won't load, fragment programs won't run etc. etc.

On the upper-right there is going to be a realtime preview. there are 3 tabs the most obvious ones on this pic are the vertex & fragment shader, the texture panel is going to be an openGLCanvas where all supported textures can be dropped on so one could choose what kind of texture it is, as well as setting it's properties, of that texture stage, rotation, scaling etc. When pressed 'ok' a new Material file will be generated and added to the list. Which is much nicer, than editing everything by hand, I wanted to start integrating the entity handling events this week, but i will first finish this.

Paul

vrijdag 4 juli 2008

omni lights


WOW:)
Omni lights are working now,

The biggest problem was that i didnt set up the correct(modelview) matrices for the cubemap, i just 'debugged' the code by drawing the 6 frusta of the omni.
What i am doing now is rendering the squared distances of the light into an floating point cubemap, which i use in turn in the shadow shader to see if the fragment is in shadow or not.
here is the fragment shader, needs to be cleaned up still:

uniform sampler2D tex0; //diffusetex
uniform sampler2D tex1; //normaltex
uniform sampler2D tex2; //depth texture
uniform samplerCube tex3; //shadow tex
uniform vec3 lightPos; //light pos
uniform vec3 lightColor; //light color
uniform float lightRadius; //raidus
uniform mat4 invMat; //inv projmv mat
varying vec3 camPos; //camera position
varying vec2 texCoord;
varying vec4 dir;
uniform float lightScale;


void main()
{
vec4 base = texture2D(tex0, texCoord);
vec3 bump = normalize(texture2D(tex1, texCoord).xyz* 2.0 - 1.0);
float depth = texture2D(tex2, texCoord).r;
vec4 worldPos = invMat * vec4( (texCoord*2.0)-1.0, depth * 2.0 - 1.0, 1.0 );
worldPos.xyz /=worldPos.w;
vec3 lDir =(lightPos - worldPos.xyz);
float distanceSqr = dot(lDir, lDir);
float distance = sqrt(distanceSqr);
float att=max(0.0, 1.0 - distance/lightRadius)*lightScale;
lDir = normalize(lDir);
float shadow = textureCube(tex3, -lDir).r;
float shadowColor = ((distanceSqr)>shadow) ? 1.0 : 0.0;
float diff = max(0.0, dot(lDir, bump));
vec4 final_color = vec4(0.0, 0.0, 0.0, 0.0);
if(diff > 0.0)
{
final_color += base * diff * att * vec4(lightColor, 1.0)*lightScale;
}
//vec4 color =
gl_FragColor = final_color*shadowColor;
}

zaterdag 28 juni 2008

What the fuck


just trying to run some test on the engine, suddenly i get this:0
probably a big bug somewhere
Paul

dinsdag 27 mei 2008

virtual cube maps


here are 2 pics of rendering to an unrolled depth cube map, just RGB for now, because depth cube maps are recently supported on geforce 8x hardware, it is unrolled for now, in a standard texture

Paul

woensdag 21 mei 2008

screenshots..



...last blog comment sofar.. i will post more if i got more convincing screenshots..this are more of the same kind..





zondag 18 mei 2008

code changes

I've rewritten certain parts of the code, mainly 'alWorld.cpp', alShadowmap.cpp, and alCamera.cpp.
before alWorld had 2 arraylists, containing both deferred and forward shaded polys. I've moved this variables to the alCamera.h so every camera has it's own set of visible polygons..much more easier to maintain. Since i can query frustum calls directly from the camera class.
plus it is easier to create special effects like mirrors, portals.
I hope to implement shadowmapping today.


void alWorld::doShadowPass(alLight* light)
{
//setup matrices for this light
if(light->setupMatrices())
{
alShadowMap *map = light->getShadowMap();
//render to FBO(depth only)
map->begin();
alCamera * cam = map->getCamera();
//get intersecting polys
fillPolys(cam);
//fill depth buffer
zOnlyPass(cam);
//end fbo
map->end();
//wxLogMessage(_T("NumPolys is %d"), cam->getDeferredPolys()->size());
}
}

zaterdag 10 mei 2008

some thoughts..


i did some research..mostly reading white papers about deferred shading, mostly about setting up the g-buffer..but most of the papers stated that it is difficult..to do transparancy. But i don't see the big deal, i first render all deferred geometry, than do the lighting pass, (yes lightning is limited). Then switch to forward shading, and can all do of nice stuff. Right now i've set the limit to the 8 hardware openGL lights. Which i think is enough, for surfaces that really need to be highlighted, we can get some really nice effects.

Next big thing is integrating physics, i've set up the basic framework already, every material can have its special properties, mass, material, specific gravity. I'm going to integrate bullet physics
(http://www.bulletphysics.com/Bullet/wordpress/) they did a great job..i'm impressed especially by their softbody physics.

Paul

dinsdag 6 mei 2008

test




test.. with some model..textures are wrong, as well as the winding of the polygons...


update..added a simple water shader..basically took the old (Forward rendering ) code and rewrote it a bitt

maandag 5 mei 2008

SSAO



implemented screen space ambient occlusion, still need some tweaking though

zondag 30 maart 2008

deferred shading






finally implemented deferred shading, as for now, i only see benefits of using it, of course it has it drawbacks, like not handling transparancy, but well having 500 lights realtime, unoptimized, with all the eye candy is worth it.

dinsdag 25 december 2007

wxwidgets


i've been busy with programming the gui, and found a wxpropertygrid for it, a really nice addition where one can create easily property grid and it looks really stunning

donderdag 13 december 2007

some thoughts...

i've been thinking of the editor lately, nowadays it is unacceptable to create geometry, only with primitives. I'm busy with implementing patches but they are more a novelty(and also limited)..so there has to be a better way to create stunning geometry.
So i came up with the following, the editor is mainly used to place lights, doors, triggers, in short actors that inhabit the world. For visibility determination there will still be brushes placed to 'sculpt' the rough geometry, all these brushes with the same flag( WORLD_BRUSH) will be csg'ed
and the polygons of these brushes will be used for creating sectors(bsp tree i think, or just go with the planes of the original brush?! ) so grouping them will be easy. All the detailed geometry, can be created in a modellers environment, like maya, max etc. because it is beyond the scope of the editor.

maandag 10 december 2007




hacked in normal maps, now i can finally go finish the editor

dinsdag 4 december 2007

glsl lightning

got glsl lightning working, by only chanding the .shader files:), not actually modifying the c++ source files

vrijdag 23 november 2007

another post



i can display textures in the viewport:) texcoords are automatically generated in the range 0..1 thats why some are still fucked up. the nicest part is it is scripted so i can change shaders/ textures by only editing the script files

boolean operations




i've got boolean operations working,
right now the supported operations are csg union, csg subtraction, and csg hollow, also i've written a material library, where material properties(mass, #textures, and surface properties. e.g. slime, lava ) go in a .shader file that will be parsed upon loading. Great benefit of this is that textures aren't hardcoded anymore.
Textures, materials and shader programs will only get loaded once if they are already in memory i will just return a reference( that was the hardest part);
Paul

zaterdag 27 oktober 2007

a picture is worth a thousand words...


old engine stuff, written in pure java, code of this can be found here(again) http://home.hccnet.nl/pj.holverda/

dinsdag 23 oktober 2007

more editor stuff

here is an executable for the editor, http://home.hccnet.nl/pj.holverda/
you can create octagons but only in the upper left window, i find it really shit that in (default) c++ there isn't a good way to list files, so i have to specify a .txt a where all other files will go into(

Paul

vrijdag 12 oktober 2007

editor progress



some progress on the "level editor"
tonight i ported old code of the java-editor to c++. Right now it is possible to create primitives, with at most 200 faces... more than that it and crashes back to the OS. Hopefully i can integrate the glsl part of the engine into the editor so we can get a wysiwg type of editor. But that means also dealing with POV, collision detection etc. etc.:)

cheers

Paul Holverda

woensdag 10 oktober 2007

got text working



text is now displayed correctly, i had to use alpha testing instead of blending with the framebuffer, when multipass rendering, and not clearing the screen, (Duh!!):
glEnable(GL_ALPHA_TEST);
glAlphaFunc(GL_GREATER,0.1f);

cheers,

paul holverda

vrijdag 21 september 2007

progress on level editor


i've made some progress on the level editor, the 4 viewports act accordingly, although i'm pretty ill i couldn't force myself to stay in bed
more to come...

donderdag 20 september 2007

level editor


i've been busy with learning wxwidgets lately, it is really nice and clean api, anyone that wants to learn gui programming i can recommend it. much better than mfc, all functions are packaged in easy to understand classes. There is also a really good wxwidgets gui designer found here wxformbuilder.org. i designed the global layout in minutes:). Over the editor, not much too see yet, except for the 4 colored panels, they correspondend to 4 individual opengl panels(top, left, front, and perspective) where one can create primitives in, most of it i had already written in java, so it just porting.


Cheers

maandag 30 juli 2007

Code dump

i've deciced to dump the code i've created 3 years ago now, so it can be (A)used for everyone.
it is a complete csg/bsp lightmap generator for quake based maps. including removing unseen faces. as well as a basic software renderer and a very basic opengl renderer. but for beginners like i was back in the time it is a valuable addition.

the complete code can be found here

http://home.hccnet.nl/pj.holverda/

bottoms up

Paul

maandag 23 juli 2007

Constructive solid geometry


almost got CSG working, some polygons are not removed properly, but nothing hard to overcome

donderdag 19 juli 2007

Plane Clipping


Just ported old code of the java engine to c++, plane clipping and sorting polygon counter clockwise, the colors here are taken from the plane normals, next will be CSG:D