GAZ082 Posted August 3, 2015 Share Posted August 3, 2015 Hi there. I'm trying to import a simple character to play a little with babylonjs. But when i do it, i get on the log: WARNING: No materials have been assigned: On the left is how it's rendered by babylonjs, on the right, what should it be: I modified nothing on the original Blender file. Just loaded and hit export to Babylonjs. What might be wrong? Thanks! Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted August 3, 2015 Share Posted August 3, 2015 This is a question for our blender god: Gryff Quote Link to comment Share on other sites More sharing options...
gryff Posted August 3, 2015 Share Posted August 3, 2015 Hi Gaz - welcome to the BJS forum Can you post your blend file somewhere so I can look at it? You can PM me the link if you wish. And did you create the model - or was it imported from somewhere else? cheers, gryff Quote Link to comment Share on other sites More sharing options...
GAZ082 Posted August 4, 2015 Author Share Posted August 4, 2015 Hi gryff *bows* Here is the model! http://www.blendswap.com/blends/view/80046 Thanks! Quote Link to comment Share on other sites More sharing options...
gryff Posted August 4, 2015 Share Posted August 4, 2015 Well Gaz, I have the model ... and you have a couple of issues; 1. The model uses the Cycles Render Engine and all the materials are built through the node system. Currently the BJS Exporter supports only the Blender Render Engine. Jeff Palmer (JCPalmer who looks after the exporter) is working on this so watch for developments 2. The scene has 10 lamps illuminating the mesh. WebGL allows a maximum of 4. It is not the cause of the problem - but just remember that as you play with BJS. I will spend more time with the file tomorrow. Ooh and as for Deltakosh's remarks, remember the old piece of philosophy: "In the kingdom of the blind, the one-eyed man is king" (Erasmus 1436-1536) cheers, gryff GameMonetize 1 Quote Link to comment Share on other sites More sharing options...
JCPalmer Posted August 4, 2015 Share Posted August 4, 2015 I was able to download this to test. Good since I do not have a lot of Cycles samples. Actually 3 meshes in this scene. The Cycles capable release processed the file fine. Took a while, but I ran it under Ubuntu, & I cannot turn on GPU accelerated Cycles rendering. Am not going to take time to publish, but here was the log file: Exporter version: 3.0.0, Blender version: 2.74 (sub 0)========= Conversion from Blender to Babylon.js ========= Python World class constructor completed processing begun of mesh: Dientes WARNING: No materials have been assigned: num positions : 6656 num normals : 6656 num uvs : 0 num uvs2 : 0 num colors : 0 num indices : 36864 processing begun of mesh: Cuerpo processing begun of baked material: Cuerpo Cycles baking texture, type: DIFFUSE_COLOR, mapped using: BakingUV Cycles baking texture, type: SPECULAR, mapped using: BakingUV num positions : 28385 num normals : 28385 num uvs : 56770 num uvs2 : 0 num colors : 0 num indices : 147456 processing begun of camera (FreeCamera): Camera processing begun of mesh: Lengua processing begun of baked material: Lengua Cycles baking texture, type: DIFFUSE_COLOR, mapped using: BakingUV Cycles baking texture, type: SPECULAR, mapped using: BakingUV num positions : 5824 num normals : 5824 num uvs : 11648 num uvs2 : 0 num colors : 0 num indices : 29952 processing begun of light (POINT): Lamp.009 processing begun of light (POINT): Lamp.008 processing begun of light (POINT): Lamp.007 processing begun of light (POINT): Lamp.006 processing begun of light (POINT): Lamp.005 processing begun of light (POINT): Lamp.003 processing begun of light (POINT): Lamp.002 processing begun of light (HEMI): Lamp.001 processing begun of light (POINT): Lamp========= Writing of javascript file started ================== Writing of javascript file completed ================== end of processing =========elapsed time: 1 min, 42.3217 secsThey are using a Glossy node, which is what I pencilled in to do a specular bake. The diffuse of the body looked right: But I am concerned about the specular. I can generate any type of bake possible, but I have to define the needs, recipe. I asked for input on which node types should cause which bake types in another topic, but no one responded. Not sure this specular texture is right. Anyway, I have more to test with: Quote Link to comment Share on other sites More sharing options...
GAZ082 Posted August 4, 2015 Author Share Posted August 4, 2015 Thank you guys. I think ill have to manually set the textures when switching engines? It's been like 6 years since i messed up with Blender, heh. I dont know what just JC posted, looks like dissected the poor ghosty :'( Funny you do not have cycles samples, i just downloaded 4 or 5 models from blendswap.com and all were Cycles. Quote Link to comment Share on other sites More sharing options...
gryff Posted August 4, 2015 Share Posted August 4, 2015 From your log file Jeff: Exporter version: 3.0.0, Is this the latest version available from the BJS github site, or is it still a version you are working on? As for the spec map above, I would have expected a greyscale image - see this tutorial (at 13.00 min.) : Blender/Unity Specular and Normal Mapping But maybe BJS handles spec mapping in a different way from Unity. cheers, gryff Quote Link to comment Share on other sites More sharing options...
JCPalmer Posted August 4, 2015 Share Posted August 4, 2015 GAZ, you have been out of the game too long. Those are what 2D textures of 3D objects look like. Exporter generates a smart project UV map called: BakingUV. Deleted once done along with any temporary images. Gryff, yes this is not published yet. If you wish to test either exporter, pm me. Still testing & documenting, which the exporter badly needs. I loaded up this thing & specular was definitely wrong. I commented out the specular & got this: https://googledrive.com/host/0B6-s6ZjHyEwUfkhYdW1yQ2hqTU90SUx6SzFjaVY3TnlQLVA2WmNSdDE5NWJubV9Cc1l2ekE/index.html . Not sure why there are no eyes. Looks like a "Glossy" node puts it data into a diffuse bake. Have ripped out checking for anything to do a specular bake. I'll just wait till someone complains it is missing, and then I'll know what should trigger it. Quote Link to comment Share on other sites More sharing options...
gryff Posted August 4, 2015 Share Posted August 4, 2015 Exporter generates a smart project UV map called: BakingUV. Even if the mesh in question already has a UV map, Jeff? cheers, gryff Quote Link to comment Share on other sites More sharing options...
JCPalmer Posted August 4, 2015 Share Posted August 4, 2015 Yes. Presumably if there are image textures that are assigned a UV map, they will used to render, but then be baked using the temp one. When baking, the temp UV is the only one that will be written to the .babylon / .JS file no matter how many UV maps there are. Though I have fixed when there are multiple UVs. The first one always was set to be used. I had thought of using one if I found it, but what if there was more than 1? Also, if I just did an unwrap, instead of a smart project, the Gingerbread man was terrible, and minutes instead of seconds to do it. Smart project always seems to do something good. Might be hedging a little for the newbie, but for so major an addition, seems like the thing to do for an initial release. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.