-
Notifications
You must be signed in to change notification settings - Fork 34
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Error when selecting individual voxels then trying to recombine, no alpha model. #12
Comments
Did you pull #11 ? I think I got this error fixed. Let me know if you still have it! |
@barraudf I downloaded the repo. There's only the master. I assumed I got up to including the last commit :S |
Can you tell what file / line did you made this change please? 'Cause this
looks like the exact changes I did in #11, and as far as I know I left no
alphaMask.voxels[] without ensuring first that alphaMask.voxels is not null
On 5 Oct 2017 00:18, "Discipol" <[email protected]> wrote:
@barraudf <https://github.com/barraudf> I downloaded the repo. There's only
the master. I assumed I got up to including the last commit :S
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#12 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AHUmgY6-9kFSZX1YfU9Zco0fos1LQZqmks5spAQogaJpZM4PuP2V>
.
|
@barraudf I didn't push it, only tried to fix it locally, but then other things started throwing errors :S I don't want to mess things up as I JUST found this repo, just shared how far I got. |
What file did you modify please? What line number?
I'll have a look tomorrow
Thinking about it, adding alphamask was a bad idea :/, especially now that
material data has been added to the vox file
…On 5 Oct 2017 00:26, "Discipol" ***@***.***> wrote:
@barraudf <https://github.com/barraudf> I didn't push it, only tried to
fix it locally, but then other things started throwing errors :S I don't
want to mess things up as I JUST found this repo, just shared how far I got.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#12 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AHUmgXctv3wQAFqmTJc_4bhpb_aIM3VRks5spAYkgaJpZM4PuP2V>
.
|
@barraudf MVImporter.cs > 457 > int alpha = alphaMask == null ? (byte)0 : alphaMask.voxels[ x, y, z ]; Yeah I don't see the point of that either :D There are also some problems with the shaders / meshes. Some of the faces are reversed, so I can see through some cube faces :S |
This is not what the file actually looks like : https://github.com/darkfall/MagicaVoxelUnity/blob/master/Assets/MagicaVoxel/Scripts/MVImporter.cs It was updated 10 days ago, and no longer contains any "(byte)0". My guess is your working copy is outdated. You should try to revert and pull. |
@barraudf Downloading it gives me that old version, I am git-ing now and its the latest one.
Should be alphaMask != null :D |
@barraudf The unitypackage and the source files are different, that's why I was getting outdated stuff, I was using the package :S what's happening here? |
This repository is not much active anymore, I guess the unitypackage is not updated after each Pull Request, you'd better stick with git source code. What I did back in time was to make my own magicka voxel importer in the end. Good catch on |
@barraudf I want to mate but deadlines tell me I can't. At least, not at the moment. I will need some of this code to transform VOX into a format I will need, so I will say my warmest thanks to you and other contributors 👍 |
Steps to reproduce:
Get latest unity build.
Install this repo.
Load the knight model, without alpha model.
Select the individual voxel option, reimport.
Select the voxels that form the axe, or another voxel set. Try to merge them.
An error pops up here: alphaMax.voxels is null and you try to access it:
Fixing it like this:
Creates this error :S help
NullReferenceException: Object reference not set to an instance of an object
(wrapper managed-to-managed) object:ElementAddr_3_1 (object,int,int,int)
MVImporter.GenerateFaces (.MVVoxelChunk voxelChunk, .MVVoxelChunk alphaMask) (at Assets/MagicaVoxel/Scripts/MVImporter.cs:420)
MVVoxModelVoxelInspector.CombineVoxels (.MVVoxModelVoxel[] voxels) (at Assets/MagicaVoxel/Scripts/Editor/MVVoxModelVoxelInspector.cs:43)
MVVoxModelVoxelInspector.OnInspectorGUI () (at Assets/MagicaVoxel/Scripts/Editor/MVVoxModelVoxelInspector.cs:20)
UnityEditor.InspectorWindow.DrawEditor (UnityEditor.Editor[] editors, Int32 editorIndex, Boolean rebuildOptimizedGUIBlock, System.Boolean& showImportedObjectBarNext, UnityEngine.Rect& importedObjectBarRect) (at C:/buildslave/unity/build/Editor/Mono/Inspector/InspectorWindow.cs:1240)
UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr)
The text was updated successfully, but these errors were encountered: