Jump to content

nestor_d

Recommended Posts

I'm trying to get the canopy of a cockpit to have a specular shader, but having the rest of the model keep its normal bumped shader. This has to be possible because that's how stock cockpits are without windowshine or any visual add-ons. I already tried exporting the canopy as a separate mesh into Unity, but for some reason Unity doesn't let me add a diferent kind of shader to the two separate meshes. Does anyone have any guidance on this?

Link to comment
Share on other sites

1 hour ago, nestor_d said:

I'm trying to get the canopy of a cockpit to have a specular shader, but having the rest of the model keep its normal bumped shader. This has to be possible because that's how stock cockpits are without windowshine or any visual add-ons. I already tried exporting the canopy as a separate mesh into Unity, but for some reason Unity doesn't let me add a diferent kind of shader to the two separate meshes. Does anyone have any guidance on this?

In Unity Editor -- you need to create separate Material instances for each mesh.  Shaders are assigned to a material, and not to meshes themselves.  Materials are assigned to meshes.  One material = one shader; two materials = can use different shaders.

Duplicate your existing material, re-name it (for clarity), and set it up to use the specular shader.  Assign that new material to your window mesh (you can drag the material onto the visible mesh to assign it, or use the drop-down/selection box), and hit the part-tools export button.  Done.

Link to comment
Share on other sites

1 minute ago, Shadowmage said:

In Unity Editor -- you need to create separate Material instances for each mesh.  Shaders are assigned to a material, and not to meshes themselves.  Materials are assigned to meshes.  One material = one shader; two materials = can use different shaders.

Duplicate your existing material, re-name it (for clarity), and set it up to use the specular shader.  Assign that new material to your window mesh (you can drag the material onto the visible mesh to assign it, or use the drop-down/selection box), and hit the part-tools export button.  Done.

Ah thanks a lot! that's exactly what I needed! So just one more question. When I export the part as a .mu and then paste it in the respective gamedata subfolder, will I need two separate texture files or will it work with just one as usual?

Link to comment
Share on other sites

3 minutes ago, nestor_d said:

Ah thanks a lot! that's exactly what I needed! So just one more question. When I export the part as a .mu and then paste it in the respective gamedata subfolder, will I need two separate texture files or will it work with just one as usual?

As long as you use/assign the same texture file(s) in both materials, it will only need the one (set of) texture(s).  (Bumped shaders obviously require the normal map + diffuse, whereas the non-bumped specular only needs the diffuse)

Link to comment
Share on other sites

This thread is quite old. Please consider starting a new thread rather than reviving this one.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...