Jump to content
  • Advertisement


  • Content Count

  • Joined

  • Last visited

Community Reputation

195 Neutral

About xerzi

  • Rank
  1. There's no Vulkan subforum yet so..   I believe the Spir-v specification has been released, i was wondering if there was any sort of feature that would allow for shaders that use macros (in GLSL) to change the functionality of the shader. In most cases it would pretty much be a "static if" statement that just choose which block of code to run. Is there anything in the specification that complements this? Or would i essentially need to compile all variants of my shader and create an archive file to store and retrieve them appropriately?
  2. I was wondering if there were any sort of graphic programming languages, as used in UE3/4 (unreal engine) to do shaders. I haven't really found any sort of abstract solution which simply supplies a tool to create shaders and a compiler to generate the appropriate glsl/hlsl code for the shader. Is there any such api, open source or otherwise? If not i was wondering why not? Is it too difficult to abstract, or would the advantages of using such a system be negated by abstracting it to be integratable into any game engine?
  3. Yes it is a Mobility Radeon HD 3650. Thanks for all the help i think i will look into and use uniform buffers.
  4. Cause i need something slower as a baseline, and i don't have anything else and i'm not willing to buy new hardware for such a purpose.
  5. I'll look into, but from a glance (if it does require a buffer object to hold the data) idk if that is any easier, it just adds another thing to manage.   passing -1 to glUniform should not cause any problems except wasting a few clock cycles on a noop call. If your driver has problems with that you might want to install a newer driver.   It is the vertex attribute that i was referring to there. If you pass -1 to any of those related functions it does give an invalid value error.   A driver update should be enough. Is there a reason that makes that inviable?   AMD dropped support for the card a while ago. It is mobile as well, so it wasn't ever really supported well to begin with.
  6. I have some old hardware that doesn't have the explicit uniform locations extension (even though it is still good hardware), and i would like to support it. It is a pain to use glGetUniformLocation, it causes so much redundant code to be written. Also the fact that uniforms and such can get optimized out, thus return an invalid value (iirc), which you then have to check for to avoid triggering an opengl error, which just piles onto the redundant code. I was wondering if anyone had any tips or can share how they handle this elegantly?
  7. xerzi

    Animation Manager ?

    Alright i think i have a better understanding of how it'll work now, thanks for all the help!
  8. xerzi

    Animation Manager ?

    Ok so this is where that all makes sense from an abstract stand point, but i get confused about some implementation details.   For forward movement, how is the frame determined for all of the animations? Is there an animation frame index for each of the 3 at once, or are they expected to all be the same length and match. So at frame 5 the right leg is up in walk and the right leg is also up in the run animation. Otherwise the blending wouldn't work?   For the meleeAttack, when the condition is false it does 2 things, 1) it doesn't blend anything into the animation 2) it sets the frame index to -1, so when the condition becomes true and the frame is incremented it'll be "0"?   So rather than using a state machine to manage the animation, it'd be possible to use a state machine to manage the objects state. So if i am in a state "climbing wall", that state would make sure meleeAttack's condition is set to false as you can't melee while climbing a wall?   How about transitional blending? So say i am "moving forward" and then i go into a "climb wall" i would want to blend the current walking forward animation into the start of a climbing wall animation so that there isn't any kind of stutter. This would then require a state machine correct? To know when we are in one state, and want to go to another to trigger a blending operation between the two states? I don't think the blend tree would work here though, as forward movement would go to zero when climbing, but i'd want to blend the animation that was happening when the climb state was trigger (i assume just copy the node data and blend from 0 to 1 from the old node data to what the actual animation is) but then i can also choose to not blend certain state changes?
  9. xerzi

    Animation Manager ?

    @Buckeye The demo doesn't have to be specific to my implementation, i just want to be able to see a demo of something more complex than one or two animations.   Well the code handling it right now is a bit of a mess, can't really say it's better than spaghetti code. That combining animation is pretty neat, thanks for the read. The blending i need to do doesn't need to happen over time though. It is calculated biased on aim direction, and if it needs smoothing that can be done by adding a rate of change to the aim direction so it doesn't just snap in place. Which needs to be blended between 4 frames anyway usually (left-right, up-down), idk if a controller is really necessary there. It's more how to manage and when to play specific animations. So when i aim playing a melee, reload or gesture animation, i shouldn't be blending in the rotation animation (as that is only relevant when idle, running, or firing).   @haegarr So as an example, i choose the animation "running melee" and then i go to the blend tree which defines "running melee" as the two animations "running" and "melee" and mixes them (or in my case overwrites the needed nodes with the melee animation)? I might be getting that wrong, but how would the blend tree know then which frame the running is on and which frame the melee is on? Maybe that's a bad example on my part...
  10. Well right now just thinking about doing animations just seems like a giant cliff i need to scale. I've read about some patterns commonly used for animation. Well i am trying to rework an animation system that's already been done without altering too much.   There are 3 types of animations: Static - basically whole raw animation, every bone is set with the animation. Overwrite - only some animation data is decoded and overwrites existing frame data. Additive - contains basically the "change" information that modifies the existing frame data.   As an example, for a 3d character. "Static" would be something like a running animation. Overwrite would be something like a melee (so you can run and hit something at the same time). Additive would be aiming, the rotation of the head and arms to modify depending on where you are aiming.   So now there are some conflict as when a melee animation is happening, then there shouldn't be any aiming, otherwise it would distort the melee animation.   I know i've read about state machines but i can't wrap my head around some ideas. If someone maybe knows of a demo program, that has a character animation with several animations and different states of the character going from and into? A lot of the examples I see are relatively simple and i find they don't really demonstrate enough to get a good idea.   Thanks for any help.
  11. Trying to implement some lighting and shadows but I'm not really sure what techniques to use. I've read about forward and deferred lighting but I don't know of any shadow techniques.   From what I know about deferred lighting, basically you render a bunch of buffers, normal, diffuse, etc... and combine them such that you apply lighting based on those buffers such that you don't need to perform per object per light rendering. So you can have many lights at some cost, such as having materials i believe is a bit tricky as everything is basically rendered at once using the same process.   Now for shadows in this case, I'd assume you'd have a shadow buffer in this case and simply apply it over the lighting one ? I haven't really found that many resources on dynamic shadows with the deferred lighting technique.   I think forward rendering is pretty easy to understand, just every light that affects an object you apply that light to it when you draw the object (some restrictions as to how many lights an object can have on it, this is dependent on how many free registers you have in your shader I believe).  
  • 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!