Jump to content
  • Advertisement

All Activity

This stream auto-updates     

  1. Past hour
  2. Yeah Photoshop is bad enough at eating all my RAM without trying to load a 16GB TGA file... 🥺 If a game needs textures bigger than that, you'll probably need to build a system that lets you edit it as small sections before assembling the full image, so that artists don't need a terrabyte of RAM in their development PCs. Then, seeing as you're now doing custom tooling, you could also just use a modified TGA with 32bit width/height fields?
  3. lukash

    Yet another graphic engine

    Update: For half a year, I completely rewrote the engine. Implemented: Deferred render Physically based materials Image based lighting Game objects system with parent-child relationship Translate manupulator Picking Experimental Import FBX
  4. That's something I hadn't considered before - thank you very much. I'll work on a simplified template, cut down and go from there. You meantioned that was a main problem of yours - did you have any issues with the rest of the content besides structure and the quotes?
  5. vinterberg

    Specular Lighting seems Backwards

    mat4 TI_model_matrix = transpose(inverse(u_model_matrix)); model_position = vec3(model_matrix * vec4(vec3(v_position), 1.0)); model_camera_position = vec3(model_matrix * vec4(u_camera_position, 1.0)); model_light_position = vec3(model_matrix * vec4(u_light_position, 1.0)); model_normal = normalize(vec3(TI_model_matrix * vec4(v_normal, 0.0))); Unrelated to the issue, but doing all this for every pixel is not very efficient Some of it should be done in vertex shader, and stuff like camera+light might as well be provided directly by uniforms! Also, you should do different shaders for all those combinations, and batch all drawcalls together for each one - instead of all those conditionals, they should generally be avoided if you can IMHO Have you tried using Blinn-Phong instead?
  6. The main problem is the overall structure. The eyes and mind can´t fix on some anchor of savety in your portfolio. I would suggest to you to create a template for an overall frame to keep a structure (the section of your craft you present, etc.). This structure or frame stys the same. If you do this you give the eyes of the reader a kind of save haven. The first glance is essential. At the moment I get the impression that there is much going on... but I also get a feeling of doubt if you can keep up with months or years of game production. All of this just by the rather chaotic visual esthetics. You want to avoid this feeling inside the reader at all cost. Give the portfolio a repeating pattern. I would highly recommend to leave the qoutes out of the first page. or make them less. As mentioned above: my eyes don´t know where to start. A common way is to have the essential information in front and MAYBE some art, examples with oppacity in the background. They must NEVER conflict with the essential info! It doesn´t matter what your portfolio contains if the frontpage makes the reader quit because it gives the wrong impressions. Give everything more space to breath! Quality over quantity. This makes it more readable and you reach the potential costumer.
  7. Today
  8. Great work and very neat details! Maybe you should try some different timings on the weapons for more weight (acceleration on heavy stuff etc.). Stretching the arms back a bit more to give it more punch (anticipation). By no means the animations are bad. Just a suggestion too perfection
  9. A_Mc

    Advice on creating a lighting sprite

    Go for some sprite librarys on google. They have EVERYTHING you want to know. Frame-by-frame.
  10. A_Mc

    Attacking animations for 2d characters

    Also google the 12 rules of animation. Timing, anticipation, overstretching etc... can really help giving the weapon weight and a certain feel.
  11. I use Clip Studio Paint which is awesome for animations and very cheap considering the competition. My workflow is pretty simple. Layers, Layers and Layers. Because you dont want to reanimate everything yourself. There is ofcourse a certain drawback to this: Less bounce if perhaps the legs don`t bend slightly while breathing (12 rules of animation). In your case (presuming you wan´t it quick and dirty and not SNK-style sprite godlike mode) I would either go with the cut out style animation which a personally dislike because it doesn´t look so good to me or I would divide the body in seperate parts i.e. head, neck, chest, belly (maybe in one depends on how detailed your char is),arms , hip, front leg, back leg, etc... and then just animated the parts you need. this comes in quite handy. (Clip studio lets you declare folders full of layers as one frame. don´t know how that works in PS) It´s a technique which is a mix of both mentioned above. I use this for dialogue screens to save time and still have the capability to do frame by frame animation on certain parts of the body, like talking and random blinking with the eye. I might also suggest to do your char in the original size you need because some details might not be needed after all. Less distance to paint, less details to sketch, etc. you won´t be doing 4k so 1080 is the max size of screen I guess. So your char is allready way too much work. Just place the char on a testrender. Take away some details not relevant to the character (It´s done all the time) and you allready have some time saved. The problem also comes with the angles used in game. 8-way movement or sidescrollers have different amounts of animation to be performed. Each action multiplys your work amount. I currently work on sketches for a sidescroller (new to this myself) because I love to animate. I had to do all the steps by hand and I think it shows the difference between cutout and frame by frame perfectly. The chest and the hips bend and so forth. You won´t need that for a Visual novel, or a point and click though. - Down below you see two steps I take before the real animation. - The targetrender is my personal sandbox where I check my character design and resize the character until I get the final size. Then I simplify. In this case it will be frame-by-frame because I wan´t to have a fluid and dynamic feeling. The run cycle is a previous version of this character which I´m not so fond of. More stretching and mashing needed but it shows what can be done. - I would advise against frame-by-frame animation if time is precious. because doing the animations right requires time (my final versions are still in keyframes until thy snap just right). -If you do frame by frame: sketch out your keyframes!!! test them!!! If they don´t work. Make them work. - check out spritesheet resource librarys and go for some old games. In the sheets check for the idle sections. there you can have a good look of what it takes to make i.e. a breathing cycle frame-by-frame or how to divide the body into different parts. I guess Vanilla Ware are the masters of Cut-out-animation. Check those games out too.
  12. Hello Brody, sadly I allready commited myself to another project and made myself pretty indispesable and I won´t let them down. I hope you find someone because your game seems pretty neat. With best wishes, Ansgar
  13. tamlam

    Change Animation in OpenGL

    Thanks for comment. I tried but it did not work. The problem is that in order to roll a cube along its edge. There are some steps (just like youtube link : 1. translate the cube until the contact edge for rolling == Y_axis.) 2. rotate the cube with new coordinate (90 degrees) around Y_Axis. 3. translate the rotated cube to a new coordinate. When we do animation (only for rotation) we have to do 3 steps in OpenGL, how can I only show the rotation because it has to pass these 3 above steps?
  14. Psychopathetica

    Specular Lighting seems Backwards

    Sure I can post some code and screenshots. It went through lots of changes over time though since I added cubemapping for reflection and other goodies. But I can't for the life of me figure out why specular lighting is backwards. The normals I know are correct because the objects I created on Autodesk 3D Studio Max show the normals are pointing out of the object. Vertex Shader #version 300 es uniform mat4 u_model_matrix; uniform mat4 u_mvp_matrix; uniform vec3 u_camera_position; layout (location = 0) in vec4 a_position; layout (location = 1) in vec4 a_color; layout (location = 2) in vec2 a_texturecoordinates; layout (location = 3) in vec3 a_normal; out vec2 v_texturecoordinates; out vec4 v_color; out vec3 v_normal; out vec4 v_position; out vec3 v_model_normal; out vec3 v_model_position; out vec3 v_model_camera_position; void main() { v_color = a_color; v_texturecoordinates = a_texturecoordinates; gl_Position = u_mvp_matrix * vec4(vec3(a_position), 1.0); v_normal = a_normal; v_position = a_position; v_model_position = vec3(u_model_matrix * vec4(vec3(a_position), 1.0)).xyz; v_model_normal = vec3(u_model_matrix * vec4(a_normal, 0.0)); v_model_camera_position = vec3(u_model_matrix * vec4(u_camera_position, 1.0)).xyz; } Fragment Shader #version 300 es precision highp float; // Texture units uniform sampler2D u_textureunit; uniform samplerCube u_cubemap_unit; // Texture enabled uniform int u_texture_enabled; uniform int u_cubemap_enabled; // Matrices uniform mat4 u_view_matrix; uniform mat4 u_model_matrix; // model: local and world matrices combined uniform mat4 u_model_view_matrix; // Light enabled uniform int u_light_enabled; // Light Color uniform vec4 u_ambient_color; uniform vec4 u_diffuse_color; uniform vec4 u_specular_color; // Enabled light types uniform int u_ambient_enabled; uniform int u_diffuse_enabled; uniform int u_specular_enabled; // Light intensities //TODO diffuse intensity uniform float u_specular_intensity; // Positions uniform vec3 u_object_position; uniform vec3 u_camera_position; uniform vec3 u_light_position; // Angles uniform vec3 u_camera_angle; uniform vec3 u_light_direction; // Selectable color; uniform vec4 u_RGBA; // Enabled two sided lit side uniform int u_two_sided_enabled; // Reverse reflection uniform int u_reverse_reflection; uniform int u_invert_normals; uniform int u_invert_x_normal; uniform int u_invert_y_normal; uniform int u_invert_z_normal; // Light type uniform int u_light_type; in vec2 v_texturecoordinates; in vec4 v_color; in vec3 v_normal; in vec4 v_position; in vec3 v_model_normal; in vec3 v_model_position; in vec3 v_model_camera_position; out vec4 color; vec4 ambient_color; vec4 diffuse_color; vec4 specular_color; mat4 view_matrix; mat4 model_matrix; mat4 model_view_matrix; vec3 model_position; vec3 model_camera_position; vec3 model_light_position; vec3 model_normal; // Not used ////////////////////////////////// vec3 modelview_position; vec3 modelview_camera_position; vec3 modelview_light_position; vec3 modelview_normal; ////////////////////////////////// float diffuseFactor; float specularityFactor; vec3 finalLitColor; vec3 linearColor; vec3 gamma = vec3(1.0/2.2); vec3 hdrColor; vec3 toneMap; vec3 normal; vec3 camera_world_position; vec3 object_world_position; vec3 light_world_position; vec3 light_direction; void ambientLight(){ if(u_ambient_enabled == 1){ ambient_color = u_ambient_color; } else{ ambient_color = vec4(1.0, 1.0, 1.0, 1.0); } } void diffuseLight(){ if(u_diffuse_enabled == 1){ // Use only modelNormal, not modelViewNormal // Reason is because it will change colors as you move the camera around, // which is not a real world scenario // Observations: // normal = normalize(v_model_normal) means the values of the norm will never change. // For example when the object rotates, the light colors are stuck on // that side of the object! diffuseFactor = max(0.0, dot(normal, light_direction)); diffuse_color = clamp(vec4(diffuseFactor * u_diffuse_color.rgb, 1.0), 0.0, 1.0); } } void specularLight(){ if (u_specular_enabled == 1){ // Use model_position, not vec3(v_model_position). When the object rotates, once the normals // point the other way, specular light disappears! With model_position, the light // stays on them at least the whole way round. // the reflect() method does this formula: reflect(I, N) = I - 2.0 * dot(N, I) * N vec3 reflect_direction = reflect(-light_direction, normal); vec3 camera_direction = normalize(camera_world_position - object_world_position); float cos_angle = max(0.0, dot(camera_direction, reflect_direction)); specularityFactor = 0.0; if (diffuseFactor >= 0.0) { specularityFactor = pow(cos_angle, u_specular_intensity); } specular_color = clamp(vec4(vec3(u_specular_color) * specularityFactor, 1.0), 0.0, 1.0); } } void main() { model_matrix = u_model_matrix; mat4 TI_model_matrix = transpose(inverse(u_model_matrix)); model_position = vec3(model_matrix * vec4(vec3(v_position), 1.0)); model_camera_position = vec3(model_matrix * vec4(u_camera_position, 1.0)); model_light_position = vec3(model_matrix * vec4(u_light_position, 1.0)); model_normal = normalize(vec3(TI_model_matrix * vec4(v_normal, 0.0))); if (u_invert_normals == 1) { model_normal = model_normal * vec3(-1.0, -1.0, -1.0); } if (u_invert_x_normal == 1) { model_normal = model_normal * vec3(-1.0, 1.0, 1.0); } if (u_invert_y_normal == 1) { model_normal = model_normal * vec3(1.0, -1.0, 1.0); } if (u_invert_z_normal == 1) { model_normal = model_normal * vec3(1.0, 1.0, -1.0); } object_world_position = model_position; camera_world_position = model_camera_position; light_world_position = u_light_position; normal = model_normal; vec4 texture_color0 = texture(u_textureunit, v_texturecoordinates); /* reflect ray around normal from eye to surface */ vec3 incident_eye = normalize(camera_world_position - object_world_position); vec3 reflect_normal = model_normal; vec3 reflected = reflect(-incident_eye, reflect_normal); reflected = vec3(inverse(u_view_matrix) * vec4(reflected, 0.0)); vec4 texture_color1 = texture(u_cubemap_unit, reflected); if (u_light_enabled == 1){ if (u_light_type == 0) { // Point Light light_direction = normalize(light_world_position - object_world_position); } else if (u_light_type == 1) { // Directional Light light_direction = normalize(u_light_direction); } else if (u_light_type == 2) { // TODO Spot Light light_direction = vec3(0.0); } ambientLight(); diffuseLight(); specularLight(); finalLitColor = vec3(1.0, 1.0, 1.0); if (u_light_type == 0) { // Point Light float dist = distance(light_world_position, object_world_position); float attenuation_constant = 1.0; // Infinite light emmission for now. float attenuation_linear = 0.0; float attenuation_exp = 0.0; float attenuation = 1.0 / (attenuation_constant + attenuation_linear * dist + attenuation_exp * dist * dist); linearColor = vec3(u_ambient_color.r + attenuation * (diffuse_color.r + specular_color.r), u_ambient_color.g + attenuation * (diffuse_color.g + specular_color.g), u_ambient_color.b + attenuation * (diffuse_color.b + specular_color.b)); vec3 gamma = vec3(1.0/2.2); finalLitColor = pow(linearColor, gamma); } else { // Directional Light linearColor = vec3(u_ambient_color.r + diffuse_color.r + specular_color.r, u_ambient_color.g + diffuse_color.g + specular_color.g, u_ambient_color.b + diffuse_color.b + specular_color.b); vec3 gamma = vec3(1.0/2.2); finalLitColor = pow(linearColor, gamma); } if (u_texture_enabled == 1 && u_cubemap_enabled == 1){ // Incase you forget how to add a toneMap overtime... // gl_FragColor = vec4(toneMap.rgb, texture(u_textureunit, v_texturecoordinates).a) * // Problem is, is that it is not that colorful. its a dull resident evil greyish world then color = vec4(texture_color0.r + texture_color1.r, texture_color0.g + texture_color1.g, texture_color0.b + texture_color1.b, texture_color0.a + texture_color1.a) * vec4(v_color.r * finalLitColor.r * u_RGBA.r, v_color.g * finalLitColor.g * u_RGBA.g, v_color.b * finalLitColor.b * u_RGBA.b, v_color.a * u_RGBA.a); } else if (u_texture_enabled == 1 && u_cubemap_enabled == 0){ color = vec4(texture_color0.r, texture_color0.g, texture_color0.b, texture_color0.a) * vec4(v_color.r * finalLitColor.r * u_RGBA.r, v_color.g * finalLitColor.g * u_RGBA.g, v_color.b * finalLitColor.b * u_RGBA.b, v_color.a * u_RGBA.a); } else if (u_texture_enabled == 0 && u_cubemap_enabled == 1){ color = vec4(texture_color1.r, texture_color1.g, texture_color1.b, texture_color1.a) * vec4(v_color.r * finalLitColor.r * u_RGBA.r, v_color.g * finalLitColor.g * u_RGBA.g, v_color.b * finalLitColor.b * u_RGBA.b, v_color.a * u_RGBA.a); } else{ color = vec4(v_color.r * finalLitColor.r * u_RGBA.r, v_color.g * finalLitColor.g * u_RGBA.g, v_color.b * finalLitColor.b * u_RGBA.b, v_color.a * u_RGBA.a); } } else{ // No light if (u_texture_enabled == 1){ color = texture(u_textureunit, v_texturecoordinates) * vec4(v_color.r * u_RGBA.r, v_color.g * u_RGBA.g, v_color.b * u_RGBA.b, v_color.a * u_RGBA.a); } else{ color = vec4(v_color.r * u_RGBA.r, v_color.g * u_RGBA.g, v_color.b * u_RGBA.b, v_color.a * u_RGBA.a); } } } Now, with this current code, I get this on the front side... ...and this on the back side when i move the camera over. And here you can clearly see the light source which is slightly behind the camera towards the left assuming I was facing front As you can see, the specular light is backwards. Hitting the opposite of side of where it suppose to be. But its only backwards for the Z's and Y's, not the X. Besides it being backwards for the Z side, when the objects above the light source, the light hits the top of the object (suppose to be the bottom). When its below the light source, the light hits the bottom of the object (suppose to be the top). However the X's are correct which is strange. So in my specularLight() method where I'm reflecting: vec3 reflect_direction = reflect(-light_direction, normal); and I take away the negative light direction and make it positve, I get this: Which doesn't make sense because now the math is backwards. But I get what seems to be correct results.....sort of. Keyword there. Now this is ok for the Mario guy and sphere in the background, seems legit on all sides and positions and angles, but when I use a tubular object such as this ship in the image or a flat polygonal quad, the specular light is now going the wrong way in the X direction. Take a look at what happens when I move the ship to the left of the light: And its true for vise versa. I don't know if the code written in those articles are for left handed coordinate systems or what. But I'm using right handed. And OpenGL by default is right handed. So I'm completely confused as to why its backwards whether just in the X direction or the Y-Z direction. Hopefully I was clear enough there
  15. Yyanthire Studio


    Album for Moonrise
  16. TotoGuau

    I need ideas

    Hello friends Well for a long time I wanted to create a game or mobile application because I have basic knowledge about programming but I have never had an idea in particular so I come to ask any creative mind to help you see this post to help me decide what to do. It's my first post so I do not know if there are rules for this and if there are any, let me know. Goodbye
  17. Fulcrum.013

    A good 3D math library in C for OpenGL?

    it is 2 options to use DLL - import a separate functions from it and import a interfaces using COM. Both seriously affect perfomance, becouse any call of DLL function is indirect i.e. same as virtual call and can not be inlined. So best way to use it for pluggable modules is to break system to huge closed subsystems that require intermodular calls very rare. For example physic engine into one DLL, render into another DLL and scene into main module. As result you can just export only function from each of dlls and call it once per frame. Internal implementation of functions inside dll can use inlining, clasess and other advantages of C++ for anything that not require a interdll calls.
  18. Wyrframe

    Specular Lighting seems Backwards

    Are you clamping reflection angle to zero, so that light only reflects off the "outer" face of a shape? Post a minimum-reproduction sample of code, post screenshots, explain your observations and how they differ from the expected results.
  19. Have you considered this Single-pass Wireframe Rendering approach? It works by rendering filled triangles and calculates the outlines of the triangles in a fragment shader. The algorithm is pretty efficient however the major drawback is that it requires you to add an additional per-vertex attribute that stores the Barycentric coordinate of the vertex. This Barycentric coordinate would then be an input to your vertex shader where you pass it through to the fragment shader to get the interpolated point on the triangle. Using this point you can derive the distance from the edge of the triangle. If the point is near an edge of the triangle, you color the fragment black (or whatever color you want your outlines to be). You should be able to find some tutorials for implementing this algorithm online.
  20. GoliathForge

    GC : Explosive Balls (game play)

    Attached is an updated version. Hope to get a bow on it this next week. GDN_SideScroller_goliathForge_TEST_02.zip
  21. Hello, I'm currently searching for additional talented and passionate members for our team that's creating a small horror game. About the game: The game would be a small sci-fi/post-apocalyptic survival horror 3D game with FPS (First person shooter) mechanics and an original setting and story based in a book (which I'm writing) scene, where a group of prisoners are left behind in an abandoned underground facility. It would play similar to Dead Space combined with Penumbra and SCP: Secret Laboratory, with the option of playing solo or multiplayer. Engine that'd be used to create the game: Unity About me: I'm a music composer with 4 years of experience and I'm fairly new in this game development world, and I'm currently leading the team that'd be creating this beautiful and horrifying game. I decided that making the book which I'm writing into a game would be really cool, and I got more motivated about doing so some time ago when I got a bunch of expensive Unity assets for a very low price. However, I researched about how to do things right in game development so I reduced the scope of it as much as I could so that's why this game is really based in a scene of the book and not the entire thing. Also I'm currently learning how to use Unity and learning how to program. Our team right now consists of: Me (Game Designer, Creator, Music Composer, Writer), 3 3D Modelers, 2 Game Programmers, 1 Sound Effect Designer, 1 Concept Artist, 1 3D Animator and 1 Community Manager. Who am I looking for: We are looking for a talented and passionate programmer that's experienced with Unity and C#. Right now the game is in mid-early development and you can see more information about it and follow our progress in our game jolt page here: https://gamejolt.com/games/devilspunishment/391190 . We expect to finish some sort of prototype in 3 months from now. This is a contract rev-share position If you are interested in joining, contributing or have questions about the project then let's talk. You can message me in Discord: world_creator#9524
  22. Basically I copied some code from https://www.tomdalling.com/blog/modern-opengl/07-more-lighting-ambient-specular-attenuation-gamma/ to do specular lighting but I ran into an issue. The specular highlights are on the opposite side of the object. On top of that, not only does it seem reversed on the Z side, but on the Y side as well. If I make the incidence vector positive instead of negative though, the X side of the specular highlight is reversed on flat surfaces facing the viewer while on round 3d objects such as a person or sphere is perfectly fine. Like in this bit of code for the shader: vec3 incidenceVector = -surfaceToLight; //a unit vector vec3 reflectionVector = reflect(incidenceVector, normal); I literally tried everything such as flipping normals of the object or flipping just the x normals but it comes out wrong at certain angles. Im using the right handed system in OpenGL. Any help is appreciated. Thanks.
  23. Sounds interesting. Do you have a blog or website? I'm way into the planetary stuff: simplex noise, run-time smooth terrain generation with voxels, JIT terrain for collision, rebasing the origin on the GPU, etc ........... but unfortunately I'm fully committed doing my own C++ planetary engine at the moment. I wouldn't mind following you guys though. Good luck!
  24. Haven't looked at your system yet because I don't have time right now, but it DOES remind me that I need to get the C# version of my entire IAUS up on the Unity Asset Store.
  25. bok!

    Bad Bunch - Announcement Trailer

    Dive-bomb into an alternate reality where air combat rages above land and sea. Red versus Blue. Choose your color, launch you air frame, and fight to be the baddest bunch of Aces in the sky. Visit https://badbunch.net for more info.
  26. GoliathForge

    GC : Explosive Balls (game play)

    No worries.. That will give me a chance to put an update in maybe tomorrow. Sound has been improved by a long ways. I was missing on my sound release time and it made it muddy. But an accidental fix cleared it up. Sounds great now. Maybe not so accidental, but certainly a surprise. Re-arranged the three bar looping music. It's groovy now instead of just noise. Added difficulty by scaling time. It's pretty fast, some collision types ghost through at the faster speeds, so I need to break up the step to ball radius(x2?) perhaps. Been playing it, trying to make it fun. meh, not bad-ish. Still need to finish up the pipe configuration arrays. It's a play, add/smudge/play routine now with the driving data.
  1. Load more activity
  • 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!