Posted: Fri Jun 08, 2018 10:50 am Post subject:
.vox file support (working with MagicaVoxel files)
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 QUICK_EDIT
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 QUICK_EDIT
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. QUICK_EDIT
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. QUICK_EDIT
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.
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. QUICK_EDIT
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 .
QUICK_EDIT
Also Known As: banshee_revora (Steam) Joined: 15 Aug 2002 Location: Brazil
Posted: Fri Jun 08, 2018 8:20 pm Post subject:
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? QUICK_EDIT
The materials are render-exclusive I guess 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 .
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...
Also Known As: banshee_revora (Steam) Joined: 15 Aug 2002 Location: Brazil
Posted: Wed Nov 07, 2018 9:56 pm Post subject:
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. QUICK_EDIT
Also Known As: banshee_revora (Steam) Joined: 15 Aug 2002 Location: Brazil
Posted: Mon Jan 28, 2019 11:13 pm Post subject:
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. QUICK_EDIT
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