PicaVoxel partial transparency?

0
ChildGodOfTerminus posted this 22 June 2016

I'm trying to make just part of a PicaVoxel object transparent. I'd have expected to set a lower alpha value for the portion I want to have see-through, similar to how I do it for emissive voxels.

This doesn't seem to work, however. If I use the PicaVoxel PBR Transparent shader, the whole mesh is equally transparent, and if I use the PicaVoxel Diffuse Transparent shader, nothing seems to be transparent.

Am I missing a step, or doing something wrong, or is it just not possible to have a partially transparent object in one volume?

Thanks in advance. Sorry for my novice questioning. :)

9 Comments
Order By: Standard | Newest | Votes
0
ChildGodOfTerminus posted this 22 June 2016

Looks like I can get the effect I want by changing the alpha on the "Tint" color. Hmm..

Except when a transparent voxel and a non-transparent voxel share a side, the transparent voxel seems to take precedence, so one side of the non-transparent voxel ends up invisible. Any way around that?

Thanks! :)

1
GarethIW posted this 22 June 2016

You're not missing something or doing something wrong - it's just the way Unity/ 3D engines in general work! You have to draw anything transparent after drawing all the non-transparent stuff. With regular 3D models with transparent sections this would be done with a separate mesh or a submesh with its own material that supports transparency.

With PicaVoxel, you will have to create a second volume with just the transparent parts. Set the Layer of the volume to TransparentFX and then use one of the PicaVoxel Transparent materials on it.

I find it's easier to do this by creating a parent object with the two volumes as children, then having the transparent volume the same size as the non-transparent one, and just set the voxels you need as transparent. That way, the two volumes will line up correctly and stay together. Alternatively, just have the transparent volume as a child of the non-transparent one.

0
ChildGodOfTerminus posted this 22 June 2016

Thanks!

PicaVoxel (and Qubicle) are saving my butt on this project after my env artist left me hanging on it.

Here's a little of what I've gotten built so far using both Qubicle and PicaVoxel in my workflow to avoid traditional texturing steps that make me cry... ;-)

https://www.youtube.com/watch?v=gip76Q8MpMs

1
GarethIW posted this 23 June 2016

That looks amazing! I'm like you, a programmer with not much in the way of art skills. But I can just about do pixel art, so voxel art is the easiest step into 3D!

https://www.youtube.com/watch?v=OTO8NKrpby8

0
ChildGodOfTerminus posted this 23 June 2016

Whoa, all the little touches on the animation in that! I love the spray from the treads, and the explosions are sweet, too. Even the little mounted machine guns move when the turrets swivel. :)

0
ChildGodOfTerminus posted this 23 June 2016

Not to spam my game, but here's with fixed character movement so it's not so frustrating to watch:

https://www.youtube.com/watch?v=j5MZq9VmMbM

:)

0
MrGilbert posted this 22 September 2016

I'd like to jump in here, instead of creating a new thread. :)

Just bought the asset some days ago, and I really love tinkering around with MagicaVoxel and PicaVoxel. They really fit perfectly.

However, would it be possible to add some kind of convenience methods to the MagicaVoxel-Importer, which would take care of creating a seperate volume for all the transparent blocks?

I just had a quick look at the importer code, so I THINK I could do it by myself, but it would be pointless if you plan to do it anyway, and the next update blows everything up.^^

0
GarethIW posted this 22 September 2016

That does sound like a really cool idea, but if you have the ability to do it (it shouldn't be that hard like you say - but I actually have no idea how the transparent blocks are marked in Magica) then go ahead. I'm currently super busy with work on my game so I don't know when I'll get to do a feature update for PicaVoxel.

Edit: unless the documentation for the .vox format has not been updated, it looks like material information is not included in the file format.

Last edited 22 September 2016

0
MrGilbert posted this 22 September 2016

Thanks for your reply!

Yeah, I think I misread the docs and was a little over-hyped. I thought the alpha-part (RGBA) from the "PALETTE"-chunk builds the, well, transparency of the blocks, but that wouldn't store the missing settings like refract etc. All in all, everything I do in render mode isn't stored at all, which is kind of weird. At least I don't find a "Save"-Button for that.

Looks like I need to do some splitting and splicing in MagicaVoxel before saving... sigh


Our 123 members have posted 456 times in 110 discussions