Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

DarkBASIC Professional Discussion / Checking How much memory is left

Author
Message
Pincho Paxton
23
Years of Service
User Offline
Joined: 8th Dec 2002
Location:
Posted: 26th Jul 2012 20:26 Edited at: 26th Jul 2012 20:28
How do you check how much memory you have left?

I am right on the edge of crashing DBPro, and need to know how far I can push it.

When I use Smem it says 2048, but I have 3072, so that's wrong for a start.

Brendy boy
20
Years of Service
User Offline
Joined: 17th Jul 2005
Location: Croatia
Posted: 26th Jul 2012 20:40
Quote: "How do you check how much memory you have left? "

task manager

Quote: "I am right on the edge of crashing DBPro, and need to know how far I can push it."

you can use up to 2gb of RAM

Pincho Paxton
23
Years of Service
User Offline
Joined: 8th Dec 2002
Location:
Posted: 26th Jul 2012 20:49 Edited at: 26th Jul 2012 21:13
Quote: "you can use up to 2gb of RAM"


That's strange. I had 2gb of ram, and I could get 40000 sphere before DBPro crashed. So I bought another gig of ram, and then I could get about 60000 sphere before DBPro crashed. It was the same program, so the 1gb made a difference. How did it make a difference?

Anyway thanks.. Task manager. 149,984k

It runs out at about 250,000k (DBPro crashes to Editor), so I'm not sure what's happening there.

Brendy boy
20
Years of Service
User Offline
Joined: 17th Jul 2005
Location: Croatia
Posted: 26th Jul 2012 21:53
Quote: "How did it make a difference?"

OS takes some, all other proceses take same so at the end less than 2gb was available for your program

Quote: "It runs out at about 250,000k (DBPro crashes to Editor),"

how many objects have you created?

Pincho Paxton
23
Years of Service
User Offline
Joined: 8th Dec 2002
Location:
Posted: 26th Jul 2012 22:49
Quote: "how many objects have you created?"


That's about 50000 sphere 6,6.
An array 50000
Another smaller array.

Kevin Picone
23
Years of Service
User Offline
Joined: 27th Aug 2002
Location: Australia
Posted: 26th Jul 2012 23:35
Creating hundreds of thousands polygonal spheres isn't a viable way forward. It'd more efficient in the long run to throw out the dbpro 3d engine stuff and just model the spheres in 3d space yourself.

Each sphere would have simple structure giving it a coordinate/radius/colour ( & whatever else you need). If objects interact with other then how the data structure is set up becomes critically important as the particle count increases.

To display the scene is more complicated, but all we're really doing it's picking the points that fall within the cameras view volume. If the space it cut up into a tree, then you can trim branches pretty easily.

Pincho Paxton
23
Years of Service
User Offline
Joined: 8th Dec 2002
Location:
Posted: 26th Jul 2012 23:48 Edited at: 26th Jul 2012 23:48
Quote: "Creating hundreds of thousands polygonal spheres isn't a viable way forward. It'd more efficient in the long run to throw out the dbpro 3d engine stuff and just model the spheres in 3d space yourself. "


Well, I only get about 50000-60000 plains as well. I seem to have lots of computer memory left. Something else seems to be limiting my program.

Kevin Picone
23
Years of Service
User Offline
Joined: 27th Aug 2002
Location: Australia
Posted: 26th Jul 2012 23:55
No really surprising, given how much fat is around the edges of 3D objects.

Pincho Paxton
23
Years of Service
User Offline
Joined: 8th Dec 2002
Location:
Posted: 27th Jul 2012 00:48
I need scale, texture, alpha, transparency, rotation, diffuse, location, and Emissive.

I don't need interactions, or collision. I don't need colour. My texture is my colour which I have to control with diffuse, and emissive. Which is controlled by energy levels.

So if I make a plain, how do I apply all that?

Anyway for now I shall go with a limit of 45000. just to get it started.

