advanced rendering for AutoCAD
I've used nXt to insert an obj model.
How do I get it to add the textures?
I've tried adding the folder with the textures to the support paths , but it still doesn't work.
The obj file was downloaded from renderpeople.com.
I don't remember offhand-- I can check a little later. In general this just works. A few things to consider:
Make sure the mtl file(s) are accessible and correctly referenced in the obj. Use a text editor to check this.
Make sure the textures are in an nXt supported format such as png or jpg. If you need to convert the texture make sure you change the references in the mtl file to have the correct extension.
Check the *.mtl file(s) for how they reference the textures. Change if necessary.
There are no MTL files.
There is the OBJ file or an FBX file and then a folder with textures in JPG and TIF formats.
The obj won't have materials without a corresponding mtl file. If you open the obj in a text editor you should see a reference to an mtl file via an mtllib tag. That's the file you need. The usemtl tags refer to materials contained within the referenced file(s).
The obj file just contains strings of numbers which look like they are coordinates for all the triangles in the mesh.
OBJ files are not carrying bitmaps themselves, but they contain UV mapping information of those maps. That is the way of projection of particular bitmap on the object's surface. If you insert textured OBJ file using nXt, it is enough just to locate the exact bitmap path in material editor for newly created (imported) material. At least, that was the way I'd use to do when working with nXt in the past. It can be done also externally, if you have program able to open and edit the material attributes of 3D files (3Ds, OBJ and others) like PolyTrans or Right Hemisphere Deep Exploration, but it is not necessary.
That's what I tried to do, but it doesn't seem to work.
Can you pass me those OBJ Peter? I could throw an eye on them if you like. If yes, send me link to e.g. dropbox in PM please.
You can find the sample models here: https://renderpeople.com/free-3d-model/
I took a quick look at one of these. You're right, the obj files do not contain material refs and are therefore incomplete. They do include texture coordinates so it would be possible to bring these up in an obj editor and assign the textured materials to various meshes.
Not sure if you can do this in nXt since I don't think the individual meshes of the object are accessible to the AutoCAD UI. I don't remember what happens if you explode my textured mesh object-- but I don't think this will work well. You may lose the texture coords. at that point. Might be worth a try.
Ah-- got it now. The texture itself is not present in the obj-- however in the tex folder there is a very large (64 MPixel) texture which should map correctly to the mesh. You may want to reduce the texture's resolution in photoshop first-- it's very cumbersome to work with.
Create a material using it and assign to the object. Haven't verified that this works yet but suspect it does. If it doesn't you'll need to create an mtl file and reference it from the obj. I can help with that.
Using AccuRender Studio:
I tried creating a material with the texture and assigning it to the object, but it didn't work.
Try this one Peter: