Page 1 of 3

VoxelShop (Voxel-Editor)

PostPosted: Tue Feb 11, 2014 15:02
by flux
Hello artsy people!

Over the last years I have written a voxel editor called VoxelShop in my free time. Features are still being added, but there is already a lot you can do!

Image
(click here for more info)

Looking forward to seeing your creations and your feedback! I'm very confident this is something you'll love!

Thank you!
flux

Edit: For updates you can follow me on twitter @whiteflux.

PostPosted: Tue Feb 11, 2014 15:57
by Pitriss
i think this topic should be moved to "Minetest-related projects" or "offtopic" because it is not minetest mod.

PostPosted: Tue Feb 11, 2014 15:59
by hoodedice
Pitriss wrote:i think this topic should be moved to "Minetest-related projects" or "offtopic" because it is not minetest mod.


Yes, this belongs in related projects.

@flux: It looks really promising! Great work!

PostPosted: Tue Feb 11, 2014 16:13
by flux
Thanks @ hoodedice!

And sorry about posting in the wrong section, I was confused about which one to post it in.

PostPosted: Tue Feb 11, 2014 16:19
by Inocudom
If you can find a way for this program to be used for making nodebox models (or if somebody can write the needed plugin,) then this program will be extremely useful for the Minetest community.

Yes, this program does look very promising.

PostPosted: Tue Feb 11, 2014 16:22
by flux
Thank you!

I'm currently investigating formats and planning to add more (since this is something the program is lacking). If you could point me to a resource that discusses nodebox models that would be very much appreciated!

PostPosted: Tue Feb 11, 2014 16:49
by webdesigner97
Here, this should help you: Lua API.

Edit: I downloaded it and saw it needs Java :/ Hmmm, I'm thinking about installing Java just to try this out...

PostPosted: Tue Feb 11, 2014 17:34
by rubenwardy
Nice! I like it!

PostPosted: Tue Feb 11, 2014 17:42
by flux
@webdesigner97 Could you explain a bit what nodes are? I found water, air, liquid, etc, but how do you differentiate between different types of terrain? From what I understand it's basically what is loaded into the engine?

Yeah, it required java. I've chosen Java since I wanted the program to be compatible with all major OS (Linux, Mac, Windows).
I thought Java was pretty much standard on all desktop machines these days. And I was wrong =)

PostPosted: Tue Feb 11, 2014 18:21
by webdesigner97
Nodes are the cubic blocks in Minetest: solids, liquids and even air. All of them are registered as nodes (not sure for air, though). Nodeboxes are applied to nodes if wanted and define nodes with special shapes, e.g. stairs.

PostPosted: Tue Feb 11, 2014 18:47
by rubenwardy
webdesigner97 wrote:Nodes are the cubic blocks in Minetest: solids, liquids and even air. All of them are registered as nodes (not sure for air, though). Nodeboxes are applied to nodes if wanted and define nodes with special shapes, e.g. stairs.


Air is too.

https://github.com/minetest/minetest/blob/master/builtin/misc_register.lua#L279

PostPosted: Tue Feb 11, 2014 19:30
by aldobr
flux, does it compile using gcj ?

PostPosted: Tue Feb 11, 2014 20:10
by flux
Uhm, don't know. I think it might have problems with the spring framework that I'm using.

Why do you need to know?

PostPosted: Tue Feb 11, 2014 21:53
by hoodedice
flux: Does it not work with the openjre that ships with ubuntu by default?

PostPosted: Tue Feb 11, 2014 21:57
by flux
No, have a look at the readme. It says

LINUX ADVICE
============

You need to be using the oracle java version. You can
install it as follows:
sudo add-apt-repository ppa:webupd8team/java
sudo apt-get update
sudo apt-get install oracle-java7-installer
Similar to MAC you will need to change the permission
of the start.cmd file before you can execute it.

PostPosted: Tue Feb 11, 2014 22:05
by Calinou
It would be nice to have a release of the source code under a free license, this way other people could improve it.

PostPosted: Wed Feb 12, 2014 08:22
by flux
Yeah, releasing the source code was something I was thinking about already. There are some pros and cons though. What I do have is a fail-save already. So if something happens to me the project will go open source.

