• Advertisement


  • Content count

  • Joined

  • Last visited

Community Reputation

1145 Excellent

1 Follower

About Sollum

  • Rank

Personal Information

  • Interests
  1. Thanks lads! Crap, what a lame mistake that was. Fixing it was fast and easy. int i_indiceMod = 10 * i; Vector3 p1 = new Vector3(finalMeshVertexFloatArray[i_indiceMod + 0], finalMeshVertexFloatArray[i_indiceMod + 1], finalMeshVertexFloatArray[i_indiceMod + 2]); Vector3 p2 = new Vector3(finalMeshVertexFloatArray[i_indiceMod + 10], finalMeshVertexFloatArray[i_indiceMod + 11], finalMeshVertexFloatArray[i_indiceMod + 12]); Vector3 p3 = new Vector3(finalMeshVertexFloatArray[i_indiceMod + 20], finalMeshVertexFloatArray[i_indiceMod + 21], finalMeshVertexFloatArray[i_indiceMod + 22]); Everything now seems normal, and both spheres seem to have only marginal difference in surface area. Tho the first one seems to have bigger surface area, but somehow it makes sens to me. Flipped models are also fixed, but there is small 0.000001 error For now I am using "new" operator, since calculations are done only once, whilst loading the models. Latter on ill simply use raw vertice data for calclulations.
  2. Sorry for the late reply. Yes, i though the same, but difference is way way way way way way to big in my opinion. ~5 times bigger surface area from subdividing 2 or 3 times. And the volume itself becomes ~3 times bigger. Different example: Same model, only flipped in 3d modeling tool and loaded as a separate model. Its area and volume differs.
  3. Hello! I have this strange issue with mesh surface area calculation. Surface area increases, if i "subdivide" mesh to be more detailed and add more polygons, even tho the relative size remains the same. Code is rather simple and the formula itself doesn't matter as much as differentiating results based on polygon count. float total_area = 0; int indice_count = finalMeshIndices.length; for (int i = 0; i < indice_count; i += 3) { float area = 0; Vector3 p1 = new Vector3(finalMeshVertexFloatArray[i + 0], finalMeshVertexFloatArray[i + 1], finalMeshVertexFloatArray[i + 2]); Vector3 p2 = new Vector3(finalMeshVertexFloatArray[i + 10], finalMeshVertexFloatArray[i + 11], finalMeshVertexFloatArray[i + 12]); Vector3 p3 = new Vector3(finalMeshVertexFloatArray[i + 20], finalMeshVertexFloatArray[i + 21], finalMeshVertexFloatArray[i + 22]); Vector3 e1 = p2.sub(p1); Vector3 e2 = p3.sub(p1); Vector3 e3 = e1.crs(e2); area = (float) (0.5 * Math.sqrt(e3.x * e3.x + e3.y * e3.y + e3.z * e3.z)); if (Float.isNaN(area)) System.out.println("NaN... The fuck?"); total_area += area; } I think the issue is with float precision, because i have the same issue if i take a model and flip it. Here is visual representation If i take a cube 1,1,1 its area is ~5 If i upscale it 3 times, its area becomes ~19 So it seems that float precision is a culprit here. At least i guess so.
  4. Thanks for all the tips! I found a way how to do stuff with the help of framework i am using, turns out, i had to implement everything into a batch, calling glDrawArrays outside of batch bounds did not produce results i wanted. Anyways, i managed to achieve the result i wanted. Its quite fun tho, to observe android logs and profiler tool. In this test i allocate 7000 float array each frame and rebuild it. GC dump numbers are nice! Edit: It was "strange" experience and kind of counter intuitive for me. I have made 4 2D games and always tried to cache, reuse or preload data as much as I could get away with. And now, I had to dynamically recreate arrays of data, each frame. Are all graphic effects based on that? What if i'd want to make dust particles going from bellow car tires? A blind guess would be to make at least ~10000 3 cordinate vectors, recalculate them each frame, based on movement vector and delta draw time, and then recreate all the buffer data all over? Can mobile phones even handle that? Anyways, here is the result!
  5. Thanks a lot! I will look into "orphaning", but i am afraid that mobile platforms are not that "powerful" for that
  6. I was experimenting with trails and tried to use GL Immediate Mode. I haven't figured out fully framework i am using. I was thinking of storing quads in one model, but whenever it is created, everything is stored in meshes, that are stored in VBO's. Each mesh is a different draw call. If model has 5 meshes, it will be 5 calls and so on. I could try updating existing VBO with new vertices (based on documentation, it has that option https://libgdx.badlogicgames.com/nightlies/docs/api/com/badlogic/gdx/graphics/glutils/VertexBufferObject.html#updateVertices-int-float:A-int-int-), but wouldn't it be expensive and taxing to interact with VRAM after data loading is finished? Sorry, my thinking and questions might sound dumb, but i am used to storing everything in VRAM at the load time and using GPU later on for drawing. It seems like a taxing action to recreate/adjust VBO's on the go. Thanks for all the tips!
  7. Hello! I am experimenting with 3d and using LibGDX platform. I want to do "engine trail" effect in 3d space. Well, a more simple version would be simple lines. Tried with GL Immediate Mode and it looked nice, but the problem is the amount of draw calls! It was around 150 calls to draw pretty curved line. One line. And the solutions of itself isn't valid, because i have to create different model instances, and transform them separately to make a curved line in order to draw in a proper model batch. Is there any spreadsheet or information on what is considered "normal" amount of draw calls for a mobile/desktop game? It seems that most 3d effects take up a lot of resources, but i have no idea to benchmark what is normal and what is a no no. Example of what i am trying to achieve.
  8. Looking for tips in 3D

    Hello! Thanks for the tips! Meditating on some tasks is actually useful and knowing hardware and "software" limitations is good, experimenting allows you to avoid future pitfalls. Also I want it to be fun learning process.
  9. Hello, http://www.ogsoundfx.com link is broken, redirects to http://www.ogsoundfx/
  10. Looking for tips in 3D

    Thanks for responses! Happily learning 3D stuff! Currently learning stuff about FBO, trying it out on my 2D game, for some fancy projectile effects. Took me quite a while to get into Models and Animations on framework of my choice (LibGDX), as Wings 3D has no rigging, so i had to figure out how to manually create animations in code (later on can be scripted). Not planning on creating GTA 7 or something Decided to try out "space" theme, as there wont be as much issue with "walking on ground uphill". Turns out, there are lots of guides how to achieve "frustum culling" on models with ease, so i wont have to care for BSP trees for now. But one thing buggers me - How to cull invisible faces? Thing that comes to my mind is using geometry shader to check each face if its "front" center is hit by ray? I use low poly models, up too 1500 max.
  11. Looking for tips in 3D

    Hello! Thanks for all of your responses! My primary interest in Doom is its editors. Editorial software should build maps with "compiled" BSP trees, so I could skip creation of those tools myself. I am acustomed to Wings 3D, since its basic model builder. I had done some basic 3D stuff before, but movement was limited to 2D cordinate system. I have no idea how to handle movement uphil or all the colision detection (my first guess is to split terains into smaller patches, to reduce collision detection). How to know that your character is moving uphill just from model?
  12. Hello! I was thinking about trying out 3D game development. Done some research. Figgured out its more demanding that it looks. So my initial thoughts where to try cloning existing games to some extent. Doom (1993) or Q2. I was thinking of using some existing world editors to build BSP maps so i could render the world quite efficiently. And then the only thing left - to code map loader and render it in Java. Any thoughts on this endeavor or tips? P.S. Doom may not be 3D, but its still interesting to try out.
  13. Hello, I have this habit of storing art i like, for later references. Even facebook games can offer some good art, issue is - its hard to store it. Print Screens and tons of saving does the job, but its quite a nuisance if game updates its art quite often. So i wonder, if anyone else does it and what tools are you using? And if its even possible to get art assets out of facebook game. I managed to get *.swf through browser, but its a mess inside if i open it with 7z, I am not entirely sure its a proper topic for Beginners forum, but i have no idea where to post else. Also i think its not illegal to do so and its not like i am stealing art.
  14. Hmmm, still a bit confused. Maybe its because i've stayed in 2D way to long.   I've used LWJGL, LibGDX and OpenTK for 3D before. You place vertices into memory, get the handle, draw the model, change lightning when needed, load vertice and fragment shaders. LibGDX even allows programatical mesh adjustment, building and moving mesh parts around. Issues usually come with stuff like "3d picking". Thanks guys! I will look into your examples and those terms like "post-processing-pipeline", maybe everything will become clear. Maybe there are some 2D "graphical engines" you know of? I will let it sink into me for a while.
  • Advertisement