I know thats a lot of work (and many hours to debug ). But the difficulties of writing a game and an engine is also part of the attraction:)
Another question: Would you recommend using the same structures for collision/detection and culling? For example is it a good idea to make collision/detection AND culling just based on bounding volumes on the objects. Or is it better to use bounding volumes for collision/picking and some other structure (cells, quadtree) for culling?
All my objects are static. The only thing that moves is the player. Some objects are rotated (for example some houses) and for these objects an AABB would be pretty bad.
Yes, spheres are fast but if the object has a "long shape" (like a long house), the bounding sphere gets to big and the player stops moving meters before he even touches the house. AABBs are also very bad for the rotated houses.
What do you think about this: All my scene objects return a polymorphic bounding volume object, which can be a sphere or AABB or OBB. For most of the objects I return an AABB and for the rotated houses I return an OBB. Good/bad idea?
I also thought about a 2 pass system: All objects return an AABB and only if the player partially overlaps with the AABB, I make an OBB test.
Do you think its ok to just linearly iterate over all my scene objects and just test every object with the player? (I guess I have around 50 objects)
I have a little terrain (maybe like 100 x 100 meters) with some trees, houses, rocks etc. The player moves around this little
map and I need collistion detection against the objects and picking (the user should be able to pick certain objects, for example trees have to be highlighted if the mouse cursor is over a tree).
Now I wonder what could be a good and simple (!) approach to solve my collision detection/picking. If possible I want to avoid "sophisticated" structures like kd-tree.
Should I just give every object an OBB and iterate through all objects and make a collision test player vs object OBB? Any other suggestions?
Maybe it is just a minor detail, but I found it very funny, that this guy (Bruce Dell) - who is a 3D graphics pogrammer - even does not know what LOD stands for. He always said "level of distance". Sorry, but that is just pathetic;)
And the fact that he talks like as if the "technology" had ONLY advantages is just unprofessional. Every real engineer knows that there is ALWAYS a tradeoff. But this guys alwys just said "yes. its possible". "no, we have no problems with XY". Plain marketing bullshit.
I have a program that needs to compile and run under Linux and Windows. I have a Dialog class that draws a very simple Dialog (on Windows it uses plain WinAPI, on Linux... I don't know. Haven't been so far yet;)
Should I know write two totally different classes (one for windows and one for linux) and just exclude the one that does not fit to the current platform or should I make one single class (one .cpp and one .h) and just code the platform specific parts inside the methods with #ifdefs?
I love this site but I absolutely hate the code editor. I am sorry, but its really the worst edtior/tag I have ever seen on any site.
1) When I paste formated code in the code tabs the formation is gone. I have to reformat ever single line. Extremely annoying.
2) Selection of multiple lines does not work. I wanted to select (per mouse) multiple lines of code but after some lines the selection just stops.
3) The rendering is really fucked up. I formatted ever single line by hand and it was perfectly aligned in the preview. Bu when I submit everything is fucked up and not aligned!
4) The code view with the black background and the colorful words is just plain ugly. Feels like a unix console from 1980. Why not just a syntax highlighting like visual studio?
Sorry for the criticism, but I am really pissed off right now. I spend 10 minutes to format just some lines of code and it still looks like shit. All other sites are know have nice and good looking editor/tags. Btw: I am using Opera 10.
I can't believe I am the only one who thinks the code tags are terrible...
I just read an article about environment cube mapping and found this line of HLSL code:
float4 reflectedColor = texCUBE(environmentMap, R)
where R is a 3-dimensionale direction vector and environmentMap is a sampler for a cube map. my question is:
how can one implement the function texCube (im interested at the maths behind it)? I really would like to know how to receive the right texel on one of the 6th sides of the cube map with the direction vector.