PostPosted: Wed Feb 12, 2014 13:43
by MrElmux
Nice to have voxel based model editor for a voxel game

PostPosted: Sun Feb 16, 2014 14:04
by flux
Could someone please provide me with some nodebox sample files and a quick explanation?

PostPosted: Sun Feb 16, 2014 15:12
by rubenwardy
A nodebox is a cub(e / oid) that is not rotated. It is defined by two points (eg: top left, bottom right)

Simple example:
Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
Code: Select all
{-0.5,-0.5,-0.5,0.5,0.5,0.5},  -- one box
{-0.5,-0.5,-0.5,0.5,0.5,0.5}, -- another box
{-0.5,-0.5,-0.5,0.5,0.5,0.5} -- another box


Node box coordinates go from -0.5 to 0.5, because the center of a node (block) is 0,0,0

Each row is

Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
Code: Select all
{ x1, y1, z1, x2, y2, z2 }


Where 1 is one corner, and 2 is the other corner, diagonally.

Here is an example of it in practice:

Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
Code: Select all
minetest.register_node("3dforniture:table",{
    description = 'Table',
    tiles = {
        "forniture_wood.png",
        "forniture_wood.png",
        "forniture_wood_s1.png",
        "forniture_wood_s1.png",
        "forniture_wood_s2.png",
        "forniture_wood_s2.png",
    },
    drawtype = "nodebox",
    sunlight_propagates = true,
    paramtype = 'light',
    paramtype2 = "facedir",
    node_box = {
        type = "fixed",
        fixed = {
            {-0.4,-0.5,-0.4, -0.3,0.4,-0.3},
            {0.3,-0.5,-0.4, 0.4,0.4,-0.3},
            {-0.4,-0.5,0.3, -0.3,0.4,0.4},
            {0.3,-0.5,0.3, 0.4,0.4,0.4},
            {-0.5,0.4,-0.5, 0.5,0.5,0.5},
            {-0.4,-0.2,-0.3, -0.3,-0.1,0.3},
            {0.3,-0.2,-0.4, 0.4,-0.1,0.3},
            {-0.3,-0.2,-0.4, 0.4,-0.1,-0.3},
            {-0.3,-0.2,0.3, 0.3,-0.1,0.4},
        },
    },
    groups = {snappy=2,choppy=2,oddly_breakable_by_hand=2}
})

PostPosted: Sun Feb 16, 2014 15:46
by flux
So, if I wanted to convert a voxel object into a nodebox, I'd need to figure out how to separate it into (minimal amount of) boxes and texture them. Would you agree?

PostPosted: Sun Feb 16, 2014 18:33
by flux
Talked to webdesigner97 and now things are pretty much clear. I need a good algorithm to convert voxel into boxes though. If you are on stackexchange I'd appreciate if you could up-vote:

http://math.stackexchange.com/questions/678557/3d-space-packing-problem

Thank you!

PostPosted: Sun Feb 16, 2014 19:09
by twoelk
Sounds good ;-)

I have played with the program called Sproxel some time ago as aldobr had made an export script for it. I made a version of the Minetest-Logo
+ as can be seen here.
Each node is represented by a voxel (what a surprise) It gave out code that I used to add a block to the game
+ which resulted as this ingame.
So every voxel even those completely surrounded by others became a nodebox. Of course I could have considered this while I was building the thing but my basic idea was to maybe built something in Minetest and to scale that down to a single node with this tool. The writer of the exporting script might have had other usecases in mind but I was experimenting.

You may note that the ingame result is somehow mirrored so I spent most of the time adjusting the textures to fit the model.
This shows another problem. The model includes a cave and if you look inside it you may notice the textures are not correct. Sproxel and the script only rendered one texture file for each side so six in all. Consider the table lamps in the Home-Decor mod among others as an example of the effects that schould be possible with a simple model.

As I mentioned in other threads for other tools, if you do want to add VoxelShop as a tool for Minetest, I would love to see it be abble to communicate with other tools of the same category be it the Node Box Editor, the WieldItemModeleditor - WIM or Sproxel. I simply consider it important for the succes of a tool to be able to share information/files with other tools.

