Skip to content

Text rendering is blurry in the Gaussian splat scene. #248

@cloris

Description

@cloris

I used Spark to render a PLY and found that the text in the scene is very blurry, but it appears very clear in MKK — could you please take a look?

In Spark:
Image

In Mkk:
Image

Ply file:
https://1drv.ms/u/c/1ad718b987e56d68/IQDA0kmJX3JTR6-RGrccw-iPAbCoYeco6MTtinhMNIxdDMs?e=l3Kgo5

Code:
`import "./style.css";
import * as THREE from "three";
import { SparkRenderer, SplatMesh } from "@sparkjsdev/spark";
import { OrbitControls } from "three/examples/jsm/controls/OrbitControls.js";
import Stats from "three/examples/jsm/libs/stats.module.js";
const stats = new Stats();
document.body.appendChild(stats.dom);
let titleDiv = document.createElement("div");
titleDiv.id = "apptitle";
titleDiv.textContent = "spark";
document.body.appendChild(titleDiv);

const scene = new THREE.Scene();
const camera = new THREE.PerspectiveCamera(
60,
window.innerWidth / window.innerHeight,
0.1,
1000
);
camera.up.set(0, 0, 1);
const renderer = new THREE.WebGLRenderer({ antialias: true, precision: 'highp' });
renderer.setPixelRatio(window.devicePixelRatio || 1);
renderer.setSize(window.innerWidth, window.innerHeight);
document
.querySelector("#app")!
.appendChild(renderer.domElement);

const splatURL = "point_cloud.ply";
const splatMesh = new SplatMesh({ url: splatURL });
scene.add(splatMesh);

const controls = new OrbitControls(camera, renderer.domElement);
controls.object.position.set(60.28,-24.62,1)
controls.target.set(60.28,-25.62,1);

renderer.setAnimationLoop(function animate(time) {
stats.update() // 更新FPS显示
controls.update(time);
renderer.render(scene, camera);
});

window.addEventListener("resize", () => {
camera.aspect = window.innerWidth / window.innerHeight;
camera.updateProjectionMatrix();
// set pixel ratio before size so the backing store is correct
renderer.setPixelRatio(window.devicePixelRatio || 1);
renderer.setSize(window.innerWidth, window.innerHeight);
});
`

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions