Demo: Green Dragon

Articles with the tag: OpenGL

CharSim: release and summary

System architecture for version 001

What I planned in the spec is now complete and ready for release. The GLSL shaders now work at version level 120 (compatible with OpenGL 2.2) in order to support older graphics cards.

What has been the point of the project?

  • Am familiarised with 3D APIs and shaders.
  • Have explored and incorporated third-party libraries.
  • Learn and apply knowledge of mathematics and algorithms for a technical animation framework and basic game engine.
  • Handle debugging using exception handling and gdb.
  • Designed an object-oriented framework model.
  • Used C++ standard library tools (smart pointers to automatically refcount resource objects, lambda functions and their relation to STL algorithms, vectors, lists, maps, iterators).
  • Explored C++ design patterns (abstract classes used as interfaces, compositing and inheritance patterns).
  • Have worked with the distributed version control system Git for revisions and distribution.

Of course there are many features I still want to explore ...

Read More »

Texturing: OpenGL Vertex attributes limitation

It's a start, but why are the seams visible? Those seams are where the UV sections seperate, but they render fine in Blender.

I think the problem is that the UV map island edge vertices are actually the same vertices, so they are traversing the no-man's-land between islands and creating the warped texturing at the seams. It shouldn't be doing that, but it's doing some weird interpolation between the islands.

UV texture islands

Possible solutions:

Try: shrinking mesh islands - no Try: finding that weird border delta glsl thing

last ditch: colour the area between islands GREEN so the seams don't look as bad...

...which won't work, because it's going over the other islands.

[16/06/14 11:22]

Possible solution: Multitexturing. Each island can be given its own texture of the same size but with an alpha channel, so no cross-blending can take ...

Read More »

Model File Format (JSON)

It would appear that the Three.js Blender exporter exports indexed vertices. Wonderful.

Three.js JSON Model format 3 output format best for the demo:

40 = 00101000

40: [vert, vert, vert], [uv, uv, uv], [norm, norm, norm]

Why are there three UV coordinates when UV coordinates are a 2D basis by definition? It's called UVW coordinates and it's a depth value. Blender doesn't appear to export the W value, so it can be ignored.

OpenGL can't handle a separate index for vertices, uvs and normals, so a custom indexing algorithm must be made.

Could use Python to convert JSON into OpenGL-parsable data. It's much nicer to work with for text processing.

Read More »

Starting work on the demo framework

Setting up GL pipeline and framebuffer loop. Looking at CUDA implementation to see how it achieves the looping framebuffer with FreeGLUT.

OGL 3/4 discourages matrix operations as part of the library. I must look at my Direct3D 11 implementation to see if I implemented my own matrices there.

It would appear it uses a lot of matrix manipulating code in the XM* library. XMMATRIX, etc. GLM, the shaderesque maths library, should be useful.

It looks like animation is really hard to import. Might be working on those CUDA spheres after all, and Bal will stay in Blender.

...unless I want to write an animated mesh exporter for Blender, and a C++ importer.

Read More »

Platform decisions

OpenGL viewing pipeline

Why did I decide to do it in Linux as opposed to VS2010? CUDA+GL should be fine in VS. Is it desirable...

Read More »

Early ideas (part 1)

CUDA-based illumination

A hybrid renderer would be best for maximum speed, i.e. OpenGL rasterisation with deferred rendering for photon mapping (for example) and specular phenomena.

Must look at:

  • How CUDA interprets OpenGL vertices and how they can be mapped with a texture.
  • How is normal vector interpolation achieved for GLSL/HLSL phong shading? It must be the same as the CUDA version.

Read More »

Page 1 / 2 Older »