TheComet
18
Years of Service
User Offline
Joined: 18th Oct 2007
Location: I`m under ur bridge eating ur goatz.
Posted: 27th Jul 2012 01:01
I thought DBP could use 4 GB of RAM?

TheComet

Brendy boy
20
Years of Service
User Offline
Joined: 17th Jul 2005
Location: Croatia
Posted: 27th Jul 2012 03:02
Quote: "I thought DBP could use 4 GB of RAM?"

all 32bit applications can use 2gb of RAM and since dbpro is 32bit...

Kevin Picone
23
Years of Service
User Offline
Joined: 27th Aug 2002
Location: Australia
Posted: 27th Jul 2012 03:46
erm.. 2^32 is more than 2gig..

TheComet
18
Years of Service
User Offline
Joined: 18th Oct 2007
Location: I`m under ur bridge eating ur goatz.
Posted: 27th Jul 2012 05:12
That's what I was about to say... 2^32 = 4294967296 = 4 GiB

TheComet

Kezzla
17
Years of Service
User Offline
Joined: 21st Aug 2008
Location: Where beer does flow and men chunder
Posted: 27th Jul 2012 13:39
I was under the impression that the number of rendered 3d objects came down to the amount of video ram you had.

I had similar issues, but with greed for trees rather than spheres.

Sometimes I like to use words out of contents
Pincho Paxton
23
Years of Service
User Offline
Joined: 8th Dec 2002
Location:
Posted: 27th Jul 2012 16:38
It could be, because I should have over 1G left. I only have a 512 Graphic card.

Brendy boy
20
Years of Service
User Offline
Joined: 17th Jul 2005
Location: Croatia
Posted: 27th Jul 2012 17:50
Quote: "erm.. 2^32 is more than 2gig.."

2^32 is system limit for RAM amount, but 2gb is software limit that is built in windows (it can be overridden)

basjak
16
Years of Service
User Offline
Joined: 16th Apr 2010
Location: feel like signing up for mars
Posted: 27th Jul 2012 18:27
I got the same results when tried the core and enhancement pack commands.

my computer is 4gb.
total memory = 3767MB
available memory = 2124 MB

used = 43%
free = 57%
(no other programs are open.)



Dar13
18
Years of Service
User Offline
Joined: 12th May 2008
Location: Microsoft VisualStudio 2010 Professional
Posted: 27th Jul 2012 20:06
Quote: "I need scale, texture, alpha, transparency, rotation, diffuse, location, and Emissive. "

Diffuse is color.

basjak
16
Years of Service
User Offline
Joined: 16th Apr 2010
Location: feel like signing up for mars
Posted: 27th Jul 2012 20:27
Quote: "Diffuse is color?. "


usually it's better to open another thread with this question.

use "SET OBECT DIFFUSE objno, colour" when you want your material to look like plastic, wood, hard surace.

use "SET OBJECT SPECULAR objno, colour" for shiny materials such as metals, shiny floors, soft surfaces.

Pincho Paxton
23
Years of Service
User Offline
Joined: 8th Dec 2002
Location:
Posted: 27th Jul 2012 22:53 Edited at: 27th Jul 2012 22:55
I know that one of them can make a texture black, and white, and that's the one that I want. I think it's diffuse, but it might be another one. I want to fade my textures to B/W and bright colours.

basjak
16
Years of Service
User Offline
Joined: 16th Apr 2010
Location: feel like signing up for mars
Posted: 27th Jul 2012 23:31
You mean bright b/w?

Pincho Paxton
23
Years of Service
User Offline
Joined: 8th Dec 2002
Location:
Posted: 28th Jul 2012 01:14 Edited at: 28th Jul 2012 01:17
Quote: "You mean bright b/w?"


No, I mean control the light colour bouncing off an object.

In the help it says....
Quote: "The diffuse component makes up one of the factors that controls the final colour of the object, specifically
the amount of light it receives from all available light sources. Can be used on INSTANCED OBJECTS, but if
ALPHA MAPPING used, it will carry alpha in diffuse value.
"


And you can use it to get b/w and any colour you want from a texture.

mr Handy
18
Years of Service
User Offline
Joined: 7th Sep 2007
Location: out of TGC
Posted: 30th Jul 2012 10:19
Pincho, you should try to test your memory using 4096*4096 textures. AFAIR my old test, app crashed at 19. But RAM was used like 250 or something, when 1 pure 4096*4096*32 texture holding approx 64 megs of data.

