:: Home :: Get Hosted :: PPM FAQ :: Forum FAQ :: Privacy Policy :: Search :: Memberlist :: Usergroups :: Register :: Profile :: Log in to check your private messages :: Log in ::
Do you want to advertise at Project Perfect Mod. Find out how to do it HERE.

The time now is Sun Sep 23, 2018 2:33 pm
All times are UTC + 0
 Forum index » Featured Tools » Voxel Section Editor III » Suggestions
.vox file support (working with MagicaVoxel files)
Moderators: stucuk
Post new topic   Reply to topic Page 1 of 1 [17 Posts] View previous topic :: View next topic
Author Message
Kerbiter
Vehicle Driver


Joined: 05 Jun 2018

PostPosted: Fri Jun 08, 2018 10:50 am    Post subject:  .vox file support (working with MagicaVoxel files) Reply with quote

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
tomsons26lv
Cyborg Cannon


Joined: 30 Dec 2009
Location: Latvia

PostPosted: Fri Jun 08, 2018 11:08 am    Post subject: Reply with quote

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
Vehicle Driver


Joined: 05 Jun 2018

PostPosted: Fri Jun 08, 2018 11:14 am    Post subject: Reply with quote

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
Damfoos
Grenadier


Joined: 27 Mar 2016

PostPosted: Fri Jun 08, 2018 11:38 am    Post subject: Reply with quote

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
Vehicle Driver


Joined: 05 Jun 2018

PostPosted: Fri Jun 08, 2018 12:01 pm    Post subject: Reply with quote

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

:: [PPM] C&C Mod Haven ::

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


Joined: 02 Aug 2012

PostPosted: Fri Jun 08, 2018 1:28 pm    Post subject: Reply with quote

Kerb sasat !

Back to top
View user's profile Send private message
Kerbiter
Vehicle Driver


Joined: 05 Jun 2018

PostPosted: Fri Jun 08, 2018 1:35 pm    Post subject: Reply with quote

...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:  1253 Time(s)

.PNG



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


Joined: 17 Apr 2009
Location: The Fang

PostPosted: Fri Jun 08, 2018 4:12 pm    Post subject: Reply with quote

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: Underground Clone City

PostPosted: Fri Jun 08, 2018 6:37 pm    Post subject: Reply with quote

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


Joined: 15 Aug 2002
Location: Brazil

PostPosted: Fri Jun 08, 2018 8:20 pm    Post subject: Reply with quote

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
Vehicle Driver


Joined: 05 Jun 2018

PostPosted: Fri Jun 08, 2018 9:48 pm    Post subject: Reply with quote

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.
_________________

:: [PPM] C&C Mod Haven ::

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
G-E
General


Joined: 09 Feb 2015

PostPosted: Sun Jun 10, 2018 9:08 am    Post subject: Reply with quote

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
Vehicle Driver


Joined: 05 Jun 2018

PostPosted: Tue Jun 12, 2018 8:51 am    Post subject: Reply with quote

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.
_________________

:: [PPM] C&C Mod Haven ::

Back to top
View user's profile Send private message
G-E
General


Joined: 09 Feb 2015

PostPosted: Tue Jun 12, 2018 8:56 pm    Post subject: Reply with quote

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:  6 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
Vehicle Driver


Joined: 05 Jun 2018

PostPosted: Wed Jun 13, 2018 12:47 pm    Post subject: Reply with quote

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.
_________________

:: [PPM] C&C Mod Haven ::

Back to top
View user's profile Send private message
Kerbiter
Vehicle Driver


Joined: 05 Jun 2018

PostPosted: Mon Aug 13, 2018 2:08 pm    Post subject: Reply with quote

Any news on the topic?
_________________

:: [PPM] C&C Mod Haven ::

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


Joined: 15 Aug 2002
Location: Brazil

PostPosted: Mon Aug 13, 2018 3:32 pm    Post subject: Reply with quote

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
Display posts from previous:   
Post new topic   Reply to topic Page 1 of 1 [17 Posts] View previous topic :: View next topic
 Forum index » Featured Tools » Voxel Section Editor III » Suggestions
Jump to:  
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 one of the following words: 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

Wildcard SSL Certificates
[ Time: 0.1248s ][ Queries: 14 (0.0042s) ][ Debug on ]