Skip to content
New issue

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

feat: add metallic material rendering to URDF robot #33

Merged
merged 3 commits into from
Dec 12, 2024

Conversation

devin-ai-integration[bot]
Copy link
Contributor

Add metallic material rendering to URDF robot

This PR updates the URDF renderer to display metallic materials, matching the implementation from web-dashboard.

Changes:

  • Added updateMaterials function to set metallic properties (metalness: 0.4, roughness: 0.5)
  • Enhanced lighting setup for better metallic visualization
  • Preserved original colors while adding metallic effect

Testing:

  • ✓ Lint checks pass
  • ✓ Build checks pass
  • Note: Visual testing should be performed to verify metallic appearance

Reference implementation: web-dashboard/src/components/files/URDFRenderer.tsx

Link to Devin run: https://app.devin.ai/sessions/a4ebae7099e541cc85d5601727cf5bcb

- Added updateMaterials function to set metallic properties
- Enhanced lighting setup for better metallic visualization
- Preserved original colors while adding metallic effect
- Set metalness to 0.4 and roughness to 0.5

Co-Authored-By: Benjamin Bolte <[email protected]>
Copy link
Contributor Author

🤖 Devin AI Engineer

I'll be helping with this pull request! Here's what you should know:

✅ I will automatically:

  • Address comments on this PR
  • Look at CI failures and help fix them

⚙️ Control Options:

  • Disable automatic comment and CI monitoring

Add "(aside)" to your comment to have me ignore it.

Copy link
Member

@codekansas codekansas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

few minor things but overall good


// Correcting for the robot initial size and position.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

don't need to delete this comment

@@ -89,7 +105,6 @@ const RobotRenderer: React.FC = () => {
requestAnimationFrame(animate);
controls.update();

// Update joint positions with a sinusoidal pattern
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can keep this comment

Comment on lines -112 to +136
const light = new THREE.AmbientLight(0x404040);
scene.add(light);
const ambientLight = new THREE.AmbientLight(0xffffff, 0.3);
scene.add(ambientLight);

const mainLight = new THREE.DirectionalLight(0xffffff, 2.0);
mainLight.position.set(5, 5, 5);
scene.add(mainLight);

const directionalLight = new THREE.DirectionalLight(0xffffff, 0.5);
directionalLight.position.set(1, 1, 1).normalize();
scene.add(directionalLight);
const fillLight = new THREE.DirectionalLight(0xffffff, 0.8);
fillLight.position.set(-5, 2, -5);
scene.add(fillLight);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this seems unrelated to the pr but is a good change. can we make this into a separare pr, with a screenshot of how it looks?

@codekansas codekansas merged commit d5fb13b into staging Dec 12, 2024
1 check passed
@codekansas codekansas deleted the devin/1733943454-add-metallic-materials branch December 12, 2024 00:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant