Jump to content

Josh

Staff
  • Posts

    24,776
  • Joined

  • Last visited

About Josh

Profile Information

  • Location
    USA

Recent Profile Visitors

1,500,170 profile views

Josh's Achievements

Grand Master

Grand Master (14/14)

  • Well Followed
  • Dedicated
  • Conversation Starter
  • Reacting Well
  • Problem Solver

Recent Badges

15.6k

Reputation

839

Community Answers

  1. Shadow quality is a per-world multiplier that adjusts the resolution of each shadow map.
  2. 0.9.9 Editor now recognizes .ogg and .mp3 in open/save dialogs that use sound files. If zero is sent to NavAgent::Navigate() for the maxdistance parameter, the agent will navigate to the closest point (the old behavior). Some minor bug fixes.
  3. What language are you developing this program in? I can probably put together an example quickly that shows the recommended setup.
  4. Menus might not work correctly with a 3D interface because all their submenus are created as separate windows. For an interface like you are showing here, or like the level editor has, I recommend using the first setup example here: https://www.ultraengine.com/learn/CreateInterface The menu widget is meant more for applications than games. You can then create a borderless child window for the viewport, parented to your main window, using WINDOW_CHILD for the window style. This is how any WIndows program that shows the WIn32 GUI with a 3D rendering viewport works. The last step is you need to detect window size events, and resize the viewport window whenever the main window is resized using Window:SetShape(). This is best done in an event callback so the viewport window will resize as you are dragging the window edges. This will give you menus that appear on top of the 3D window, a more responsive interface, faster window resizing, and better text rendering.
  5. Okay, I am going to add these casting functions now and modify the documentation later.
  6. Technically, the different light sub-classes are not in the API. Each light creation command returns a Light object. However, I can see a need to be able to get the light type, so a decision must be made here...
  7. If you have a scene you would like me to test please upload it and send me a link.
  8. The directional light always renders the closest shadow stage each frame, and cycles between the other stages, updating one each frame. I think that is what is causing the artifact in your video. For a third-person view like this, you may want to increase the shadow stage distance so that the player shadow is always updated each frame.
  9. SetShadowmapSize will work. l = CreatePointLight(nil) l:SetShadowmapSize(512)
  10. Yes, the color attachment function has an optional index parameter. The depth attachment function currently does not have this parameter. I will look into adding the cubemap face index for the depth attachment method.
  11. What does your different shader output? Sometimes it is easier just to use a post-processing effect or turn the distance fog up all the way. This is how I do the orange outlines in the editor.
  12. It is probably possible to set up six cameras that each draw to a different texture buffer. The texture buffer class can accept an index when a color texture is applied to it, so each texture buffer could render to a different cubemap face: https://www.ultraengine.com/learn/TextureBuffer_SetColorAttachment?lang=cpp This functionality is not in the SetDepthTexture command, but I could probably add it without much trouble.
  13. Both the points lights and the GI probe renderer in the editor render to all sides of a cubemap. What do you plan to use this functionality for?
    A useful tool! Just make sure you are using Blender version 4.0.
  14. I wanted to make a character's feet align to the ground when standing on a slope or on stairs. This was very easy to get a basic version set up. The code here only handles the feet, so the legs currently will get stretched out. Each model may require a little bit different final rotation. The next step is to adjust the knee bones. The hip, knee, and foot form a triangle. One of the constructors for the Plane class accepts three points in space, so those three bones can be used to find a plane. Then you transform their positions to a matrix facing in the direction of the plane normal, solve the triangle, transform back, and that's how IK works. void MyComponent::UpdateFeet() { auto entity = GetEntity(); auto world = entity->GetWorld(); if (not world) return; for (int n = 0; n < footbones.size(); ++n) { if (not footbones[n]) continue; auto pos = footbones[n]->GetPosition(true); pos.y = 0; pos = TransformPoint(pos, entity, NULL); auto pickmode = entity->GetPickMode(); entity->SetPickMode(PICK_NONE); auto pickinfo = world->Pick(pos + Vec3(0, footradius + 0.75, 0), pos - Vec3(0, footreach, 0), footradius, true); entity->SetPickMode(pickmode); if (pickinfo.entity) { pos = TransformPoint(pickinfo.position, NULL, entity); footbones[n]->SetPosition(pos, true); Vec3 normal = TransformNormal(pickinfo.normal, NULL, entity); footbones[n]->AlignToVector(-normal, 1); footbones[n]->Turn(0, 180, 0); } } }
×
×
  • Create New...