Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Messages - d3x0r

Pages: [1] 2 3 ... 5
Started a 'smarter' / better ... Dual Marching Tetrahedra.  Pass 1 - compute Tetrahedra, which each face results in a point.  Use those points on the faces to make edges of new faces.   It smooths out some of the very pointed artfacting and makes a much smoother result.

Unfortunatly, the multi-texturing becomes a merge of 3-5 (depending on how it's looked at) x 3 vectors each , so I fell back to just downloading the 'element' or 'voxelType' information to the shader... I took the 3d volume and tiled slices on a texture so I can look up in x/y/z of the point what the type is; but this makes very sharp edges between types... there's basically no merging (well, that, and I sort of over-multiply points that should otherwise not count... it's still sort of a work-in progress to get the textures in 'Show Grid' mode to work well).

Also, there's a lot of points on the grid that generate overly small triangles (I could loosen my tolerances and it would probably work better); but I recently added the 'show normals' to show the 'reason' that there are flips in the quads generated....


This needs almost a whole user manual :)

Some important things I should point out - Show Edges - draws the wireframe model; this is sometimes generated as a quad of line segments - so it misses a triangle across; it was assumed that the intersection through 4 edges was flat; it is not.  But! Show Edges allows to show where water is transparent(for instance)

( This needs Multi-pass to render solid, and then transparent/liquid phases; but it's just a simple demo )

The inflation slider, when in a normalized position, allows inflating and deflating the land; which for a landscape game could be applied for solid and liquid phases. (A different game entirely)

But; 1:10, 1:1, 10:1 scaling options are fixed cube position things... making all the computations digital instead of analog... Minimize/Maximize even moreso... My first pass at smooth-ish rendering is sort of like maximized mode - which pushes out edges, and causes some dimpelling... Minimize is a totally opposite effect, making inner corners inset instead of out-set...

Stylistically I like the 1:1 , with edges.

I was going to do a custom index-blackvoxel.html which reduces the terrain texture (except where there is specular light reflection, and a black surface with a grid. )

I did have to scale/bias the grid because on maximized/minimized initially, the planes at 0, 1, 2, 3, etc, are all exactly on one of the axis lines so the whole faces lit up with the grid-glow; I believe this is an improper style... but depending on where you scaled (well the previous message has the grid render - on some of the things you can see the purple sort of over-glow - like on the back of 'terrain' input data with 'outside' enabled (which closes in the bottom, and generates just random data... (random is worst case for input; the functions make nice smooth curves, the scaling 1:1 sort of options normalize randomness... (but really sort of make it a flat plane).

I think instead I can measure the face normal and de-emphasize the axis that the plane is aligned on...  (scale by  1-normal )

Hope you all are well!

Updated a bit; added 'Show Grid' option, which uses a shader to draw rectilinear grid lines :)

Actually, marching cubes, with show grid is actually very rectangular...

General Discussion / Re: School Mode
« on: April 02, 2020, 12:47:11 pm »
Okay great
I'm not sure your notify option is working for everyone; I'm at gmail, and I'm certain I set notify on the message.

I've been toying with smooth meshing for a while, determined to not have to use 'marching cubes'; that surly there's a simpler way.  It's maybe not a 'better' way in all aspects... (pretty pictures included)

(How much TL;DR to include...)
tetrahedra only have 2 mesh modes - 1 point in/out and an edge out which generates a quad that's not constrained  flat.

The example code is JS; and it looks like a lot; the plane mesher (that calculates each shared point only once) is actually simple (perhaps it's because I've been staring at it for dayz).  That is, the first version was long-form expanded with if's; and series of statements; I consolidated those into lookup tables, and 'simplified' the overall required code, at the cost of legibility perhaps?  (Like I never really did understand your face mating tables :) )

This forms a mesh around the points as a center (instead of sort of in-a corner of the cube), which offsets it by (0.5,0.5,0.5); but for things like trees, and other geography would think smoothing would work well, using world-space coodrinates for texture uv-coordinates; was also playing with the ability to 'inflate/deflate' the mesh and realized that meshing water deflated and land inflated would give a very nice transition.

Still requires a pass to stitch sectors together; otherwise data has to be duplicated; can easily do default 'outside' 'inside' by faking 1 render point outside... hmm actually that's just on the stitch line; I should add the stitch pass as another option...

There is certainly a lot of space for square meshes! 

Peace and good health to you!

General Discussion / School Mode
« on: November 01, 2019, 04:11:02 am »
Hello!  Great to see updates from y'all.

School shouldn't be tedious.... Right now, to get to be able to make your first tool... you have to dig, and I'm gussing it's 1.5 seconds(? 2?) per dig block?

( 64 * 3 = 192 ) * 1.5 = 382 seconds... 6 and a half minutes. (9 almost 10 minutes?)

And then I can find greenstone, and be able to return with it to the surface where my machine.

The document says.
'Where can you find it ?
You can find this voxel in the ground into the central blue flat zone.'  And the picture shows it on top of black rock blue... I know it's just showing the same block on the same oroginal blank stage, but... it does sort of imply that it can be over blackrrock blue - and it never is.

So ... I think " it's just another random block like copper, okay I'll keep digging sideways... surely they wouldn't force me to climb up and down all the time... " and dig t alot sideways, so now 30 minutes later and still no greenrock ...

Most voxelish digging games put rock only a little ways below dirt.... 4-8 voxels... because there's an infinite supply of dirt (blackrock blue).

So, optimally that's 6 minutes after the first 5-8 playing with the RTFM and external help; and having the cursor trapped to the game, so I can't click back on the browser... (tough, I know, to own the cursor, but give it up when you don't have it. )  There are lose focus events that you can revert the cursor capture... )

And if I was really new, I'd be sidetracked by copper and iron and other things, and it would really take me a long time to get to green rock; (I mentioned that earlier, it's realistically at LEAST 7 minutes, to make your first tool).

I wanted to learn to program, not spend my time in a clicker.

let me just reiterate, as i was closing this window... I missed the (X) a little...

1) when the game is not in focus, do not setmousepotiion on mouse event.  (background window of the browser, I miss the scroll bar a bit, and my mouse snaps to the other thing, but I was JUST typing in the browser... and then I have to get back to the scrollbar, but if there isn't actually another window over where the mosue moves, it's stuck, until you hit I to get to invenotry (free mouse) or something

2) alt-F4 doesn't work.

3) window isn't resizable by clicking on the frame (if you could somehow get the mouse off the game-focus :) )

So when drilling, if I click and drill, there's a kinda buzzing/grinding sound for the drill.  If I continue to hold the button, that sound stops for the second block.  if I release and click again it re-starts.  (almost shouldn't stop really?)

when holding shift (to run?) the footstep sound stops; and move speed doesn't seem different (if there's supposed to be one)

