Jump to content

Josh

Staff
  • Posts

    23,353
  • Joined

  • Last visited

Everything posted by Josh

  1. No, unless you import the rigs of rods library, which is what that is using.
  2. Tessellation shaders aren't really that hard to add, but they require an OpenGL 4 context.
  3. Example material file: texture0="abstract::crawler.dds" texture1="abstract::crawlerdot3.dds" shader="abstract::mesh_bumpmap_skin.vert","abstract::mesh_diffuse_bumpmap_specular.frag" shadowshader="abstract::mesh_shadow_skin.vert"
  4. http://www.leadwerks.com/werkspace/page/Documentation/le2/_/tutorials/introduction-to-animation-r474
  5. Everyone, feel free to use that image as frequently as is necessary.
  6. The materials should use the mesh animation shader. This will give you fast vertex skinning on the GPU.
  7. The controller does not use the physics simulator. It has a simplified system to control things in an unrealistic way that is better for gameplay. The problem is adding torque to force something upright will always have unintended effects that are felt elsewhere, like when standing on ramps.
  8. There's a function to calculate the omega (angular velocity) needed to move a body to a specific rotation. Use this and multiply it by the mass to get the torque (angular force) you need.
  9. http://www.leadwerks.com/werkspace/page/tutorials/_/programming/transparency-and-refraction-r10
  10. If you have a particular file that is problematic, please post it in the bug report forum.
  11. The command set is very similar, but I would not expect code to compile with no changes.
  12. Yes, I would like it please, but it needs to use OpenGL 2.1.
  13. This is what the code block does: --This function will be called once when the program starts function App:Start() --Set the application title self.title="Darkness Awaits" --Create settings table and add defaults self.settings={} self.settings.vsync=true --Load the user's settings self:LoadSettings() --Create a window self.window=Window:Create(self.title,0,0,1024,768,Window.Titlebar) --Create the graphics context self.context=Context:Create(self.window,0) if self.context==nil then return false end --Create a world self.world=World:Create() --Create a camera self.camera = Camera:Create() self.camera:SetPosition(0,5,-10) --Load a test scene Scene:Load("Scenes\\trash.scene") return true end
  14. FreeGlut would work too, I just need something that will create a window and OpenGL context without scaring them with too much code.
  15. Does anyone have a visual studio project that creates a window and initializes an OpenGL context with SDL? I am teaching a single class in OpenGL and this would save me a lot of time, if anyone has it already. Thanks.
  16. It has soft bodies, destruction, and scaling now, so I am pretty happy.
  17. You should be able to change settings on the fly. If you can't it's a bug.
  18. Josh

    A tale of optimization

    You wont be using this with 50 high poly characters, but it runs on everything. The opengl4 renderer will use gpu skinning.
  19. I'm really shocked by how fast C++ can be. iOS and Android do not support GPU skinning, so I had to implement vertex-weighted skinning on the CPU. It took about a day to get running, and then I started optimizing code. My test case was an 8400 polygon model. Each vertex could be attached to as many as four bones, but most just used two or three bones. To make it more interesting, I put the vertex weighting code inside a loop so it would be performed ten times instead of once. When I started, the process took 23 milliseconds. I replace OO math code with procedural (including some inline functions), reduce the number of dynamically allocated objects, and make looping code as small as possible. One interesting thing I did was merging four float variables in a loop into a single float array. Instead of resetting each variable to 0 in each iteration of the loop, I did a single memcpy() from an array of zeroes I created just for this purpose. Before: position[0]=0; position[1]=0; position[2]=0; sumweights=0; After: memcpy(position,nullarray,16); This actually resulted in a very big speed increase! The Result By the time I was done, my stress test was executing in 4-5 milliseconds. The program now renders an 8400 skinned model at 1000 FPS, which I thought was impossible with CPU skinning. We're still going to implement GPU skinning in our high-end PC renderer, but the CPU skinning will be good for mobile devices and older hardware.
  20. Josh

    Hello, Crawler

    1000 FPS now in my test.
  21. Josh

    Hello, Crawler

    Okay, so with 8400 polys and four bones per vertex, the crawler model skins in 0-1 milliseconds. That's plenty fast.
  22. Josh

    Hello, Crawler

    Lol, I got it down to 4-5 msecs. C++ is fun to optimize.
  23. Josh

    Hello, Crawler

    I got animation working and now I am optimizing. The weighting uses a single mat4 * vec3 operation. I'm optimizing now, and I've got an 8400 poly mesh weighting 10 times in 9 milliseconds, which is faster than I expected.
  24. I decided to make the section more focused. "Articles" is too broad and it's getting ignored right now. When someone sees "Tutorials" at least they know what it's for.
  25. Josh

    Hello, Crawler

    Animation and skinning don't have to go together. You should only use skinning for organic shapes that need it.
×
×
  • Create New...