# EvilWeebl

Member

84

126 Neutral

• Rank
Member
1. ## Swap limbs of a skinned mesh

If I have a model, such as a robot, I am able to swap its limb meshes out and replace them with other robot limb meshes by merely removing the limb mesh from the skeleton and attaching the new one to the appropriate bone.   Now I want to essentially do the same thing but with a skinned mesh, say a human/monster character. For example I want to swap a normal human arm for some bad-ass demon arm. How do I go about doing this as I believe I need to take into account skin/bone weights etc.   A great example I have found is the game Impossible Creatures
2. ## floating point precision problem

Ahh I see where I went wrong now, thanks for summing that up for me. Also laztrezort that link was a good read so thanks for that.
3. ## floating point precision problem

Thanks for the reply, Sorry I should have been more specific, the numbers I provided are examples of my bound.Height and bounds.Y values, bounds being another RectangleF so they will be floats and not doubles. Well It's not too important its just causing it to crash when I set some other values that rely on it clamped between 0 and 1 but as you say I can just clamp that myself. I was wondering if using decimal here would be preferable? Or at least casting them to decimal and then the resulting answer back to a float?
4. ## floating point precision problem

Hi all, More than just solving this problem I'd love if someone could explain to me the cause for this: I'm doing a winforms projects and have a picture box with an image. I drag a rectangle over that image and get the bounds of that rectangle. The thing is that I need to store these bounds as UV coordinates and as the picture box Y is at the top and UV's Y(or V) starts at bottom I need to flip them. I do this like so : return new RectangleF(bounds.X, 1.0f - (bounds.Height + bounds.Y), bounds.Width, bounds.Height); I should mention that X and Y range from 0.0000 - 1.0000. Now the problem occurs when I select most if not all the box and the equations looks something like: return new RectangleF(bounds.X, 1.0f - (0.9886 + 0.0114), bounds.Width, bounds.Height); Now obviously 1.0f minus this sum should make 0, but instead I'm getting -0.0000000158324838. Now I've seen that a float has a 7point accuracy but as you can see I'm not using that, so what is the problem? Any help would be much appreciated.
5. ## Negative exponential curve formula for stat leveling

But level 100 would be the maximum level, so whether it would continue to rise or not is not important as the character is capped at level 100. I realise that in my example to exponent is greater than 1, but changing the curve amount given a different exponent. a curve amount between 0 and 0.5 gives a positive curve and between 0.5 and 1 gives a negative curve. If anything this is a great help for defining growth rates of different characters. Am I right? Of all the googling I've done on rpg stat leveling formulae why haven't I come across anything like this? Makes me think I'm missing something.
6. ## Negative exponential curve formula for stat leveling

Hi all, sorry I've been away so long. I just discovered something called Ken Perlin's bias that seems to suit my needs well and is adjustable on the growth. I am having a problem trying to fit in the base stat though so if I could get some help that would be great. This is what I have so far : stat(level) = (level/maxLeve)l^(log(curveAmount)/log(0.5)) * MaxStat In the following example the stat is 0 at level 0 and 500 at level 100. http://www.wolframal...)/log(0.5))*500 Now as I said I'm not sure where to be fitting the base stat into this equation to ensure it starts at say 50 but ends at 500. Any help much appreciated. Edit : actually could this be it? stat(level) = ((level/maxLeve)l^(log(curveAmount)/log(0.5)) * (MaxStat - baseStat)) + baseStat
7. ## Negative exponential curve formula for stat leveling

Wow such a lot of info to take in at once and I hardly understand any of it. Away from the computer at the moment but will look into it as soon as I can. Also I believe your right about logaritic curves not being for me as I checked them out and I did notice it can't be influenced between a maximum and minimum.
8. ## Negative exponential curve formula for stat leveling

Hi all, I'm making a game where the character levels up and stats need to be increased. Now its a bit dull if every level got +1 for each stat so what I want is an exponential curve. The thing is I keep finding millions of things about making it start slow and get faster but can find sod all on the opposite, as in many rpg's you gain pace quite quickly and then at higher levels ease off. Now I'm not really an expert on this side of maths and have heard many terms such as negative exponential curve, logarithm etc. What I want is to take a min and max value and curve between them over 100 levels. Say at level 1 I want attack to be 1 and at level 100 I want it to be 1000, but at level 50 I don't want it to be 500, rather more like 600. I'm sure you understand. I've been trying formulas in wolfram alpha but not really getting anywhere. Could some one help me out. Any help much appreciated.
9. ## Android : import animation

