Jump to content

  • Log In with Google      Sign In   
  • Create Account

lawnjelly

Member Since 20 Mar 2012
Offline Last Active Yesterday, 09:54 AM

Posts I've Made

In Topic: Interpolating 2D data

09 July 2016 - 09:05 AM

Three come to mind:
* Kriging: This is a complicated technique, but it gives very good results. I don't know if there is a readily available library implementation you can use.
* Natural neighbor interpolation.
* Constrained optimization using a quadratic penalty for difference between neighbors. I am sure this is not an original idea of mine, but I can't find a reference to it. You try to find the 4096x4096 array that agrees with your data at all the given points and that minimizes the sum of squares of differences between neighboring entries.

You can find a longer list of methods on Wikipedia.

 

Krigling I think I got lost with the maths (reading maths is not my strong point lol  :D )..

The natural neighbour is a good idea, I might give that a whirl at some point. I think I already have written code for doing voronoi / dirichlet tesselation stuff.

 

The third idea about minimizing differences is something I've dabbled with for this too, in various guises.

 

Ok enough with the lack of bias, some of the things I can remember trying:

 

  1. Weighted averages, weighting the influence of each data point by distance. Either taking into account all the data points or have some kind of cutoff distance. I think I ended up using this last time I faced the problem.
  2. Triangulating the points. Ugly.
  3. Cellular automata type approaches. I think these might be ultimately the best but I had real problems coming up with good rules.

 

The cellular automata methods I tried were things like having discrete amount in each cell, then redistributing according to the neighbour amounts (like water flow). And also something similar but like a spring system, like FEM physics models (I think?). This is probably similar to your third method.

 

I do fancy the iterative cellular technique best if I could get it working well. It also has the advantage that has no significant extra cost for each data point, as you only need to 'seed' it. So the cost would just be related to the size of the grid.


In Topic: W(h)ats with the Watts?

05 July 2016 - 08:27 AM

My NetTop power brick is pushing out a mean 65 watts, total. :wub:

 

Granted, it's not the most powerful for playing games, but I think the move to low power / quiet computers is great .. I made the switch from 'fastest ultra overclocked super dooper' (with accompanying fans sounding like an aircraft) to low power about 15 years ago, and haven't looked back. I now prefer to develop on low powered PCs, as they help you get really good at optimizing .. in terms of your code at runtime, startup, and also compilation.

 

I find having a high end PC encourages sloppiness and massive hardware requirements for your software. :o  And you just can't beat the sound of silence. Fanless is the best.  :D


In Topic: Preparing a 3d game as a demo for my CV.

03 July 2016 - 01:11 AM

braindigitalis, collada supports animation, too. The problem is that I don't know how to load it into OpenGL.

lawnjelly, I already have the animation data from Blender, i have the file, I just don't have any idea how to parse it.

 

And I cant use vertex tweening, I need to use skeletal animation, because this is how I make my animations in Blender.

'Having a file' means nothing *unless* you can parse it. A quick google of collada suggests it may be overly difficult to parse.

http://codeflow.org/entries/2011/nov/18/parsing-3d-file-formats/#collada-the-xml-format-from-hell

 

Hint: Skeletal animation is often used to create the data for vertex tweening.


In Topic: Preparing a 3d game as a demo for my CV.

02 July 2016 - 11:00 AM

But to load it into OpenGL, it is really above my skill level. I didn't find any code on the internet that loads collada files into opengl. I can't find sufficient info on the internet about skeletal animation and how exactly everything works, there are just a few articles that touch the subject on the surface, but nothing more.( or I'm just stupid)

 

To state the obvious but the one of the best ways to increase your skill level is to try new things out. Programming is all about this. :D

 

Think about things logically:

  1. Are you being realistic about what you can achieve in the time frames? If yes...
  2. You need animation data from blender. Either you need to parse some 3rd party format, or export the data into your own format. Have a look at the source code for blender python addons for exporting. It isn't a great stretch to learn some basic python (which is icky!) and export what you need.
  3. Consider what kind of animation you want. If you are starting out, I'd recommend starting just exporting 'vertex tweening animation', which means just export the position of each vertex on each frame, rather than the bones / skinning stuff. Vertex tweening is much easier to get working, and is not too daunting a task to write a shader for in the game.

 

Getting bones animation working is usually the final solution used for character animation, but is quite tricky / finicky to debug, and not something I'd recommend until you understand tweening. Tweening can of course be used for character animation too, and was used in many games back in the day (quake 3 etc), it just has some drawbacks such as memory use and lack of flexibility for animation blending.


In Topic: Artefacts in triangle mesh

20 June 2016 - 12:51 PM

Ok with a .obj I could finally load it in blender to see what was going on.

 

Here is the before pic:

Attached File  before.png   17.99KB   1 downloads

 

 

Here, I cutaway all the polys around the smoothing group of interest. This was the diagnostic test I suggested earlier. It cures the problem. This suggests it is because of shared vertex normals between faces across the blade. :)

Attached File  cut.png   8.86KB   0 downloads

 

 

Solution, in blender, along with make sharp (which you already have done successfully), was to add an edge split modifier, set to split edges on the 'sharp' marked edges. This forces the geometry to be split, so there is more than one vertex normal along the edge. Thus the vertex normal can be closer to the face and doesn't have to approximate between 2 wildly different faces with different face normals:

Attached File  edgesplit.png   14.97KB   0 downloads

 

I'm sure there must be some setting you need to make in Max to get the smoothing group to 'do its thing' (I am not a 3d studio user), because it doesn't seem to be.

 

And here is a more clear explanation, I've set blender to show vertex normals. Here is the original file. The normals at the side of the blade are *shared* between faces pointing in opposite directions, so it just averages, which makes it look icky on a sharp edge.

Attached File  beforesplit.png   40.95KB   0 downloads

 

This is after the edge split, which splits the geometry so there is a separate vertex normal for each face on the edge. Notice how the normal now points more towards the face, so you get the sharp edge you are looking for.

Attached File  splitnormals.png   18.59KB   0 downloads


PARTNERS