Project Perfect Mod Forums
:: Home :: Get Hosted :: PPM FAQ :: Forum FAQ :: Privacy Policy :: Search :: Memberlist :: Usergroups :: Register :: Profile :: Log in to check your private messages :: Log in ::


The time now is Thu Mar 28, 2024 3:32 pm
All times are UTC + 0
.vox file support (working with MagicaVoxel files)
Moderators: stucuk
Post new topic   Reply to topic Page 1 of 1 [21 Posts] Mark the topic unread ::  View previous topic :: View next topic
Author Message
Kerbiter
Cyborg Soldier


Joined: 05 Jun 2018

PostPosted: Fri Jun 08, 2018 10:50 am    Post subject:  .vox file support (working with MagicaVoxel files) Reply with quote  Mark this post and the followings unread

Basically what the title says. It would be nice to have a support for importing (and exporting maybe) MagicaVoxel's .vox files in VXLSE III/IV.

Why'd you actually want that:

- Very handy UI and editor controls of MagicaVoxel;
- Full-blown yet simple to use ray tracing renderer with support for different materials, including reflective, translucent and emissive materials (also with MarchingCubes smoothing support) that will be nice for creating cameos;
- Support for "frames" - different models in the same file - which can be used to represent different sections;
- Works with 256 color palettes (actually the 256th color is unused, probably because it's used to represent blank voxels or smth). I already implemented a converter (a python3 script) of YR/TS palettes into .png palettes that are supported by MagicaVoxel.

Some caveats and technical info:
- MV works only with max 126x126x126 models, at least bigger size can't be set in editor. It's unknown how it'll treat bigger than 126x126x126 files, maybe it'll open them just fine. I guess majority of voxels aren't *that* big, anyway.
- MV 0.98 would be the best because it's the latest version that supports MarchingCubes for renderer and multiple frames. 0.99 is in alpha and doesn't support those features yet. Get it here (and also there's example renders and other screenshots): https://ephtracy.github.io/
- The file format specification can be found here: https://github.com/ephtracy/voxel-model You'll prolly want MagicaVoxel-file-format-vox.txt. The file format is basically a tree-like structure of so-called chunks with different types of content. It's pretty straightforward and shouldn't be too hard to implement.

I tried to do some kind of a converter between .vox and .vxl almost a year ago, but I stumbled on a .vxl, which is a pure brainf#ck in terms of structure. Apparently working with .vxl-s requres more coding experience than I have. So that's why I'm proposing this as an addon to the VXLSE functionality (maybe I can even help with it).

Last edited by Kerbiter on Fri Jun 08, 2018 4:12 pm; edited 1 time in total

Back to top
View user's profile Send private message Visit poster's website
tomsons26lv
Cyborg Artillery


Joined: 30 Dec 2009
Location: Latvia

PostPosted: Fri Jun 08, 2018 11:08 am    Post subject: Reply with quote  Mark this post and the followings unread

In itself the voxel format is simple, what complicates matters is Westwood uses normals assigned to each voxel, and this is where it differs the most from every other voxel format out there.
Now if MV were to implement normals in such a way that it can translate to WW's voxel format tho it def would be interesting to see how far to a VXLSE replacement we'd could get

_________________
Tiberian Dawn, Red Alert, Tiberian Sun ,Red Alert 2,Renegade, Command & Conquer 3,Tiberium and Tiberium Wars and Westwood related image & video archive
https://picasaweb.google.com/113361105083292812413?noredirect=1

Skype live:tomsons26
Don't forget to state who are you otherwise i'll ignore the invite

Back to top
View user's profile Send private message Visit poster's website
Kerbiter
Cyborg Soldier


Joined: 05 Jun 2018

PostPosted: Fri Jun 08, 2018 11:14 am    Post subject: Reply with quote  Mark this post and the followings unread

Well, what I had in mind isn't an idea of making MV a "better VXLSE" but being a complementary tool to VXLSE. That's why I said "import" - you create shapes in MV, then import them in VXLSE and doing all this normals etc. stuff.

BTW, you can check the repo, IIRC there was some info about normals in txt files.

Edit: you can create .vxl from scratch in VXLSE, right? so the idea is create a .vxl, import voxels and colors from .vox and respective palette and have VXLSE and it's user do the rest.

Back to top
View user's profile Send private message Visit poster's website
Damfoos
Rocket Infantry


Joined: 27 Mar 2016

PostPosted: Fri Jun 08, 2018 11:38 am    Post subject: Reply with quote  Mark this post and the followings unread

tomsons26lv wrote:
In itself the voxel format is simple, what complicates matters is Westwood uses normals assigned to each voxel, and this is where it differs the most from every other voxel format out there.
Now if MV were to implement normals in such a way that it can translate to WW's voxel format tho it def would be interesting to see how far to a VXLSE replacement we'd could get


What if MV voxels were imported into VXLSE without data about normals, just the shape and the colors? Users are likely to apply autonormals anyway, and when you make a voxel model from scratch in VXLSE all voxels use the same normals value anyway until you fire up the normalizer. Being ablt to import just the shape with colors would already be a huge plus. Unless VXLSE gets ability to select specified parts of the voxel model to be able to move/copy/delte them (kinda like in FA2 where you can mark tiles for copying) or ability to make edits right in the 3d view window, then MV won't be really needed.

Back to top
View user's profile Send private message
Kerbiter
Cyborg Soldier


Joined: 05 Jun 2018

PostPosted: Fri Jun 08, 2018 12:01 pm    Post subject: Reply with quote  Mark this post and the followings unread

>then MV won't be really needed
did you see MV's renderer? It produces quite good results.

_________________

Using MagicaVoxel to create voxel models :: Phobos YR Engine Extension

[img]https://raster.shields.io/endpoint.svg?url=https%3A%2F%2Fshieldsio-patreon.vercel.app%2Fapi%3Fusername%3Dkerbiter%26type%3Dpledges&style=flat[/img]

Back to top
View user's profile Send private message Visit poster's website
KALAPS S8
Grenadier


Joined: 02 Aug 2012

PostPosted: Fri Jun 08, 2018 1:28 pm    Post subject: Reply with quote  Mark this post and the followings unread

Kerb sasat !

Back to top
View user's profile Send private message
Kerbiter
Cyborg Soldier


Joined: 05 Jun 2018

PostPosted: Fri Jun 08, 2018 1:35 pm    Post subject: Reply with quote  Mark this post and the followings unread

...what did I expect from Kalaps. *sigh*

UPD: I managed to import some edited voxel using other software called VoxelShop, which uses OpenRA code to load vxl and then expots to vox. Got this after 5 minutes of playing with render settings.



.PNG
 Description:
 Filesize:  615.53 KB
 Viewed:  10628 Time(s)

.PNG



Back to top
View user's profile Send private message Visit poster's website
m7
Commander


Joined: 17 Apr 2009

PostPosted: Fri Jun 08, 2018 4:12 pm    Post subject: Reply with quote  Mark this post and the followings unread

Would be cool to see some kind of modernized 3d control voxel builder, even if we just used it to import into VXLSE. Plus reverse exporting out for making cameos could help improve the overall quality of many projects for those who are just learning the graphical aspects of modding.

Back to top
View user's profile Send private message
PussyPus
Commander


Joined: 14 Jul 2015
Location: Egypt

PostPosted: Fri Jun 08, 2018 6:37 pm    Post subject: Reply with quote  Mark this post and the followings unread

Magicavoxel would be really useful if we had a chance to import its voxels to vxlseiii

_________________
If you are a MetalHead (Heavy Metal Fan) and don't want to be a metalhead, Just remove your metal ball from your head. �:p .

Back to top
View user's profile Send private message ModDB Profile ID Skype Account
Banshee
Supreme Banshee


Also Known As: banshee_revora (Steam)
Joined: 15 Aug 2002
Location: Brazil

PostPosted: Fri Jun 08, 2018 8:20 pm    Post subject: Reply with quote  Mark this post and the followings unread

It shouldn't be hard to do it at all, although there will be losses for both sides (normals from .vxl and materials and transparent colors from .vox). However, right now I am overloaded with my university. So, hopefully, I can work it out on the next month once things get easier on my side.

Could you upload or point out some sample .vox files that I could use for testing?

Back to top
View user's profile Send private message Visit poster's website Skype Account
Kerbiter
Cyborg Soldier


Joined: 05 Jun 2018

PostPosted: Fri Jun 08, 2018 9:48 pm    Post subject: Reply with quote  Mark this post and the followings unread

The materials are render-exclusive I guess Smile There's only base color which is paletted.

Yeah, sure, there are many of them here: https://github.com/ephtracy/voxel-model/tree/master/vox
Also there are example .vox'es bundled with MagicaVoxel itself. Also feel free to ask me for C&C palette converting or custom .vox'es if something, though I'm not that of a voxel artist #Tongue .

Be sure to check animated models in /anim! And also I could try to help you, though I'm not strong in Delphi.

_________________

Using MagicaVoxel to create voxel models :: Phobos YR Engine Extension

[img]https://raster.shields.io/endpoint.svg?url=https%3A%2F%2Fshieldsio-patreon.vercel.app%2Fapi%3Fusername%3Dkerbiter%26type%3Dpledges&style=flat[/img]

Last edited by Kerbiter on Sat Jun 16, 2018 9:28 am; edited 1 time in total

Back to top
View user's profile Send private message Visit poster's website
G-E
Defense Minister


Joined: 09 Feb 2015

PostPosted: Sun Jun 10, 2018 9:08 am    Post subject: Reply with quote  Mark this post and the followings unread

Have you guys looked into the other voxel formats like say Voxelise?

_________________
http://www.moddb.com/mods/scorched-earth-ra2-mod-with-smart-ai

Back to top
View user's profile Send private message
Kerbiter
Cyborg Soldier


Joined: 05 Jun 2018

PostPosted: Tue Jun 12, 2018 8:51 am    Post subject: Reply with quote  Mark this post and the followings unread

G-E wrote:
Have you guys looked into the other voxel formats like say Voxelise?


No, we didn't, nor I tried other voxel editors. MV is just fine with two single limitations being 126 voxels size limit and 255 instead of 256 colors in palette.

_________________

Using MagicaVoxel to create voxel models :: Phobos YR Engine Extension

[img]https://raster.shields.io/endpoint.svg?url=https%3A%2F%2Fshieldsio-patreon.vercel.app%2Fapi%3Fusername%3Dkerbiter%26type%3Dpledges&style=flat[/img]

Back to top
View user's profile Send private message Visit poster's website
G-E
Defense Minister


Joined: 09 Feb 2015

PostPosted: Tue Jun 12, 2018 8:56 pm    Post subject: Reply with quote  Mark this post and the followings unread

Here's the importer java sources for voxelshop, it has a number of formats that might be worth including for import.

Interestingly they seem to use OpenRA's source for TS/RA2 voxel support, and they have a hardcoded palette converter table, but the comments suggest they planned to support external palettes...



importer.rar
 Description:

Download
 Filename:  importer.rar
 Filesize:  13.48 KB
 Downloaded:  82 Time(s)


_________________
http://www.moddb.com/mods/scorched-earth-ra2-mod-with-smart-ai

Back to top
View user's profile Send private message
Kerbiter
Cyborg Soldier


Joined: 05 Jun 2018

PostPosted: Wed Jun 13, 2018 12:47 pm    Post subject: Reply with quote  Mark this post and the followings unread

Thanks for contribution, now we need to convert all this code to Delphi Very Happy

Yeah I too noticed that they use OpenRA's sources.

_________________

Using MagicaVoxel to create voxel models :: Phobos YR Engine Extension

[img]https://raster.shields.io/endpoint.svg?url=https%3A%2F%2Fshieldsio-patreon.vercel.app%2Fapi%3Fusername%3Dkerbiter%26type%3Dpledges&style=flat[/img]

Back to top
View user's profile Send private message Visit poster's website
Kerbiter
Cyborg Soldier


Joined: 05 Jun 2018

PostPosted: Mon Aug 13, 2018 2:08 pm    Post subject: Reply with quote  Mark this post and the followings unread

Any news on the topic?

_________________

Using MagicaVoxel to create voxel models :: Phobos YR Engine Extension

[img]https://raster.shields.io/endpoint.svg?url=https%3A%2F%2Fshieldsio-patreon.vercel.app%2Fapi%3Fusername%3Dkerbiter%26type%3Dpledges&style=flat[/img]

Back to top
View user's profile Send private message Visit poster's website
Banshee
Supreme Banshee


Also Known As: banshee_revora (Steam)
Joined: 15 Aug 2002
Location: Brazil

PostPosted: Mon Aug 13, 2018 3:32 pm    Post subject: Reply with quote  Mark this post and the followings unread

Not yet. I've been busy with other RL issues.

Back to top
View user's profile Send private message Visit poster's website Skype Account
Kerbiter
Cyborg Soldier


Joined: 05 Jun 2018

PostPosted: Wed Nov 07, 2018 6:30 pm    Post subject: Reply with quote  Mark this post and the followings unread

it's been quite a while, any progress?

_________________

Using MagicaVoxel to create voxel models :: Phobos YR Engine Extension

[img]https://raster.shields.io/endpoint.svg?url=https%3A%2F%2Fshieldsio-patreon.vercel.app%2Fapi%3Fusername%3Dkerbiter%26type%3Dpledges&style=flat[/img]

Back to top
View user's profile Send private message Visit poster's website
Banshee
Supreme Banshee


Also Known As: banshee_revora (Steam)
Joined: 15 Aug 2002
Location: Brazil

PostPosted: Wed Nov 07, 2018 9:56 pm    Post subject: Reply with quote  Mark this post and the followings unread

No progress at all. It's low on my priority list at the moment due to other real life priorities, I am sorry. The other tools were not touched either.

Back to top
View user's profile Send private message Visit poster's website Skype Account
Kerbiter
Cyborg Soldier


Joined: 05 Jun 2018

PostPosted: Mon Jan 28, 2019 5:04 pm    Post subject: Reply with quote  Mark this post and the followings unread

check #Tongue

_________________

Using MagicaVoxel to create voxel models :: Phobos YR Engine Extension

[img]https://raster.shields.io/endpoint.svg?url=https%3A%2F%2Fshieldsio-patreon.vercel.app%2Fapi%3Fusername%3Dkerbiter%26type%3Dpledges&style=flat[/img]

Back to top
View user's profile Send private message Visit poster's website
Banshee
Supreme Banshee


Also Known As: banshee_revora (Steam)
Joined: 15 Aug 2002
Location: Brazil

PostPosted: Mon Jan 28, 2019 11:13 pm    Post subject: Reply with quote  Mark this post and the followings unread

Still no progress. Sorry. Even the news at PPM is silent for a reason... and we had a release of C&C Red Alert History that I still didn't talk about in the news. And that kind of news is considered to be a high priority here.

Back to top
View user's profile Send private message Visit poster's website Skype Account
Display posts from previous:   
Post new topic   Reply to topic Page 1 of 1 [21 Posts] Mark the topic unread ::  View previous topic :: View next topic
 
Share on TwitterShare on FacebookShare on Google+Share on DiggShare on RedditShare on PInterestShare on Del.icio.usShare on Stumble Upon
Quick Reply
Username:


If you are visually impaired or cannot otherwise answer the challenges below please contact the Administrator for help.


Write only two of the following words separated by a sharp: Brotherhood, unity, peace! 

 
You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © phpBB Group

[ Time: 0.1733s ][ Queries: 14 (0.0140s) ][ Debug on ]