Triangle Intersection

Pages: 12
In most cases would it be better to define a collision mesh that is completely separate to the visible texture mesh?
I'm doing this in my engine and I understand that it most definitely takes up more ram but the rendered mesh can be stored in video memory, and this allows for simpler, hidden collision meshes. I.e. Faster collision calculations.
closed account (N36fSL3A)
Yes, you should have a separate mesh. It's better to sacrifice RAM than CPU time IMO.
That's what I was thinking, RAM is now getting pretty damn cheap actually, most new PC's come with either 4GB / 8GB of RAM...
And any present graphics card will be able to handle the rendered mesh (32MB for 1,048,576 of Position-Normal-Texture vertexes [D3D-FVFs], for same number of indexes add another 4MB... Not much at all)
closed account (N36fSL3A)
I don't think I'll ever use up 32 mb of VRAM, hell, I don't think ANY of my programs used that much.

Keep in mind, just because technology is getting cheaper is no excuse for writing inefficient code. An unoptimized engine could result in less sales.
Oh yes of course, I am quite an efficiency freak actually, even though half the time I don't need to be.
But did you not see how much data would be stored within my 32MB quote?
1,048,576 * ((3 * float) + (3 * float) + (2 * float))
8,388,608 - floating variables

And if a program doesn't expect to use anywhere near this much then of course it shouldn't reserve it, but I was just merely pointing out why compromising RAM for CPU is acceptable since the price of holding excess memory is nowhere near as bad as the having to work with excess memory.
A float is 4 bytes and so 8388608 * 4 = 33554432 bytes or 33554.432 kb or 33.554432mb ? :s
@Mats, NOPE
Don't you know by now that computers work to powers of 2?

33554432 B / 1024 = 32768 KB
32768 KB / 1024 = 32 MB

This is why when you go buy a 4GB memory stick (or whatever), you plug it in and your computer says something like 3.7GB... The manufacturers just pack it with ~4,000,000,000 B instead of the true 4,294,967,296 B that belong in 4GB

P.S. (I chose 3.7 randomly but by coincidence the calculations show 3.725GB)
Last edited on
Keep in mind, just because technology is getting cheaper is no excuse for writing inefficient code. An unoptimized engine could result in less sales.
Space efficiency must be judged from the application class, not from the total byte count. If you could run Google off 32 MiB, that'd be pretty damn impressive.

Plus, you said it yourself.
It's better to sacrifice RAM than CPU time
Don't you know by now that computers work to powers of 2?


erm yeah forgot about this. LOL
closed account (o1vk4iN6)
This is why when you go buy a 4GB memory stick (or whatever), you plug it in and your computer says something like 3.7GB...

I'd suggest you buy a different brand of RAM then.
He's talking about flash memory, not RAM.
<rant>
HDDs I could possibly understand, because disks aren't inherently built out of components that come in powers of two, but flash memory? SSDs? Those people have to actually go out of their way to be deceitful.
</rant>
closed account (N36fSL3A)
I noticed them robbing me of my money, I should have wrote a strongly worded letter to the company and I'd like a custom flashdrive with exactly 16 GB of space, no more, no less.
The thing is, technically, 16KB = 16,000 bytes. However, Windows (and other OS's too) display kB (kilobyte) as meaning KiB (kibibyte). I think this is absolutely unintuitive, but apparently thats the way it is (unless the Wikipedia monster has struck again).

http://en.wikipedia.org/wiki/Kilobyte
Last edited on
Topic archived. No new replies allowed.
Pages: 12