sdxsdx
-
Posts
33 -
Joined
-
Last visited
Content Type
Blogs
Forums
Store
Gallery
Videos
Posts posted by sdxsdx
-
-
1 hour ago, Josh said:
I'm not exactly sure what you are trying to do. Are the cubes all on a flat plane? If so, it would make sense to just remove them and add a transparent blue plane where the water surface is.
Thank you for your reply.
How could I set the transparent blue plane with penetration?
I want the object can sink into the blue cube.
-
the scene model has some blue cubes and if I want to make the cubes to be water(object can sink into the bottom), is that possible do it in ultra engine?
Any help is appreciated.
------------------------------------------------------
edit:
one way to do it is add coordinate y-offset value to the water surface. Any advice?
-
14 minutes ago, Dreikblack said:
widget->SetColor(1, 0, 0, 1, WIDGETCOLOR_FOREGROUND);
Thank you. it works.
-
to set the font color, I can't find any statements in document, is it there?
For alternative, I can use sprite with coloring to draw text, but if the ui system has setting font color function that will be great.
-
CreateLabel works fine.
CreateButton works fine.
CreateTextField does't work. It appeared in screen first but once the game world is complete loaded, the TextField becomes disappeared.
Maybe there is something wrong with CreateTextField?
-
8 minutes ago, Josh said:
You need to create the 3D camera before the UI camera, or call camera->SetOrder() to adjust the order they render in.
CreateTextField does not work but CreateLabel works fine.
May be I am setting something wrong?
-
I have two camera, one camera runs the 3d world, one runs the interface;
But the 3d world camera seems to override the interface camera.
Once the world is loaded, the interface is disappeared.
-
std::shared_ptr<UltraEngine::Interface> ui = UltraEngine::CreateInterface(window); auto sz = ui->root->ClientSize(); ui->SetRenderLayers(128); auto text = CreateTextField(0, 50, 100, 30, ui->root,UltraEngine::TEXTFIELD_DEFAULT); text->SetText("Hello World!"); auto uicam = CreateCamera(world, PROJECTION_ORTHOGRAPHIC); uicam->SetClearMode(CLEAR_DEPTH); uicam->SetRenderLayers(128); uicam->SetPosition(framebuffer->size.x / 2, framebuffer->size.y / 2); //Main loop while (window->Closed() == false and window->KeyDown(KEY_ESCAPE) == false) { text->SetText("Hello World!"); while (PeekEvent()) { auto event = WaitEvent(); ui->ProcessEvent(event); } world->Update(); world->Render(framebuffer); }
Am I missing anything?
I have two camera, one camera runs the 3d world, one runs the interface;
But the 3d world camera seems to override the interface camera.
-
Hope the shadow function works soon.
-
3 hours ago, Josh said:
In the default main.lua script there is some code that shows stats and FPS.
--Render statistics context:SetBlendMode(Blend.Alpha) if DEBUG then context:SetColor(1,0,0,1) context:DrawText("Debug Mode",2,2) context:SetColor(1,1,1,1) context:DrawStats(2,22) context:SetBlendMode(Blend.Solid) else --Toggle statistics on and off if (window:KeyHit(Key.F11)) then showstats = not showstats end if showstats then context:SetColor(1,1,1,1) context:DrawText("FPS: "..Math:Round(Time:UPS()),2,2) end end
I usually use a third-party tool like FRAPS because it ensures consistency across all programs.
Thanks you, how could I increase the shadow rendering distance? I have tired world->SetLightQuality(2) or light->SetRange(10000) or light->SetRange(-10000,10000), it doesn't work.
-
auto sprite = CreateSprite(world, font, "FPS", 18); sprite->SetRenderLayers(128); sprite->SetPosition(2, framebuffer->size.y - font->GetHeight(18) - 2, 0); sprite->SetRenderLayers(2); world->RecordStats(); auto uicam = CreateCamera(world, PROJECTION_ORTHOGRAPHIC); uicam->SetClearMode(CLEAR_DEPTH); uicam->SetRenderLayers(2); uicam->SetPosition(framebuffer->size.x / 2, framebuffer->size.y / 2); //Main loop while (window->Closed() == false and window->KeyDown(KEY_ESCAPE) == false) { sprite->SetText("FPS:" + (String)world->renderstats.framerate); while (PeekEvent()) { ui->ProcessEvent(WaitEvent()); } world->Update(); world->Render(framebuffer); }
I modified some lines and this works for fps showing.
The second question is still not answered.
-
I have found: auto font = LoadFont("Fonts/arial.ttf"); auto sprite = CreateSprite(world, font, "", 18); sprite->SetRenderLayers(128); sprite->SetPosition(2, framebuffer->size.y - font->GetHeight(18) - 2, 0); //Main loop while (window->Closed() == false) { //Display the feamerate sprite->SetText("FPS: " + String(world->renderstats.framerate)); world->Update(); world->Render(framebuffer); }
but I still can't see the fps.
-
How to show FPS inside the game and how to increase the distance for shadow shading?
Many thanks for any help.
-
When I start a new project, I got this error message;
Severity Code Description Project File Line Suppression State
Error C1007 unrecognized flag '-Zc:nrvo' in 'p2' test C:\Users\xxx\Documents\Ultra Engine\Projects\test\LINK 1
I have tried 1.0,1.01.1.02,1.03 all versions. and the results are same.
visual studio 2022,2019 are same too.
Error C1007 unrecognized flag '-Zc:nrvo' in 'p2'
in Bug Reports
Posted
The problem sovled after I reinstalled windows 11.