Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Help  Camera, lights and export question
#2
(01-08-2024, 03:48 PM)troys Wrote: 1. When editing control points the camera controls become weird. If you middle click the camera jumps an odd distance and it's not possible to drag and move it like usual. Also the rotation is disabled. I have to turn off control points if I want to move the camera and it's really annoying. Is that how it's supposed to work?

No, it's not supposed to work like this. Rotation should be enabled, and moving the camera should work as usual, since we don't meddle with Unity's camera controls at all. I'm unable to reproduce this behavior on either Mac or Windows editor. Could you give any more details regarding this behavior? Unity version being used?

(01-08-2024, 03:48 PM)troys Wrote: 2. Using chain renderer, the chain meshes only receives light from directional lights, not spot or point. I don't use directional lights so the chain is unlit. How do I make it work with spots point lights?

This is a bug/omission in Unity's built-in pipeline, forward rendering path: additional lights (other than the main directional light) don't work properly with mesh instances. The reason is that directional lights are applied on the object's main pass (forward_main) while point and spotlights are done in subsequent, additive passes (forward_add). When using DrawMeshInstanced, Unity only performs the main pass and doesn't render the additional lights. See:

https://discussions.unity.com/t/how-to-u...ing/717600

This works properly in the deferred rendering path. Only the built-in forward path is affected. Unfortunately we can't do anything ourselves to fix it.

(01-08-2024, 03:48 PM)troys Wrote: 3. I want to export the finished chain as a FBX file, but Unitys FBX export tool does not work. Is there a way to do this?

Unity's FBX exporter only works with the built in rendering components: MeshRenderer and SkinnedMeshRenderer. In particular, it cannot handle GPU instances which is what the chain links are (for performance reasons, as using individual gamaeObjects with MeshRenderers for each link would be very expensive).

If you need such functionality however, we can write an exporter that generates an .asset mesh in your project. This will allow you to use the resulting chain mesh as a static prefab/prop in your game, or place it in a MeshRenderer to export it as a .FBX using Unity's exporter. Would you be interested in this?

kind regards,
Reply


Messages In This Thread
Camera, lights and export question - by troys - 01-08-2024, 03:48 PM
RE: Camera, lights and export question - by josemendez - 02-08-2024, 07:44 AM
RE: Camera, lights and export question - by troys - 02-08-2024, 01:45 PM
RE: Camera, lights and export question - by troys - 05-08-2024, 02:17 PM