Jump to content

Josh

Staff
  • Posts

    23,504
  • Joined

  • Last visited

Blog Comments posted by Josh

  1. I will have to experiment some more with this. Interestingly, this overlaps with some problems with 2D drawing. Now in reality there is no such thing as 2D graphics on your computer, it is always 3D graphics. I think my approach here will be to stop trying to hide the fact that 2D is really 3D even if it does not fit our conceptions of how it should be. Stay tuned...

    • Like 1
  2. 11 hours ago, Ma-Shell said:

    Isn't that basically what a world is? Each camera renders only the objects that are in its world, so the world is basically a filter for the camera

    I'm going to try adding a command like this:

    void World::AddRenderPass(shared_ptr<World> world, const int order)

    The order value can be -1 (background), 1 (foreground), or 0 (mix with current world). No guarantee yet but I will try and see how well it works.

  3. 4 hours ago, Slastraf said:

    Well I already find it a little comedic that my comment criticizing LE game engine got removed so I cannot partake in this discussion. Honestly its kind of sad.

    Since you say it is not acceptable as a professional tool, why are you here? I just received ten orders for the enterprise version from a little company called Northrop Grumman, but I guess you are the expert.

    • Like 1
  4. 1 hour ago, Ma-Shell said:

     

    Isn't that basically what a world is? Each camera renders only the objects that are in its world, so the world is basically a filter for the camera

    In an abstract sense, yes, but there’s a thousand more details than that. The strictness of both Vulkan and the multithreaded architecture mean I can’t design things that are “fast and loose” anymore.

  5. 3 minutes ago, Ma-Shell said:

    You mean, because unlike the previous version the user does not directly call Render() anymore, since it is run on a different thread and thus the user can not correctly orchestrate the rendering? This should not be a problem, since in CreateCamera you can specify the world.

    
    auto realCamera = CreateCamera(realWorld);
    auto HUDCamera = CreateCamera(HUDWorld);
    realCamera->setOrder(1);
    HUDCamera->setOrder(2);
    realCamera->SetClearMode(CLEAR_DEPTH | CLEAR_COLOR);
    HUDCamera->SetClearMode(CLEAR_DEPTH);

     

    There is a World::Render() command which basically says "tell the rendering thread to start using this world for rendering". So rendering two different worlds in one pass would be sort of difficult to manage.

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

    • Like 1
  7. 7 hours ago, Marcousik said:

    Is there something like this in current LE4.6 ?

    No.

    1 hour ago, gamecreator said:

    You can do it through either Windows commands (I'm guessing Linux has equivalent) or try through the Leadwerks GUI (though I don't think it's documented still).

    Linux actually does not. GTK or some other library that not all Linux installs have does do it. Which makes things more difficult.

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

    • Like 1
  9. 15 hours ago, gamecreator said:

    Does this mean that we won't have to worry about euler/quaternion any more?  SetRotation and GetRotation will just work, without having to deal with conversions?

    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.

×
×
  • Create New...