Page MenuHome

New Materials doesn't appear collada preview
Closed, ResolvedPublic

Description

MacOS 10.14.3
2017
27"
5K

Please do use Macintosh. Do not use Windows.

Blender 2.80 latest version February 1, 2019

Create new materials and work on texture I show you picture.
https://imgur.com/a/inYexxa

Export doesn't appear preview for Mac.
https://imgur.com/a/L2uON8e

Materials need to fix bug support collada.dae should appear preview on Mac. Blender 2.79b it work as well but 2.80 some bug.

Event Timeline

Gaia Clary (gaiaclary) triaged this task as Needs Information from User priority.

Hello, Kent;

please provide:

  • a blend file with your test cube that can be opened by Blender 2.79
  • a collada file that was made by blender 2.79 and that works with your viewer on the Mac

thanks

Sigh
New Materials will not work on Collada dae preview within Blender 2.80

Please do this:

  • Open Blender 2.79b
  • Create the testcube with 3 Materials
  • Export the testcube with the Blender Collada exporter
  • Check that the collada file works with your previewer on the mac
  • Attach the blend file and the collada file to this ticket

Hi Gaia,

  1. Blender 2.79b and I just create new 6 materials.

  1. Export collada .dae

a. Popmenu select SL/OpenSIM
b. Change from (UV Texture) to (Materials) popmenu

  1. Mac Preview yes appear there.

Blender 2.79b file

Just Blender 2.79b regular (Blender Render without Cycles Render)

  1. Blender 2.79b materials

You will see Texture #2 below.

  1. You can see texture I put each materials into texture.

  1. Export Collada and use SL/OSGrid and change from UV Texture to Materials

  1. You can see perfect texture there on materials within Mac Preview as well.

Blender 2.79b file

dae need to be 3 texture below come together.

I am wait for you to answer.

I am still wait for you to fix bug on Blender 2.80

While you are waiting you could try to figure out what exactly your viewer does not like in the Collada file. Since i have no Mac i can only guess. But you can inspect. Any information about the cause of the problem would help a lot.

Furthermore you do not need to remind us about open bugs. We know about them already :)

Sigh Blender 2.80 still bug because no show preview.

Had a quick moment to look into this. Looking at the diff of my Collada models, I notice something interesting.

2.79 mesh element, sub-element is using triangles.
2.80 mesh element, is using polylist sub-element.

A quick google search shows this might be a problem http://dayabay.ihep.ac.cn/e/graphics/collada/collada_viewer/.

I can look more into later, if you have any questions.

@Chris Williamson (chris) Evans , did you use your own Macintosh to check preview yet?

Blender 2.79b new materials can be show preview on Mac .dae.
Blender 2.80 new materials doesn't be show preview on Mac .dae.

@Chris Williamson (chris): When Blender exports a triangulated object, it should use <triangles> and not <polylist>. So, this certainly is a regression. thanks for your find!

Regarding the link you posted, that one refers to Blender 2.59. That document is very outdated. We have changed a whole lot since then to make the collada module more capable.

Yes, @Kent Davis (mac4kent) I used my own Mac (looks like we have the same model). I have only tested with my models, I can inspect your blender and model files later this week when I have time.

@Gaia Clary (gaiaclary) Hopefully this will help us track down the issue. I am gonna see about getting the blender source on my computer this weekend, so if you have any patch files or a git branch (please tell me Blender is using git) I can help debug the problem.

Sorry to Chris Williamson for getting pulled into this, they're too many Chris' (Chris's?) in the world. ;)

@Chris Evans (mgchris) thanks you for helping! I have added back the feature to use <triangles> instead of <polylist> for meshes which only use triangles. You can find the fix in master (commit df8bd07313b52a69b17fbd0dc1f84637264e86ed ) and yes, Blender uses git :)

However using <polylist> for storing triangles should not be related to the viewer problem, since it is actually just an optimization of the Collada exporter. Nevertheless i just had the idea that maybe there is a problem with Meshes which have texture coordinates (TEXCOORD) assigned but no materials. But even that should actually be no issue.

Had some time tonight, so I got blender installed and no luck with the code in master.

I imported my model into Xcode hoping it might give us some more information.



Nothing stick out to me as to what the problem might be.

I went through and reported this as a "bug" in Xcode and gave them my model. If we're lucky someone from Apple will tell me what's wrong with the model. But don't expect fast turn around from Apple and Bug Reporter.

