I'm noticing that while modeling, certain rotations and pulling around of vertices makes quite a few of the quads non-planar. I began wondering if this will cause any issues.
From what I can tell, the biggest issue appears to be with culling... and at what viewing angle a non-planar quad is not drawn. If some quads are only slightly off of a plane and not likely to be viewed along an edge, should I worry about them much? Or are there other things to be weary of...
Extra Question 1 - I'm testing a texture out for a floor surface and the model atop it does not have a texture yet. If I bind a texture then draw the floor, the model seems to be affected. Is there a quick easy way to unBind a texture so vertices that follow use no textures?
Extra Question 2 - Along the sames lines a EQ1, I'm trying to do a repeating texture. From what I know of defining texture coordinates... I'm not understanding how it works. If I have a single square plane of a quad, and 128 x 128 texture that I want to fill the quad, I'd define a texture coord. at each vertex and it would stretch or shrink the image on the entire quad based on those coords... Adding the parameters to wrap don't seem to be affecting anything... I'm sure I'm just missing the proper way to do it.
Non-Planar Quads and a couple more 3D Questions
Re: Non-Planar Quads and a couple more 3D Questions
I haven't dealt much with non-planar quads, but in my last project involving a simple landscape created by random-height vertices, having used them create problems depending on the viewing angle of them. The closer they were, the high the chance that they'd show with culling on. The farther away, the higher chance they got culled out.
Extra Answer 1 - whether you are using the libnds functions, or entering the value straight into the memory register, sending in a value of 0 disables the use of textures on polygons that follow (until you "bind" a new texture).
Extra Answer 2 - Try this little example. Get your quad out with the texture fully over it (from 0.0 - 1.0, or whatever you do). Then, double the max value used (from 1.0 to 2.0). Depending on the type of wrapping used, you'll see your texture squished/shrunk, plus you'll either have the edges of the texture repeat from the middle to one corner (2 edges) of the quad, or you'll see your texture mapped 2x2 over the quad. By choosing texture coordinates more within the texture, it will look like the texture is expanding on the quad, while choose coordinates outside the texture (including negatives), it will appear as if it's shrinking with possible tiling if wrapping is set.
Extra Answer 1 - whether you are using the libnds functions, or entering the value straight into the memory register, sending in a value of 0 disables the use of textures on polygons that follow (until you "bind" a new texture).
Extra Answer 2 - Try this little example. Get your quad out with the texture fully over it (from 0.0 - 1.0, or whatever you do). Then, double the max value used (from 1.0 to 2.0). Depending on the type of wrapping used, you'll see your texture squished/shrunk, plus you'll either have the edges of the texture repeat from the middle to one corner (2 edges) of the quad, or you'll see your texture mapped 2x2 over the quad. By choosing texture coordinates more within the texture, it will look like the texture is expanding on the quad, while choose coordinates outside the texture (including negatives), it will appear as if it's shrinking with possible tiling if wrapping is set.
Re: Non-Planar Quads and a couple more 3D Questions
Okay, I guess I'll just have to keep an eye on the quads. I'm pretty sure that they're not going to reach a distance or angle that's going to be a problem, but I may have to just wait and see or do my best to use tris as much as possible...
Thanks on calling glBindTexture(0,0), that worked perfectly.
Thanks on the repeating textures as well. Picturing how the texture is displayed when using coords between 0 and 1, I can see how overshooting it would make it repeat. I ran a test that worked just fine. I can see that having planes of different sizes (like sides of building perhaps) and trying to keep the texture patterns looking the same size might be tricky using the fixed point versions of texture coords. I'll be getting the coords from the model conversion in the end though (and not seeing them)... so I'll have to run a couple more tests to see how that goes.
Thanks again for everything. Between you and elhobbs I'm going to have this stuff down solid in no time.
Thanks on calling glBindTexture(0,0), that worked perfectly.
Thanks on the repeating textures as well. Picturing how the texture is displayed when using coords between 0 and 1, I can see how overshooting it would make it repeat. I ran a test that worked just fine. I can see that having planes of different sizes (like sides of building perhaps) and trying to keep the texture patterns looking the same size might be tricky using the fixed point versions of texture coords. I'll be getting the coords from the model conversion in the end though (and not seeing them)... so I'll have to run a couple more tests to see how that goes.
Thanks again for everything. Between you and elhobbs I'm going to have this stuff down solid in no time.
Who is online
Users browsing this forum: No registered users and 0 guests