Jump to content

Weird Instance Behavior


Pryme8
 Share

Recommended Posts

So I am doing a hex grid system, and to stop the textures from being repetitive I have multiple textures of the same 'block' type being built.  In this example 2.  As soon as I try to rotate between the instance I am using the system acts really weird and like layers the blocks together and the screen glitch's.  Prior to wanting to use multiple instances it was working fine and I had no glitch's.

Any ideas?

https://pryme8.github.io/LOB/

https://github.com/Pryme8/LOB/blob/gh-pages/js/lob.js

Link to comment
Share on other sites

@Deltakosh
  I think I may have found a bug with 2.5, Im not sure Ive  never seen this behavior before.

So I load a OBJ file, and then assign that to an object presets['Rock'], then set it to disabled so it does not render.  Then I made clones of the preset and assigned different materials also setting them to disabled.
Now the weird behavior happens when I try to use more than one of my presets, so lets say I have a rock hex and a dirt hex they both should have separate identities and should not conflict with each other but this is not the case. Everything handles fine I can add as many of a single preset as I want but the second I try to use a second one the first one that I was using disappears or stops rendering depending on which other instance I add and the material starts jumping between the two that the instanes had assigned on all instances on the sceen...  like shit is bonkers.

Any clue?  Ill upload the newer version right now that shows the it in action.  if you click on one of the hex tiles it will add a new one on top and thats when everything goes to hell... but does not do it if I do it with a single instance only.

 

https://pryme8.github.io/LOB/  I just uploaded a new version that shows what happens when you add a new one, all the first instances disappears.  which id different behavior then when I am spawning them.  The version I had up last night did some really weird stuff but I think this one will be easier to debug.

Basically Instances are looking broken to me.  I cant use clones, that is way too many draw calls... um maybe clone them and them combine them as a work around?  Most the hexs will be static, the problem is there is like 18 different types and each one has like 3-4 texture variations.  And I want to stay away from merging, because of the flowing water hexs...

hmm who might have and idea... @jerome, @Temechon, @Vousk-prod.

Link to comment
Share on other sites

I don't clearly get what you're talking about, but when I click an hex tile, some strange things definetly are happening.

I don't know what I should see, but sometimes a click changes material for a tile, sometimes it makes all "flat" tiles invisible and "layered" tiles appears... But in console I see that some .mtl are missing, couldn't it be the problem ? (when a texture or a material is not found, WebGL render the object with "nothing" as material, so the object is just invisible).

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