eidosmontreal / unreal-vdb

This repo is a non-official Unreal plugin that can read OpenVDB and NanoVDB files in Unreal.
Apache License 2.0
686 stars 108 forks source link

getting weird artifact #89

Closed digitalguerrero closed 1 year ago

digitalguerrero commented 1 year ago

Hello, I am getting a streak looking artifact coming from the side off all vdb I load in. They shrink and grow from different angles when I tumble around the volume. I am applying my Volume Ray March material to a cube. Other than this they look great! I did notice in the volume texture that the last couple textures are reading "Bad Size". I couldn't find a way to fix the bad size image and not sure if they are related. Any help on solving this would be appreciated!

Capture Capture_02 Capture_03

thilamb commented 1 year ago

Hi, this is an issue related to how you sample the border of your volume texture.

You might be able to change your texture settings to account for that. image

If not, you should change your raymarch material to sample 0 (black) on volume borders so that they don't extend like this in your viewport.

digitalguerrero commented 1 year ago

Great thanks that worked, changing to a power of 2 removed the bad images and no more streaks! One more question though, my VDB got smaller in resolution and lost details and now have a lot of empty black images in the array. I can get my details back by increasing the steps to compensate but is there a better solution?

Capture

thilamb commented 1 year ago

That sounds alright. Padding the texture just increased the overall resolution but didn't change the active data that was already there. Increasing step or re-adjusting active volume bounds will help.