larsiii23

Members
  • Content Count

    17
  • Joined

  • Last visited


Reputation Activity

  1. Like
    larsiii23 got a reaction from Wingnut in Multiple problems using VideoTexture   
    Good initiative. Am a little busy these days, and not a hell of a writer neither to be honest. If you don't bother adding it to the wiki that would be very nice. I can take a look and see if I got anything to supply. Not familiar with wiki markdown, but I'll guess it's not to hard to learn
  2. Like
    larsiii23 got a reaction from Wingnut in Multiple problems using VideoTexture   
    Interesting. These are the values I get:
    For the plane created in javascript (that works):
     uv: 0,0,1,0,1,1,0,1  pos: -2.5,-2.5,0,2.5,-2.5,0,2.5,2.5,0,-2.5,2.5,0  ind: 0,1,2,0,2,3   For the plane imported from the blender scene (that doesn't work):  uv: null  pos: 1,0,-1,1,0,1,-1,0,1,-1,0,-1  ind: 0,1,2,3,0,2     So it looks like there is some problem with the uv mapping for the blender imported plane.   By then setting the uv coordinates manually in the javascript fixed the problem!   setVerticesData("uv", array_of_UV_coordinates, true)   Thank you so much for your help Wingnut!   Screenshot  
  3. Like
    larsiii23 reacted to Wingnut in Multiple problems using VideoTexture   
    Interesting!
     
    Here's a piece of code that you can run on both planes... to help see the differences:
    console.log(  "\n uv: " + videoPlane.getVerticesData("uv") +  "\n pos: " + videoPlane.getVerticesData("position") +  "\n ind: " + videoPlane.getIndices()); For step 3, videoPlane.getVerticesData("indices") returned NULL for me, so I used the getIndices() function.  I'm not sure if that is important, but I suppose it COULD be.
     
    For BJS plane... this returns:
     
    uv: 0,0,1,0,1,1,0,1
    pos: -0.5,-0.5,0,0.5,-0.5,0,0.5,0.5,0,-0.5,0.5,0
    ind: 0,1,2,0,2,3
     
    Know about that stuff?  uv are 2 values per point, pos are 3 values per point, ind are 3 values per face (there are 2 triangles in the plane.  If the indices are drawn in CLOCKWISE order, the triangle faces are frontfaced/backfaced in a certain direction.  If drawn COUNTERCLOCKWISE, backface becomes frontface and vice versa.). 
     
    We could also check the "normal", but that is a lighting thing, and I don't think it applies to this issue.  There's also uv2, color (per vertex), and a couple of others... but probably not important here.
     
    I don't know if anything can be learned from doing this to both types of plane, but, I thought I would tell you about it. 
  4. Like
    larsiii23 got a reaction from Deltakosh in Meshes translated to origin after Blender export   
    Sorry, but the reason to the problem was only my own code. I had forgotten to remove a line which translated the last added mesh to origin.
    Useless thread, can be deleted