Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8423211
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T03:39:55+00:00 2026-06-10T03:39:55+00:00

I would like to render an animated voxel scene using WebGL and Three.js, for

  • 0

I would like to render an animated voxel scene using WebGL and Three.js,
for a hobby project (to visualize live point cloud data from a server-side stream).

the scene is not very huge – it should be around 128*128*128 voxels (2 millions points).

So I suppose I could just load a big static file containing all voxels data, then incrementally add or delete individual voxels, depending on events in a stream from a server.

However after seeing this demo (which is not based on a volume (with “inner” details) but a simpler “XY coordinates + elevation + time” model) :

webgl kinect demo

I am wondering:

Could I use the same things (video, textures, shaders..) to render my voxel animations? How would you implement this?

I don’t have that much “hobby time” so I prefer to ask out before 🙂 For the moment I am thinking about loading many videos, for each layer of the voxel model.

But I’m not sure that three.js will like it. On the other hand, voxels are always big memory consumers so maybe I don’t have a lot of choices..

Thank you


Update 1:

I do not need, indeed, real-time visualization of the data.
I could just poll the server once in a while (downloading a new snapshot as soon as the previous has been loaded on the GPU)!


Update 2:

Each voxel has a material attached to it (the “color”)

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-10T03:39:56+00:00Added an answer on June 10, 2026 at 3:39 am

    There’re so many ways to go about this, but I’ll suggest the following…

    As it’s pretty much down to writing one single shader, I’d choose [GLOW][1] in favor of Three.js but that’s entirely up to you – both will work, I think, but I think GLOW will turn out cleaner. (Actually, not sure Three.js supports drawArrays, which is more or less necessary in my suggestion. Read on.)

    For data I’d use 4 images (PNG as it’s lossless) that is…

    • 128×128 pixels
    • Each pixel has (RGBA) 4×8=32 bits
    • Each bit represents a voxel
    • You need 128/32=4 128×128 images to represent 128x128x128

    You simply make one shader which you, between draw calls, switch texture and move a position (which is added to the vertex) up/down.

    There are a couple of ways to go about creating the vertices for the voxel boxes. There’s one straight forward method: you create vertex/normal attributes for each voxel box, and a parallell attribute with UVs+bit (basically a 3D UV-coordinate, if you like) to sample the right bit. This will be huge, memory wise, but probably quite fast.

    On less straight forward method: Possibly you could survive with just the 3D UV-coordinate attribute plus some kind of vertex index (stored in .w in a vec4 attribute), and in the vertex shader calculate a vertex/normals on the fly. I leave it there, cause it’s so much explaining and you can probably figure it out yourself 😉

    The shader will require vertex textures, as you need to sample the textures described above in the vertex shader. Most computers support this, but not all, unfortunately.

    If the bit is set, you simply project the vertex as you normally do. If it’s not set, you place it behind the near clipping plane and WebGL pipeline will remove it for you.

    Note that bit operations in WebGL is more or less a pain (shift/and/or aren’t available) and you should avoid using ints as these aren’t supported on some Mac drivers. I’ve successfully done it before, so it’s very doable.

    …something like that might work ;D

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm using Java3D to render a three-dimensional scene. I would like to overlay a
I would like to re-render a list made using Marionette.ItemView when the corresponding model
I would like to render an ember.js view using either raphael.js or d3.js .
I have a rails site and I would like to render the live site
My server is in Central Time. I would like to render timestamps using Eastern
I would like to render project documentation in html from a lighweight markup language
I would like to render a image by using the webapi so that i
I would like to render individual HTML elements into PNGs using Phantom.JS. Does anyone
I would like to render a complex type, using the JSON render method in
I would like to render a list of HTML links in ASP.NET MVC. Note

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.