(Windows 7)

Announcements / Re: Blackvoxel V2.0 is out
« on: April 20, 2017, 10:48:09 am »
Yay! :)
Was just thinking... they said they were going to do a new version 'soon'... I checked a month or so ago and nothing :)  But now....

General Discussion / Re: Voxelarium.js
« on: October 28, 2016, 04:46:48 am »
I did some experimenting with building presorted voxels.... which seem to apply pretty fast.

This was part of the C# work; but basically I made a linear list of the closest points of sectors that are to the [upper/0/lower][left/0/right][forward/0/backward]

I just went through each point(voxel) and figured it's distance from the respective point, and then sorted the resulting indexes; so I could have an ordered list of voxel indexes for transparent things that are outside of 'here' which is the 0/0/0 center point...

And really to be more accurate any sector that is on a 0 needs to be sorted based on the slice of other coordinates... blah I'm over-complicating this.

For 'here' the sort list has to be dynamically computed; there's too many combinations to keep them all pre-set; well maybe sub-sectors could be made that could be pieced back together as 'close enough' ...

so anyway then it's just foreach( index in list ) { mesh voxel[index] based on drawinfo }   instead of just voxel based on offset... this will then add the faces to the draw list in the right order... (and maybe that's kinda what your sorter does; I just kinda wanted to implement it, because when I tried it with a bunch of semi transparent blocks it broke down because of how it serially stepped - without regard to which side the player was from the sector being meshed.

Why don't I get notifications? I end up having to just come back and read? I'm pretty sure I put in my email right?

General Discussion / Evolutionary voxel robots?
« on: October 28, 2016, 04:37:27 am »

I ran across this the other day; and you don't have an off topic, and really hope you don't find this too random :)

General Discussion / Re: Voxelarium.js
« on: October 12, 2016, 10:46:19 am »
I have some updates and news :)

I've been working on WebVR; and 3d controller support.  I have a single sector loaded that I can walk around, and that's kinda satisfying.

