Jump to content

Flickering house


ozRocker
 Share

Recommended Posts

Does anyone know why this house is flickering around the windows? http://www.babylonjs-playground.com/#28YUR5#212

You can download the ZIP file of the house here if that helps http://preview.punkoffice.com/obj/building3.zip

I've looked at it in Blender and can't see double faces or incorrect facing normals.

Edited by ozRocker
Fixed link
Link to comment
Share on other sites

@ozRocker: I had no problem (almost) loading the .obj file into Blender and then exporting. Maybe it has something to do with the .obj importer you like to use ?

If you can load it into Blender, why not export it from Blender?

The one issue I had - model size. It is equivalent to 130 BJS basic 1 unit boxes high  - I had to move my standard camera way out

But no flashing!

cheers, gryff :)

Link to comment
Share on other sites

5 minutes ago, gryff said:

@ozRocker: I had no problem (almost) loading the .obj file into Blender and then exporting. Maybe it has something to do with the .obj importer you like to use ?

If you can load it into Blender, why not export it from Blender?

The one issue I had - model size. It is equivalent to 130 BJS basic 1 unit boxes high  - I had to move my standard camera way out

But no flashing!

cheers, gryff :)

Interesting.  So in the playground, when you move the camera around the object you don't see any flashing around the windows, like Z competition affect?

I need to import as OBJs because random users will be uploading OBJs.  I don't want them to have to download Blender and plugins to convert to .babylon

Link to comment
Share on other sites

Sorry to butt-in, guys.  http://www.babylonjs-playground.com/#28YUR5#214

I see z-fighting around the pea green 4-pack windows on the first floor.  Almost like an extra set of windows is super-imposed atop.  One set of green windows... a little z-jaggies.  The other, a BUNCH.  hmm. Just passing-on what I see.  Be well, guys.

Oh wait... I see some jittering on the top floor windows, too.  Extra hmm!

Link to comment
Share on other sites

@ozRocker and @Wingnut: Here is the exort as a .babylon file from Blender:

The Shop

Now there are some differences between it and oz's original PG - the textures. Note the name of the shop "Carpet Barn" - it is a mirror image in the PG.

Also looking at the model in Blender - there are a lot of edges marked as sharp. How does the BJS obj importer handle these?

cheers, gryff :)

Edit : the textures are huge - 4096px by 4096px - 4+MB each

Link to comment
Share on other sites

Is there something I can do in Blender to make it not flicker when imported as an OBJ?

I know about the inverted Z axis with OBJs.  If I switch to right-handed system using scene.useRightHandedSystem = true the problem is still there.

Link to comment
Share on other sites

Yes, there's definitely z overlapping, but there are no overlapping polygons.

However, @gryff put an idea into my head.  Exporting to .babylon turns it into tris.  I had a look at the .OBJ file in Blender and there are some n-gons in there.  I used the "triangulate" modifier to remove the n-gons and now there's no z-fighting :) You can see it here http://www.babylonjs-playground.com/#28YUR5#215

What kind of lazy-ass puts up n-gon models on TurboSquid??

Link to comment
Share on other sites

@ozRocker; Glad you found a fix :)  Funny, looking at the type of mesh it is - a simple building with doors and windows - I would never have modeled it with n-gons.

But it maybe that the modeler used a "knife" tool to do certain things - can create n-gons fast :o

As for getting 3d models of the internet for use with web3d - some are good, some are poor. And in my experience, price is no indicator of quality!.

I still think the model scale and texture size are going to be issues.

But good luck with your project.

cheers, gryff :)

Link to comment
Share on other sites

ok, I increased compression on textures to drop the filesize down by half.  I'm considering using GPU texture compression but in my experience that makes the filesize bigger.  So there's a trade-off between faster downloads and saving RAM.  Not so important on desktop computers but mobile devices have shared RAM and its easy to crash the browser if you have too much going on.  Something I need to experiment with.

You can see the house being used in my virtual world http://threedium.com When I upload an OBJ it automatically scales to a reasonable size.  I use bounding box size to find absolute size then resize it before displaying.

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...