We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
bevy_gaussian_splatting/src/io/ply.rs
Line 65 in 507a28d
fn set_property(&mut self, key: String, property: Property) { match (key.as_ref(), property) { ("x", Property::Float(v)) => self.position_visibility.position[0] = v, ("y", Property::Float(v)) => self.position_visibility.position[1] = v, ("z", Property::Float(v)) => self.position_visibility.position[2] = v, ("f_dc_0", Property::Float(v)) => self.spherical_harmonic.set(0, v), ("f_dc_1", Property::Float(v)) => self.spherical_harmonic.set(1, v), ("f_dc_2", Property::Float(v)) => self.spherical_harmonic.set(2, v), ("scale_0", Property::Float(v)) => self.scale_opacity.scale[0] = v, ("scale_1", Property::Float(v)) => self.scale_opacity.scale[1] = v, ("scale_2", Property::Float(v)) => self.scale_opacity.scale[2] = v, ("opacity", Property::Float(v)) => self.scale_opacity.opacity = 1.0 / (1.0 + (-v).exp()), ("rot_0", Property::Float(v)) => self.rotation.rotation[0] = v, ("rot_1", Property::Float(v)) => self.rotation.rotation[1] = v, ("rot_2", Property::Float(v)) => self.rotation.rotation[2] = v, ("rot_3", Property::Float(v)) => self.rotation.rotation[3] = v, (_, Property::Float(v)) if key.starts_with("f_rest_") => { let i = key[7..].parse::<usize>().unwrap(); // interleaved // if (i + 3) < SH_COEFF_COUNT { // self.spherical_harmonic.coefficients[i + 3] = v; // } // planar let channel = i / SH_COEFF_COUNT_PER_CHANNEL; let coefficient = if SH_COEFF_COUNT_PER_CHANNEL == 1 { 1 } else { (i % (SH_COEFF_COUNT_PER_CHANNEL - 1)) + 1 }; let interleaved_idx = coefficient * SH_CHANNELS + channel; if interleaved_idx < SH_COEFF_COUNT { self.spherical_harmonic.set(interleaved_idx, v); } else { // TODO: convert higher degree SH to lower degree SH } } (_, _) => {},
The text was updated successfully, but these errors were encountered:
see: https://lightgaussian.github.io/
Sorry, something went wrong.
mosure
No branches or pull requests
bevy_gaussian_splatting/src/io/ply.rs
Line 65 in 507a28d
The text was updated successfully, but these errors were encountered: