Sketchup to blender WITH textures? - three.js

I am working on a game in three.js and have some trouble adding some textures. When I put textures in Sketchup and then export the file as a collada file (.dae) and import it in blender, the textures is missing. Anyone know how tot fix this?

First, you need go to edit mode and select all faces. Then in UV / Image editor, click Browse image (beside + icon) and select the texture of your model.
Done! Now, go back to Object mode and changes the 3d viewport to display textures.

Related

How to fix image texture not transfering to Unity from Blender

I textured an object in Blender because it wouldn't texture properly in Unity, and then imported the object and texture to Unity.
I don't know how to fix this, I'll put both pictures here.
Blender Texture Before Import
Object In Unity
Okay, so based on your screenshots..
You're going to select everything then add a modifier called "Solidify", then set this to something very small like .03. (Unity doesn't like objects that are just planes).
double check all your normals are facing out. Let me know if you don't know how to do this...
Go into edit mode select all edges, then right click, select "mark as seam".
Open UV editor window (should be split screen with Edit mode on one side, UV view on the other). In the Edit side select all, then go to UV dropdown menu and click "unwrap". You should then see your object unfolded into flat planes over on the UV window side. There's different unwrap options, like smart UV unwrap, etc. I think just "unwrap" has worked for me, but play around and there may be something that shows your object shapes in a less distorted way..
At this point, since your pattern is basically repeating. If you export the OBJ file and take it into unity, and you add the image file (make sure it's dimensions are perfectly square) it should receive the image file as an Albedo texture much better than in your screenshots. You can play with the 'tiling' and "X/Y offset" till it looks right (you might face issues with rotation though.
BUT
If you want to line it up very specifically, you can export the UV layout as a png from the UV window in blender. Then use photoshop or another photo editor to change/rotate and arrange your texture so the sides line up properly. In blender in the Edit window (assuming you still have both UV + editor open) when you select a side it will highlight in the UV window the corresponding flat plane, based on this you should be able to figure out what should be rotated up/down, etc. Then when you change that 2d image and drag it into Unity, it will adjust and wrap around the object.
I'm pretty new to both, but the advice I've been given is to not do the texturing in blender, but instead to do it in Unity.
This is a 10-month-old post but incase anyone is curious or struggling the same, Blender exports models with a scale of 100 so you need to scale up the tile of the material (in material settings) to see it.
This is a bad solution however because then you are not working with objects on a scale of 1 so you actually want to check "Apply transformations" when exporting the FBX model in blender

Importing a downloaded .obj file to blender, how do I add textures that are provided in .png format?

So, as a starter on Blender, I've downloaded a 3d file from the internet. I've been able to import the object (.obj file) to the scene, but noticed one thing: There are 12 pictures in a folder called "Textures" that come with the downloaded object. How do I import these textures to the scene and apply them to the object? It is a good note that the object itself is not a whole, it is a combination of other objects.
Blender objects use materials to add color and shading to each mesh face. We assign textures to each material. The UV map image textures are assigned to a material in a process called skinning. You might just need to select the object and then look in the Material and Texture properties. Each Texture will have a folder icon to set the location of the texture image file.
YouTube offers many how-to videos about how to UV wrap an object. Just don't make your task too difficult. You probably only need to set the correct image texture png for each UV texture.
Hang in there and good luck.

Messed up UVs and Lightmap

I want to bake my model lightmap in blender then load them all in three.js.
So in blender i set two uvs for each objects and baked ambient occlusion in second uv. finally i exported whole scene via three.js exporter into js file.
(exporter has problem that the baked texture goes for diffuse-map not light-map which is correctable by editing exported js file).
But the problem is when i load js with SceneLoader, the textures especially for my floor goes wrong, like upside down.
here is my test files: Test Light Map
So is there something wrong with my blender file or ...? Which loader i should use for it?
Thanks.
I just upload some images to see what i mean:
Messed up textures:
After edit js file, it's get better. but still there is problem at the edges:
And specially at floor, the light-map goes wrong:
Ok, i don't know why, but it seems my uvs was messed up in blender. i did some recaculate normals and flip normals in blender and now textures map fine on objects.
But i still need to edit exported scene to change map:texture.png to lightMap:texture.png.
[EDIT]
Actually this is a bug related to three.js scene exporter: Blender Exporter - Scene Exporting
[Final Answer]
The problem was about my model which had a negative scale in blender. i select my model, hit crtl+a then choose scale. now everything's fine.

How to create Transparent Hole in Plane in three.js

In Three.js, How do I create transparent hole inside a plane so that only objects below the hole are visible. Something like clearRect of canvas.
I'm doing this with Blender and PSP.
So my scenario is the following:
Create a trensparent image with a hole in PS or PSP.
Open Blender and create your plane. Use the transparent texture you just created on it.
Export the Blender scene into a collada file.
Use on of the sample .html-s to display the collada file.
This is my working solution. If you wish I can give you working codes.
Or if you are not familiar with Blender and this collada related things then you should use that example files they using transparent images (for example: webgl_particles_billboards.html).
Take a look at "textures/sprites/disc.png" It's a transparent image as well. You can replace it with your transparent image with the hole.

Export Fbx from Blender To Unity

I have a complete blender file which has an animated character with two actions and I want to export it as an fbx so i can view it in unity. I did it and for some reason it is only exporting my actions and not the mesh or camera or anything else only exports the actions. Why is it not exporting my mesh I have everything selected and i have apply modifiers and include animation selected. Thanks for the help
Sounds like you are exporting in Blender with Selected Objects options set. In this case you have to select the mesh itself in object mode to export both. Selecting the armature will export animations only.
If you do have a mesh in Unity3D but can't see it in the scene, you have to fix the scale factor. It's set to 0.01 by default. So change it to 1 to see the mesh in its original size.

Resources