Jump to content
  • Advertisement

Maxwan

Member
  • Content Count

    57
  • Joined

  • Last visited

Community Reputation

122 Neutral

About Maxwan

  • Rank
    Member
  1. I was planing to multitexture a gluSphere when i encountered a problem. As I am putting a texture on a sphere the first textures coord are beeing calculated as they should, and it works fine. However, when I am putting the next texture on the sphere it's texturecoords will be located at 0.0, 0.0 and it doesn't calculate them to fit the sphere as it did with the first one. With the multitexture-code below a simple quad would be multitextured. glBegin(GL_QUADS); glMultiTexCoord2fARB(GL_TEXTURE0_ARB, 0.0f, 0.0f); glMultiTexCoord2fARB(GL_TEXTURE1_ARB, 0.0f, 0.0f); glVertex3f(-1.0f, -1.0f, 0.0f); glMultiTexCoord2fARB(GL_TEXTURE0_ARB, 1.0f, 0.0f); glMultiTexCoord2fARB(GL_TEXTURE1_ARB, 1.0f, 0.0f); glVertex3f(1.0f, -1.0f, 0.0f); glMultiTexCoord2fARB(GL_TEXTURE0_ARB, 1.0f, 1.0f); glMultiTexCoord2fARB(GL_TEXTURE1_ARB, 1.0f, 1.0f); glVertex3f(1.0f, 1.0f, 0.0f); glMultiTexCoord2fARB(GL_TEXTURE0_ARB, 0.0f, 1.0f); glMultiTexCoord2fARB(GL_TEXTURE1_ARB, 0.0f, 1.0f); glVertex3f(-1.0f, 1.0f, 0.0f); glEnd(); Anyway, I cant figure out a way to put multitexture on my... what am I supposed to do? gluSphere(former, 1.0f, 100, 100); Thanks for any help.
  2. Maxwan

    *.md to *.ms3d

    Hi. I need to export a *.md model-file to *.ms3d, without losing bones, animations and so on. If there's a good way to do this, maybe not straight from md to ms3d but some way around, please let me know and tell me what programs I should use. Thanks.
  3. Hi. I would like to compare the fps in my game with other games, since I don't know how fast other games are running with a certain number of polygons. If someone has some stats like: "quake3, 8020 poly, 213fps", (you get what I mean) I would very much like to have a look at them. thanks.
  4. Maxwan

    convert modelfiles

    Ofcourse, I've looked after a converter with google (you'll get thousens of hits and not one seem to work), and I've searched this forum and other places before I posted, so it dosen't look like I'm gonna find a converter on my own. And "newer build for my conveter", the problem is, I don't have one at all. I'm just using milkshape, if you could call that a converter. Well lets look at the problem. I am using a ms3d-ascii loader and in the txt-file you'll find the whole model except the texture. In this file you'll find meshes, bones and texture-coords. However, when I am loading like say a md3 model, the animation comes separate and when I'm converting from md3 to ms3dascii the animation is not included, and it looks that it will be hard to fins something that can go all the way from *.max to *.ms3dascii (txt) without loosing information. Help please..!
  5. Maxwan

    convert modelfiles

    Hi. I'm using milkshape's modelfiles in my program and my friend is using maya and 3dstudiomax in school to make models to our project in school for his projects. So now I need a program to convert files from max to ms3d. Okey, I know that it is possible to save as 3ds in 3dstudiomax, and than import them in milkshape, however, the animation didn't work as should. Now, is there a way to get around this problem with some convertprogram or something. And in maya (I know nothing about that program), how does it work there?
  6. Maxwan

    Fog and Blend

    Aggh. As I was posting the message, and after explaining the problem, everything got clear to me what the problem really was - my png-loader, made by my friend, dosen't support GL_TEXTURE_1D, so, there's the problem. Well, it's almost morning and even if I am on a hollyday, I need to sleep :) So, I'll fix this tomorrow and then post a picture when everything is working. Forget my last post - I was tired and couldn't think (well, it's hard to stay awake even now, since it is 4:16 in the morning...). Good night.
  7. Maxwan

    Fog and Blend

    Wow.. now this whole problem is very close to be solved. There's just one small thing that dosen't work, and I don't know where the problem is. I do understand (or at least I think) what you want it to be. A picture that works as fog shall be placed over the already blended and non fogged water, so it looks like GL_FOG but acually is just a picture. Correct? And if so, the picture loaded shall look like the one up in the left corner of the image below (or inverted). Anyway, I wont work as it should. Instead it become lines everywhere, and if I'm not misstaken, this is a common problem when a picture cant be found. glBindTexture(GL_TEXTURE_1D, 0); should be: glBindTexture(GL_TEXTURE_1D, background[4].texturId); // background[4] is the circular picture. and then, as you said, render the water again, but with the new image, right? And then it would look like fog. However, something get's wrong, and I don't know what it is and I've tried alot of stuff to make it work. Anyway, this is close to the goal 'cause even if it is lines, the princip works. Last, you mean glTexParameterf and not glTexParameter right?
  8. Maxwan

    Fog and Blend

    "For what it's worth you should disable texturing TEXTURE1 instead of TEXTURE3." Yes ofcourse; when I was sending you the code I looked it throught, and changed the wrong thing. It should be TEXTURE1. "Could you please explain the desired effect ?" Yes, look below.. :) The first texture is decalmap&detailmap, 2 in 1. The second texture is shadow&colormap 2 in 1. These makes the terrain. The theird is the one you've been talking about that I don't need - the one that makes the fourth works. And that one is the one making the water move. "Whatever color gets out of texturing,it goes through fog stage,and in area #1 it should become the fog color.I'm convinced the problem is the BlendFunc he's using." Yes it should get the same color as the fog however it dosen't. And no, it has nothing to do with the BlendFunc, since I've tried all possible combinations (it took a while). Very well. Here what it looks like with glBlendFunc(GL_SRC_ALPHA,GL_ONE_MINUS_SRC_ALPHA) (1), and also the diffrence between how I want it to look (3) and how it looks now (2). #3 is made in paintshop pro. "Now, there is not that much diffrent between 2 and 3" someone will say. No, but if the water not is fogged correct than the loading of the models is visible, so it looks really stupid. zedzeek said "as long as u try opengl blending with opengl fog, u cant achieve what u want."... maybe it's not even possible to achieve what I want, as he says ?..
  9. Maxwan

    Fog and Blend

    With glBlendFunc(GL_ZERO,GL_ONE) there is nothing to look at, as the water disappear and not render at all. I'll send you my rendercode as well. Wait a moment.
  10. Maxwan

    Fog and Blend

    "Anyway, what happens is you disable blending ? The water would not be transparent anymore, but is the water fogged correctly ?" Yes it works if I just remove the GL_BLEND. It looks like the picture above, and this is also the way I want the fog to be - and ofcourse it should be possible to look throught the water, however, when I enable blend, yeah you know what I am going to say. "I still don't understand exactly what is "the water that makes the other texture work"" The one that makes the other work is like, well, if I remove that one the blended one will blend with nothing, and there wont be any surface at all. Does it make sense? After that mikeman, I really don't know what to say. I think you understand whats needs to be done, however, all the C=Cf*A+Cf... stuff, I don't know how to use it. I've send you my rendering code in a PM. You can have a look at that, and se if you can write something to make it work the way you want it to work.
  11. Maxwan

    Fog and Blend

    Okey. I think both you guys can help me but my brain is boiling and I don't really know what's need to be done, even if you've explained it for me.
  12. Maxwan

    Fog and Blend

    mikeman: "Can you describe what's in the texture units?What texture is in tex1 and tex2?What are you using them for?" The first texture is, well, it's nothing but if I don't have that one the second will not be visible cause that one is blended. And the second, blended one, is like waves on the water. It looks nice :) "There is no texture that needs to be blended.There are the fragments the compose the water that need to be blended with the background(colors already present in the buffer).Or maybe I'm misunderstanding something here?" I don't really understand what you mean. Maybe you're right but I guess that the texture still needs to be blended. Agh, damn, I don't know... :) --------------- vincoof: "It looks like your water is multitextured in multipass, and that one of the passes doesn't enable fog." Both passes the fog cause if they didn't, then it would look alot diffrent. If I do not missunderstand you. ---------------- zedzeek: Do you mean that I need to "blend" all the vertexes in the water to a specified color (and that would be the soft blue)? If so - just by using glColor3f or? ---------------- tomek_zielinski: I am really sorry but I don't understand what you mean. Not at all :) Call me stupid but, you have to explain it alot easier... :) Thanks for the help guys, even if I'm to stupid to understand what I need to do... I'll go to sleep now, and wake up in the morning, hoping for a really nice explanation or some code :)
  13. Maxwan

    Fog and Blend

    mikeman: The steps you explain is the steps I take, even if it maybe doesn't look like that. If I changed the order, than it doesn't work at all. Well, it is like you said so it don't matter anyway :) FReY: Yeah it is correct, or at least I'm 90% sure at it. If I use like GL_ADD, then it won't work as it should at all. And GL_TEXTURE0_ARB is already disabled. Anyway, the problem is like when the fog fade's to one color, the blended water blends the fog (or really, the water, that is blended in one color and now get many colors) and because of that you still can see the water. But how to .. argh. Any new ideas?
  14. Maxwan

    Fog and Blend

    First of all, tell me one thing better with drawing 10000 quads instead of 1 ... :) An no, it is not 1 quad, it's about 100, cause they are still quite big. That is not the problem however, the problem is that I don't want it to be visual where the terrain is "building up" in the end of the fog. The problem is that the blending, as I said before, works poor with fog. If I remove the blend from the water, just making it to solid quads, then the fog works. So it has nothing to do with the size of the quads. Anyone with another solution ?
  15. Maxwan

    Fog and Blend

    Sorry to say it, but that did not help me that much :( Can't you, or someone else, point me to a internetpage with some "hard stuff" to work with. 'Cause I've tried to solve this problem and I can't find a soulution.
  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!