• Content count

  • Joined

  • Last visited

  • Days Won


JoeJ last won the day on November 7

JoeJ had the most liked content!

Community Reputation

2637 Excellent


About JoeJ

  • Rank
    Advanced Member

Personal Information

  • Interests
  1. C# How to reduce data sizes?

    Ok, but let me make another unrelated example: vec3 diff = findMe - nodeCenter; int childIndex = (diff.x>0) | ((diff.y>0)<<1) | ((diff.z>0)<<2); This way we get 3 bits from 3 comparisons and combine them to a number 0-7. If you order the children of octree in a certain order, this indexes the correct child node in an elegant and effective way. If positions are integers too, this works even without comparisons just by selecting proper bits from position (shift depends on tree level). Another one is if you have 4 packed values in one, you can add and subtract to all of them with one op: 0x01020304 + 0x01010101 = 0x02030405. Limited, but there are practical use cases (e.g. to save registers on GPU). What i mean is you should see bit packing more as a subset of bit math, which is a lot more than just compression (but not a total MUST to know).
  2. An easy explanation to Dual Contouring?

    Well - fair enough. I apologize for being rude myself, instead i should have explained why Questers quoted commend was wrong: If you look yourself to the video, it's clearly visible that the geometry is just a deformation of grid aligned cubes. Deformed cubes can of course have sharp features. Dual Contouring would contain intersections with the grid and also new geometry inside the cubes for the sphere shown in the video. (I did not say Surface Nets are 'better', just 'easier to implement' - so probably attractive for a beginner.) I won't commend on why they state on their website their technique is BASED on dual contouring (whatever that means exactly), but you see that there was no interest in any further explantation as you suggest. And that made me angry because of the time it took me to find information about the technique i remembered. I still perceive this reaction as ignorant. Asking for help and then rejecting valid points it is not nice either and contradicts public discussion. But i took that much too personal. Shouldn't get upset that fast, even on a bad day. Sorry again, guys! Edit: ... and sorry for wasting even more space
  3. C# How to reduce data sizes?

    Some crash course about bit packing (i'm using hex numbers which makes it easy to understand): int32 a = 0x01, b = 0x02, c = 0x55; All numbers must be >=0 and <= 0xFF (255) - for that range we need 8 bits because 2^8 = 256 possibilities. int32 compressed = a | (b<<8) | (c<<16); We get 0x00550201 by bit shifting and OR to pack 3 numbers into one. (upper most 8 bits still unused - you could pack a 4th number) Now unpack: int32 A = compressed & 0xFF; // mask out the other numbers int32 B = (compressed>>8) & 0xFF; // bit shift and mask int32 C = (compressed>>16); // no mask necessary if there is no 4th number What to do if our original numbers are larger, but we want to use only 8 bits? int32 a = 0x00120004; We could ignore less important bits: int32 qA = a>>16; // 0x00000012 then after packing and unpacking you lost 16 bits, resulting in 0x00120000 but sometimes that's good enough. Edit: E.g. if you bin characters to smaller tiles of space, less bits become enough for the position relative to the tile, which is a form of delta compression. What would the code for this look like? You would need to tell how you store your original data. In the worst case it's a switch with 8 cases.
  4. An easy explanation to Dual Contouring?

    Maybe those other people ARE interested in less known alternatives, you already made clear you are not. Also, YOU brought up the game and said this is what you want. Sorry for wasting space in your thread (and my time in trying to help), while you are allowed to repeat yourself and being rude. Work on your social competence! No worries: End of conversation.
  5. An easy explanation to Dual Contouring?

    You have not understood Surface Nets.
  6. An easy explanation to Dual Contouring?

    Found what i have in mind, it's called 'Surface Nets' Also found this about dual contouring, if you don't know yet, seems quite complete with code:
  7. An easy explanation to Dual Contouring?

    Still disagree. See here (1:10): The wireframe morphs directly from deformed geometry to voxels. No geometry is generated inside a voxel like dual contouring or marching cubes would do. Also the edge artefacts at the beginning when they build a structure from 3 boxes may hint this (missing vertex to represent multiple surfaces inside one voxel.) Of course i do not know if that's all functionality they have.
  8. An easy explanation to Dual Contouring?

    The video looks like they do not use dual contouring, they only snap voxel vertices to the nearest point of target geometry, which should be a lot easier to implement. (Limitation is probably: You can not have two surfaces in one voxel.) Unfortunately i do not remember a proper name or explantation of the technique, but there are a few around. Maybe someone else...
  9. I remember i thought about this few years ago. I think the solution would be to modify compression algorithms like jpg in two ways: 1. adapt to usecase of normals, roughness etc. 2. To hide blocky artefacts, interpolate the compression encoding with that of neighouring blocks (similar to how biliniear filtering works). This might reduce quality a bit, but blocky artefacts would disappear at the cost of 4 times slower decompression. Not sure if it's worth it.
  10. Did you try how much double compression reduces quality on the final texture? I assume it might have issues on normals and roughness because JPG cares for features visible to the human eye, but not for other stuff. Also, streaming directly from HD without CPU cost is nice to have, but it could be done once during installation.
  11. Here is a related paper about BC6H: I would assume that finding the best compression possible is NP-hard, but i'm not sure (what do you think?). So it's a matter of quality to do it offline.
  12. How to learn from Quake source code

    I mean CoD has simple gameplay mechanics, like Quake. I did not say it is easy to develop - you just got me totally wrong. And again - i did NOT recommend quake source code to beginners - i advised against it, like most of you. I could turn the analogies that you make equally inappropriate, but i won't, because... ... we are at exactly this point for some time within this topic already. It's all pointless, so i'll shut up (hopefully )
  13. How to learn from Quake source code

    I could say it's the opposite way around, really. Crazy techniques has been established since then. Notation only describes the result, not how this works - it's more comparable to the game than the code. Also we experience a form of retro revival with games now, which illustrates gaming has got a history valuable to preserve. This must include the code as well. I could also say there is no major progress at all - music theory has not recieved a major update since the 70s, code is still based on C. CoD is still a simple FPS. It's subjective, so all angles should be pointed out.
  14. How to learn from Quake source code

    There is no such thing as "holy" code. There are no perfect codebases. I was not the one who used the word 'holy', also i said in my first comment i don't think there is much value in looking at the code too close. I'm worried about this: Programmers tend to talk so much about code design that a beginner may conclude: "Code design is the most important thing to get right", which is very wrong IMHO. Similar to trends like "Today hardware is fast - iterating serially over a list of 1000000 objects is faster than using a tree." If you hear it too often, you could conclude learning trees is not that important. Also i think if somebody is really interested in this old source code then he should read it. It will do no harm to him. If someone want's to get a good guitar player, would you say: "Oh no - don't listen to Jimi Hendrix - that's old! If you listen to that, you'll never learn to play properly!"?
  15. How to learn from Quake source code

    It linked to this IIRC (don't know if they really fixed tis, just guessing): But i can't find the test of improved game performance with Fall Creators Update anymore, i remember to read it on 2 sites, test with 10 games, something about 10% better performance. At least Forza7 is known to have no more stuttering. But while searching i found also reports of decreasing performance. They compile Windows with it, so it affects both OS and games.