Possible Blueprint Rendering Bug

I created a Modular Pawn, following the C++ tutorial, with a new Body component that connects to Mesh (the head). The code compiled cleanly and the component showed up properly in the Blueprint that I created (derived from my C++ class). In the Components tab of the Blueprint editor I was able to add a skeletal mesh to the new component and it follows the animation assigned to the head without problem.

The problem/bug starts when I drag the Blueprint onto the map to create an instance. When I do, only the Mesh (head) is visible. If I run the game in the editor (or simulate), the body shows up and animates properly. Once I stop playing, however, the body mesh disappears again. If I exit the editor, however, and restart it, then all instances of the Blueprint in the map render properly. Editing the Blueprint in any way, however, immediately causes the body mesh to disappear again.

I’ve looked at the code and it looks identical to what Epic has done to create the Mesh component in Character.cpp so I’m not sure why this is happening. I first noticed the problem when launching the editor from Visual Studio 2013 with DebugGameEditor selected. I tried rebuilding with DevelopmentEditor selected and running the editor separately, but I get the same result.

I am working with v4.4.0 but I have a copy of my project in v4.31 and was able to reproduce the problem there as well. I wasn’t sure where to post this as it could be C++ or Blueprint. Given that the C++ code looks the same as that used in Character.cpp, I decided to put it under Blueprints. The problem isn’t a show-stopper, but it is annoying. If anyone is aware of a workaround, I’d love to hear it. Thanks.

Dean

In further testing this morning, I found that editing any material blueprint in the same folder (but not being used by) the modular pawn instances also caused the body mesh to disappear. Editing map-related materials, for example, did not cause the body mesh to disappear.

I was hoping that updating to 4.4.1 might fix this problem, but it has not. Something that I did not mention above is that, even when the body mesh shows up, it does not cast a shadow unless in Play or Simulate mode. This morning I rebuilt lighting to see if that would create the shadow, but it only caused the body mesh to disappear. Again. Has no one else experienced this?

Hello ,

I was looking over the issue that you posted about the body of your character not showing up and was wondering if you are still experiencing this issue in the newest version of the engine. If you are still experiencing this issue please feel free to contact us back and we will be more than happy to assist you further. Also please include any updated information that may pertain to this problem.

Make it a great day

Mr. Triplett,

I unsubscribed from the engine after v4.4, specifically because I was unable to get responses to this, and other programming-related questions. That said, I sent the project files to a friend who still subscribes and the issues that I reported in v4.4 of the engine are still present in v4.6, including the fact that, even when the body mesh is visible, only the head casts a shadow.

Hello ,

If you or your friend would like assistance with this issue please feel free to post here. If you would please contact your friend who has the file and let them know that if they are having this issue as well, that I would be more than happy to assist them in the resolution of this issue.

Make it a great day.

Hello ,

We have not heard back from you in a few days, so we are marking this post as Resolved for tracking purposes. If you are still experiencing the issue you reported, please respond to this message with additional information and we will offer further assistance.

Thank you.

Mr. Triplett,

I am unclear on why you would unilaterally mark this issue as resolved. I posted the original question on 25 Aug 14 and Epic didn’t even acknowledge it until 11 Dec 14, two engine versions later. You asked me if the problem was resolved with 4.6 and I told you that, yes, it still exists. What else would you have me do? You offered no advice on how to fix the problem, or even ways to narrow the problem down. By marking the problem as resolved, you mislead anyone else who may have the same problem. Is “head in the sand” Epic’s new approach to problem solving?

Hello ,

I was was unclear before. As you said in your reply on Dec. 13th you had unsubscribed and that you had sent the files to a friend. I asked that you inform the person who still has the file to contact me via this post. When no such reply was forth coming from someone with whom I could start the process of narrowing down issue I interpreted the act of unsubscribing and lack of response as disinterest. I thought it best to inform those connected to the post that the matter would be closed for tracking purposes. At that point interested parties could express interest in the matter, which would as it has, reopen it. That being said, I would be more than happy to assist you.

Quick questions:

  1. Can you reproduce this in a clean project?
  2. If you can reproduce the issue, can you provide a detailed list of steps to reproduce the problem?
  3. Can you provide screen shots of the blueprints that are involved with the issue as well as the issue its self?
  4. Would it be possible to acquire a copy of the project that was/is being used?

These questions will help narrow what issue it is that you are experiencing.

Mr. Triplett,

