Jump to content

Josh

Staff
  • Posts

    23,090
  • Joined

  • Last visited

Posts posted by Josh

  1. 0.9.6

    • Added Delete option when you right-click on a mesh in the asset editor.
    • Probably fixed bindless texture sampler uniforms.
    • Exposed Object:AddHook to Lua (experimental!).
    • Added some string functions for Lua.
    • Component updates now happen after animation is updated.
    • Like 1
    • Thanks 1
  2. Hi, I just tried the following with a GEForce 1080 and the latest driver 552.12.

    • Deleted the file "C:\ProgramData\Ultra Engine\settings.json" to reset all settings.
    • Launched Ultra Engine Pro on Steam, default branch (0.9.5)
    • Created a new project.
    • Opened the Visual Studio solution and compiled for debug and release.
    • Ran the game, and the start.map game opened and ran.

    Questions:

    • Are you launching from the editor or from Visual Studio?
    • If you are in the editor, do you have the start.map scene open in the editor when you launch?
    • This is a new project, right, not an old project that was previously created with the Vulkan build of Ultra?

    It sounds like maybe the program is not loading the starting map, so there is no camera and just a black screen.

    • Like 1
  3. The Ultra string classes are not exposed in Lua. Ultra uses wide strings, which do not work well with Lua strings. However, all command interfaces between C++ and Lua that pass strings convert UTF8 (Lua) to wide strings (C++) and back.

    I have added the string methods as functions that can be used like this:

    s = "test"
    s = Right(s, 1)
    s = Trim(s)

    I also added Len(s), which is like Ultra's GetSize() method for the string class.

    This will be available in the next build.

  4. Another small change I forgot to mention is that if the create object button in the toolbar is already selected and you click it again, it will open the object selection window. It's subtle, but improves the flow of the program.

    • Thanks 1
  5. 0.9.6

    • Asset editor will now save colliders embedded in an Ultra model file instead of as a separate file.
    • Asset editor now displays all materials a model uses, including external material files.
    • Added "Appearance" settings group in asset editor limb properties.
    • Added LOD distance setting in asset editor limb properties.
    • Model::SetLodDistance parameters changed, up to four LODs are supported.
    • Added World:GetEntitites to Lua API

    image.thumb.png.5cdea7b8d58591b5639daa1b4132f56f.png

    • Like 1
    • Thanks 1
  6. Here is how colliders are stored. For tolerance and optimization, if you don't know just write 0.0 / 0:
     

    // Collider
    if (stream->ReadString(4) != "PHYS")
    {
    	auto pos = stream->GetPosition() - 4;
    	Print("Error: Expected PHYS tag at position " + String(pos));
    	return false;
    }
    int colliderdatasize = stream->ReadInt();
    auto colliderstartposition = stream->GetPosition();
    if (colliderdatasize)
    {
    	Vec3 position, scale, euler;
    	Quat rotation;
    	std::vector<shared_ptr<Collider> > parts;
    	int partcount = stream->ReadInt();
    	for (int n = 0; n < partcount; ++n)
    	{
    		if (stream->ReadString(4) != "PART")
    		{
    			auto pos = stream->GetPosition() - 4;
    			Print("Error: Expected PART tag at position " + String(pos));
    			return false;
    		}
    		shared_ptr<Collider> part;
    		auto tag = stream->ReadString(4);
    		if (tag == "HULL")
    		{
    			float tol = stream->ReadFloat();// tolerance
    			std::vector<Vec3> points;
    			Vec3 p;
    			int count = stream->ReadInt();
    			for (int n = 0; n < count; ++n)
    			{
    				p.x = stream->ReadFloat();
    				p.y = stream->ReadFloat();
    				p.z = stream->ReadFloat();
    				points.push_back(p);
    			}
    			part = CreateConvexHullCollider(points);
    			part->tolerance = tol;
    		}
    		else if (tag == "MESH")
    		{
    			int opt = stream->ReadInt();// optimize flag
    			int count = stream->ReadInt();
    			int vcount;
    			std::vector<Vec3> face;
    			Vec3 p;
    			std::vector<std::vector<Vec3> > meshfaces;
    			for (int n = 0; n < count; ++n)
    			{
    				vcount = stream->ReadInt();
    				face.clear();
    				for (int v = 0; v < vcount; ++v)
    				{
    					p.x = stream->ReadFloat();
    					p.y = stream->ReadFloat();
    					p.z = stream->ReadFloat();
    					face.push_back(p);
    				}
    				meshfaces.push_back(face);
    			}
    			part = CreateMeshCollider(meshfaces);
    			part->optimizemesh = opt;
    		}
    		else
    		{
    			position.x = stream->ReadFloat(); position.y = stream->ReadFloat(); position.z = stream->ReadFloat();
    			rotation.x = stream->ReadFloat(); rotation.y = stream->ReadFloat(); rotation.z = stream->ReadFloat(); rotation.w = stream->ReadFloat();
    			scale.x = stream->ReadFloat(); scale.y = stream->ReadFloat(); scale.z = stream->ReadFloat();
    			if (tag == "BOX_")
    			{
    				part = CreateBoxCollider(scale, position, rotation.Euler());						
    			}
    			else if (tag == "CYLI")
    			{
    				part = CreateCylinderCollider(scale.x, scale.y, position, rotation.Euler());
    			}
    			else if (tag == "CONE")
    			{
    				part = CreateConeCollider(scale.x, scale.y, position, rotation.Euler());
    			}
    			else if (tag == "CCYL")
    			{
    				part = CreateChamferCylinderCollider(scale.x, scale.y, position, rotation.Euler());
    			}
    			else if (tag == "CAPS")
    			{
    				part = CreateCapsuleCollider(scale.x, scale.y, position, rotation.Euler());
    			}
    			else if (tag == "SPHE")
    			{
    				part = CreateSphereCollider(scale.x, position);
    			}
    			else
    			{
    				Print("Error: Unknown collider type \"" + tag + "\"");
    				return false;
    			}
    		}
    		if (part) parts.push_back(part);
    	}
    	if (parts.size())
    	{
    		if (parts.size() == 1)
    		{
    			model->SetCollider(parts[0]);
    		}
    		else
    		{
    			auto c = CreateCompoundCollider(parts);
    			model->SetCollider(c);
    		}
    	}
    	stream->Seek(colliderstartposition + colliderdatasize);
    }

     

×
×
  • Create New...