Refresh Imported Files

NikSpace posted this 03 June 2015

Is there any way to update the already imported .qb file?

Refresh Chunk is not reading the .qb is reading what is already in memory. I get it why because if you make in Unity changes to keep them. But can you add a button like restore or something like that?

Sorry if that question is already asked. But i can't find something about anywhere else. Thanks you.

Order By: Standard | Newest | Votes
GarethIW posted this 03 June 2015

It's something I would like to do, and it has been requested in the past. Importing has so far been a one-time process for pretty much the reason you state above: if you change the volume using the PicaVoxel tools (edit, resize, add an animation) then what should happen when you refresh from the imported file? What happens if the imported file's dimensions have changed?

The easy answer is pretty simple: all changes made in Unity will be overwritten when you refresh from the source file.

Implementing this is somewhat harder, especially for Qubicle files due to multiple matrices (layers) which become individual PicaVoxel Volumes under a parent object.

But yes, it's on the to-do list.

NikSpace posted this 04 June 2015

I would really want that. We are going to make a multi-part character creator for the game. So i am look to skip the import method. I am trying to just read the .qb and dynamically put them in the scene.

I am going to look on it next week. If you make something on this i would love to try it and give feedback.

NikSpace posted this 07 June 2015

Ok so make something like a local updater for every Qubicle Volume. Custom Inspector

But my problem is that when a Frame has multiple Chucks it updates only the ones which overwrites. So to avoid that i was looking a method from your Library that deletes the Frame. The ().DeleteFrame(); So i overload the method.

What i couldn't find is how to delete the old meshes of the old chunks. So the GUID Folder is getting full with unused meshes.

I know its a really messy way. To recreate the frame and not update it. But i didn't wont go any deeper in your code.

My question is that do have any method that deletes the old meshes. Because i saw that they are empty folders in the MeshStore. So there it must a point that you do that. I don't wont to lose time on making the code if it is already in your code.

BTW: if you want to see the Code i recreate for it. I could share it with you. Nothing special i just reuse the QubicleImporter.FromQubicle() and modify it to replace only single parts for the time being.

GarethIW posted this 08 June 2015

That looks like a really good start!

But yes, you're coming up against one of the many issues that I had thought of. If you do delete the frame, you will need to delete all of the meshes for that frame from storage first (while you still have the GUID of the frame you are about to delete).

A better way to do this is to update the voxel data within the frame instead of deleting the frame and recreating a new one.

If you want to post the code, put it up on and link it here and I'll see if I can wrap it up for you.

NikSpace posted this 10 June 2015

github Link: Qubicle Updater for PicaVoxel


Those two files are the updating method.

and the QubicleFileInspector.cs is your importer but on the inspector panel. It's not perfect but it helps me work a lot faster!!

Tell me opinion about that too.

Our 127 members have posted 466 times in 112 discussions