jeannekamikaze

Member

5

286 Neutral

• Rank
Newbie

• Website
• Interests
Art
Design
Programming

Social

• Github
https://github.com/jeannekamikaze

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

1. A Long-Awaited Check of Unreal Engine 4

It is open source, it's just not free.

3. Collision/Culling - Design Issue

I've got the point now, and avoiding colliding mesh data with other mesh data solves my design issue. In any case, I guess you'd want to collide bounding volumes with mesh data. Like say if you have a car and a stop light, a box-box test wouldn't let you drive the car under the stoplight, however a box-mesh test would, so I guess the proper thing would be to go for a box-box test first to eliminate false positives and then go for a box-mesh test if the first test passes, which isn't as expensive as a mesh-mesh collision since that would imply considering every pair of triangles.
4. Collision/Culling - Design Issue

Well this isn't about ray tracing but you gave me an idea which I'll discuss in case anyone is interested. The problem arises when colliding two objects A and B which share mesh data. Instead of doing a per-triangle collision, I'll collide A's triangles with B's bounding box, which is already precise enough and faster than a triangle-to-triangle collsiion. To do so I'll calculate the inverse of A's world matrix and bring B's bounding box to A's local space as you suggested, where the box-triangle collision will take place. I think that should do it :), thanks for your idea.
5. Collision/Culling - Design Issue

Hello. I've got a design issue that I just ran into and I'd like to discuss it here to see if anyone who has had a similar situation can help me out. I just noticed the description got kind of lengthy so please bear with me. So far I've got this class called "Model" which holds model data - vertices, indices, and normals. Apart from that I have an "Entity" class, which amongst other things has a member variable which is a pointer to a Model instance; this way, all entities of the same kind share the same geometric data. So, for example, to draw a bunch of trees in the scene, I'd have several instances of Entity and a single Model for the tree. Each tree Entity would apply its transformation matrix and then call the Model's draw method. So far so good. Now say I want to perform a collision test between two trees. First I'd build a bounding box around each one of them, test for box collision, and if the box test passes then I'd perform a more accurate per-triangle one. However, I have a problem: the Model class holds the tree's data in local space - i.e. I don't have the vertex data for each tree in world space. What I thought about the bounding box is the following: Each tree Entity would have a box which is updated every time the tree entity is transformed; the box would first be calculated in local space and then I'd apply the Entity's particular transformation matrix over the box to transform it to world space. This way each tree would have its own bounding box in world space ready for collision. However, what shall I do with vertices? I need each of the tree's vertices in world space to perform an accurate collision after the box one, and I don't have these. Letting the Entity have an updated copy of its vertices in world space would kind of defeat the purpose of having a Model instance shared between all entities of the same kind. Transforming each of the entity's vertices to world space before performing the collision test would bring a performance hit if several collision tests are carried since these would be recalculated for every test. I'm not sure if I'm being clear enough so please ask for clarifications if you have the time/will to help me out. Perhaps I should take a whole different approach. Your feedback is all welcome :)
6. glTexImage2D - segfault

Ah! Thanks. Lots of happiness for you and your loved ones :).
7. glTexImage2D - segfault

Hello, I am having some trouble with glTexImage2D. What happens is it segfaults every now and then (about 9 out of 10 times). This is what I am doing essentially: GLuint ID; char data[64*64]; glEnable(GL_TEXTURE_2D); glGenTextures(1, &ID); glBindTexture(GL_TEXTURE_2D, ID); // Segfault here --> glTexImage2D(GL_TEXTURE_2D, 0, 4, 64, 64, 0, GL_RGBA, GL_UNSIGNED_BYTE, data); // <-- glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR); glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR); ... I am checking for errors with glGetError() after glEnable, glGenTextures, and glBindTexture, and no errors turn up. Could anyone provide any light as to what might cause the problem? Thanks in advance.