Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

AppGameKit Classic Chat / Found this very cool voxel to 2d tool to make 3d looking 2d sprites.

Author
Message
Cliff Mellangard 3DEGS
Developer
18
Years of Service
User Offline
Joined: 20th Feb 2006
Location: Sweden
Posted: 8th Sep 2018 16:54 Edited at: 8th Sep 2018 17:01

Attachments

Login to view attachments
basicFanatic
7
Years of Service
User Offline
Joined: 7th Jun 2017
Location:
Posted: 8th Sep 2018 17:02
Fun, but AppGameKit doesn't really support voxels ...
Cliff Mellangard 3DEGS
Developer
18
Years of Service
User Offline
Joined: 20th Feb 2006
Location: Sweden
Posted: 8th Sep 2018 17:06
It exports to 2d sprites
You paint in 3d and export to 2d sprites...
Iam talking to the author to insert a export to 3d obj ...
Bengismo
7
Years of Service
User Offline
Joined: 20th Nov 2017
Location: Yorkshire, England
Posted: 8th Sep 2018 17:34 Edited at: 8th Sep 2018 17:52
A voxel is a cube and AppGameKit supports cubes of course. (it can also just be a case of stacking transparent images too but thats texel marching in my opinion...and AppGameKit supports that soo anyway)

Minecraft is a voxel based game in that everything is based on cubes. The software just allows you to convert a "Stack" of 2d images up vertically and each pixel in the image then becomes a cube. This is similar to what cliff was doing in his cool 2D/3D shooter

While a 3D .obj or fbx export would work more easily...its easy enough to import the images then build the object in 3D in agk too.

it looks like a nice piece of software.

EDIT: - and fairly easy to import creations in AppGameKit (my tree artistic editing is shocking though)
Cliff Mellangard 3DEGS
Developer
18
Years of Service
User Offline
Joined: 20th Feb 2006
Location: Sweden
Posted: 8th Sep 2018 17:56
Thanks bengismo

The shooter will i try to update soon also
GarBenjamin
AGK Developer
7
Years of Service
User Offline
Joined: 30th Nov 2016
Location: USA
Posted: 8th Sep 2018 18:28 Edited at: 8th Sep 2018 20:44
Very cool find Cliff! Thanks for sharing. There are a lot of cool tools out there Indies have made just that much like for game dev they don't market very well so is very hard to find them. Itch.io is one of the better places I found such things on.

One I bought a couple of years ago which seems to be along the same lines of this in some ways is Asset Forge Deluxe. I was focusing hard (as usual) on streamlining and reducing the amount of time it takes to create games in this case to create graphics. It is a pretty cool tool.



Well actually no that was me trying to accelerate 3D modeling. This next one is a free one I came across that is closer I think.

MagicaVoxel. Anyway you might want to check it out and see if it is useful to you.



I have spent so much time (and hundreds if not thousands of dollars) trying out literally hundreds of different tools. lol Most just don't cut it for me but these two are very nice. I really should get back to them some time but you know how it is. Always so many things we want to do and experiment with and only so much time.

Anyway I will definitely check out Vox Edit. Looks great!
basicFanatic
7
Years of Service
User Offline
Joined: 7th Jun 2017
Location:
Posted: 8th Sep 2018 19:21 Edited at: 8th Sep 2018 19:22
The best voxels I have seen is the one used in Nex Machina:

https://www.youtube.com/watch?v=6BARxD_2lxw

(Try setting the speed to 0.25 so you can really see that nice grid morph on the floor)
GarBenjamin
AGK Developer
7
Years of Service
User Offline
Joined: 30th Nov 2016
Location: USA
Posted: 8th Sep 2018 21:53 Edited at: 8th Sep 2018 22:00
Hmm... to me it doesn't even look like a voxel game and seems like the reason they went with voxels was purely technical because this allows the objects to all be destroyed easily. I mean everything is already made up of hundreds or thousands of tiny cubes so no need to realtime split the geometry and so forth. Very useful for destructible environments. I mean it definitely looks great but aesthetically to me this completely loses the appeal of a voxel game as far as what people think of when they hear "voxel game".