Pincho Paxton
23
Years of Service
User Offline
Joined: 8th Dec 2002
Location:
Posted: 30th Jul 2012 13:42 Edited at: 30th Jul 2012 13:48
It's not really just a test, it's a program I am making. The program only uses tiny textures, but lots of objects. In fact I would like it to allow over 1 billion objects, and even infinite objects. No memory restrictions. When I upload a demo the program should adjust to the computer.

mr Handy
18
Years of Service
User Offline
Joined: 7th Sep 2007
Location: out of TGC
Posted: 30th Jul 2012 14:35
Then, Pincho, you choosed wrong programming language for your program. Dark basic is not suitable for such amount of objects. Personally, I have low fps at 1000 objects. Billions... Try java or c++

Kezzla
17
Years of Service
User Offline
Joined: 21st Aug 2008
Location: Where beer does flow and men chunder
Posted: 30th Jul 2012 14:42
You're gonna have to use culling and chunk loading.
I see no reason why once the pattern has been generated you cant just take an image of a section or texture a larger sphere with the image of the desired pattern.
Once the physics has been calculated and the formula has moved on there is no reason to keep the spheres as live objects in the screen. they can of course stay live in the logic and save data of the program, but you will have to make concessions.

I too would love infinite computer capacity...
just imagine...

Sometimes I like to use words out of contents
Pincho Paxton
23
Years of Service
User Offline
Joined: 8th Dec 2002
Location:
Posted: 30th Jul 2012 15:11
Quote: "Then, Pincho, you choosed wrong programming language for your program. Dark basic is not suitable for such amount of objects. Personally, I have low fps at 1000 objects. Billions... Try java or c++"


You would manage 40000 objects on a low end computer. Even 4fps is fast the way I am doing this, because movement is stroboscoped, so at 4fps you should see some 40000 objects all moving at once at a reasonable speed.

Pincho Paxton
23
Years of Service
User Offline
Joined: 8th Dec 2002
Location:
Posted: 30th Jul 2012 15:16 Edited at: 30th Jul 2012 15:20
Quote: "You're gonna have to use culling and chunk loading.
I see no reason why once the pattern has been generated you cant just take an image of a section or texture a larger sphere with the image of the desired pattern. "


I think I have to totally depend on the computer to handle as much as it can. The scale I am working at includes gravity as a material, and gravity just never stops still. I might get a bonded object, but surrounded by physics invisible to us, but not invisible to the program. The thing you can do is choose not to see the invisible physics to get more speed. You also have the choice to see them. You can see time if you want to as well, it all there.

mr Handy
18
Years of Service
User Offline
Joined: 7th Sep 2007
Location: out of TGC
Posted: 30th Jul 2012 16:20
40k -> 0,1 FPS

Pincho Paxton
23
Years of Service
User Offline
Joined: 8th Dec 2002
Location:
Posted: 30th Jul 2012 16:28
Quote: "40k -> 0,1 FPS"


Try plains. You should be OK, my computer has never been very high end. I never spend more than £80 on a graphic card.

basjak
16
Years of Service
User Offline
Joined: 16th Apr 2010
Location: feel like signing up for mars
Posted: 30th Jul 2012 18:46
@mrhandy. Java is unable to handle 1000 objects this language is more specialised in workflow rather than graphics. About dB pro like any other engines its the amount of polygons that should rendered within a frame. Have a look at the most complex games and you will not see large amount of objects. Use dark occlusion and imposter to handle such amount.

mr Handy
18
Years of Service
User Offline
Joined: 7th Sep 2007
Location: out of TGC
Posted: 1st Aug 2012 09:27
@Pincho Paxton
40k objects, not polys. DBP renders many polys quite good.

Pincho Paxton
23
Years of Service
User Offline
Joined: 8th Dec 2002
Location:
Posted: 1st Aug 2012 15:59 Edited at: 1st Aug 2012 16:00
Quote: "Try plains. You should be OK"


Quote: "@Pincho Paxton
40k objects, not polys. DBP renders many polys quite good."


Well plains are objects. My program is using plains at the moment, and low poly sphere are almost identical in speed. To get a low poly sphere you just add 6,6 to the end of the sphere creation.

Login to post a reply

Server time is: 2026-07-08 14:12:24
Your offset time is: 2026-07-08 14:12:24