Blackvoxel > Programming with Blackvoxel

How hard could smoothing be?

<< < (6/7) > >>

d3x0r:
compare_swap_and_xchg and InterlockedExchange are similar; other than the function results...
I see; that is one thing I had an issue with when porting; think I made it thread unsafe...

Here's something I was playing with - surround-o-vision

http://youtu.be/R2izTRpP2kM 

each display is actually independant, and should build its display list appropriate for its view direction, but right now, everything is added to every display list, and 6 windows shown each rendering pass... at very low frame rates there is frame tear between the displays....

More optimal would be to target 3 monitor, and just show forward left and right.. a single display stretched across 3 displays is not right, and perspective gets distorted badly.

----
So ya I'll turn my attention more to voxel based operations... I dunno just feel I'm missing something... like I saw the voxel engine

d3x0r:
I I continued to do some merging, and ... I have gui popup displays rendering... but as soon as I do the textures ...
*and as I typed that I realized what it might have been*
So the last thing that's being done is drawing a black text output, which left glColor set at 0,0,0.. and apparently whatever the last color before the swap is, is what the glCallList lists use... so everything seemed to be there, but it was all black... like the geometry opaqued my displays in the depth buffer... but had no color themselves... finally reset the color back to 1,1,1 before swap and now

.. *deleted*. http://youtu.be/V9TR1w2yEtg

Doh; stupid opengl window doesn't record right.

olive:

--- Quote from: d3x0r on November 02, 2014, 09:06:03 am ---The other example of 'poor relationships' I ran into is C# has a type called DataTable, which is a representation of a SQL table, with dynamic columns with types and rows, etc.  But datatables contain columns and rows but all columns know the datatable they are in, and all rows know the datatable, also datatables can be contained in datasets which is a group of datatables and adds the foriegn key relationships between tables.  So from any row you can get to any other row in any other table that row is remotely related to... so there's sometimes merits of having... say worlds know all sectors, but sectors know their world, and hence their renderer... or something.

--- End quote ---

True. It's a good idea.


--- Quote from: d3x0r on November 03, 2014, 09:22:01 pm ---compare_swap_and_xchg and InterlockedExchange are similar; other than the function results...
I see; that is one thing I had an issue with when porting; think I made it thread unsafe...
--- End quote ---

Yes, thread unsafe code can easily create weird instabilities. The problem with a performance oriented program is that we are trying to avoid any form of lock whenever possible. The difficulty is to avoid missing the cases where it won't work.


--- Quote ---Here's something I was playing with - surround-o-vision

http://youtu.be/R2izTRpP2kM

each display is actually independant, and should build its display list appropriate for its view direction, but right now, everything is added to every display list, and 6 windows shown each rendering pass... at very low frame rates there is frame tear between the displays....
--- End quote ---

It's fun. We see that it can do many things.  :)


--- Quote ---More optimal would be to target 3 monitor, and just show forward left and right.. a single display stretched across 3 displays is not right, and perspective gets distorted badly.
--- End quote ---

For doing it right, it would need entering some parameters for each screen. As far as I know, only some flight simulators support some kind of advanced multi screen.


--- Quote ---So ya I'll turn my attention more to voxel based operations... I dunno just feel I'm missing something... like I saw the voxel engine
--- End quote ---

Yep, the most interesting part of Blackvoxel is on the MVI side...

That's the core of the game interest.

The rendering engine is designed mainly to be fast and efficient in order to serve MVI.  :)

The Blackvoxel team

d3x0r:

This is a code snippet that's mostly standalone; use of libpng to read/write images.  1/2 is read 1/2 is write.
basically my image stucture is
struct image {
  int x, y;
  unsigned int w, h;
  byte[4] *image; // color data
}


https://code.google.com/p/c-system-abstraction-component-gui/source/browse/src/imglib/pngimage.c

several editors on windows support png and the alpha transparent layer... none (few); probably you use gimp?  support 32 bit alpha saving.  I Have a command line utility that converts 24 to 32; but makes the alpha channel opaque. 

png is like bmp that it is lossless... but it is a zip compression per channel...  works good for RLE encodable images basically... or mostly constant images... but does have 1 byte alpha channel support.

can google 'sample libpng read' which is what my code was based on... which is mostly copy and pastable....

----------
On image loading; I open the file memory mapped and pass the pointer to that memory to a routine that trys passing it to several loader routines, which then result with an image... basically if( !ZBitmapImage.PNGLoad(file) ) if( !ZBitmapImage.BMPLoad( file ) ) ... if (!... JPGLoad() ) ...

can just pass the open file and rewind it between....
SDL has an image loading library...
FreeImage is a LARGE library that loads just about everything... but it's like 2M .. png is a few hundred K
-----------

olive:

--- Quote from: d3x0r on November 09, 2014, 12:46:03 am ---This is a code snippet that's mostly standalone; use of libpng to read/write images.  1/2 is read 1/2 is write.
basically my image stucture is
struct image {
  int x, y;
  unsigned int w, h;
  byte[4] *image; // color data
}

https://code.google.com/p/c-system-abstraction-component-gui/source/browse/src/imglib/pngimage.c

several editors on windows support png and the alpha transparent layer... none (few); probably you use gimp?  support 32 bit alpha saving.  I Have a command line utility that converts 24 to 32; but makes the alpha channel opaque.

png is like bmp that it is lossless... but it is a zip compression per channel...  works good for RLE encodable images basically... or mostly constant images... but does have 1 byte alpha channel support.

can google 'sample libpng read' which is what my code was based on... which is mostly copy and pastable....

----------
On image loading; I open the file memory mapped and pass the pointer to that memory to a routine that trys passing it to several loader routines, which then result with an image... basically if( !ZBitmapImage.PNGLoad(file) ) if( !ZBitmapImage.BMPLoad( file ) ) ... if (!... JPGLoad() ) ...

can just pass the open file and rewind it between....
SDL has an image loading library...
FreeImage is a LARGE library that loads just about everything... but it's like 2M .. png is a few hundred K
-----------

--- End quote ---

Gimp is what we recommend for texture working with Blackvoxel. That's a very powerfull program.

But any other major image editor will do the job (and provide support BMP32.)

You are right to say uncompressed BMP take more space on the disk. But is it really a problem ?

At this time, the place taken by blackvoxel on hard disk stay low compared to many games. As images are mostly textures, we'll run out of GPU RAM well before hard disk space become a problem.

And for web distribution, packages are compressed anyway.

After all, image loading isn't a central functionnality in a game. That's common to have limited support of texture formats.

There is pro and cons for compressed formats. In one hand, we'll gain space, on other, we'll add a little delay to startup time.

But more complex format mean also more compatibility problems.

And image library are typicaly the pieces of code that need evolution and maintenance over time.

Some months ago, Gimp changed to a new BMP format revision. And we had to update the image loader.

But at last, as we written it, we were able to fix the problem very quickly.

So, as there is pro and cons in the story, we'll have to think about that idea.

The Blackvoxel Team

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version