Hi all, I want to build an animated character for a 2d game but I want the limbs to be interchangeable. Imagine like a cardboard puppet where all the limbs are attached by pins. In essence what I want is for sprites to be attached to an animated skeleton system, understandably this isn't possible and I definitely don't want to be manually animating the character. Instead what I figure is I'd make some planes in 3ds max or something and attach them to an animated skeleton. My question is how do I then import that into my android project and animate?
10. ## Assimp creating FileNotFoundException?

I have 3 projects in my solution; a native engine that produces a lib, a managed interface that uses that engine lib and creates a dll, and a managed Editor that uses that dll and accesses the engine through the managed interface. Ive recently been trying to implement assimp the asset importer into my engine and as soon as I have all the include and lib directories included and include the headers its all building and compiling fine. As soon as I try and utilise even the first bit of assimp my managed editor decides to through out this error at runtime: System.IO.FileNotFoundException: Could not load file or assembly 'ManagedInterface.dll' or one of its dependencies. The specified module could not be found. Its fine when I comment out the single line of code relating to assimp and runs perfectly but as soon as I uncomment it it will crash at runtime again. It's probably not directly significant but this is the line of code in my engine: Assimp::Importer importer; I figure it must have something to do with the way my include or lib directories are set up or something with assimp isn't getting built correctly. Any help would be much appreciated.
11. ## syntax error 'ID3DBlob'

I figured it thanks, I wasn't including the DX include and lib directories in my other projects. For some reason I always thought if you referenced the lib of a project that included the directories then it was ok but no, you have to set the directories up again for that project. It was in D3Dcommon.h though so thanks for your help.
12. ## syntax error 'ID3DBlob'

I'm building an Engine lib and have a function in my Engine.h that looks like this: HRESULT CompileShaderFromFile(WCHAR* szFileName, LPCSTR szEntryPoint, LPCSTR szShaderModel, ID3DBlob* ppBlobOut); This Engine project itself doesn't produce any errors but two other projects that access it by its lib produce the error: error C2061: syntax error : identifier 'ID3DBlob'. Probably a simple answer but I'm not very good with including libs and dll's and stuff into other projects.
13. ## Importing Engine.lib into other projects

We can forget this ever happened, consider this discussion closed. The libs weren't included in the linker *facepalm* Thanks anyway
14. ## Importing Engine.lib into other projects

Ok so I included the Directx include in the other projects and then included d3dx11.lib and the whole blobs error went away. I should have been more specific about that second problem it wasn't my helper function it was having the problem with it turns out its this directx function it doesnt like. D3DX11CompileFromFile(L"shaders.hlsl", NULL, NULL, "VShader", "vs_5_0", NULL, 0, NULL, &VS, NULL, NULL); it seems to be producing these errors in the projects that are importing the lib: error LNK2019: unresolved external symbol _D3DX11CompileFromFileW@44 referenced in function "private: void __thiscall Engine::InitPipeline(void)" (?InitPipeline@Engine@@AAEXXZ) C:...\NativeEngine_Sample\NativeGame\NativeEngineLib.lib(Engine.obj) NativeGame error LNK1120: 1 unresolved externals I've included just about every header that my lib uses such as d3d11.h, d3dx11.h, d3dcompiler.h, d3dcommon.h and yet still get same errors. Any ideas?
15. ## Importing Engine.lib into other projects

Thanks for the quick reply. Excuse my ignorance but which file? The engine.h file in my Engine lib or the files in the projects that are importing them? Im sure ID3DBlob is under ID3DX11.h which is included in my Engine lib project and compiles fine, its just the projects that import it are complaining. I presumed projects that imported the lib would also import the headers the lib is using, no? I have to #include all the headers again? It seems in the Engine lib project's external Dependencies it has D3DX11.h (hence I can #include it) but other projects that import the Engine libs are lacking it(although amongst the list seems to be most other DX headers). How do I add an external dependency? I'm sorry if these are brutally noobish questions but my experience is as much as starting a new project and going properties/include directory/ add DX. Also this solution was sent to me as a starting point and I have no idea how it was set up.