Tangent: I am unable to build blender using Xcode, because of a bunch of Undefined symbols for architecture x86_64: "boost::filesystem::path::replace_extension(boost::filesystem::path const&)", referenced from:", etc. Building from the command line work though. Any tips on this?

Reviewing the diff tool and I think I found the issue.

<transparent opaque="A_ONE">
    <color>1 1 1 0</color>
</transparent>

This is in the 2.8 version. 2.79 does not contain this element. Note that the alpha value is zero.

@Kent Davis (mac4kent): You could help finding the reason for the issue. for example you could check if removing the <transparent> tag from the dae file would make the mac viewer able to display the file. Would that be too much to ask for ? As it is in your own interest.

Original materials without change appear on preview finder .dae
When add materials then apply make preview disappear. That what I show you on first above.
I just create to show you February 20, 2019 on Blender 2.80 beta

Quick lunch break.

@Gaia Clary (gaiaclary) Removing that element, or changing the last value from 0 to a 1. Will make the model visible in macOS Preview (and Xcode).

@Chris Evans (mgchris) i already fixed it in master. thanks for the find!!!

@Gaia Clary (gaiaclary) , @Chris Evans (mgchris)
You can notice February 21, 2019 I has been download at about 4:10 AM Pacific Time.

Should be preview red face.

I just add 2 more materials on green and blue. 4 pictures.

(*Rotate*)

Now you can notice should be color but did not made it color.

(*Rotate*)

@Kent Davis (mac4kent) Can you post your dae file, so I can take a look at it?

@Gaia Clary (gaiaclary) Had a moment to test blender and using the master (last commit 0ca623362d5e955f051c6cc5cdd69925248e7f76). When I export the model its alpha value is set to 0.5.

<transparent opaque="A_ONE">
    <color>1 1 1 0.5</color>
</transparent>

With Blender 2.8 I am not sure how to check what the color value is set to.

<transparent> must set all color values to 1 according to a comment in the code the attribute opaque="A_ONE" seems to be the clue here. Alpha is taken from Material->alpha_threshold which is filled from the principled BSDF Shader's Base color (alpha part) If a material has no Alpha_threshold (alpha_threshold=1), then the transparent node is not created in the exported collada file.

Furthermore as far as i know the Alpha value of a material might still not be fully implemented in Blender 2.80 I am not sure if ma->alpha_threshold will remain the value that shall be exported in the final 2.80 release.

I would be happy to know what exactly causes the issues in the Mac Viewer. Then i can fix it. But right now all of this is more guessing than knowing :(
Request to Mac people: please help to figure out what is wrong :)

@Chris Evans (mgchris) , Yes
@Gaia Clary (gaiaclary) , yes

@Kent Davis (mac4kent) I believe that your Blender is not up to date. Please can you download and try the newest Blender from 22-feb-2019.
Here is a quick link: https://builder.blender.org/download/blender-2.80-9541ce2c261b-OSX-10.9-x86_64.zip

Yes I did already on February 22, 2019. I always inspect first download before inspect everything I did.
Other country of February 22, 2019 and me USA February 21, 2019
I just click link right now from @Gaia Clary (gaiaclary) and let me check again right now on download right now.

There ya go February 22, 2019 at 11:23 AM Pacific Time (California USA)

I forget one more add on DAE snapshot to show you.

Hi, @Kent Davis (mac4kent) I now see what your issue is: You have disabled Nodes in your materials. This is currently not supported by the Collada exporter. So, at least for now you have to enable nodes on your materials and use the Base Color in the Principled BSDF Shader.

However, i will look into adding back support for materials without Nodes. But i first need to talk to the Material gurus to avoid adding unsupported features :)

Sure @Gaia Clary (gaiaclary)
What is principled, BSDF also I don't know where to find one.

google search: principled bsdf shader blender

Busy morning and just noticed I forgot to post a screenshot form the build I created this morning.

From what I can tell (looking at my models) macOS Previewer is looking at the transparent element and applying the transparency to the whole material. In the model that I exported that alpha channel was 0.5, which is why I am assuming my model looks semi transparent in Previewer.

For this particular model I have one material, here is the screenshot of it.

(Note I am barely getting back into 3D modeling, so I am not sure if I am using the right term when I say material, textures, elements, etc).

@Kent Davis (mac4kent) Had a quick moment to look at your model and exported file.

Thinking we're seeing two problems here so I am going break up my thinking and findings as such. We have hidden/transparent faces and missing material colors.

