Jump to content

SpiderPig

Developers
  • Posts

    2,258
  • Joined

  • Last visited

Everything posted by SpiderPig

  1. And I don't need anything special in my custom frag shader? This should read the texture no matter where it comes from yeah? vec4 texColor = texture( texture2DSampler[ GetMaterialTextureHandle( materials[ inMaterialIndex ] , TEXTURE_DIFFUSE ) ]
  2. Up till now this was my working code; texture_buffer = CreateTextureBuffer(size.x, size.y); camera->SetRenderTarget(texture_buffer); material = CreateMaterial(); material->SetShaderFamily(LoadShaderFamily("Shaders\\Unlit.json")); material->SetTexture(texture_buffer->GetColorAttachment(), 0); model->SetMaterial(material); I switched the material out for a custom one I made and am getting an error in the rendering thread I think. I've not given it much thought yet but was wondering if the shaders need something special to access the texture rendered from a camera? I was thinking it should be a normal texture lookup in GLSL but I may be wrong.
  3. Discord for TheSeventhWorld Getting back into the swing of things! I made my own UI system, mainly so I could make materials for widgets and do some cool effects down the track. This is the second time I've made this inventory, first time was in Leadwerks, this time in Ultra. Ultra is looking much nicer and is soooo much faster. Can't wait to get some color into it.
  4. Your defiantly on the right track but there are a few things I'd do differently. First learning the keyboard shortcuts will improve your workflow ten fold and will reduce any errors by visual moving each tile into the correct position. I'd make all your tiles the same sized square, rather than the street corner a square and the straight a rectangle. That way the grid size in Leadwerks will be all the same for each piece. After setting the origin to the cursor, if you click 'N' it'll show you the objects position in blender and you can set XYZ to 0. The model's origin will go straight to the centre and I'd export from there. Do that for each tile, I think FBX will export it's offset from the world origin and can stuff up tiling in Leadwerks. I wouldn't scale on export (that's probably just my preference though) I would scale the mesh in blender to the size I wanted, make sure the objects scale is applied in blender with Ctrl+A. Sometimes odd scales can cause issues. If you have consistent tile sizes and consistent export locations there shouldn't be any problem in Leadwerks. At least not with geometry lining up.
  5. With Ultra, shader texCoords are vec4's but I recall @Josh saying you got rid of the second coord set? Is something else stored here now or can I still use the second set? I see there is still Mesh::SetVertexTexCoords() which can still take the index as a parameter...
  6. It was working until the new system you made with mesh colliders by using AddFace().
  7. Tried it and it made no difference. I'm pretty sure I've put the collider in the right spot...
  8. I think I did... but let me check again...
  9. Hey @Josh, do you have time to take a look at this soon?
  10. I'll be back in a few hours. If you upload all your exported files I will test it out myself in Leadwerks. We will fix this. 😉
  11. Hope it is resolved! Sometimes all it takes is for a rethink of the basics.
  12. I can see the tile positions aren't perfect. So it might be easy to make a mistake in recalculating the tiles origin.
  13. If you upload the blend file your exporting from I can better check it out. It does sound odd.
  14. I can also see that all the origins for the tiles are different. I'm not sure how your exporting but it might be the problem. Make sure that each tile has the same origin (one of the corner perhaps) and then move that tile to the world origin before export as FBX. That way the you can rotate the tiles in Leadwerks and they'll all rotate about the same point.
  15. Can you upload one of the tiles you've exported?
  16. I loaded it in blender. So your just exporting each once of those street tiles into Leadwerks and not editing the geometry before hand?
  17. It would be something with your models I think. Normals, tex-coords or just vertex positions. If you upload a blend file (or PM me if you wish) I'll take a look in blender for you.
  18. Okay cool. Thankyou. I'll see what I can do.
  19. Cool thanks. I did notice that with the TRANSFER hook the callback is being called multiple times unless repeat is set to false. Is that okay?
  20. Curious on the exact difference between HOOKID_TRANSFER and HOOKID_RENDER? I mean they both call the same function type but I take it they call it at different times within Ultras rendering process?
  21. Okay thanks, I'll investigate!
  22. Has it been documented yet?
×
×
  • Create New...