• Content count

  • Joined

  • Last visited

Community Reputation

190 Neutral

About doomtr666

  • Rank

Personal Information

  1. Hi,   I've made experiments on a similar problem a while ago (biome placement on a procedural map). One alternative way for solving that type of problems could be to use a constraint solver like Google OR Tools. With OR Tools, you have to express the constraints of your system :   - My domain is a X*Y grid - I want at most 25% of rock blocks - Near a rock block there's 75% of chance to have a sand block etc.. Set the seed, call Solve(), and you get a solution.   The main difficulty is to express the constraints, but I think it could be a very interesting approach, and can give a very good control of the generation.   Anyway, our actual generator is based on Perlin (GPU generation), and it works fine... Just an idea ;)
  2. Hi, Like said SeanMiddleditch, most of your extensions are frontend one. For example, your external static access, is kind of scoped globals, and could be handled in frontend. So modify CLang is a good idea. Be aware that kind of variable can be a pain in the ass to optimize by the compiler, especially with pointers due to aliasing. What about local function déclaration ?
  3. Ok, just a suggestion ;)   In that case, LLVM is a good choice. You "just" have to write your frontend and generate LLVM IL. That can be a bit tricky but LLVM will produce .obj for you, and you will have many choice about optimization passes to apply. If you choose that path, don't hesitate to PM me if you need help !   In any case, I hope you will inform us of your progresses ;)
  4. Hi,   Trust me, I've worked 6 years in that domain, writing optimizing compiler middle and backend is a quite complex task, especially to achieve decent performance. LLVM is a very good framework. It is very modular and have a lot of state of the art optimization and analysis passes. But it's also quite complex beast to start with ;)   If you plan to generate native x86 code, have you considered writing a translator from your language to C or C++ language ?  This approach permits you to rapidly focus on your langage developement, and let your favorite compiler do the nasty stuff. With this first prototype, you could then analyze the code generation, and think about the oportunities of further optimizations based on your language characteristics (i.e, aliasing rules, loop parallism and vectorization and so on). Then you can switch to a compilation framework such as LLVM to code those specific optimizations.
  5. Hi,   Maybe you could post some code snippets of your draw method ?
  6. OpenGL OpenGL Lighting Issue

    Hi,   I'm not sure there's any normalisation about the order of uniforms. Anyway you could use something like that to force the location (GL 4.3 I think): layout(location = 2) uniform mat4 WorldMatrix;   Otherwise you have to use glGetUniformLocation(), to retrieve the location of each uniforms.   See OpenGL wiki for the details:   And maybe you could use a graphic debugger to identify your issue ? AMD GPU Perfstudio, NVidia nSight, Intel GPA,... It saves my life a lot ;)
  7. Hi,   I'm not aware of any libs combining particles and GUI. But some good pure GUI libs exists such as CEGUI. Anyway, have you considered embedding a web browser in your game ? It can be with Awesomium or directly with Chormium Embedded.  This is the approach we have chosen for our game, and it is quite powerful ;)   I hope this helps !
  8. Hi, Looking in an old OpenGL 2.0 spec, it seems that active texture replace fragment color, chapter 3.8.15:   "This texture value is used along with the incoming fragment in computing the texture function indicated by the currently bound texture environment. The result of this function replaces the incoming fragment’s primary R, G, B, and A values"   If you look, in chapter 2.14.1, you have the complete lighting equations.    Hope this helps !
  9. [Assimp] Getting bind pose bone positions

    I got headache when I have worked on skinning with Assimp. Uglydavis has right, no bind pose. I had to take a look to Assimp model viewer source code to get it working. The bone matrices should be computed like that (or reverted depending of your matrix convention): BoneWorldTransform * BoneOffsetMatrix * InverseRootNodeWorldTransform Root node, is the root node of the aiScene (not the skeleton root node). Hope this helps !
  10. Hey Artur,    As SeanMiddleditch says, we use CEF in our game engine (and previously Awesomium), It's not so difficult to integrate. Do not hesitate to PM me if you take this way !
  11. Assimp meshes & animation

    Hi,   With Assimp you load an aiScene which contains the list of meshes contained in the the model (I guess you already use that).   In addition you have a pointer to the rootNode (aiScene->mRootNode). Nodes (aiNode) give you the tree hierarchy of the differents elements of the scene, contains transforms, can be bones or contain meshes. Animation data points to nodes (in aiNodeAnim, you have the node name), changing the transform of a node over time.   So to handle animation properly, you have to handle the node structure, particulary if you plan to use skinning.   I hope this helps.
  12. Hello,   It depends on your target platforms, and what kind of content you have to display. First approach is fine on PC with modern hardware.   If you have large texts to display, it may be a good idea to not redraw everthing every frame.   But have you considered mixing the 2 approches ? Using a method 1 to draw in a render texture ?
  13. Large terrain shadows

    [quote name='Frenetic Pony' timestamp='1321231930' post='4883594'] The problem with Wolfire (and overgrowth's) shadows is that they're completely static. They look good for a static sun position, but if you want any time of day changes then that's out. Further, I wouldn't go with an interval update for shadow maps. Skyrim does that, and it can be even more distracting than a bit of shimmer you'd otherwise get. Honestly, depending on your target hardware and other factors you could just brute force it. Sample distribution shadow maps [url=""]http://visual-comput...lications/sdsm/[/url] with say a triple 2k split might look good enough, especially since the biggest artifacts you're getting are from aliasing. [/quote] You're right Skyrim's shadows are really awful Thank you for you paper I will take a look at it ! Cheers !
  14. Large terrain shadows

    [quote name='dpadam450' timestamp='1321296753' post='4883875'] [quote]The problem with Wolfire (and overgrowth's) shadows is that they're completely static.[/quote] Well depending on the game he 1: may not need time of day. 2: you can still change the sun vector on the height map on the cpu and resend a nice light map right down to the gfx card. Just thread it or something and when it is done computing you can send it back down. Your sun will only move 1 time every 20 seconds to a minute depending on the game. So why re-draw it every frame? You also get to filter your light map to get softer edges. [/quote] Actually, I need to handle time of day. I wonder if i will not do some kind of horizon mapping, storing 2 angles for each point of the map. The first angle indicating when the sun will start to illuminate the point, the second when it will end to illuminate. I could store AO in the map too. This could be pretty fast. In addition, I will use CSM for the closer objects. Do you think it's ok ? Cheers !
  15. Large terrain shadows

    [quote name='dpadam450' timestamp='1320995612' post='4882863'] What do you mean on the fly? At startup or does it change at run time by dynamic destruction? If its at startup then generate 1 height map, regardless of LOD method, you still have it project to the correct spots that the original shadow map should be just fine. I have this same problem myself, well did because its not that great for terrains in my opinion: Look up Wolfire on youtube, their terrain is beautiful, uses a 2048 static shadow map and texture splat map. Also saves you a little bit of render time to not re-draw the terrain 2 times every frame. [/quote] For now the heightfield is generated by a background thread while the player moves... But that does not seem to be a so good idea. Thank you for your help, I will take a closer look at Wolfire terrain technique.