That being said though I have played around with this idea before of making everything out of tiny cubes (not THIS tiny as they are using) for the same reason... DESTRUCTION is fun. lol
It'd be cool to have a very simple voxel modeler that spits out a file that can be very easily loaded into AppGameKit with lists of the cubes making up the models. I found it is too involved to do this stuff purely in code. I mean sure it can be done but again it isn't efficient. But a GUI tool where models could be built from small cubes (probably options for the size) would be useful and each object is saved out in a simple format with the model name and list of cubes making it up. For each cube it just has its position and color.
Bengismo
7
Years of Service
User Offline
Joined: 20th Nov 2017
Location: Yorkshire, England
Posted: 9th Sep 2018 00:28 Edited at: 9th Sep 2018 00:46
Quote: "It'd be cool to have a very simple voxel modeler that spits out a file that can be very easily loaded into AppGameKit with lists of the cubes making up the models."


Yeah it would. The software cliff posted does it on a small scale at a least. You could load many images from the software posted by cliff above and use an image for each layer to set the block colors fairly easily.

You could use tiled and create a number of layers (one for each pixel on the z axis) then load the map and create a cube for each tile. That would give a 3d map thats editable easily. Its been done on here for mazes etc....

Alternately, just load an image and use the alpha value as the height of cubes gives a nice effect - (i intentionally didnt copy the colours and used textures instead for the blocks)

(Also, The item above is a single object in agk - not multiple cubes.) So it can be copied to make a vary large cube based landscape
basicFanatic
7
Years of Service
User Offline
Joined: 7th Jun 2017
Location:
Posted: 9th Sep 2018 14:57
I once tried creating a monster character using a program called Voxelshop. However, the lack of depth perception makes it really hard to see the depth, so I constantly found holes in my models. Also, the program was simply not designed for large-scale models and slowed down a lot. The attached image is pretty much how far I got.

2nd attachment: a face I made.

Attachments

Login to view attachments
basicFanatic
7
Years of Service
User Offline
Joined: 7th Jun 2017
Location:
Posted: 10th Sep 2018 21:38 Edited at: 10th Sep 2018 21:40
Also, voxels are used for the environment in Vangers:

https://www.youtube.com/watch?v=7QDNhZeQk-s
Bengismo
7
Years of Service
User Offline
Joined: 20th Nov 2017
Location: Yorkshire, England
Posted: 19th Sep 2018 19:57
Quote: "MagicaVoxel. Anyway you might want to check it out and see if it is useful to you."


This is a really fun bit of software and its great considering its FREE!!
My very young nephew has been playing with it making characters and scenes really easily.

I then realised that the files its saves can be loaded straight into agk without the need for any special loading code or anything. So it can make prototyping a simple game really easy and fast with little effort.


This is a quick design downloaded from the web and loaded into agk using 3 lines of code. My nephew is loving it.




GarBenjamin
AGK Developer
7
Years of Service
User Offline
Joined: 30th Nov 2016
Location: USA
Posted: 19th Sep 2018 21:25
Glad you (or at least your nephew) appreciate it Bengismo!

Yeah I always keep an eye out for better tools to make things easier. Because a lot of it (efficient development) isn't entirely experience & skill but rather just using a better tool the right tools for the job. I have maybe a few dozen utilities installed now that are the best I could find for their specialty. Takes a lot of time just finding this stuff then trying it out and often have to buy to even try. You're right this is particularly nice because is FREE!
GarBenjamin
AGK Developer
7
Years of Service
User Offline
Joined: 30th Nov 2016
Location: USA
Posted: 19th Sep 2018 21:53
I think Asset Forge is kind of the ultimate approach and the kind of thing I had been trying to find for years decades maybe. I always wondered why there is no tool that just has hundreds or even thousands of prebuilt tiny pieces to connect together. Even thought about and probably played around with making such a tool myself once or twice. But the key for something like this is really to have a community behind it and Asset Forge has that with people making new component pieces and sets continually.