I don't really have pictures... and it's somewhat unstable.   I can't use my glow shaader in AltSpace VR (Free Social platform which supports all devices including 2d displays; err your desktop. )

I have it loading there which is almost like WebVR... but entirely not.

still actually working out controls; and I noticed in AltSpace that the controls are still hooked to their game engine, and I need to see if there's a can't default behavior;

and I had to fallback to conventional textures; but 90fps in javascript with lots of room to spare :) 

General Discussion / Re: Hello
« on: September 21, 2016, 04:08:56 am »
Really?  You're saying if I create a set of assets and charge $30 for them, that has anything at all to do with blackvoxel or it's code/resources? 

I disagree entirely.  If all supporting changes to the code is kept open source... but you can also charge for distribution of the sources, if no other methods are available... but even so...
The changes would have to be kept on your own git branch and basically any pull request would be useless to the mainline...

General Discussion / Re: Voxelarium.js
« on: June 05, 2016, 09:05:11 pm »
Need to dig out the how-to-find-face logic... I'm actually finding the cube reference so it replaces instead of adding...

updated demo page; first page takes a few seconds to load now.... could maybe have some optimizations.

the glow effect is bleeding through though... still need to figure out frame buffer targets with depth buffer.  I erased some cubes internally; a consequence of selecting a cube not a face :)   (going to fix that before updating the edit demo page (click 'editor' on first page)   

General Discussion / Re: Voxelarium.js
« on: June 01, 2016, 06:39:37 am »
Just posted for reference; going to start some smaller projects, next one's the editor.  I created like 50 lines with "some server name here"  "player 0/3"  "Ping 333"  and that meshed and rendered quickly.

I want to move away from flat GUI tech; because it's VR/3D unfriendly... and tinkering with that I guess I coudl just voxelize the words and move the camera up/down to get a list...

Need to work on inventory/hotbar stuff for editor... and then browsers don't really have localStorage either so some sort of server to save changed sectors....

I'll fix the demo name before all of that. Kinda soon...

three.js is a good inbetween; it handles meshes, computed min/max volume automatically and keeps objects in a scene so it can do full-sector sort of clipping; each object is one mesh; which is basically a few call lists (solid, transparent and custom) so that fits pretty good...  was even able to leverage some normal map effects etc on the texture in addition to glow... I render the face flat without glow, and render the edges to a glow buffer to apply a blur/extend of the bright edges.  I was trying to get very clever and render to a offscreen render target (like the glow is done), with a depth buffer, so I can clip the depth of the glow (without rendering the faces, the are transparent, so glow lines show up from the back... need to maybe just turn on one sided rendering too (kinda defaults to lazy mode)

Was thinking it might be a neat demo to do an old computer's boot (timex sinclair maybe?) that becomes like the intro level with the text as voxels on a background layer... maybe make it curved the the monitor :)  (probably wouldn't work out well)

Beyond that there's issues to tackle like WebAudio, and physics... Ammo.js is a port of bullet physics for instance (kinda overkill) there's another engine Cannon.js that's really popular, but its default objects are too.. squishy; they behave more like sponges than solid things... there's anther small engine (some 300k) called Oimo which has more rigidity; but also causes shapes to pop more on even small penetrations...   

Not expecting anything from anyone, just posting information; and I know noone does javascript;  Who would do Javascript?  that's a web script kiddy language!  Ya... well, it has evolved over 20 years and is actually more usable than java.   There's Node.JS which is a console-based runner for javascript; it's fairily easy to write hooks to create c++ objects from javascript using Node.JS modules you can just hook native code, which could include opening an SDL window and everything else that is Blackvoxel *shrug*  I wrote some modules that node.js could use to create frames using my library (SACK -

I also write a script language processor called dekware ( )  which was utterly simple; but conceptually can be refit to be native javascript and use javascript as the language with some extensions and instead of being some class of object itself.. I dunno I think I can get the object persistance to work in a distributed platform between multiple clusters of server nodes even but that's a entirely different project :)

General Discussion / Re: Voxelarium.js
« on: May 28, 2016, 12:17:00 pm »


for development Electron is used(required?), so require() works.  (
for building node is required, for browserify...  Browserify does have a -d option to make the output more debug friendly (and chome detects debug information)... (

and Atom for a javascript editor (works OK it's a little ... flaky)

Pages: [1] 2 3 ... 5