3D Tool – web based 3D model viewer

Let me present you 3D Tool, web-based model viewer with a simple renderer I made during this summer. It has basic functionality and can deal with several basic 3D formats. 3DTool.ivank.net.

After loading 3D models, the random color is attached to each part of the model. It can be rendered using Path Tracing as a diffuse material. The light is provided by environment map.

You can simply dran and drop a model into browser window, it will be parsed, HDR tree will be built (it may take a while ...) and model will be added to the list. You can add environment maps (in .HDR format) in the same way.

Used JS libraries

  • IvanK.js - my library for accelerated graphics in the browser
  • K3D.js - my library for parsing and editing 3D meshes
  • RT.js - my library with very fast KD trees (not public)

The purpose of this project

I can not see any purpose of this project right now. Some people may use it as a simple model viewer, if they don't have any better software on their current PC (or mac, or phone, or tablet). It can be extended into a 3D model editor (but there already exist many good web-based editors) or into professional 3D renderer (but currently JS is slow, so I will wait until WebCL becomes supported in browsers).

Rendered images

The images below were rendered in a browser on my laptop in about 5 minutes.

Old comments (closed because of spam)


  1. Andy said:

    Nice, do you bake the lighting as a texture for interact viewing? This would be a nice feature – and to be able to export the textures afterwards too – of course you would need to u/v map the models (or use some sort of octree for unparameterised texturing and lookup in the pixel shader).

    December 30th, 2013
  2. Ivan Kuckir said:

    Thanks :) I was thinking about “baking” textures too, at least producing occlusion maps. I needed them for my game. But how to nicely “unwrap” a surface 3D model into a plane for texture? I saw some scientific articles about that and gave it up …

    December 30th, 2013
  3. Andy said:

    Yeh, I hate u/v mapping – there are two texturing techniques that stand out that don’t require you to unwrap your models – nVidias octree texturing (http://http.developer.nvidia.com/GPUGems2/gpugems2_chapter37.html) and Disney’s pTex (http://ptex.us/).

    Or you could just drop the polygons entirely and ray cast the whole scene in a sparse voxel octree ;)

    December 30th, 2013
  4. Andrew said:

    I would like to help alter your 3d tools if you could release the source. I would like to do the following:

    - fix the perspectives between webgl and path tracing
    - support interpolating vertex normals with the path tracing to give pseudo-smooth surfaces
    - octree-based texturing for baking lighting into the webgl mesh so lighting is displayed in webgl
    - add bilinear/bicubic sampling to the skybox for path tracing
    - add oculus rift support

    This would only work with completely diffuse materials, as per your demo, but reflection/refraction could be estimated in shaders using the lighting in the octree later. I am thinking that the octree would be offline and a texture is created from it on the fly at runtime based on the octree coords produced by a shader.

    January 21st, 2014
  5. Ivan Kuckir said:

    Hey Andrew!

    Thank you for your offer. I am usually publishing my code as small open-source libraries (K3D.js, Ivank.js). 3DTool is just an example of usage of these libraries.

    It would be better, if you put all your code into a library too, with some easy interface and a simple documentation. Then I can use that library in 3DTool and mention you as the second author. This way, you won’t have to read my code (which is ugly) and you can use your own style of programming.

    January 21st, 2014