Jump to content

Pastaspace

Members
  • Posts

    60
  • Joined

  • Last visited

Everything posted by Pastaspace

  1. Yep, that works just fine! One question though, is it possible to resize a buffer at all?
  2. I already know how to do that, I'm talking about applying that to things like contexts and similar.
  3. After a few tries on my own, with no luck, I've decided to ask for help. What I'm trying to do is have a separate and smaller context/render area out on the screen. Basically anything drawn outside of the area gets cut off. So for example, drawing a 200x200 image inside of this area, if it was 100x100, would only render part of the image. I'd be using this for minimaps and similar. Basically this. I have a general idea of how do to this, but then again, not really. So what do I do? My main guess is that it involves creating and drawing to a separate buffer, but there's limited documentation on buffers.
  4. Not last I checked, no. Edit: The blendmode was already alphablend, so nothing helped there.
  5. Yeah, I definitely don't have diffuse+normal+alphamask.shader, searching through anything. And you're absolutely sure I can't have this interface be 3D and transparent? It'd really add a lot to the feel of things.
  6. No dice, not exactly. There's a few issues. First, there's no diffuse+normal+alphamask.shader, only a diffuse+normal+specular+alphamask.shader Second, while it solves the issue of the background (which is now fully transparent) disappearing, the transparent aspects of the textures now disappear as well. Example. Probably because the shader is discarding those pixels. Ideally though, it should have a slight transparency for those textures, basically like this.
  7. I've tried both the diffuse and the transparent.shader, but not the alphamask one. For the color, is that the material color that needs to be set, or the context color?
  8. I'm not sure if this should go in the programming or the game art section, since it seems equally split between the two sections. My GUI is drawn on a 3D model, as that thread shows, the way I'm doing this is drawing to a buffer and having that buffer be the texture of a plane. That works just fine, except for one thing. No matter what I do, the buffer background is always rendered. That is, even though it draws all the elements, it draws them on a white screen. Example here. I simply want the plane to draw my textures, semi transparent if need be, and nothing more. Having the material for the plane use the transparent.shader texture doesn't work, it's applied there and it just makes the white background transparent as well, rather than get rid of it entirely. My question is, what do I need to do to have it just render the textures I draw, rather than the textures + that white background?
  9. Is it possible that one can draw on a model. That is, normally, I would have a UI by drawing 2d images with the context object, what I want to instead is have a 3d object, a plane that displays the player's health and other attributes, that evidently updates with the relevant information. Does Leadwerks support this?
  10. Have to tweak things around, but yep, that worked. Thanks.
  11. Tried that before, it gives me the distance between the entities, which does not always function correctly, for example, for a lot of larger objects.
  12. What I am trying to work is out code that allows the player to use objects, in this case by pressing the E key when their mouse is over a usable object. Now this is done, the problem is the range. Using a pick, the camera will pick something regardless of its range to the player. So even if the button I use is fifteen miles away, it'll still activate it as long as the mouse is technically over it. My question is, Leadwerks 2.5 allowed us to give the pick a distance (anything past that distance was ignored basically), how do I do this in 3.2? tp_toPick.distance doesn't work. It always returns -1 regardless of distance. Basic code is here, with the action code cut out. if (window->KeyHit(Key::E)) { if (camera->Pick(centerMouse.x, centerMouse.y, tp_toPick, 0, true) == 1) { //If things are a certain distance, perform the relevant action on the pick. } }
  13. Alright, nice to know it's a possibility. Anyone have any idea where I would start with implementing such a thing?
  14. Just wanting to get a feel for what the engine can and can't do. Say there are two models (in this case, human bodies, one thin and one bulky). Is it possible for Leadwerks to "slide" between the two models (offering in-between versions of both types), similar to how a game such as, say, Skyrim works?
  15. Yep. No matter what distance my camera is from the pickinfo, it returns -1.
  16. I'm also getting this issue, performing a camerapick, then checking the pickinfo.distance variable, it's always -1 no matter what distance I'm at relative to the picked thing.
  17. I've done all that. This is not the actual code, merely a similar example to help demonstrate what I'm trying to accomplish. What I'm trying to do is use DrawImage and similar Context functions in a separate object. I can call anything just fine in the main body where the original context object was initialized, but cannot pass it to another object for use, this is what I'm trying to figure out.
  18. I've been working on converting my game to 3.1's engine, and I've run into a bit of a snag. Basically, the things that handle my inventory are separate objects, in separate files from the main Start and Loop portions. These objects also contain the functions for drawing the player's inventory (a mix of DrawImage and DrawText). However, this doesn't seem to work, and I always get an "Assert failed" error. This is a basic version of what my code is doing. In my main program, I create a context window as well as an inventory object and similar. App::App() : window(NULL), context(NULL), world(NULL), camera(NULL) {} inventoryObject myObject; bool App::Start() { window = Window::Create(); //Create a rendering context context = Context::Create(window); return true; } Somewhere in my InventoryObject's list of functions is the one that draws its image, it it passed the context it renders on from the main program. InventoryObject.cpp is, obviously, a separate file. void inventoryObject::DrawObject(Context* cc_Context) { cc_Context->DrawImage(myImage, 0, 0); } Then in the main loop, it calls this function. bool App::Loop() { if (window->Closed() || window->KeyDown(Key::Escape)) return false; Draw::SetColor(0,0,1); context->Clear(); Draw::SetColor(1,0,0); myObject.DrawObject(context); context->Sync(); return true; } However, again, I get an assert fail error. Is there something here that I'm missing, or do I have to draw all my context images and text in the main program only?
  19. Now, if I wanted to turn a pre-existing mesh of mine (say an .obj) file to a .phy file for 3.1, how would I do this?
  20. Recently upgraded to 3.1 from 2.5, and we brought a lot of models over. The problem is, their old 2.5 .phy files don't load in the 3.1 engine, and I can't find any documentation on making or generating .phy file models. Anyone able to help?
  21. If that is the case, is there at least a good way to make the gun have a similar shiny shiny look to it?
  22. Basically, what the problem is is that in Marmoset and dDo, the textures applied to one of our modesl look like http://i.imgur.com/rGiWCpH.jpg in accordance to concepts and the artistic vision of the game. However, when attempting to convert the model into a format compatible with Leadwerks, the model instead ends up looking like http://i.imgur.com/XJ0HMrg.png. We believe this has to do with the way either Leadwerks or the .mat file is handling the Normal and specular maps and also the loss of a gloss map, which was integral to the look of the original concept, and can't really find a solution or decent documentation on properly transferring over such textures. So does anyone here know what the problem actually is?
  23. That would be the entity returned by LoadScene() correct?
  24. Couldn't find a good topic on this, so I'm gonna ask myself. Say I have a scene that I've loaded, and inside the scene I want to retrieve all of the entities of a specific type (like say, I want to get all the oil barrels for my barrel-romance simulator). The problem is, I can't find a place to start. How would I implement a function where I could parse a scene for all of a type of entity?
×
×
  • Create New...