Self-Shading issue/confusion

_jbmc posted this 20 August 2015


I just purchased PicaVoxel and am struggling to generate the same self-shading effect that can been seen in the asset store screenshots What I am getting is In the screen shot Self-Shading is set to 1 just for visibility.

Apparently a new type of AO was implemented in the latest update ( so maybe the look I am trying to achieve is no longer possible which would be a shame.

EDIT: Looking at the feature list for 1.3.0 release there was an update in the AO and the effect that I am creating is to be expected. Is there now way to achieve the previous version AO effect?

Any assistance would be greatly appreciated


Last edited 20 August 2015

Order By: Standard | Newest | Votes
GarethIW posted this 20 August 2015

Hi, thanks for trying PicaVoxel!

You are correct in that the self-shading was completely overhauled to be more like MagicaVoxel (this was one of the main complaints of the original version of PicaVoxel!). I didn't think anyone would want to use the older style ever again! I really need to get around to updating the asset store images.

Don't fear though - I've got you covered!

In PicaVoxel/Scripts/MeshGenerator.cs, replace the Quad() method with the following:

And you'll get the original style shading. It's best used with a really low intensity (about 0.05 should be good).

Let me know if that helps :)

_jbmc posted this 20 August 2015

Awesome stuff! Thanks for the quick reply, I'll give it a spin and get back to you.

I also emailed you via support, feel free to ignore that =]

EDIT: Seems to all works as intended (screenshot: intensity currently set to 0.065.

From a feedback stand point you could possibly provide both versions of AO within the editor as this blocky style fits perfectly in a purely cube/pixel world. Providing both types will give devs a way to achieve that pure cube/pixel style in both world and AO. Plus it looks win! (just a future update idea =P)

Thanks again for the help.

Last edited 20 August 2015

_jbmc posted this 21 August 2015

I've been messing around with the AO that you sent us but it appears to be different from what I've seen your demo video Here is a screenshot from an earlier point in the video and it might be better to illustrate the issue

Notice how the the AO shadows 'overlap' and dissipate at the corners but in the script alteration you sent this is what is occurring: The AO shadows don't overlap, its a constant colouring. Perhaps there is something I need to adjust in the script?

Our 132 members have posted 493 times in 119 discussions