blender_niftools_addon icon indicating copy to clipboard operation
blender_niftools_addon copied to clipboard

Material : Import causes duplicate shader with unset shader, failure on export

Open ensikon opened this issue 6 years ago • 15 comments

@niftools/blender-niftools-addon-reviewer -

Before creating a new issue, ensure that

  • [ ] Read the user documentation.
  • [ ] Check that the issue hasn't already been reported.
  • [ ] Read through the list of Helpful resources links on the right-hand side.
  • [ ] Talk with the developers to ensure its a valid issue

The issue will get closed off immediately as invalid if

  • [ ] Looking for support where the forums, chat or documentation is more appropriate.
  • [ ] Goes off topic, loses focus or turns into a discussion.
  • [ ] Removing parts of the template the issue.

Fill out the template below to the best of your ability, including .blend files, nifs, logs; help us to help you.

Issue Overview

[Provide a general introduction to the issue and why it is relevant to this repository] I tried to export body model to nif :с

Version Information

Blender Niftools Addon Version Info

[Provide version information for the Blender Niftools Addon the issue occurs with, available in Blender in the Add-On section]

Blender Version Info

[Provide information on which version of Blender the issue is seen]

Platform information

[Provide a brief overview of what OS your running on]

Context

[Provide more detailed information to the issue itself and why it is relevant]

Steps to Reproduce

[Ordered list of the steps required for recreating the issue, including settings] #.

Expected Result

[Describe what you expected to have resulted from this process]

Actual Result

[Describe what you currently experience from this process, and thereby explain the bug]

Possible Fix

[Optional, suggest fixes, improvement or reasons for the bug might have occurred]

Screenshot

[If relevant, include a screenshot] Screenshot_286

Logs and Files

[Provide logs file generated during the error as well as the blend and nif files are related to the issue]

Info Bar Output

[Output from the Info View, available at top of Blender viewport, drag to expand]

Console Output

[Set the logging level to 'Debug' and attach the output of the console. Enable via Window -> Toggle Console]

Blend File

[Attach the blend file if the issue is reproducible]

Nif File

[Attach input or output files, samples of what the expected output should be and reproducing the issue]

Similar Known Issues

[Reference any known issues - https://github.com/niftools/blender_niftools_addon/issues]

Additional Information

[Anything else you feel is relevant]

ensikon avatar May 09 '19 21:05 ensikon

i just don't know how to put shaders... i tried to use the guide, but it does not work >.<

ensikon avatar May 09 '19 21:05 ensikon

The shader type is not set in the property panel.

Dev

        if b_obj.niftools_shader.bs_shadertype == 'None':
            raise nif_utils.NifError("Export version expected shader. "
                                     "No shader applied to mesh '%s', these cannot be exported to NIF."
                                     " Set shader before exporting." % b_obj)

neomonkeus avatar May 13 '19 08:05 neomonkeus

In the objects you are trying to export, you must set your shader type. Select BS Shader

TagnumElite avatar May 13 '19 09:05 TagnumElite

I think there is an issue where importing skyrim shaders is also producing duplicate materials.

neomonkeus avatar Apr 22 '20 13:04 neomonkeus

In the objects you are trying to export, you must set your shader type. Select BS Shader

This "Niftools Shader" is nowhere to be found. None of the properties tab have it.

Wolfstorm321 avatar Apr 22 '21 23:04 Wolfstorm321

In the objects you are trying to export, you must set your shader type. Select BS Shader

This "Niftools Shader" is nowhere to be found. None of the properties tab have it.

Thanks for nudging this issue. I suspect you are using a more recent version (in fact I hope to release a new version this weekend), which has the newer texture nodes support. What version of the plugin are you using?

@Candoran2 Is this still an issue based on the way things work now.

neomonkeus avatar Apr 23 '21 13:04 neomonkeus

In the objects you are trying to export, you must set your shader type. Select BS Shader

This "Niftools Shader" is nowhere to be found. None of the properties tab have it.

Thanks for nudging this issue. I suspect you are using a more recent version (in fact I hope to release a new version this weekend), which has the newer texture nodes support. What version of the plugin are you using?

@Candoran2 Is this still an issue based on the way things work now.

Currently, that Niftools Shader panel should be found under the material (if you have applied one to your mesh, if you don't have a material it will simply export without a shader property):

image

Same thing if you're using 2.7x:

image

(BTW, that must be an old gif, since there haven't been many changes to the 2.7 branch for a while).

It's still an 'issue' in the sense that you have to set it, and it fails if you don't (at least for Skyrim meshes).

As far as "I think there is an issue where importing skyrim shaders is also producing duplicate materials." (Neomonkeus), goes, I haven't been able to replicate it, though I didn't look into it too hard. If you can give me the steps to replicate and what goes wrong, I'd be happy to look into it and try to fix it, if possible.

Candoran2 avatar Apr 23 '21 14:04 Candoran2

It was just import a nif and it would cause a second material to be added to the object.

I would complete forget about the 2.7x version as that branch has been removed at this point.

neomonkeus avatar Apr 23 '21 16:04 neomonkeus

In the objects you are trying to export, you must set your shader type. Select BS Shader

This "Niftools Shader" is nowhere to be found. None of the properties tab have it.

Thanks for nudging this issue. I suspect you are using a more recent version (in fact I hope to release a new version this weekend), which has the newer texture nodes support. What version of the plugin are you using?

@Candoran2 Is this still an issue based on the way things work now.

I'm using 0.0.5. I tried to install 0.0.1 but it gave me errors. Blender version is 2.92. Here is how the object panel looks like:

Clipboard36

I cant find the nif shader tab, and always get this error when I try to export: Export version expected shader. No shader applied to mesh '<bpy_struct, Material("Material_30") at 0x0000000007769188, evaluated>', these cannot be exported to NIF.Set shader before exporting.

Wolfstorm321 avatar Apr 24 '21 19:04 Wolfstorm321

I am not sure if 2.92 will be compatible with the addon. Can you attach the files and steps you used to reproduce.

neomonkeus avatar Apr 24 '21 19:04 neomonkeus

I am not sure if 2.92 will be compatible with the addon. Can you attach the files and steps you used to reproduce.

I found it, it is in another tab, the "material properties" tab:

Clipboard37

Tutorials are pointing to the object tab, though. I was using a tutorial for 2.7x.

Wolfstorm321 avatar Apr 24 '21 19:04 Wolfstorm321

Yes, a 2.7 tutorial will not be useful for 2.8 series of blender.

Do you have 2 materials or not?

neomonkeus avatar Apr 24 '21 19:04 neomonkeus

Only one tab for materials, and some nif tabs have moved there in 2.9.

Wolfstorm321 avatar Apr 24 '21 19:04 Wolfstorm321

Can you share the file.

neomonkeus avatar Apr 24 '21 19:04 neomonkeus

https://mega.nz/file/BAkUXQbK#DucHO-54FumRYwdFzICRaD9DlKKh1gt97WyZF4jO7sU

The original model can be found here (glTF version): https://sketchfab.com/3d-models/ballista-e5750f261fc4460f89e237e7c0c69659

Wolfstorm321 avatar Apr 24 '21 20:04 Wolfstorm321