Jump to content

Texture properties - Blender to Babylon


paulsouthport
 Share

Recommended Posts

Hi all

 

When I load a Blender .babylon file, the textures all have a weird excess phong/softness - the edges disappear and everything appears rounded. 

In the attached image, the pink cube has a babylon standard material, the green cube is from Blender and has a material specified in Blender.

 

How do I get nice crisp edges - ie. what is the correct Blender material settings?

 

thanks chaps!

Paul

post-13874-0-69055300-1440182043_thumb.p

Link to comment
Share on other sites

Hi paul.

 

 A question. Are you using the same lights from Blender for both cubes? Or is the red cube just a scene done strictly in code?

 

From the paleish green patch near the top of the green cube it seems to have a specular component to the material.

 

In the Materials Tab in the properties panel you will notice that the default specular colour is white and has an intensity of 0.5. Change that intensity value to 0.

 

Does that improve it ?

 

cheers, gryff :)

Link to comment
Share on other sites

Hey Gryff!

 

Thanks for the reply, it's a single scene, no lights in the .babylon, but a hemi and a directional in the JS.

I changed the spec to 0 but found that, on the "Object Data" tab, checking flat shading helps

 

It's a bit weird, and makes the scene look odd, but, getting there!

 

thanks

Paul

Link to comment
Share on other sites

Heyho,

 

you could try mesh.convertToFlatShadedMesh(); and see if it helps. Alternatively you can try setting the flat shading in Blender.

 

That animated GIF in this thread shows the button I mean: http://blender.stackexchange.com/questions/17929/where-is-the-smooth-flat-shading-property-of-an-object

 

Usually cubes created in Blender should have the flat shading, though. No clue why it's not like that for you. Maybe you created your cube in a different way.

 

 

By the way: keeping smooth curved surfaces but hard edges: http://blender.stackexchange.com/questions/734/how-to-smooth-shade-an-object-while-retaining-hard-edges

Link to comment
Share on other sites

you could try mesh.convertToFlatShadedMesh(); and see if it helps. Alternatively you can try setting the flat shading in Blender.

 

iiceman, FYI the blender setting results in a convertToFlatShadedMesh() call by FileLoader.ts.

 

I am assuming these are just standard cube created by Blender, so it is not a normals problem.  Perhaps posting your .log file will help.  And also a screen shot of your texture properties.

Link to comment
Share on other sites

Hi guys

 

I have started setting the Use Flat Shading tag on most of my materials and the edges are good.

 

would using the EdgeSplit drastically increase poly count? I have a fairly complex scene, in terms of number of objects and materials, and need to keep it useable on lower end devices and weak PC's.

Link to comment
Share on other sites

FYI, it looks like it was the normals.  DK just committed 3.0.4 exporter, which changed the default type of normal produced.  Before you always got vertex normals.

 

Now the default for NoVertex optimization is True.  When True, you get face normals.  Please rerun without resorting to Flat shading.  That recomputes normals in BJS, post load & is not a valid test.  Your files are probably going to get bigger than before.

Link to comment
Share on other sites

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.

Loading...
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...