-
Posts
24,629 -
Joined
-
Last visited
Content Type
Blogs
Forums
Store
Gallery
Videos
Downloads
Everything posted by Josh
-
This information is not available in Lua. Sorry.
-
I don't see anything wrong. I ran the program, pressed F5, then pressed F6. Nothing bad happened.
-
The fix will be available in a build later today.
-
Working on it...
-
In Leadwerks the terrain is just a static object in the map. Terrains are only editable in the editor, and there's no way to retrieve detailed information in-game. In Ultra this is quite a lot more flexible.
-
Oh, there is one more layer to this puzzle...the vegetation system in Leadwerks is really wonderful, but in Ultra I want to support multiple "biomes" so you can just paint an area as "desert", "forest", etc. and have it look good. The Far Cry 2 editor actually did an amazing job with this type of stuff, automatically laying out an arrangement of objects without creating them on top of each other. Of course the Leadwerks way is to do this all dynamically without any stored data, which scales very well for large environments, so that is going to be a challenge to figure out.
-
Fixed!
-
I removed some of these items and added the missing functionality for the remaining items. Some of these options will be added in later.
-
I can produce the error, hold on...
-
Speaker doesn't set it state back to SPEAKER_STOPPED when completed.
Josh replied to reepblue's topic in Bug Reports
Fixed in next build...- 1 reply
-
- 1
-
it will be fixed in the next upload
-
What exactly are you doing to cause the error?
-
Do you mean the window menu?
-
This might be fixed now. Let me know if you see it again after downloading the current build.
-
Scratch that, I can still produce the error in this build...curiouser and curiouser
-
I replace Lock/Unlock bits with SetPixel and it seems to work correctly. No idea why but it doesn't seem any slower this way. #ifdef _WIN32 shared_ptr<Gdiplus::Bitmap> Pixmap::GetBitmap() { if (bitmap) return bitmap; auto pixmap = As<Pixmap>(); int format = PixelFormat32bppPARGB; int bpp = 4; switch (m_format) { case TEXTURE_BGRA: break; case TEXTURE_BGR: bpp = 3; format = PixelFormat24bppRGB; break; default: pixmap = Convert(TEXTURE_BGRA); if (pixmap == NULL) return NULL; break; } auto bitmap = std::make_shared<Gdiplus::Bitmap>(size.x, size.y, format); unsigned char pixel[4] = { 0,0,0,255 }; Gdiplus::Color color; /* Gdiplus::BitmapData data; Gdiplus::Rect rect = Gdiplus::Rect(0, 0, size.x, size.y); auto stat = bitmap->LockBits(&rect, Gdiplus::ImageLockMode::ImageLockModeWrite, format, &data); if (stat != Gdiplus::Status::Ok) return NULL; memcpy(data.Scan0, pixmap->pixels->Data(), pixmap->pixels->GetSize()); stat = bitmap->UnlockBits(&data); if (stat != Gdiplus::Status::Ok) return NULL; */ uint32_t rgba; for (int x = 0; x < size.x; ++x) { for (int y = 0; y < size.y; ++y) { rgba = pixmap->ReadPixel(x, y); if (format == TEXTURE_BGRA) rgba = Rgba(Blue(rgba), Green(rgba), Red(rgba), Alpha(rgba)); color.SetValue(rgba); bitmap->SetPixel(x, y, color); } } this->bitmap = bitmap; return bitmap; } #endif
-
-
Occasionally the editor will display a white square on one or more toolbar buttons. I'm not sure if this is a Win32 problem or a problem with the SVG rasterizer.
-
Reset Layout will now reset original viewport views and camera orientations.
-
-
Yeah, it's a bug in the culling system, not in Vulkan.
-
I found that the file https://raw.githubusercontent.com/UltraEngine/Documentation/master/Assets/Materials/Ground/Rocks_Dirt_Ground_2k_dot3.dds had the mipmaps vertically flipped from the orientation of the base image, and I fixed that file. You need to delete the folder "C:/ProgramData/Ultra Engine/WebCache" to get the new file. Other than that I do not see any artifacts on an AMD 6600 and I will consider this issue closed unless you tell me otherwise.
-
Here is an update of the example: #include "UltraEngine.h" #include "Components/Player/CameraControls.hpp" using namespace UltraEngine; int main(int argc, const char* argv[]) { //Get the display list auto displays = GetDisplays(); //Create a window auto window = CreateWindow("Ultra Engine", 0, 0, 1280, 720, displays[0], WINDOW_CENTER | WINDOW_TITLEBAR); //Create a world auto world = CreateWorld(); world->SetAmbientLight(0); //Create a framebuffer auto framebuffer = CreateFramebuffer(window); //Create a camera auto camera = CreateCamera(world); camera->SetFov(70); camera->SetPosition(0, 50, 0); camera->SetRotation(45, 0, 0); camera->SetClearColor(0.125); //Sunlight auto light = CreateDirectionalLight(world); light->SetRotation(45, 35, 0); light->SetColor(2); //Create terrain auto terrain = CreateTerrain(world, 512); terrain->LoadHeightmap("https://raw.githubusercontent.com/UltraEngine/Documentation/master/Assets/Terrain/512.r16"); terrain->SetScale(1, 100, 1); //Create base material auto ground = CreateMaterial(); auto diffusemap = LoadTexture("https://raw.githubusercontent.com/UltraEngine/Documentation/master/Assets/Materials/Ground/river_small_rocks_diff_4k.dds"); auto normalmap = LoadTexture("https://raw.githubusercontent.com/UltraEngine/Documentation/master/Assets/Materials/Ground/river_small_rocks_nor_gl_4k.dds"); ground->SetTexture(diffusemap, TEXTURE_BASE); ground->SetTexture(normalmap, TEXTURE_NORMAL); auto groundlayer = terrain->AddLayer(ground); terrain->Fill(groundlayer); //Create paint material auto rocks = CreateMaterial(); diffusemap = LoadTexture("https://raw.githubusercontent.com/UltraEngine/Documentation/master/Assets/Materials/Ground/Rocks_Dirt_Ground_2k.dds"); normalmap = LoadTexture("https://raw.githubusercontent.com/UltraEngine/Documentation/master/Assets/Materials/Ground/Rocks_Dirt_Ground_2k_dot3.dds"); auto dispmap = LoadTexture("https://raw.githubusercontent.com/UltraEngine/Documentation/master/Assets/Materials/Ground/Rocks_Dirt_Ground_2k_disp.dds"); rocks->SetTexture(diffusemap, TEXTURE_BASE); rocks->SetTexture(normalmap, TEXTURE_NORMAL); rocks->SetTexture(dispmap, TEXTURE_DISPLACEMENT); auto rocklayer = terrain->AddLayer(rocks); //Apply material based on terrain slope for (int x = 0; x < terrain->resolution.x; ++x) { for (int y = 0; y < terrain->resolution.y; ++y) { float slope = terrain->GetSlope(x, y); if (slope > 15.0f) { float wt = Min((slope - 15.0f) / 10.0f, 1.0f); terrain->SetLayerWeight(rocklayer, x, y, wt); } } } //Camera controls camera->AddComponent<CameraControls>(); //Main loop while (window->Closed() == false and window->KeyDown(KEY_ESCAPE) == false) { world->Update(); world->Render(framebuffer); } return 0; }
-
Fixed: { "scene": { "base": [], "entities": [ { "castShadows": true, "collisionType": 1, "matrix": [ "0x3f800000", "0x0", "0x80000000", "0x0", "0x0", "0x34400000", "0x3f7ffffd", "0x0", "0x0", "0xbf7ffffd", "0x34400000", "0x0", "0xbf2ccccd", "0xb3628f5a", "0xbe970a3a", "0x3f800000" ], "model": { "isLimb": false, "path": "Crawler/crawler.mdl" }, "name": "U3D_MESH", "physicsMode": 0, "pickMode": 1, "position": [ "0xbf2ccccd", "0xb3628f5a", "0xbe970a3a" ], "quaternion": [ "0xbf3504f2", "0x80000000", "0x0", "0x3f3504f2" ], "reflection": true, "rotation": [ "0x42b40000", "0x0", "0x0" ], "uuid": "c15b2344-f13b-4448-a3a8-a66a1b2c8985" }, { "castShadows": true, "collisionType": 1, "matrix": [ "0x3f800000", "0x0", "0x80000000", "0x0", "0x0", "0x34400000", "0x3f7ffffd", "0x0", "0x0", "0xbf7ffffd", "0x34400000", "0x0", "0xbf2ccccd", "0xb3628f5a", "0xbe970a3a", "0x3f800000" ], "model": { "isLimb": false, "path": "Crawler/crawler.mdl" }, "name": "U3D_MESH", "physicsMode": 0, "pickMode": 1, "position": [ "0xbf2ccccd", "0xb3628f5a", "0xbe970a3a" ], "quaternion": [ "0xbf3504f2", "0x80000000", "0x0", "0x3f3504f2" ], "reflection": true, "rotation": [ "0x42b40000", "0x0", "0x0" ], "uuid": "c15b2344-f13b-4448-a3a8-a66a1b2c8985" } ], "extras": { "ambientLight": [ 1.0, 1.0, 1.0 ], "gravity": [ 0.0, -9.8100004196167, 0.0 ], "iblIntensity": 1.0, "viewports": [ { "cameraPosition": [ 0, 2.86788, -4.09576 ], "cameraRotation": [ 35, 0, 0 ], "gridSize": 0, "view": 0, "zoom": 1.42815 }, { "cameraPosition": [ 0, 0, 0 ], "cameraRotation": [ 90, 0, 0 ], "gridSize": 0, "view": 3, "zoom": 200 }, { "cameraPosition": [ 0, 0, 0 ], "cameraRotation": [ 0, 0, 0 ], "gridSize": 0, "view": 5, "zoom": 200 }, { "cameraPosition": [ 0, 0, 0 ], "cameraRotation": [ 0, 90, 0 ], "gridSize": 0, "view": 1, "zoom": 200 } ] } } }