Reputation: 514
I'm trying to load low poly FPS arms I made in Blender. I gave them colors using a material that I set a color to, it appears nicely in Blender. But when I load them into Ursina, they are totally white, no color ! I clearly think the problem is the "way" I applied the color, which may be a problem for some reason or another.
Here is how I imported the file :
class Hand(Entity):
def __init__(self):
super().__init__(model = 'ARMS.obj',
scale = (0.1, 0.1, 0.1),
rotation = (0, -20, 0),
color = color.white,
position = (0, 2, 0))
(sorry for minimum reproductible example, would be hard to do without posting my whole code)
So yeah, it shows with the color I set in the color parameter (white to avoid affecting the colors I apply in Blender... That don't show). Does someone know how to do that please ? By this, I mean, does someone have experience loading 3D models into Ursina/an equivalent, and knows what I did wrong ? I did as well as I could, following this : https://blender.stackexchange.com/questions/75872/not-showing-colors-in-material-mode. I will join an image of the properties of my material I assigned into blender :
I'm really wondering how I can get my color/future textures to load into ursina !
Upvotes: 0
Views: 1040
Reputation: 21
OBJ models can't be loaded in with colours in ursina. What you have to do is
Texture Paint
tabImage
.Save
and Save it into your project foldertexture
paramclass Hand(Entity):
def __init__(self):
super().__init__(
model = 'ARMS.obj',
scale = (0.1, 0.1, 0.1),
rotation = (0, -20, 0),
color = color.white,
position = (0, 2, 0),
texture = "ARMS.png"
)
Upvotes: 1