City and Textures
oconnordavid16
Posts: 164
in New Users
Found this city and it looks great except for the fact you need to add the textures but its not working correctly, anyone know why
Desktop Screenshot 2020.08.06 - 00.55.10.25.png
2560 x 1440 - 862K
Desktop Screenshot 2020.08.06 - 00.55.18.86.png
2560 x 1440 - 537K
Comments
What city is that? Is it provided in DS/poser format or is that something made for another program that you imported?
this is it https://free3d.com/3d-model/castelia-city-35261.html
It says it has textures but is also not UV-mapped - grabbing it now to look, not that I am an expert!
Ok ... the .fbx version seems to load ok - not fully checked all texture files load
The .dae does not seem load at all well
The .obj loads, but ... to start with it loads no textures, so ... take a deep breath and .. edit the .obj file to put quotes around the name of the .mtl file (it has a space), or remove the space from the filename and rename the .mtl file in the directory to match. Then edit that .mtl fiel and correct the pat names on thll the map_Kd options (a mass change of 'Castelia City/' to 'Textures/'
Usually, I would just add textures manually, but there are way too many to individually load with this obj.
What SimonJM said is corect.
1. Open OBJ file in Notepad or text editor - then remove the space in the mtl file name reference (this reference is found after 'mtllib' in the OBJ file)
2. Open MTL file in notepad or text editor, find and replace all instance of 'map_Kd Castelia City' with 'map_Kd Textures'
2. Set up your directory like in the image attached (i.e., change names to remove spaces)
3. Make sure when you import obj into daz, you have 'read material library' checked
ok will try this so thanks
I am so confuse, have opened the obj gile in notepad but there is no map_Kd Castelia City in there at all, tried searching for it but noting
Is it the .mtl file or the other one im meant to edit?
Sorry, didnt specify
In step 1 above, I am talking about OBJ file (changing the 'mtllib' reference to remove any spaces in the name)
In step 2 above, I am talking about the MTL file. In notepad, you can go to Edit>replace, and just mass replace all.
Basically your objective is to remove the space in the mat file name reference within the OBJ file (mtllib), and then go to the MTL file and update path directory for the textures.
In general, MTL files and OBJ should not have spaces in their references, they should have underscores intead or "" around the terms. Im not sure if this is needed for all importers or just Daz.
Ah ok I see, will try this so over the weekend thanks
so I remove the space in this ones name amd noting else with it, don't need to open it in notepad or anything
you need to open both in notepad.
For editing such files I use Notetab Light {less headache}.
Other way round. It doesn't matter (much) what the .obj file name is, but the .mtl file name must match the name written in the .obj file, on the "mtllib" line. This is usually at or near the top of the file, right underneath the initial comment lines if there are any.
What's causing this problem is that the .obj file format has problems with names that include spaces — and some programs that export .obj/.mtl file pairs are a bit lax in enforcing that. Enclosing the name in "quote" marks (including folder paths if there are any) fixes this problem. Fortunately, both the .obj and .mtl files are in plain text, so they're easily edited.
The same problem affects texture map calls in the .mtl file, which is the usual reason why problem .obj files can import without textures. It's a nuisance decades in the making (the .obj file format is ancient in computer terms), but at least it's fairly straightforward to fix.
Now I am just getting more and more confused other way round? the 3D Object file thats the obj file but the mtl one has the map_Kd Castelia City
You were asking if you should change the name of the .obj file. The name you should check to see if you need to change it is the .mtl file. That's why you need to have both files open, so you can cross-check.
some people just cant be helped. i edited my original post to make it a bit clearer.
Just remember, English may not be their first language and Google translate doesn't always give the clearest indication of what is being said.
as an aside
bit off topic but the sort of hurdles one faces not using DAZ content
obj files from Unreal Engine give me my own personal hell in Carrara because it has a file name length limit, I have to be very creative with find and replace using notepad and on the mtl and obj files, even though they actually work out the box in DAZ studio too, it also needs the quotations.
I have the fun job now facing me of converting about 100 FBX files too which are encrypted and use an image format only DAZ studio can actually read out of all my softwares namely dds, using third party models certainly can be a minefield of frustration. (I need to export as obj with converted jpg images for all my other softwares)
OMG don't get me started on Trimble 3D Warehouse sketchup files I have found a handy ArchVis converter though for those.
Made a nice discovery with those .dds files ... just going to take awhile ... they can be manually changed to .png which will then load in other programs. Didn't try .jpg ... that might work too. If not certainly the image editors can open .png files and then save as .jpgs.
think I figured out after re reading the steps you posted, just got a bit confused with the other comments after, does not look like its loaded textures properly and not all of them, might not have done as step though, how/where do I check/tick 'read material library' ?
in the obj file do I also remove the space between mtllib and Castelia City? I just removed the space bettwen Castelia City so like this mtllib CasteliaCity
you need to edit the actual file
not the name of the file
hang on will post something simple
mtl file
newmtl Default
d 1
Kd 1 1 1
map_Kd D:/TEXTURES/bark3.JPG
obj
# Exported from DAZ Studio 4.12
mtllib a_plane_with_a_bark_texture_no_quotes.mtl
o pPlane(11cg000)1
v -50 0 50
v 50 0 50
v -50 0 -50
v 50 0 -50
vt 0 0
vt 1 0
vt 0 1
vt 1 1
vn 0 0.9983114 0
vn 0 0.9983114 0
vn 0 0.9983114 0
vn 0 0.9983114 0
g pPlane(11cg000)1
usemtl Default
f 1/1/1 2/2/2 4/4/4 3/3/3
There's a tickbox in the import dialog.
No — "mtllib" is an instruction in the .obj file, it must be separated by a space with the name of the file you want D|S to look for.
That will work. Don't forget to do the same with the name of the .mtl file itself — remember that they must match.
meh I get the same file both options though
still not working correctly
join and grab it from here
https://3dwarehouse.sketchup.com/model/21024f61-8715-4452-b939-79fe281f82b3/Castelia-City
save as sketchup 2020
grab and register this
https://pcon-planner.com/en/download/
and export an obj
seems fine but with my CPU being 100% used by Carrara I am not going to try and render it right now
I'm afraid I'm stumped; those screenshots look like it ought to work.
well the original from Trimble exported from Pcon works fine for me
I will not download the version from your link (OP) as don't trust the site
iray render
added a HDRI to dome from HDRi Haven
Do you have a link to where I can get that one thats working for you?
in my post are the links for Trimble 3D warehouse and Pcon planner
oh I see, hadn'r scrolled up that far sry. thanks :)
it works now thanks