Search Unity

Question Unity game play to Blender for rendering.

Discussion in 'Audio & Video' started by username132323232, Jan 20, 2022.

  1. username132323232

    username132323232

    Joined:
    Dec 9, 2014
    Posts:
    477
    Is it possible to record a game play in Unity, export it as an .fbx (using Unity Recorder + the FBX plugin) and then render it in Blender?
     
  2. akent99

    akent99

    Joined:
    Jan 14, 2018
    Posts:
    588
    Do you mean record the screen (like OBS), or do you mean record VR tracker movements so you can replay a model doing the movements? The former I don't think Unity has a good built in solution (I would use OBS Studio or similar). The latter might theoretically be possible, but I think it was just yesterday someone said they did not have good luck with recording animations with the Unity Recorder. So it might be possible, but you might have to write the code yourself to keep up with the volume of data and speed you need.
     
  3. username132323232

    username132323232

    Joined:
    Dec 9, 2014
    Posts:
    477
  4. vladala

    vladala

    Unity Technologies

    Joined:
    Mar 3, 2017
    Posts:
    189
    The FBX or alembic recorder can most definitely used to record 3d objects to be exported to DCCs
     
  5. username132323232

    username132323232

    Joined:
    Dec 9, 2014
    Posts:
    477
    Great! My game has about 100 moving game objects, including some dynamically generated during game play. How can we export all of them into an .fbx?
     
  6. vladala

    vladala

    Unity Technologies

    Joined:
    Mar 3, 2017
    Posts:
    189
    Easiest would be if you could parent them under the same root GameObject and export that one recursively.
    Otherwise you'd need a recorder for every GO.
     
  7. username132323232

    username132323232

    Joined:
    Dec 9, 2014
    Posts:
    477
    Thank you for the advice. I tried that with Unity Creator Puzzle Kit. Here is what it looks like in Unity:

    Unity.PNG


    This is the recorded .fbx in Blender:
    Blender.PNG


    As you can see, some of the objects have wrong positions and rotations. Also, there are more instances than in the original.
     
  8. MikeBastien

    MikeBastien

    Joined:
    Apr 24, 2009
    Posts:
    139
    Did you try the different import options shown below?

    Hover your mouse over each to get a tooltip with more info about what it does.

    If objects are mirrored or upside down, then look at the 'Manual Orientation' section below as well. That doesn't appear to be your problem at the moment though.

    2022-01-23_23h04_22.jpg

    There seems to be polys with flipped normals, and / or material issues. Check out these links for possible solutions:

    1. https://blender.stackexchange.com/questions/93769/blender-fbx-import-messed-up
    2. https://blenderartists.org/t/importing-fbx-in-blender-messes-up-material/1244198/2
    3. https://blender.stackexchange.com/questions/24799/blender-fbx-import-issue-normals-shading

    Good luck!
     
    username132323232 likes this.
  9. username132323232

    username132323232

    Joined:
    Dec 9, 2014
    Posts:
    477
    Thank you Mike for your suggestions. I tried all 4 combinations of "Apply Transform" and "Use Pre/Post Rotation". None of them fixed the issue of wrong positions, rotations and instances. Here is the .fbx that I have.
     

    Attached Files:

  10. markvi

    markvi

    Joined:
    Oct 31, 2016
    Posts:
    118
    What do you get when you import the FBX back into Unity? Also, download Autodesk's FBX Review tool and see what it looks like there: https://www.autodesk.com/products/fbx/fbx-review

    That should help determine it's a Unity export problem, or a Blender import problem.
     
  11. username132323232

    username132323232

    Joined:
    Dec 9, 2014
    Posts:
    477
    Thank you for the suggestion. I did that. Same problems as in Blender. There are extra copies of the ramps and all of them have wrong positions and rotations.

    Here is the screenshot. So it seems that the .fbx is incorrect.

    autodesk fbx review.PNG
     
  12. username132323232

    username132323232

    Joined:
    Dec 9, 2014
    Posts:
    477
  13. MikeBastien

    MikeBastien

    Joined:
    Apr 24, 2009
    Posts:
    139
    I downloaded and looked at the file in Blender, and there's nothing that I can see at a glance that looks wrong.

    I checked the Delta Transforms and no problems there also.

    Looking back at your Unity screenshot, I would check the prefabs \ nested prefabs... perhaps there is something inside that is causing the problem?

    Also,

    1. Make sure there aren't any prefabs that are disabled. (that might explain the extra meshes in Blender).
    2. Unpack the prefabs, and try again... See more info here for unpacking.
    3. If that doesn't help and your scene(s) aren't complicated... try adjusting them directly in Blender to match.
     
    Last edited: Feb 11, 2022
  14. username132323232

    username132323232

    Joined:
    Dec 9, 2014
    Posts:
    477
    Do you mean that the file is a valid .fbx?

    I unpacked all the prefabs and tried recording again. The result is still the same.

    The Unity project that I'm using is Unity Creator Puzzle Kit: https://assetstore.unity.com/packages/templates/tutorials/creator-kit-puzzle-149311 Everyone is welcome to download it and try to record gameplay to an .fbx.