Missing faces:
The missing side of the cube looks to have the same issue as my model did, where the alpha channel is 0.

<transparent opaque="A_ONE">
    <color>1 1 1 0</color>
</transparent>

When I edit the dae file and change the alpha channel to 1, that side is no longer missing. I do find it odd that all the other material in this model has the alpha channel as 0.5 but macOS Preview isn't display them as semi transparent like my model. Could the difference be, that I am using a texture (UV map?) and your's are using material color?

Missing Material Color:
Looking at the cube dae file I notice that all the sides have the same diffuse values instead of the base color you have set in blender.

<diffuse>
    <color sid="diffuse">0.8 0.8 0.8 1</color>
</diffuse>

Thats all the time I have tonight. See if I can find out more this weekend.

Note I rename the materials to a, b, c, d, e, f, where a is the missing side. Because it make my life easier.

@Chris Evans (mgchris)
Correct.
Blender 2.79b is fine. Look above first, second, third I send. (February 1, 2019 and February 2, 2019)
Blender 2.80 bug.

Only way add materials then assist button that is all.
https://youtu.be/ve8O7zvWJ28

Good News Everyone! The models are getting exported correctly using changes from 5cc0bfa73a7257f3fa44d6894522aad3d81cdeb2.

I experience two issues, and not sure if they're related:

  1. I did have an issue when I exported my model for the very first time, it didn't show it's texture in macOS Preview. I exported it again and the texture was there. I haven't been able to reproduce this. I was using 5d822f4508755f90091ea474519bd6001ee8b3a6 when I first saw this.
  2. If I export with "Selection Only" checked and nothing is selected, Blender crashes (doesn't crash when using a debug build). I tested this with commit 0207d20cd4d400381db3788499bbcc5eb946463a (before your fixes this morning) and it is crashing there as well. Not sure if this is an existing bug.

@Chris Evans (mgchris)
Thanks.
Did you see last link on youtube short video yet?

Blender 2.80 February 24, 2019
Fixed very excellent on materials plus color congratulation. *PASS*
SecondLife/OSGrid upload is exactly match on fill face color is the same. *PASS*

I am not sure know yet.
We learn some more progressing and we will find out. This is my first time to see texture picture on materials face into OSGrid.
Now time to fix for texture on preview for Mac. Maybe you can figure it out through my youtube. @Chris Evans (mgchris) and @everyone
https://youtu.be/Sp_cYl5DUM8

I forget put texture (One.png) you will need put texture because of .dae require preview.

Blender 2.80 download of February 27, 2019 for Mac.
Upload fail is the same texture.
@Chris Evans (mgchris)

@Kent Davis (mac4kent) I looked at the test3.dae model, using Xcode (SceneKit Editor)

Xcode (I am assuming that Preview and Xcode are using SceneKit) is rendering that model with 4 different materials (red, green, blue, and texture map), and 4 "geometry elements" (that is what the screenshots above are showing). SceneKit only allows one material for each "geometry element", which I am assuming is correct way to render this model. To my eye's it looks like the problem is with the game engine you are using; not a bug for blender or macOS.

One thing to note is I do not know what "Operator Presets" "SI+Open Sim Static" does. I don't know if this is an importance detail or not.

@Chris Evans (mgchris) I have hurt my eyes too white you take 3 snapshot. I have Usyer Syndrome ( Deaf/low vision) I unable to look up 3 pictures.

Yes
SL = SecondLife online https://secondlife.com/
Open Sim = OSGrid online is https://www.osgrid.org/
Blender 2.79b it work no bug. I know Blender 2.80 bug.
Blender 2.79b can do that 6 separate faces (materials) fill color and texture it work. (Normal "Blender render" not "Cycles Render")

@Chris Evans (mgchris)
Use Blender 2.79b only

Please avoid to reuse this report for followup issues.
This issue has been fixed and this report has been closed.

@kent: I can not reproduce your issue

  1. I checked your collada file test3.dae (ok)
  2. I checked your blend file test1.blend (ok)
  3. I exported your blend file to test1.dae
  4. I imported your test3.dae to Secondlife
  5. I imported my test1.dae to Secondlife

Please accept this report is final.

Sigh again I forget to put texture.

Gaia Clary (gaiaclary) changed the edit policy from "Custom Policy" to "Collada (Project)".Feb 27 2019, 10:01 PM
Gaia Clary (gaiaclary) raised the priority of this task from Needs Information from User to Confirmed, Medium.