Jump to content

  • Log In with Google      Sign In   
  • Create Account


Member Since 26 Jul 2005
Offline Last Active Oct 25 2012 10:07 AM

Posts I've Made

In Topic: Virtual Shadow Depth Cube Textures

14 March 2012 - 08:00 AM

This isn't a standard cube map.

My cube faces are all on a single texture that's subdivided into an NxM grid. For each light, I render depth/shadow data to a viewport/cell on the grid instead of a unique FBO per face. This saves me FBO changes, texture units, and allows me to render multiple lights and shadows per pass.

CLAMP_TO_EDGE won't work with the subdivided texture because not all edges are on the texture's border.

Clamping UVs in the fragment shader, to not cross cell boundaries, behaves as I'd expect it to but doesn't fix the outline.

In Topic: (Solved) Max Exporter for mesh, materials, skeleton, weighting, and animation

13 July 2006 - 05:54 AM

I successfully got Ogre and MD5 mesh and animation data exporting from MAX, rendering and animating with the same code. Collada and MS3D will come next.

In Topic: (Solved) Skinning MD5mesh/anims in D3D with standard indexed vertex blending

13 July 2006 - 05:46 AM

After I got OGRE XML working, I went back to MD5 to attempt to convert it to a useable format (my normal mesh format) for standard skinning.

1) The first problem was caused by not resettingg my model's/skin's transform after scaling it down in MAX. That really only affected Ogre XML because the MD5 exporter ignored scale altogether.

2) After the data was correct, I made sure the MD5 still worked using the MD5 format's assumed method of rendering. That requires building the acttual mesh for the current frame on the CPU and passing it to the normal, static mesh rendering pipeline. Some people managed to do it GPU side but it wouldn't leave room for other effects.

The advantages of building an intermediate mesh are that it doesn't have to be skinned per draw call, your bone count per vertex is limitless, and it can be used for other things like triangle soup collision. It's essentially the same as vertex tweening with less data.

Normal GPU and CPU skinning are much cheaper, don't require custom code, and don't require dealing with so much data. GPU skinning is cheapest in all cases, whether by API or shader. That's good enough reason to convert.

3) Build the base mesh as normal, transforming and combining weights by they're joints to make the meshes vertices.

4) The joints for the MD5Mesh base skeleton (bind pose) are already transformed by their parents. They need to be concatenated with the inverse of their parent joint to match the rest of the data. This is if your system builds the inverse bind matrices instead of taking them directly.

5) Create the inverse bind matrices per bone from the step above. Only transform by these when providing matrices to the renderer.

6) Normalizing the weight values was the correct solution to chopping off too many weights per vertex.

7) There was a minor vertex twitch in one spot after removing some weights. So, limiting the bone count per vertex to 4 in MAX on the skin modifier worked best.

Then it was all henshin a gogo baby.

In Topic: (Solved) Ogre Exporter for animation in non-Ogre projects?

13 July 2006 - 04:41 AM

I got everything working perfectly. It took a while for my brain to consider and ssarch that Ogre stores skeletal animation keyframes as deltas from the base pose instead of the actual pose for that frame. I just converted the deltas to whole transforms and fed those to my animation system.

When drawing just the skeleton, it also wasn't registering (what I get for staying up late) that I should only transform by the base pose's inverse for rendering purpose.

After that, and some minor tweaks, it all worked as far as Ogre XML (which is only meant to be intermediate to get things working) was concerned.

In Topic: Suitable 3D Format

12 July 2006 - 05:57 AM

They all have limitations.

MD5 is good but requires a unique mesh format and software skinning, AFAIK.

OGRE XML is good and straight forward even though I'm having issues applying animations to it in my own code.

ASE supports vertex tweening animation.

Others recommend COLLADA, which does EVERYTHING. But because it does so much there's even more to wade through.

X text files are useable if you can parse them.