Basically I am all for tools that make game development more efficient. The more efficient it is for me the better and bigger games I will produce in the 50 to 100 hours I spend on a game. And the more I can get done in that time the easier it would be for me to consider spending more time on any one game.
fubarpk
Retired Moderator
19
Years of Service
User Offline
Joined: 11th Jan 2005
Playing: AGK is my friend
Posted: 26th Sep 2018 18:32
you could perhaps use a tool like this
http://drububu.com/miscellaneous/voxelizer/?out=obj
and convert obj to voxel and save as a obj
fubar
GarBenjamin
AGK Developer
7
Years of Service
User Offline
Joined: 30th Nov 2016
Location: USA
fubarpk
Retired Moderator
19
Years of Service
User Offline
Joined: 11th Jan 2005
Playing: AGK is my friend
Posted: 27th Sep 2018 04:46 Edited at: 27th Sep 2018 04:54
Thanks Garbenjamin
I found if you wanted to use textures with the new voxel object you need to rebake them and save both the new object and the texture
I used meshlab
1. Open MeshLab
2. File -> Import Mesh (your copied obj)
using the paint fill command on your object then once done with the brush
3. Filters -> Texture -> Parametrization: Trivial Per-Triangle
4. Increase texture dimension in Parametrization: Trivial Per-Triangle and hit apply.
5. Filters -> Texture -> Transfer Vertex Attributes to Texture (between 2 meshes)
7. File -> Export Mesh As and resave as an obj file (it should save a texture as well)
fubar
GarBenjamin
AGK Developer
7
Years of Service
User Offline
Joined: 30th Nov 2016
Location: USA
Posted: 27th Sep 2018 04:58 Edited at: 27th Sep 2018 05:13
I haven't had a chance to try any voxel stuff again recently. I definitely want to. Maybe my next game will use them.

Interestingly over on the Unity forums (I still occasionally visit there) a few days ago someone posted this video about how to make optimized voxel models which is what we'd want I think.

He uses magicavoxel to create then uses another free tool called VoxelShop to optimize (the developer who made VoxelShop has a pixel art tool call PixelShop that may be of interest as well). Looks like using VoxelShop the textures work fine too. Obviously disregard the end part about importing into Unity. He was making the video for Unity folks.

Another cool thing I was just reading is this tool has skeletal animation for the voxel models!
fubarpk
Retired Moderator
19
Years of Service
User Offline
Joined: 11th Jan 2005
Playing: AGK is my friend
Posted: 27th Sep 2018 05:12 Edited at: 27th Sep 2018 05:13
That looks really cool
Unfortunately I couldn't model that well with it nowadays

That's why I liked voxeliser it will convert any model into voxels in real time
1>load the object.
2>Adjust settings to how you like it.
3>Export (it has a texture option but i didnt have allot of success with the primitives i was using)

and i figure to use any model you need some kind of texture mapping of your own that will help you make detailed textures
and it really was easier than i thought and quicker than i thought.

without taking over the thread, i converted the JoustingEggs ive been working on and here is the result
fubar
GarBenjamin
AGK Developer
7
Years of Service
User Offline
Joined: 30th Nov 2016
Location: USA
PHeMoX
6
Years of Service
User Offline
Joined: 9th Jan 2018
Location:
Posted: 27th Sep 2018 17:41
MagickaVoxels is great and what I used for Cube House Kings (really should finish that game lol, movement is still in need of a lot of coding work)




..the downside was it requires adjusting the 3D model position to the middle of the 3D model to work flawlessly in AGK. Workflow is not too bad though really. I really did like how fast you can model with it. Animating the results though.... nah, maybe not so much hahah.
PHeMoX
6
Years of Service
User Offline
Joined: 9th Jan 2018
Location:
Posted: 27th Sep 2018 17:46
@Bengismo: How did you output that image to a 3D object? Did you create a memblock model from it? It looks like it would have an incredibly high polygon count?
GarBenjamin
AGK Developer
7
Years of Service
User Offline
Joined: 30th Nov 2016
Location: USA
Posted: 27th Sep 2018 17:52 Edited at: 27th Sep 2018 17:53
@PHeMoX that looks great! And yes I always found 3D animation to be a tedious process at least when done "by hand" with rigging and posing setting key frames and such. Then there are blends which I just don't do period because I don't see the need for Disney / Pixar animation in a Hobbyist / Indie game.

