Jump to content


  • Content Count

  • Joined

  • Last visited

Everything posted by Josh

  1. Current generation graphics hardware only supports up to a 32-bit floating point depth buffer, and that isn't adequate for large-scale rendering because there isn't enough precision to make objects appear in the correct order and prevent z-fighting. After trying out a few different approaches I found that the best way to support large-scale rendering is to allow the user to create several cameras. The first camera should have a range of 0.1-1000 meters, the second would use the same near / far ratio and start where the first one left off, with a depth range of 1000-10,000 meters. Because the ratio of near to far ranges is what matters, not the actual distance, the numbers can get very big very fast. A third camera could be added with a range out to 100,000 kilometers! The trick is to set the new Camera::SetClearMode() command to make it so only the furthest-range camera clears the color buffer. Additional cameras clear the depth buffer and then render on top of the previous draw. You can use the new Camera::SetOrder() command to ensure that they are drawn in the order you want. auto camera1 = CreateCamera(world); camera1->SetRange(0.1,1000); camera1->SetClearMode(CLEAR_DEPTH); camera1->SetOrder(1); auto camera2 = CreateCamera(world); camera2->SetRange(1000,10000); camera2->SetClearMode(CLEAR_DEPTH); camera2->SetOrder(2); auto camera3 = CreateCamera(world); camera3->SetRange(10000,100000000); camera3->SetClearMode(CLEAR_COLOR | CLEAR_DEPTH); camera3->SetOrder(3); Using this technique I was able to render the Earth, sun, and moon to-scale. The three objects are actually sized correctly, at the correct distance. You can see that from Earth orbit the sun and moon appear roughly the same size. The sun is much bigger, but also much further away, so this is exactly what we would expect. You can also use these features to render several cameras in one pass to show different views. For example, we can create a rear-view mirror easily with a second camera: auto mirrorcam = CreateCamera(world); mirrorcam->SetParent(maincamera); mirrorcam->SetRotation(0,180,0); mirrorcam=>SetClearMode(CLEAR_COLOR | CLEAR_DEPTH); //Set the camera viewport to only render to a small rectangle at the top of the screen: mirrorcam->SetViewport(framebuffer->GetSize().x/2-200,10,400,50); This creates a "picture-in-picture" effect like what is shown in the image below: Want to render some 3D HUD elements on top of your scene? This can be done with an orthographic camera: auto uicam = CreateCamera(world); uicam=>SetClearMode(CLEAR_DEPTH); uicam->SetProjectionMode(PROJECTION_ORTHOGRAPHIC); This will make 3D elements appear on top of your scene without clearing the previous render result. You would probably want to move the UI camera far away from the scene so only your HUD elements appear in the last pass.
  2. People wanted a new engine so I am making a new engine. It takes years to develop these things. Just switching over to Vulkan took six months to get basic rendering working. Anyone who needs the performance and scale of the new engine is welcome to use it, otherwise I am not going to try to convince them. I expect that right now is going to be pretty much the lowest point of engagement because we have a new technology that has been a WIP for several years and isn't ready yet. And there is going to be some change in the community because Turbo Engine has a different type of user than Leadwerks has.
  3. You are using (0,0,-1) for your normals. Try using (0,1,0).
  4. Josh

    Next Steps

    @Lethal Raptor Games I think the next big feature will be to make the terrain system hierarchal. I will explain soon.
  5. Josh

    Next Steps

    Still a lot of things left to do. Now that I have very large-scale rendering working, people want to fill it up with very big terrains. A special system will be required to handle this, which adds another layer to the terrain system. Also, I want to resume work on the voxel GI system, as I feel these results are much better than the performance penalty of ray-tracing. There are a few odds and ends like AI navigation and cascaded shadow maps to finish up. I am planning to have the engine more or less finished in the spring, and begin work on the new editor. Our workflow isn't going to change much. The new editor is just going to be a more refined version of what we already have, although it is a complete new program written from scratch, this time in C++. It's kind of overwhelming but I have confidence in the whole direction and strategy of this new product.
  6. Check out my VR horror game idea here: https://www.leadwerks.com/community/topic/19435-game-description/


    1. gamecreator


      I'm not a horror game guy but you've done a good job of getting into giving the environment/world some life.
      (Also, I'm sure you know but you can't post in that thread without joining the project, even though it's open.)

  7. I was actually thinking of Scotty's castle, not Hearst. This has a more Spanish feel.
  8. Here's a sequence for tech demo: Black screen, white text held up explaining backstory. Screen fades into hotel lobby. An envelope on the counter, Pick it up. Inside is a key and a note saying "we are gone for the holiday weekend, here is your key for room 105". Key opens room. Go to bed, press button to sleep. Dream of old west hanging scene, you are on gallows, rope around your neck, floor drops and you fall, everything goes black. You wake up. Phone rings. You pick it up. Scary voice says "Muerte" and hangs up. Go back to lobby. Guest list has appeared. Cabinet with keys is unlocked. Grab key for room of agent you are looking for. Go to elevator, to second floor, enter room. Tape recorder on desk, with those small cassette tapes for voice recordings. Play a couple of them, get some back story from the agent's logs. Enter bathroom. Find light switch. Turn on light. Blood is all over bathroom. Writing on mirror and walls in blood. Pull back the shower curtain, missing agent is dead in tub. Scary music cues in. Dark man is coming. Turn off light, pull curtain, and hide in shower, or hide in closet. If you don't hide, he kills you. If bathroom light is left on, you can see his blurry outline through shower curtain, and then it opens and he kills you. Dark man walks around, you can hear his boots, he leaves. Go to elevator. Press button. Wait for elevator. Door at end of hallway opens suddenly, pit bull dog comes running at you. Shoot him or he kills you. Cue to demo credits and end music.
  9. Setting is based on Hearst Castle and the Driskill Hotel:
  10. Hoover Dam is not very far away, which is very clearly an influence in the Black Mesa setting in the original Half-Life. I think aliens / secret government type stuff can be hinted at as a false direction in the story.
  11. "Southern Gothic" is a whole genre of literature that can be drawn from. https://en.wikipedia.org/wiki/Southern_Gothic Now that is referring to the eastern South, which is a completely different setting and culture (Left 4 Dead 2 covered it pretty well) but it can be repurposed. I think there is a whole unique setting and environment here that no one has ever really made use of. This area is also not far from Area 51 and there's a lot of military / air force stuff here, so the FBI / 1990s / X-Files themes can be drawn on as well.
  12. After playing many, many VR horror demos and being generally disappointed with the lack of depth, I have an idea I've been thinking about for some time. The idea first came to me when I was living in Austin, Texas, near the haunted Driskill Hotel. In the same area I would see a lot of those "day of the dead" masks like this: Good horror connects supernatural elements to real world fears. This game will combine Amnesia-like gameplay in an American southwest setting with drug violence. It's like "No Country for Old Men" + "Amnesia" + "The Shining" + "Hotel California". The supernatural elements will come from "Day of the Dead" type of stuff (need to research this a bit more) with lots of Catholic imagery and some vague references to Mayan / Aztec sacrifices. You will have a gun, and you will have to shoot pit bulls. If you've ever been around these dogs, they are terrifying creatures. Their jaws are unbelievably powerful. The main nemesis is The Dark Man, who stalks you, cannot be shot, and is invisible. He can only be seen by the shadow he casts. It will be strongly implied that the protagonist has been poisoned with hallucinogens, so his perception of reality is questionable. Setting is in southwest California, near the border with Nevada, somewhere near the Mojave desert. Time period is the early 1990's. You're an FBI agent sent to investigate disappearance of another agent. Plot is basically that local law enforcement made a deal with a drug cartel to allow transportation of drugs through the mountain pass in exchange for payoffs. It was very lucrative, and thus the money to build an elaborate ornate hotel in the middle of nowhere, but there was a supernatural element to the deal they were unaware of, which you will discover the mystery of. Gameplay should be a mix of two modes: concentration and dread. I have found jump scares actually remove you from the environment because I end up going through with my eyes half-closed and the volume down. Some type of simple puzzle solving is good because it forces you to concentrate, and then a clear switch over to "it's coming" mode is also good. In Amnesia the buildups were very clear, and this made parts of the game seem like something unpleasant you have to get through. That combination of relief and dread are very important for pacing. If you break that implied contract, the player mentally removes themselves from the game and the scares are no longer effective. There's even a genre of music that fits this setting perfectly called "Dark Country". It's like Johnny Cash meets "The Stand":
  13. Might be of interest: https://www.leadwerks.com/community/clubs
  14. I'm building the Lego Saturn V rocket. No code until it's done.

    1. 💎Yue💎


      My way out is to learn to play piano. I think I'm too old for this, but my old piano still plays, too bad it doesn't have a USB port.


    2. Josh


      This thing is huge. It's a meter tall. Very solid construction, you can pick it up in one hand and it doesn't break.

    3. reepblue


      LEGO is always fun. I always wanted to do a fully function city but the cost and space to do it isn't practical. :)

    4. Show next comments  27 more
  15. Josh

    Message Boxes

    No. Linux actually does not. GTK or some other library that not all Linux installs have does do it. Which makes things more difficult.
  16. Nah, Leadwerks is a 32-bit app and won't even recognize those amounts of RAM. I am guessing driver problem. Will try out the sample map provided.
  17. NVIDIA GeForce GTX 1050 Ti Should be okay.
  18. In the terrain layer properties in the editor, there is a slider for the texture scale. You can use this to make the texture appear bigger or smaller.
  19. @Marcousik That screen does not list your GPU.
  20. In Visual Studio, with 64-bit builds, if you see this error: "Component too big for incremental LTCG with 32-bit toolset, build without incremental LTCG; Consider switching to 64-bit toolset" Find the "Globals" property group and add this parameter, in the vcxproj file: <UseNativeEnvironment>true</UseNativeEnvironment>
  21. There is no global euler rotation stored. If you are setting a euler rotation in global space (and the parent is not NULL) then there is a conversion process whereby the euler is transformed into a quaternion. When you call GetRotation() with the global flag set, the rotation is extracted from the global 4x4 matrix and converted to a euler and returned. This is the source code of the GetRotation() command: Vec3 Entity::GetRotation(const bool global) { if (global == true and parent.lock() != nullptr) { return Vec3(mat.GetRotation());//Mat4::GetRotation() returns a quaternion, this is then converted to a Euler } else { return rotation; //returns the local euler rotation, whatever was last set } } Only local position, rotation, and scale values are stored, because if the object has a parent, moving the parent would invalidate all those global values and they would require constant recalculation. Now I have set it so when rotation is set in local space, that rotation is calculated to the local quaternion, but the original rotation value you input is preserved if you call GetRotation() with the global flag set to false, or if there is no parent. I also made it so that Turn() will increment the angle on one axis if the other two axes in the turn value are zero. But if that local euler gets recalculated for any reason or if a rotation is extracted from the matrix, it is possible for two different values to define the same rotation, like (270,0,0) and (-90,0,0).
  22. Vulkan has buffers of pretty much unlimited size, so in the new renderer this is already resolved.
  23. Can you be more specific? Eulers and quaternions will both work. Eulers are easy to visualize, and are fine for rotation on one axis (as most people will be using it) but quaternions are needed if you are making a space sim or something like that.
  24. The max number of instances is defined by the minimum guaranteed size of uniform buffers in OpenGL 4.0. I believe the size is 16384, which means it can fit 256 4x4 matrices at a time.
  25. The engine supports 29 channels. These are managed automatically, so if a sound is out of range or stopped that channel will be freed up for other sounds to be played. In practical terms, you won't run out of or have to worry about channels. EFX is not currently supported. It could probably be done with C++ but it would not be simple.
  • Create New...