Jump to content

some problems...


Recommended Posts

Hi M.  Just like your last issue... this is difficult for us to help-with.  It LOOKS LIKE a problem with the model.  How about adjusting .blend file (if using Blender)... so it has ONE window, and ONE tree?  When your .obj and .blend files are simple, it it easier to discover WHY the problems are happening.

Have you got a free github account?  That is a great place/way to publish some simple .blend and .obj files... and then display them in the playground without CORS-interference.

Although we don't normally help with modeling problems (Blender has its own help forums)... there are some very kind people here... who HAVE helped people operate Blender.

Without providing some simple files for us to test-with, we can only guess the solutions.  My guess is that you have some z-fighting issues... where the windows are placed at the exact same "layer" as the walls.  Windows need to sit "atop" the walls, perhaps .01 units "higher" (z-wise) than the wall surface.  When z-fighting is the issue, camera movements and zooms... make these areas "flicker" and "flash". 

Do you see any flickering on the windows... when you move a camera?  If so... there is z-fighting issues.  Then it needs adjustments in the modeler... to keep windows at a different "layer" than the wall.  Also make sure there are no rotations on the window...which could cause parts of the window to be under the wall surface.

It takes some practice and patience to find these modeling issues that cause problems for WebGL.  The more simple the test models, the easier it is to experiment.

If you have a free github account, you can drag'n'drop small, simple .blend and .obj files... into your github folders.  Then we can load them into playgrounds and view the small .obj files... looking for reasons.  It is just not easy to find problems... using pictures of the problem.

Do your best to make it easier for yourself and forum helpers.  If you are using borrowed .obj files, I suggest you import them into Blender and check them carefully... for things that can cause z-fighting.  WebGL is still new, and it wants things to be correct.  It is unforgiving of sloppy modeling.  It wants precise modeling, and will become grumpy when mesh overlap in the wrong places (this is because of webGL depth-rendering). 

Keep experimenting (with very simple models/windows/trees, etc), and tell us what you learn... which will help others learn, too.  thx.

Link to comment
Share on other sites

Make sure to flag your texture with texture.hasAlpha = true (Seems to be an alpha test issue)

To do that in blender, make sure that the texture has its "use alpha" checked.

Regarding your question, let me try to give you an analogy:


Hey team, I've just broken my car, can you advise? Here is what it looks like so far:



It is nearly impossible to help if we cannot see the car and open the motor, right? 

For babylon.js it is the same, we need to see the bug live. The playground is the perfect tool for that as we can experiment with the code. We REALLY want to help but we need a bit more than pictures :)

Link to comment
Share on other sites

@mout99 Look at your 1 & 2 - the trees straight at the camera are missing. Image 3 however has all the tree images - it it allows you to see the other side of those missing images.

Those images are on planes and will only show on one side unless you set "backFaceCulling = false" for those planes. 

And if you just want to show just the tree - as @Deltakosh said above - you need to fix the alpha issues.

gryff :)

Link to comment
Share on other sites

Ahh, yes gryff.  Tree textures need alpha setting... so they can be see-thru background... so they don't block another material from being viewed.

Interesting.  This is one of the reasons I hate modeling.  :D

Yuh yuh yuh.  I hope mout has the patience and willingness to experiment... to understand what is happening.

Mout needs a playground with a few planes... with tree images on them.  Put some in-front-of others... and play with texture.hasAlpha = true/false... and good around with rotating them backwords and seeing if/how they block the view of background planes... when backfaceCulling = true (the default).

He needs some little mad scientist experiments to play-with.  Our materials playground has some of that.  It is a simple playground, yet... MANY THINGS about materials... are shown/taught there.

Still, wouldn't it be nice to have "Everything you ever wanted to know about BJS/webGL materials"?  But nobody would read it.  :)  BJS materials are quite powerful... there's lots to learn about them.  Keep truckin', Mout.  Little experiments.  Little tests.  Can't take over the world on day 3, yet.  :)

Link to comment
Share on other sites

My pleasure.  Forum helpers are trying to discover the answer to your question.  After you are able to publish your SMALL testing .blend files on github, we might be able to learn the answer.  Until then, we are somewhat blind.  But we don't want to examine a HUGE .blend or .babylon file.  We want to see the problem happen... with only one tree and one window and not much building.  Make very simple .blend file... and you/we will discover issue faster.

You haven't answered IF/NOT these are "borrowed" models.  Did you model them?  Do you know enough about Blender to DO a small/simple version of these models and still show the problem?  These are things we don't know.  :(

I know one thing for sure.  The quicker you can get .blend and .babylon files (preferable LITTLE ones) into a github account... so we can tesdt them in the playground, the faster this issue gets solved.

Link to comment
Share on other sites

Ok, so you are not using Blender at all, right?  Only importing .obj files into BJS scene?  Ok, thx. Yeah, you need to somehow "publish" a few of those .obj files... and then we can put them into playgrounds... and start banging on them with a hammer and see what happens.  :)

Are you having problems finding good docs for opening free github account?  Need translating or anything?  Maybe I can help with that.

Link to comment
Share on other sites

1 hour ago, mout99 said:

These are borrowed files, I do not know how to create a 3d file


I would first obtain a basic knowledge of a CAD program and how to create basic 3d files as a baseline for this.  Wanting to work in a 3d environment but not having even rudimentary knowledge of the creation process is going to limit you my friend.

Download blender and do a few tutorials, then start working BJS in.

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.

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.


  • Recently Browsing   0 members

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