When I re-imported the PSD file, I found that some mesh groups could correctly use my new image texture, but some imported only added new image texture, and did not correctly replace the contents of the mesh group. Do you have any clue?
top of page
bottom of page
Hi!
Thank you for your comment.
You have attached the screenshots so we can understand the issue.
We have run various tests to reproduce the issue and we believe that the issue is caused by the "Target Mesh Group" in the "Basic Setting" step.
We will show you how we reproduced the issue you are experiencing.
And below is the explanation on how to fix it.
We have prepared a sample for reimporting the character included in the AnyPortrait demo.
Let's modify the PSD image as above and change some of the clothes to purple.
First, let's import the PSD file and create a character.
We set it up like above so that a total of 3 Atlas images are created.
We set the images in the Atlas to start with the name "Peacock_1".
(1) Let's check the mesh groups of the character generated from the PSD.
The name of the mesh group generated from the PSD is "Peacock_1", which is the same as the Atlas name.
And you can see that there are 3 Sub Mesh Groups as children of the Mesh Group.
If the "Layer"s in the PSD file belong to a "Group", the "Group" becomes a "Sub Mesh Group" in AnyPortrait.
Now let's reimport the "PSD file with changed costume color".
(1) To reproduce the problem, let's create a "New PSD Set" instead of the existing PSD Set.
(2) Select the new PSD Set.
(3) Click the Change button to load the PSD file (the character image wearing purple costume).
(4) Click the Next button.
In the "Basic Setting" step, you need to set the "Target Mesh Group" and "Images".
(1) Click the Change button to select the Mesh Group to which the new PSD file will be applied.
(2) At this time, you need to select the Mesh Group created from the first Import.
In the previous process, a Mesh Group named "Peacock_1" was created from the PSD file, so you need to select the original "Peacock_1" Mesh Group.
However, for this test, let's select the "Back" Mesh Group, which is the child Mesh Group, instead of "Peacock_1".
(1) Let's add images by pressing the "Add Images Automatically" button.
Since only the "Back" mesh group, which is a Sub Mesh Group, is selected, you can see that only some Atlases are added.
However, this is not appropriate.
At this stage, the "Target Mesh Group" and "Image" settings are different from the settings at the time of Import, so it is likely that they will not work properly.
Note.
Even if you add all the images, you may run into problems if the Target Mesh Group is different from the Import.
Both settings should be the same as the settings at the time of Import.
Let's continue with Reimport.
(1) Connect the layers and meshes to be imported in the "Mapping" step.
Since we previously set the "Back" mesh group as the target, we will select and connect only the layers and meshes belonging to that mesh group.
(1) Since we are only reimporting some meshes, we named it "Peacock_2" to avoid overlapping Atlas file names.
(In fact, it is okay for file names to overlap during this process.)
(2) When you bake, you can see that only the selected layers are included in the Atlas.
After completing the Reimport, you will see that the problem you are experiencing is similar to the problem you are experiencing.
When there is a mismatch between the settings during the Import and the Reimport process, it malfunctions.
In this case, the problem is caused by a different "Target Mesh Group".
Note.
However, depending on the configuration of Atlas and the configuration of Sub Mesh Group, the problem may occur in different ways.
Even if fortunately the problem does not occur, please follow the Reimport rules provided in the manual as much as possible.
Now let's solve the problem.
Let's go back to the state where the Import from PSD is completed and try Reimport again.
The most recommended way is to use the automatically generated "PSD Set".
(1) In the Reimport window, select the "PSD Set" automatically generated by Import.
(2) Click the Change button to select the modified PSD file.
(3) Click the Next button to proceed to the next step.
However, it does not mean that you cannot use the "New PSD Set".
If you want to create a "New PSD Set", you need to set it as follows in the next step, "Basic Setting".
If you created a "New PSD Set", all the options will not be set in the "Basic Setting" step as above.
(1) Select Target Mesh Group.
Select "Peacock_1", the mesh group created from the first import.
(2) Then add the images.
After pressing the "Add Images Automatically" button, you can see that all the Atlas images have been added.
Additionally, if you try to Reimport from a "New PSD Set", you may need to set additional settings such as "Bake Scale".
Please check the manual for details.
If the initial setup is complete from either “Existing PSD Set” or “New PSD Set”, let’s move on to the next step, “Mapping”.
(1) Select only the layers and meshes within the "Back" mesh group in the same way as the previous process.
Note that you must activate and connect not only the layers and meshes, but also the "Back" mesh group.
The rest of the process is now complete.
You can now see that the images of the meshes in the selected "Back" mesh group have changed to purple.
As explained above, setting the Target Mesh Group properly will solve the problem.
If you do as explained above, the problem you are experiencing will be solved, but in fact, this is different from the Reimport setting that we recommend.
This is because "Reimport" is not a function to replace the images of some meshes, but rather, as the name suggests, it reimports the entire PSD file.
You can see why through the following explanation.
This is the screen after completing Reimport for some of the meshes.
(1) If you look at the generated Atlas Images, you can see that both "previous Atlas images generated during Import" and "Atlas images added by Reimport" exist.
(2) This is because the Atlas added by Reimport does not include the images applied to the existing meshes, so it continues to refer to the images of the previous PSD.
As a result, if only some meshes are reimported, the Atlas continues to be added, causing the texture resources to continue to increase.
In addition, since the reimport information is only updated for some meshes, there is also a problem that additional reimport operations do not run smoothly.
So when reimporting, we recommend always activating and connecting all layers and meshes if possible.
Disabling a layer at this stage does not mean no-updating the image, but "not creating it as a mesh in AnyPortrait".
Let's create an Atlas with all possible layers and meshes enabled.
(1) This time, set the name to "Peacock_1", which is the same as the name of the Atlas texture when importing.
(2) When you do Bake, you can see that an Atlas is created for all layers.
(1) After completing the Reimport task, you can see that all the meshes' images have been updated to the new PSD image.
(2) And this time, you can see that the Atlas image is not added and the initial image is overwritten by the new PSD.
This way, the texture resources do not increase and the Import and Reimport information can be maintained.
We checked now and found that the manual did not clearly warn about this.
Sorry for the confusion.
We will revise the manual to explain it more clearly.
Reimport is a very sensitive process.
So even a slight difference in settings can cause it not to work properly.
We recommend that you make a backup in advance and perform each procedure carefully.
If your problem is not solved, please leave a comment!
Thank you.