I need to check out this VoxelShop's skeletal animation and see how it is. Could be he has streamlined things a bit to make it more efficient that I am used to. Most folks animating models (at least with Unity) seem to be taking advantage of canned animations from Mixamo and assets which of course makes it a LOT faster and simpler.
PHeMoX
6
Years of Service
User Offline
Joined: 9th Jan 2018
Location:
Posted: 27th Sep 2018 17:56
Thanks Gar. Yeah exactly. The problem of MagickaVoxels export of .obj files was that it creates cubes with detached faces everywhere, so even when you've added your own bone skeleton, it will still do some funky things because the faces are not welded. Then again, maybe using something like Blender for animating could have solved some of those issues having a bit more features and all. Not sure.
Bengismo
7
Years of Service
User Offline
Joined: 20th Nov 2017
Location: Yorkshire, England
Posted: 28th Sep 2018 09:51 Edited at: 28th Sep 2018 10:07
Quote: "@Bengismo: How did you output that image to a 3D object? Did you create a memblock model from it? It looks like it would have an incredibly high polygon count?"


No the poly count is actually fairly low as the 3D model generated has no interior quads - so no faces inside and so its well optimised to draw only the geometry that it needs to do. Plus Open GL/AGK backface culls so only ever half of the triangles are drawn.



I used a memblock to merge all the cubes in each 16x16 block into a single mesh. Thats why the frame rate can be high - that model still displays fast on my phone. You can still delete single blocks easily too or make any block any style of block. Suprisingly easy to do really.

Quote: "MagickaVoxels is great and what I used for Cube House Kings"


Yeah....my nephew was loving making simple scenes in magika voxel then throwing a physics ball into the scene and knocking everything over....lol he spent 30 minutes just laughing at it. Ahh - to be 9 years old again!

I never figured out how to do the light baking but im sure there are a few videos on you tube so set shadowing and ambient occlusion into the vertex colours too.
PHeMoX
6
Years of Service
User Offline
Joined: 9th Jan 2018
Location:
Posted: 28th Sep 2018 14:02
Quote: "I used a memblock to merge all the cubes in each 16x16 block into a single mesh. Thats why the frame rate can be high"


Would you say adding more cubes to a single mesh speed things up more or is 16 x 16 somewhat of a sweet spot? Anyway, not trying to hijack this thread.
Bengismo
7
Years of Service
User Offline
Joined: 20th Nov 2017
Location: Yorkshire, England
Posted: 28th Sep 2018 14:20 Edited at: 28th Sep 2018 14:29
Quote: "Would you say adding more cubes to a single mesh speed things up more or is 16 x 16 somewhat of a sweet spot? Anyway, not trying to hijack this thread."


Adding many cubes to a single mesh makes it massively faster. AppGameKit would struggle to render 100,000 individual cubes (each as a mesh) at any sort of usable speed but put them all into one mesh and its much much faster. GPU's want many vertices to process all at once...not 100,000 separate draw-calls (of 12 triangles each)

The fastest technique to render is ALL the cubes in one mesh but then that makes creating and destroying cubes slightly slower. The frustrum culling can easily discard any 16x16 chunks behind the camera and off to one side quickly and easily where as one single object would force all the trangles through hte GPU only for them never to be drawn. Plus, if you want a never ending world....you can continue to add 16x16 chunks when you get near the edge of a map but its hard to recreate the one megamesh and just add some area to an edge. So chunks makes sense for these reasons mainly.
PHeMoX
6
Years of Service
User Offline
Joined: 9th Jan 2018
Location:
Posted: 29th Sep 2018 12:38
Thanks! I very much appreciate the insight.

Login to post a reply

Server time is: 2024-11-23 15:45:30
Your offset time is: 2024-11-23 15:45:30