-
Posts
23,133 -
Joined
-
Last visited
Content Type
Blogs
Forums
Store
Gallery
Videos
Posts posted by Josh
-
-
0.9.6
- Fixed alpha cutoff not working correctly. Requires a shader update, currently only works in editor.
- Fixed directional lights not casting shadows on brushes in editor.
- 1
-
0.9.6
Initial implementation of the new foliage system is available. To use it, create a terrain, select the foliage tool, and add a new layer.
- Sync your project to get the new mesh layer shaders.
- Slope and height constraints currently have no effect.
- Mesh layers are not yet saved in maps.
- Collision and ray casting (picking) are not yet implemented.
- Imposters are not yet implemented.
- LOD and multiple variations within a layer (sublayers) are supported.
- 1
-
Was it a reply to your showcase thread?
-
It's actually in there already.
extern bool SetFileTime(const WString& path, const uint64_t timestamp);
- 1
-
Fixed terrain vertex shader for non-one scales.
- 1
-
- Replaced mouse tool menu items and hotkeys with a single menu item called "Next Tool" that can be activated with Shift + Tab.
- Vertex mouse tool will now make the selected vertex or edge snap to the nearest grid point.
- Terrain creation properties changed a little bit.
- Default terrain scale now set to 1.28, for easy brush alignment.
- 2
-
This is currently not a supported feature, but I am not opposed to adding it. It will just require a little extra care because Ultra has a lot more options when it comes to image handling.
- 1
-
10 hours ago, SpiderPig said:
Also screen_position should probably be an iVec3 like is returned by window->GetMousePosition(), unless there's a need for it to be Vec3?
z coordinate is the distance in front of the camera.
- 1
-
Yes, I always forget which is which. Maybe these should be ScreenToWorld and WorldToScreen?
- 1
-
-
Use this overload:
void AddHook(const HookID id, void (*hook)(std::shared_ptr<Object> source, std::shared_ptr<Object> extra), std::shared_ptr<Object> extra = nullptr);- 1
-
Apparently this requires a closed mesh:
https://github.com/melax/sandbox/issues/5#issuecomment-2069836452 -
Fixed, shader update required.
-
- Fixed rotation mouse tool acting wrong
- No longer using SPIR-V for terrain shaders, as there was some inconsistent behavior between the shaders and the compiled binaries.
- 1
-
Drag to select functionality should be 100% accurate now and working correctly.
- 1
-
- Drag-to-select-area functionality is back, now plays nicely with all mouse tools.
- Fixed bad brush picking behavior.
- 1
-
- Fixed vertex and face tools, which could get weird results that did not align to the current mouse position.
- Vertex and mouse tools now display the up/down mouse cursor when Alt key is pressed.
For now, I will keep the trenchbroom-style controls for these two tools.
-
Changed the translation tool to use an axis gizmo, like people were asking for. Some backfaces on the gizmo model are currently missing and cannot be picked, and its appearance will improve in future updates.
-
Some code I used to resize a cubemap. I think the mipmaps might not be correct, but that's okay: Pasting here in case I need it again
auto plug = LoadPlugin("Plugins/ISPCTexComp.dll"); auto tex = LoadTexture(GetPath(PATH_DESKTOP) + "/diffuse.dds", LOAD_MIPCHAIN); auto mipchain = tex->mipchain; std::vector<shared_ptr<Pixmap> > chain2; for (auto p : mipchain) { { p = p->Convert(TEXTURE_RGBA16); p = p->Resize(256, 256); p = p->Convert(TEXTURE_BC6H); chain2.push_back(p); } } SaveTexture(GetPath(PATH_DESKTOP) + "/thumbnail_diffuse.dds", TEXTURE_CUBE, chain2, 6); return 0;
-
Here is some code that uses it, but I just can't seem to get it to work right. I don't think there is an error in my code.
I had to fix this file for C++17. Maybe that is causing it? I do not understand these functions:
misc.hint VertMap(const std::vector<int>& collapse_map, int a, int mx) { if (mx <= 0) return 0; while (a >= mx) { a = collapse_map[a]; } return a; }
std::vector<linalg::aliases::float3> vert; std::vector<tridata> tri; std::vector<int> collapse_map; std::vector<int> permutation; tridata t; for (const auto& v : mesh->vertices) { vert.push_back(linalg::aliases::float3(v.position.x, v.position.y, v.position.z)); } for (int n = 0; n < mesh->CountPrimitives(); ++n) { t.v[0] = mesh->GetPrimitiveVertex(n, 0); t.v[1] = mesh->GetPrimitiveVertex(n, 1); t.v[2] = mesh->GetPrimitiveVertex(n, 2); tri.push_back(t); } //----------------------------- // Reduce the mesh //----------------------------- ProgressiveMesh(vert, tri, collapse_map, permutation); //----------------------------- // PermuteVertices //----------------------------- // rearrange the vertex Array std::vector<float3> temp_Array; unsigned int i; assert(permutation.size() == vert.size()); for (i = 0; i < vert.size(); i++) { temp_Array.push_back(vert[i]); } for (i = 0; i < vert.size(); i++) { vert[permutation[i]] = temp_Array[i]; } // update the changes in the entries in the triangle Array for (i = 0; i < tri.size(); i++) { for (int j = 0; j < 3; j++) { tri[i].v[j] = permutation[tri[i].v[j]]; } } //----------------------------- // Build new mesh //----------------------------- model->Clear(); mesh->extra = nullptr; mesh = model->AddMesh(); std::vector<int> newvertex(vert.size()); std::fill(newvertex.begin(), newvertex.end(), -1); //Add triangles int a, b, c, p0, p1, p2; int render_num = vert.size() * 0.5; for (unsigned int i = 0; i < tri.size(); i++) { p0 = VertMap(collapse_map, tri[i].v[0], render_num); p1 = VertMap(collapse_map, tri[i].v[1], render_num); p2 = VertMap(collapse_map, tri[i].v[2], render_num); if (p0 == p1 or p1 == p2 or p2 == p0) continue; a = newvertex[p0]; if (a == -1) { a = mesh->AddVertex(vert[p0].x, vert[p0].y, vert[p0].z); newvertex[p0] = a; } b = newvertex[p1]; if (b == -1) { b = mesh->AddVertex(vert[p1].x, vert[p1].y, vert[p1].z); newvertex[p1] = b; } c = newvertex[p2]; if (c == -1) { c = mesh->AddVertex(vert[p2].x, vert[p2].y, vert[p2].z); newvertex[p2] = c; } //int a = mesh->AddVertex(vert[p0].x, vert[p0].y, vert[p0].z); //int b = mesh->AddVertex(vert[p1].x, vert[p1].y, vert[p1].z); //int c = mesh->AddVertex(vert[p2].x, vert[p2].y, vert[p2].z); mesh->AddPrimitive(a, b, c); } mesh->UpdateBounds(); model->UpdateBounds();
-
I believe this is fixed now.
- 1
-
Changed the way the preview server works. I think this will be more reliable. Currently it is rather slow to generate new thumbnails but I think it will get faster.
-
- Asset browser search bar now acts as a filter, includes a drop-down box with some pre-defined file types.
- Removed grab-object-to-rotate behavior.
- 1
-
- Fixed Camera::SetUniform texture overload.
- Added Camera::SetUniform material overload.
- Added Camera::SetUniform entity overload.
- 1
Release Notes
in General Discussion
Posted
0.9.6