Skip to content

I'm unable to render 3D car model textures and colour on Linux!!! #59

@SarathChandra0025

Description

@SarathChandra0025

Hi there , I’ve encountered a bug while working with 3D models in Flutter on Linux. Specifically, the rendering of 3D models using " flutter_cube "seems to be malfunctioning or not displaying as expected for a 3D model car......Unfortunate or fortunate it is working for other 3D models but not for car models....dont know why this is happening!!!!

Issue Details:

  • Platform : Linux 20.04
  • Flutter Version : 3.22.3
  • Dart Version : 3.4.4

Description: When attempting to render 3D models using flutter_cube, the models either fail to display or render incorrectly.This is only happening for car models and not for other 3D models.I thought there was some problem with the gltf/obj of car but it is not working for any car model....This is what took me here!!!!

i'll provide you my code snipper here,

import 'package:flutter/material.dart';
import 'package:flutter_cube/flutter_cube.dart';

void main() {
runApp(MyApp());
}

class MyApp extends StatelessWidget {
@OverRide
Widget build(BuildContext context) {
return MaterialApp(
title: '3D Car Model Demo',
theme: ThemeData(
primarySwatch: Colors.blue,
),
home: MyHomePage(),
);
}
}

class MyHomePage extends StatefulWidget {
@OverRide
_MyHomePageState createState() => _MyHomePageState();
}

class _MyHomePageState extends State {
late Cube _cube;

@OverRide
void initState() {
super.initState();
_cube = Cube(
onSceneCreated: (Scene scene) {
scene.world.add(Object(
fileName: 'assets/models/car.obj',
));
scene.camera.position.z = 5;
scene.camera.position.y = 1;
},
);
}

@OverRide
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
title: Text('3D Car Model'),
),
body: Center(
child: _cube,
),
);
}
}
.........................................................................
Can you please resolve this !!!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions