• Content count

  • Joined

  • Last visited

Community Reputation

496 Neutral

About MasterWorks

  • Rank
    Advanced Member
  1. Obama or McCain?

    Quote:Original post by blueEbola ...McCain refer to Obama as "that one"? I agree this wasn't really disrepectful, just awkward... throughout the debates it's easy to find lots of speech errors, mispronunciations, suboptimal sentence constructions, etc. which I think just generally reflects on the huge amount of pressure on the candidates, and the difficult of being perfect for an hour and half on national television. It seems to me like McCain saying "one" in that spot is just a way to maintain verbal continuity after he had already (haphazardly) spoken the word "that".
  2. DirectShow and seamless looping

    To add my $.02, FMOD is great (I use it for all my projects) but I don't think you can use it to seamlessly loop MP3s -- according to the FMOD message boards, this is a limitation of the file format and not any particular player. You definitely CAN seamlessly loop .OGG files, though; this is just one of many advantages of using OGG over MP3. In other words, I don't know if what you're trying to do is even possible with MP3s, although one would think that it should be easy enough with MIDI...
  3. Quote:Original post by ProgrammerZ Thanks for the replies, guys. While I'm (ahem) here anyway, I had a couple more sprite-related questions. One, is it possible to use mipmaps with the ID3DXSPRITE interface? Two, is it possible to disable the blending (blurring) effect I get when I scale or resize a sprite? Somebody else can probably give you better responses, but if you're using D3DX to load your texture from disk, you can use the LoadTextureFromFileEx version to specify how many mipmap levels you want to be generated (I believe the default is to create the full chain). I assume the sprite interface would automatically use the proper mip level, just as a textured quad would. With regard to your second question, I believe you're referring to the MinFilter and MagFilter sampler state -- you can set these to POINT instead of LINEAR to get a more pixellated effect (which is what I think you're asking). Sorry I don't have language-specific code for you, but I think it's just a SetSamplerState call on your D3D device...
  4. Transparency circle / DirectX8

    Ok, sorry -- I couldn't see the effect in your first screenshot because it is kind of subtle. I'm not sure what the best way to do this is, it might depend on the complexity of the scene involved and whether or not you can guarantee that the character is hidden by at most one texture (and not several layers of overlapping walls). One thing you might consider is a render-to-texture method where you draw the character (and surrounding floor area) to an offscreen texture, and then reblend it with the scene after your rendering is complete. This would give you the advantage of not having to worry about the seams between textures and stuff like that, and give you precise control over the area to be blended. But, I could be way off base on this idea; there might be a more efficient idea that doesn't cost you extra fill rate like this would.
  5. Transparency circle / DirectX8

    Could you perhaps phrase your question a little more clearly? It seems that you're asking how to add a transparent circle on top of a scene, which would usually be done using a (very simple) textured quad after you've rendered everything else. But, I could be wrong because you also seem to be asking how to modify a texture resource "on the fly", which would be total overkill for such a simple effect...
  6. Textured Quad Glitches

    Quote:Original post by Endemoniada and the whole border (about 8 pixels) has a zero alpha so nothing should ever show up along the edge like it does I sometimes see this problem because even though the alpha is 0, a linear interpolation (as an example) between <255,255,255,255> and <0,0,0,0> leaves you with an ugly gray border with alpha = 128. To counteract this I sometimes have to make the border region (where alpha = 0) have RGB values that match the closest VISIBLE pixels, to avoid interpolation errors... you can also bypass this problem by using premultiplied alpha (although I have no idea if any of this applies to what you're seeing). Also, I have seen problems where mipmaps get used with sprite sheets because of similar interpolation/filtering errors. Are your quads scaled or are you talking about a 1:1 texel to pixel mapping having this problem?
  7. "fake" soft shadows?

    Quote:Original post by sqpat ah, it does potentially seem easy, but then the terrain isnt necessarily flat! so a flat shadow wont work in every case. Then you're no longer looking for a "fake" shadow, you're looking for a real one! I don't think any of the screenshots you've posted have interaction with the terrain, do they? What kind of terrain are you dealing with? Are you looking for a method that involves subdividing a textured quad and then displacing it based on the terrain somehow?
  8. Best way to go about 2D in DX9?

    Quote:Original post by Kuraitou if you're wondering why I want to do 2D in DX9 (weird, I know, lol) Absolutely 100% NOT weird -- this is a very common thing to do! IMO we see this type of question here a lot but nobody hammers home the point that 3D and 2D are basically the same thing. Your graphics card is good at drawing triangles, and lots of them; Direct3D is just there to help you do it. Direct3D doesn't really care if the information you give it "looks" 1D, 2D, 2.5D, 3D, or whatever; its up to you to draw triangles in a meaningful way. Sure, there's a whole bunch of ways to help you transform 3D points into 2D coordinates to use on the screen, but by no means are you forced to use them. You can draw textured quads using transformed coordinates, or you can draw them using orthographic projection, or you can use the built in D3DXSprite functionality (which does the same thing internally), or you can make an entire sprite/billboard system in full 3D (although this is rarely needed.) And you can combine any of these techniques with "real" 3D techniques in any combination you choose. Basically I am trying to convince you to look at Direct3D more as a renderer and less as a "scene description" API, even though it does have powerful helper functions for common 3D tasks. Each frame you basically get a blank canvas on which to draw whatever you want, and your job is to paint a pretty picture and not obsess over how many "dimensions" a human observer perceives from your assorted triangles!
  9. Changing the colours of a texture in DirectX

    There's probably a million ways to solve this sort of problem, but you get much more flexibility and higher image quality using some sort of (usually 8-bit) texture information to determine where to draw the border, and where not to. Depending on your setup, the exact techiques will vary, but I think its MORE important to do proper blending if this is a 2D situation than if it is a 3D situation, which you haven't really specified; you'll have to give us more information if you need more detailed help. (For example, what does your cow texture look like? what kind of vertices is it rendered on to, and in 2D or 3D? does it already have its own alpha channel? is the outline perfectly rectangular or not? what kind of shaders/FFP stages are you using? do you need the freedom to render any color outline on any given frame? etc.) Anyways, I'm not trying to make this more complicated than it needs to be; I am just generally adverse to the entire concept of "replacing a color" in this day and age since that either forces you to have ugly, 1-bit jagged edges, or to write complicated code where you have to figure out what exactly is close enough to some "magic color" to be replaced (and thus also precluding your use of the "magic color" in the image itself.) Even though "antialiasing" is technically not the correct term, I still can't imagine ANY outline that would be of adequate visual quality that didnt have varying levels of translucency in it -- except for an outline with only 90 degree angles, as mentioned.
  10. Changing the colours of a texture in DirectX

    Quote:Original post by beatdown_master I am using DX3D9, and I think editing the textures data would be my best bet. How would I do this? I can't answer your question directly but I would suggest that a multi-textured approach would be superior to this. The reason is that when you are manually "replacing" a color in a texture you are limited to essentially 1-bit of alpha information on the border of where your "outline color" meets your "texture color" (unless your outline is purely rectangular, or you're willing to write complicated code to perform the blending operation.) For instance, if your outline is green and you're blending it with a black-and-white cow texture, the proper ("antialiased") result is going to result in a number of pixels that are dark green, light green, and everywhere in between. If you use two textures (either a base texture on top of your colored outline, or a colored outline on top of your base texture), you can use the alpha channels stored inside your assets to determine the level of blending on a per-pixel basis. Assuming your "outline texture" is pure white, you would then complete the blending operation by varying only the -vertex- colors used to render this white texture. This gives you the freedom to get good looking results merely by defining a single 24-bit color value to use for the outline. If you do this, your only decision to make is one of memory vs. performance tradeoffs: whether to perform the composition at load time (presumably using a render-to-surface technique) or at render time (requiring you to draw both textures every frame, but saving you the memory required to store all possible color combinations in some offscreen surface). I can give you some sample images to better illustrate what I mean if this isn't clear...
  11. Will GameDev be my Math Tutor?

    Check the difference of squares link as posted above -- this particular problem is more of a 'special case' than most factoring problems. A difference of squares is 'easy' (doesn't require trial and error like most factoring problems) because the two middle terms cancel each other out exactly (in this example, 6xy^2 and -6xy^2).
  12. Anyone ever use DIET PILLS?

    Quote:Original post by Dmytry alcohol, tobacco, cocaine, heroine, and the like are drugs that mess up with brain, causing chemical addiction and real withdrawal symptoms (which aren't same as hunger Of course they aren't the SAME as hunger, but your assumption that these things are unrelated is way off base. Sex, drugs, food, even video games: these are all things that people can become addicted to, and the common bond is...(drum roll)... dopamine!
  13. Anyone ever use DIET PILLS?

    Quote:Original post by Tape_Worm And I don't think when they do prescribe a weight loss medicine that it's done lightly, nor is it done with "Hydroxy-carbo-fat-cutter-colon-cleanse 2000". But you know what, I'll go you one better, I have to visit my doctor soon, I'll ask him what he thinks of these drugs. I'm willing to bet his opinion won't be that different from the rest of us. If I'm wrong, I'll admit it. I'm as honest as the companies that make those drugs. I completely respect your right to weigh the side effects and conclude that it's not worth it to take ANY drugs, I am merely saying that people shouldn't group the late night infomercial miracle cures with FDA (or other countries' equivalent governing bodies) approved medications. Quote:Yes I'm aware of how much it's helped people, but frankly when your life is already at risk, that's when the risks of the surgery are evened out. I'm quite overweight and I'd NEVER consider it, even though I know full well I'd lose everything in record time. Simply because I can't rationalize the risks against the gains. There's also a number of examples where people who get this surgery relapse and gain their weight back because they didn't learn a damn thing. I know there are a lot of success stories as well, but it's certainly not for everyone nor is it to be taken lightly. This is precisely the type of rational analysis I was suggesting to be lacking. (Even though the OP didn't really ask about such radical solutions, they are interesting.) Quote:I don't doubt he could lose 15% or more. He could also gain 15%, who knows. I meant that he could lose 15% MORE than he would lose with JUST diet and exercise (15% being a completely hypothetical number.) Maybe that kind of assistance is not worth taking a drug to you, but maybe it WOULD be worth it to another person. Even if the prevailing medical opinion on a particular drug is 'not worth the side effects' or whatever, perhaps the OP deserved a response explaining that. Quote:if I had said "Yeah, go ahead and take alli/fenphedra/anretix/etc..." or whatever and he took it and got hurt or sick, well, I can't say I'd feel too good about that. I completely agree that telling the OP to take a certain drug would be irresponsible, although any rational person should probably seek an actual doctor before taking any such advice given over an Internet forum. Surely, though, some of us can give him information without explicitly telling him 'what to take'; maybe something more along the lines of 'what to talk to your doctor about.' Quote:It's not our fault that most of us don't trust these things. He wanted to know if they'd help, and he got answers ranging from a flat out no to at least 2 positive responses My issue is with the QUALITY of the negative responses and not their quantity. I would be suspicious of almost all of these products as well, I just think it's kind of unscientific to lump a bunch of chemically dissimilar drugs (and a lot of hyper-marketed placebos) into the same discussion. I suspect a lot of this is due to the tendency for people to dismiss overweight persons as simply being "lazy", even though it is more complicated than that. Reminds me in some ways of those who would advise people suffering from depression to "just cheer up", suggesting that modern medicine has no business treating that condition either. Quote:I don't think any of us have the required pharmaceutical background required to prove that this can help or harm us. Christ most REAL doctors and pharmacists have a difficult enough time figuring that out. My question is why you think we're all 'anti-drug' because we don't trust these charlatans? I take issue with anybody being 'pro-drug' or 'anti-drug', period, because it is a much more complicated issue than that. Your outright dismissal of anybody involved in a weight loss medicine as a 'charlatan' is a slap in the face to the FDA and the exhaustive safety and efficacy trials they perform before a drug can be legally brought to market (at least in the USA - YMMV).
  14. Anyone ever use DIET PILLS?

    Quote:Original post by Tape_Worm Quote:Many diet drugs are instructed "to be combined with diet and exercise" When I see stuff like this I wonder "why do I need the drug?" Because you can potentially get better results than with (diet/exercise) alone?? My entire point is that there are shades of gray that many of you are dismissing despite having no pharmacological details to back up your assertion. How do you know that one of these drugs can't help the OP lose, say, 15% more weight than he would have lost otherwise? He has asked for specific opinions on several weight loss drugs (which have different mechanisms of action and different side effect profiles) and received nothing except "DRUGS ARE BAD" in reply. Doctors can and do help people lose weight, and they are certainly not all 'quacks' just because they prescribe weight loss medicines. And taken even further, options like gastric bypass surgery have saved MANY people's lives.
  15. Anyone ever use DIET PILLS?

    I don't have any experience with this subject but I think people here are too quick to say 'diet pills are bad', which seems to me a much too general statement. To group so many different kinds of drugs (and different kinds of hoaxes as well) under the same heading is to preclude a rational discussion. Now, if somebody here actually knows the pharmacology of the different drugs the OP asked for help with, that would be a different story. (Obviously it is true that there is no 'wonder drug' but that doesn't mean they are all worthless either. For instance, Alli seems to have some moderate positive statistical effect by blocking fat intake, but it might not work for you, or it might work to such a small degree that the side effects are not worth it for you, or it might help you a little bit but not be worth the cost... etc. etc.) Certainly a doctor can give you better information on the various tradeoffs than you're going to get here. Nevertheless, this issue is not as simple as "modern medicine has ABSOLUTELY NOTHING to offer for weight problems", which seems to be the prevailing opinion here. Many diet drugs are instructed "to be combined with diet and exercise", but that does not necessarily mean the drug is completely worthless to all patients, either.