Jump to content

  • Log In with Google      Sign In   
  • Create Account


Member Since 21 Nov 2005
Offline Last Active Aug 07 2015 07:35 AM

Posts I've Made

In Topic: About skeletal animation (retargeting and other stuff)

23 July 2015 - 10:03 AM

Buckeye, very useful post, it helped me understand better the transformations.

However my joints are not represented just as translations from the parent (sadly...). The joints are represented as a rotation + translation pair, which is one of the reason everything was so confusing.

I tried finding a way to eliminate the rotation and keep only translations, by trying to apply a inverted rotation to the animation dat, but I had no sucess, I'm doing something wrong.


Ashaman73, I actually need it because I want to automatize targeting more than 300 models (which all have skeletons with same hierarchy, but different joint positions), along with being able to do some other cool stuff at run time (eg: create characters procedurally by patching together different body parts).


And I don't think it is that much difficult if the skeletons have the exactly same hierarchy. For example the devs from Overgrowth did it, also jMonkey engine supports this and the code is open source, I've checked it, and it is not more than 300 lines of code (altough the code uses some naming conventions for matrices that completly confuse me).


Check this link for a example of what I want to do:


In Topic: Question about Frac() in GLSL shader

07 May 2015 - 07:48 AM

I'm not sure I understand what you're trying to say, you're talking about sampling the textures, and the calculation of the UVs comes before that.


If I pass a quad to OpenGL with top left corner with UVs (0, 0) and bottom right (1.0, 1.0) those are the exact values that reach the fragment shader.


Doing just frac() on those UVs will return 0.0 to all of them and only then I sample the textures using tex2D(), so the values will be all wrong.

In Topic: Question about Frac() in GLSL shader

06 May 2015 - 11:02 AM

Just ran that formula through a couple values in my head, seems to work, yes, thanks, I'll confirm it later when I'm home :)

In Topic: Question about Frac() in GLSL shader

06 May 2015 - 09:35 AM

The problem is that I dont have have a specific N value. I'm trying to implement a scheme to allow virtualization of textures, meaning the models will come with UVs with a generic range, some will have 0..1 UVs, others use larger values for wrapping textures.

What I'm trying to do is automatically pack tons of small textures into a huge texture, so I can draw everything in a single draw.

So in the vertex shader I will convert the UVs from the original range to the UV that corresponds to the sub rect in the generated texture atlas.


In this case the texture atlas will be updated with some frequency, as I'm trying to do some texture streaming, so I can't just generate the atlas once and update the uvs in the cpu.


Your suggestion could work, but I'm afraid it will introduce texture sampling errors.

In Topic: Keeping camera inside map bounds

25 July 2014 - 02:57 PM

Create a bounding box smaller than the level, and constrain the camera to never move outside of that?



The camera is defined by two things, position and view direction.

Constraining the position to a box is trivial, sure, but the problem is constraining the view direction so the limits of the map are never visible.


My camera view direction vector can have any value except having the Y component pointing up (to the sky).

So I'm interested in knowing what kind of math could be used in this case.