If you are interested some of the resulting files and a somewhat working rudiment of a mod adding the Minetest-Logo may be found in the attached archive.

PostPosted: Sun Feb 16, 2014 20:11
by flux
We were actually looking at the second image when we were discussion how the exporter could work.

Regarding the texture inside the cave: From what I understood it is not possible to fix that with the nodebox format, since you can only define six textures (one for each side). If that is not correct, please provide me with an example (you were talking about table lamps in Home-Decor?).

Format compatibility is very high on my priority list for VoxelShop. I've already added an importer for *binvox, *.kvx and *.kv6 over the last few days and many more will come. Which file format would you like to see next?

PostPosted: Tue Feb 18, 2014 01:30
by Inocudom
twoelk wrote:Sounds good ;-)

I have played with the program called Sproxel some time ago as aldobr had made an export script for it. I made a version of the Minetest-Logo [spoiler=as can be seen here.]http://www.woelknet.de/pages2/minetest/sproxel/sproxelminetestblockscreenshot.jpg[/spoiler] Each node is represented by a voxel (what a surprise) It gave out code that I used to add a block to the game [spoiler=which resulted as this ingame.]http://www.woelknet.de/pages2/minetest/sproxel/ingame_screenshot.png[/spoiler] So every voxel even those completely surrounded by others became a nodebox. Of course I could have considered this while I was building the thing but my basic idea was to maybe built something in Minetest and to scale that down to a single node with this tool. The writer of the exporting script might have had other usecases in mind but I was experimenting.

You may note that the ingame result is somehow mirrored so I spent most of the time adjusting the textures to fit the model.
This shows another problem. The model includes a cave and if you look inside it you may notice the textures are not correct. Sproxel and the script only rendered one texture file for each side so six in all. Consider the table lamps in the Home-Decor mod among others as an example of the effects that schould be possible with a simple model.

As I mentioned in other threads for other tools, if you do want to add VoxelShop as a tool for Minetest, I would love to see it be abble to communicate with other tools of the same category be it the Node Box Editor, the WieldItemModeleditor - WIM or Sproxel. I simply consider it important for the succes of a tool to be able to share information/files with other tools.

If you are interested some of the resulting files and a somewhat working rudiment of a mod adding the Minetest-Logo may be found in the attached archive.

This is caused by a flaw that nodebox models have. All cubes that make up nodebox models have all of their faces drawn.

PostPosted: Tue Feb 18, 2014 02:31
by hoodedice
flux wrote:We were actually looking at the second image when we were discussion how the exporter could work.

Regarding the texture inside the cave: From what I understood it is not possible to fix that with the nodebox format, since you can only define six textures (one for each side). If that is not correct, please provide me with an example (you were talking about table lamps in Home-Decor?).

Format compatibility is very high on my priority list for VoxelShop. I've already added an importer for *binvox, *.kvx and *.kv6 over the last few days and many more will come. Which file format would you like to see next?


Can you add compatibility to export in .x please?

PostPosted: Tue Feb 18, 2014 09:43
by flux
hoodedice wrote:Can you add compatibility to export in .x please?

Could you please direct me towards resources that discuss the .x format? I'm having trouble finding any reference to it whatsoever.

Inocudom wrote:This is caused by a flaw that nodebox models have. All cubes that make up nodebox models have all of their faces drawn.

That's what I figured and hence I'm trying to reduce the voxel to as few boxes as possible. Should be an optimal solution within the constraint of using boxes. The problem I'm having is another.

[spoiler]Image[/spoiler]
Looking at the image and from my understanding it is not possible to color the bottom of the cave in a different color than the grass above. If I'm wrong please let me know!

@Inocudom Could you please provide better reference to your post?

PostPosted: Tue Feb 18, 2014 10:31
by hoodedice

PostPosted: Tue Feb 18, 2014 14:46
by flux
Oh, that is not a voxel format. Standard 3D formats are not a priority atm unfortunately - unless you can provide a really good reason why they are needed. Is this format needed for minetest?

PostPosted: Tue Feb 18, 2014 14:56
by hoodedice
Well, I don't really remember the supported formats off of my head, but this is the one which is used mostly in MT.