I apologize for the delay; I am just back from Christmas break. In response to your questions:

  1. Yes, but I can only test this in v4.5. My colleague is away on sabbatical this semester, and I don’t know any other subscriber.

  2. In terms of steps, I simply followed the steps, verbatim, from the Modular Pawn example on the Unreal Engine Wiki. I don’t use any Construction Script or Event Graph in the Blueprint. In the Components tab, I simply assign the appropriate meshes to the Modular Pawn components defined in C++.

  3. The following two screen-shots are from the clean build. In the first (ModularPawnInEditor.jpg) you can only see the head of the modular pawn.

In the second (ModularPawnPlay.jpg), which was taken when I pressed “Play” in the editor, you can see all of the pieces of the modular pawn, including the helmet, which is also not visible in the first screen-shot.

  1. Unfortunately, I cannot. The EULA for the model components does not permit redistribution in a “non-cooked” format.

I’m not sure if this helps, but I was able to use the same model components to create a Modular Pawn in the UDK and it renders without any problem, so I’m at a loss as to what is wrong.

Hello ,

In light of the new information, I do have another question for you. Are you placing the code you have written inside the constructor for the character class?

Mr. Triplett,

With the exception of adding the new components to the Components array (Components.Add()), my implementation is exactly as shown in the Wiki modular pawn example, which has the code inside the constructor. I’ve checked the code multiple times for typos, but I haven’t found any.

Hello ,

Does this happen with all modular pawns that you try and implement or does it only happen with the given example?

Mr. Triplett,

I only have four such models, but I get the exact same effect with all of them. I have tried all of them as modular pawns in UDK and they work as expected. Thank you for your efforts to narrow down the problem. I’m guessing that this is not a problem that you can reproduce at your end.

Hello ,

That would be correct, I am not able to reproduce this on my end. I have successfully followed the same tutorial and I am not experiencing the issue.

Is there any way that you could make a very simple character (it could be a bunch of boxes as long as it reproduces the issue on your end) in the same way the other models were made and send it to us? If you could do this I will be able to pass the project along to the developers for further review.

Mr. Triplett,

My understanding is that the components must all share the same skeleton (which is the case with my model). Graphic art isn’t my forte, so creating at least two skeletal meshs, each with the same skeleton, is beyond my abilities. If you know of one available for download somewhere (and that you know works), I would be happy to try again. Do you know of any such models?

Hello ,

You could try using the same asset over and over for all of the pieces. In theory using the default character as all of your modular pieces should do the trick. It may not look like a modular character but as along as all of the pieces show up it would be considered working.

Here is an example of what I mean:

Please let me know if this works for you.

Mr. Triplett,

I tried what you suggested and it worked properly, including casting shadows. Therefore, the problem must be on my end. I’m not sure why it works in UDK and not in UE4, but I enjoy working with UDK so it’s not really a problem. Thank you for taking the time that you did to help me troubleshoot the problem. It was very much appreciated.

Hello ,

I have spoke with a couple more people and they had a few suggestion questions if you are still interested in assistance.

Questions:

  1. When importing the mesh, did you make sure to check the Skeletal mesh check box?
  2. What file type and year are you using for your models? (fbx or obj)?
  3. Could you send a screen shot of the settings you are using when exporting and importing the models into UE4?

Mr. Triplett,

Sorry (again) for the delay in responding. My colleague and I are now six time zones apart, so e-mail Q&A is a SLOW process (Ent’s communicate faster).

Regarding your questions, this is what I have been able to find out:

  1. Yes, the Skeletal mesh check box was checked. The modular pawn shows up, and animates properly when I click “Play”.

  2. The friend that I spoke of earlier is the one who provided me with the models. He told me that the original model files are in 3DS Max format and that he uses an academic version of 3DS Max to export the files to FBX format. He clarified for me that the version that he gave me for use in UDK was exported using FBX 2012, and for UE4 it was with FBX 2014. I’m not sure if the fact that it is an academic version of max would make a difference.

  3. I don’t have access to the FBX export settings and, unfortunately, neither does he, and he won’t until he returns from sabbatical. This is a screen shot of the import settings that I used:

These are the same settings that I used for the head, and for other models that are not modular, and they show up without problem. I also noticed while reimporting the model components to get this screen shot that if the camera is facing to the right of the modular pawn (i.e. the pawn is to the left of the scene), the body mesh is visible, but only when the mesh is selected, and when I am on the same side of the mesh as the scene light. If I move the camera to the shadow side of the mesh, the the effect is reversed – I can see the mesh at all angles except when the mesh is near the far LEFT of the scene, and again, only if the mesh is selected. Otherwise it is never visible.

If you weren’t confused before, you probably are now.