Voxel frame rate problems

Started by
13 comments, last by Dredge-Master 22 years, 3 months ago
Hi
I guess that the reboot problem comes from the MSWindows memory management or memory caching algorithms, voxels are known to be memory eating, the first time you run your program it starts to allocate and load voxel data into memory, but in the second and further executions the memory allocation differs, i don''t know what exactly happens but i''m almost sure about this. Another issue maybe the borland''s memory management (not the windows memory management) borlandmm.dll does this for you, try executing your program from outside the BCB environment (run the exe file directly) this may help.

And i love voxels, i also use BCB ) i have an old voxel landscape engine, you can see a little screen shot of it in :
http://www.geocities.com/seyedof/projects.htm

--Ali Seyedof
--MFC (The Matrix Foundation Crew)
Advertisement
Firstly, I would like to say FUBAR due to the optus international access being down (Optus Cable in Australia).
http://members.optushome.com.au/jlferry/image/optus_international.jpg
The above images shows how I got to this page.

Well about the lighting, thank you for the code snippets.
Fortuneatly I got it figured out. My problem with the lights originally was that I was tacking them to the viewing rotation. Since I did that I had to work my way back from it and get it to load all the lights.
In the end I deleted it, then used the Dot product in Component form, and whipped up a few functions to do it all for me.
It worked great first time round. Then I just tweaked it and made some lookup tables to make it faster. It happily processes 6 lights at the moment, but when I had 60 lights running on the above sphere it dropped down to 6 fps (coloured lights).

About the memory thing, it lags even without the Borland IDE. I will try it on this machine some time and see if it still has the same error. If so I will give win2k or winxp a try and see if it is just windows or my code. Easier than reading my own code.

Well I will download the image you gave me the address of then ftp it back so I can view it.

Oh yeah, incase anyone wawnted to know why I was working on a voxel system, it is so I can make a 3D game along the lines of Scorched Earth/Worms where you can dig out holes in the ground (like in QBasic's Banan/Gorilla where you could disable the gravity effect on the ground).
The minimum frame rate I am trying to achieve is only around 15 to 20 so the game is playable at high res, and so the mouse cursor doesn't lag.

Until Optus fixes up this bug I probably won't be here much, so seeya al later.


Beer - the love catalyst


Edited by - Dredge-Master on December 20, 2001 7:47:43 PM
Beer - the love catalystgood ol' homepage
Nice screenshot there Seyedof (off your site for the games section).

I tweaked the engine some more, rewrote the sin, cos, acos and tan functions (still changing them to speed up the float to int conversions) and then changed the light processing. Sped it up a shirt load. Also tweaked bits here and there and added in some culling to the voxels (not just the surfaces) and the frame rate is now at 40fps for a textured sphere with 6 lights

also added in a gui so you can set light colours, diffuse reflection, diffuse atmosphere reflection and the colour of the voxel object (if I add in any editing features, I will put in a paint feature so you can use different colours on the voxel model). The gui also has light controls and voxel display type controls. I will try to get the fps up higher, then upload some screenies and a small sample prog to test the gui on my site somewhere.


Beer - the love catalyst
Beer - the love catalystgood ol' homepage
hi
the best voxel stuff ive ever seen are Delta Force2 engine which does Voxel Tiles and Voxel Texturing, the other is Ken Silverman''s voxel engine which renders complex curved objects.
Im working on a voxel/polygon engine for a military simulation project, it includes a nice and powerful terrain generation and editing tool to add rivers, lakes, roads and other stuff to a heightfield landscape
waiting to see a demo of your engine
--MFC (The Matrix Foundation Crew)
Yup, I loved Delta Force 2''s engine. (best thing though was shooting a guy in the arse or groin with the sniper rifle and watch him either 1 - grab his arse and jump around, or 2 - grab his groin and buckle forward)


Well anyway, I rigged up a small sample program of my little engine so you can see the four different modes and the real time lighting.

http://members.optushome.com.au/jlferry

Link is on the bottom of the page. It is 603kb.


All features are mouse driven with the mouse movement, left button, right button and scroll wheel (sorry if you don''t have one - it controls the zooming and the "closeness" of the lights only though - I will add in keys for it if I upload another one)
The only functions to be mapped to the keyboard are as follows:
Escape can be used to exit, and F1 to toggle the edit panel
insert to add lights,delete to delete them. f5 to f8 to switch between the four modes. you can also use 1 to 9 to select a light from 1 to 9

The model is a solid 64x64x64 sphere. 6 lights by default.

Maximum lights are set at 30 (can''t fit any more on the edit display without changing the size of it). New lights default to .5r .5g .5b and normal atmospheric reflection, at location 1,1,1. To add one of these lights, click add (cross) or hit insert

To delete a light, click the minus sign (the minus sign) or hit delete. Then click on the question mark next to the light (was a switch, changes to a question mark when deleting). If you wish to cancel the delete, hit the minus sign (now a cross) or hit delete again.

To select a light, hit 1 to 9 or just click on the colour of it on the right.
To turn a light on and off, click the switch next to the light.
To unselect a light, just click on it again (or press its number). When no lights are selected, the model is selected.

To select a voxel drawing mode, click on one of the four images of the model or hit f5 to f8.

To change the colour or the atmospheric reflection(if a light is selected) or reflective diffusion (no lightis seclected) drag/click on the four bars at the top. red green blue are the colours, white is the atmospheric reflection and the reflective diffuision one.

To minimise/maximise the colour editor, click on the icon second from the right on the bottom (line or box) or hit F1. To exit, hit the bottom right icon ( a cross) or hit escape.

if no lights are selected hold right button down and move the mouse or the scroll wheel to rotate/move the display

if a light is selected and you have the right button down, it will move the light around when you move the mouse or the scroll wheel.


Have fun.


PS - I think that wall image was from the demo of a Rainbow Six game or possible counter strike or the new TFC maps. I forgot where.


Beer - the love catalyst
Beer - the love catalystgood ol' homepage

This topic is closed to new replies.

Advertisement