- Home /
How to import baked texture to Unity
How to export baked texture from Max(using vray) to unity, exporting the fbx and exr failed.
in Max i tried add Modifier list Unwrap UVW and then Render to texture but no luck. And in Unity i import and drag the exr to the slot of fbx material.
this is free sample i've downloaded, and this is the result link
the second image is the texture.. I don't know why you need to export it from max, just add it to the object in Unity
if i just add it to the object, the texture won't map correctly, the shadow and color randomly placed to the object. did you try this before?
The 3D model has a UVW Unwrap, which corresponds to the UV Tile. You don't need to bake anything. When you export your fbx, the UVW data is included. Just attach the texture..
It is common to SWAP textures on a model in-game, so having to bake them into the model would be a huge problem
Thanks for quick respon, first the texture is created using non standard material, second things is because unity doesn't have vray plugin so i have to bake it.
I add the result link to my question
Answer by AXXE78 · Nov 14, 2012 at 10:50 AM
If you're using Render to Texture and it's set to automatically unwrap the UVs on an uv channel different from the standard one, you will see the right texture with wrong UVs in Unity. Make sure you're unwrapping on the first UVs channel if you want to use that texture as a Color texture. If you're after lightmaps, then you will need two UV channels: one for the color map, and one for the lightmap.
I know this is Unity answer, and i should go to $$anonymous$$ax Forum. But could you tell me more what to set in $$anonymous$$ax if i want to use that texture as lightmaps while i search it 1) apply a uvw map modifier to a model, set on channel 1 2) set the tiling in UVW mapping modifier 3) Add Unwrap UVW , set the $$anonymous$$ap Channel to 2
Render to Texture 1)Selected object settings enabled checked 2)Padding 2 3)Projection $$anonymous$$apping Enabled unchecked 4)$$anonymous$$apping Coordinates Object select use selecting channel, Channel 1 5) Output add complete map 6) Selected element common settings Enabled checked, Target $$anonymous$$ap Slot->Diffuse Color 7) Use Automatic $$anonymous$$ap Size unchecked (choose your own size)
Did i forget something?
In Unity Import the fbx file , go to your model, in the inspector , shader, choose Diffuse(or Legacy Shaders/Lightmapped/Diffuse) and drag your exr file
You need to have two different UV channels, one for the color map and one for the lightmap. Usually, for the second UV channel (the one for the lightmap) you would prefer to use Automatic Unwrapping (from Render to Texture) and let the software automatically unwrap your UVs in the second channel. That's mainly because you want unique UVs for the lightmap. So the steps would be: 1) create UV on the first channel for the color map, as you would normally do 2) open Render to Texture, check Automatic Unwrap (can't remember the exact name, but you will find it easily) 3) make sure that Automatic Unwrap will operate on second UV channel (2), otherwise it will overwrite your existing UVs on channel 1 (the one you use for the color map) 4) once done, max will create a shell material to let you view the lightmap in the viewport; you need to assign a standard blank material to your model before exporting it 5) export the model in .FBX 6) in Unity, create a new $$anonymous$$aterial with one of the Lightmap shaders 7) assign the color texture and the lightmap in the right slots of the material
" 4) once done, max will create a shell material to let you view the lightmap in the viewport; you need to assign a standard blank material to your model before exporting it" => can i assign vray material to my model
VRay materials are not supported by FBX or Unity...so what's the point in assigning it to the model? You can keep it in the lightmap generation phase, but FBX only supports standard materials.
This is the results baking with VRay, using .exr file, no Lighting is used.
But i am still looking for an easy way to do this.
Your answer
![](https://koobas.hobune.stream/wayback/20220613083838im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
COLLADA import with textures 3 Answers
Applying textures to multiple meshes 0 Answers
Blender texture resolution issues 0 Answers
Prevent FBX from importing embedded textures 1 Answer
Multiple texture import settings? 2 Answers