Cannot load textures in 3d models with jit.gl.model
Dear All,
I have a work with a company where I need to use several 3d models with their own textures.
In the past I made some Blender objects with textures (simple stuff) and I created .obj and .mtl files, loading the textures directly with jit.gl.model. However, I'm not an expert in 3D modeling, so I don't know which kind of files they will send me.
I tried downloading several models as:
http://tf3dm.com/3d-model/mp5k-fully-rigged-60158.html - Here obj tells me "no object" and the other format doesn't load textures (model is ok)
http://tf3dm.com/3d-model/mouse-41760.html - Here the model is ok but no textures
http://tf3dm.com/3d-model/table-24316.html - Same, model ok but no textures, even copying the files in the same folder
http://tf3dm.com/3d-model/vw-touareg-72326.html - Here model ok, some strange material stuff, no textures, even copying everything in the same folder and modifying the folder directory with TextEdit
(I tried several others obj. but no success)
Can anyone help me in finding a good way of loading textures? These model works for you? Do you have some link to free models that work (not the same Apple or Seymour) online like that one?
The studio will work with Cinema4D on models. I really need to figure out how to implement all that stuff otherwise I need to move on other softwares... I checked the previous post on textures and export, but cannot find out how to load textures in any of that models...
Thank you in advance for the tips! :)
Hi there,
the simplest thing is to say to the company that you'll be working with that they need to export all models in the .dae format.
I just checked a few links with what you posted, you can download them in multiple file formats, try downloading them as .dae files and see if that works.
When this model type is loaded into max then all textures and UV maps are opened automatically.
If that isn't an option then you can get the jit.gl.model @matrix_output 1
This will output all the matrixes with regards to vertex array , uv array etc.. (12 planes if I'm correct)
You can then combine this with jit.gl.texture to retexture your models.
A little bit of work with jit.unpack and jit.pack will be required (though jit.gen is far more efficient using swiz and vec to unpack the planes)
If you've got any example files then just post them and I'll see if I can help you out.
Also: the obj and dae model examples from the links you send don't have the textures applied to them. You can check in Blender or C4D.
When you open the right textured model in Blender or C4D, and you export them as dae and you will see the texture.
But even then "material_mode 3" on the jit.gl.model works best to see the textures correctly.
Ok...With Dae textures are inside or are image files?
However, many models (as Table and Touareg) that I link have textures...Even in Dae o Max3D format textures are not load...I don't understand why...It's an error of the model export itself? It's an error from me?
Do you have some link of Dae that works well downloadable (more than Seymour.dae)?
Just make a simple model in blender with UV unwrapping using a texture.
Save the textures.
Then export the model with "include UV textures" checked.
When the model is exported all necessary files will be exported along with the model into the folder.
With me this works flawlessly.
This should show you that dae import with textures works.
Ok, but I need to understand with them how Cinema4d can export it... They don't use Blender...Do you have an example downloadable?
As many models from that site that I linked before are written with textures but no one load it, even dae or max3d...and most of tgem are made with cinema4d
Try using jit.gl.texture with the texture image. If a model has a uv wrap it should work fine.
Thank you very much to all...So, just to see of I understood correctly...
Do you have suggestions about exporting from Cinema4D?
For now I told them to try:
.Export dae with UVMapping and Baked Textures.
Other suggestions that I can gave them?
They sent me before an .obj that works good but no textures (I think C4D just export .obj without .mtl neither textures pics), so I wait for the .dae.
I'm also curios if TouchDesigner and VVVV are so difficult about importing textured models...Do you have experience wuth those softwares?
Well I've never used cinema 4d. Regardless max is fully capable of loading the object formats you requested.
Please make a zip file with an example model and texture then upload it.
It'll be far quicker that way.
Hi, sorry I was confused with materials in my first answer. With textures it works like ANDRO says. I exported your first example model from C4D to dae 1.4 and the textures load in one go!
@MRMARTEN, it would be possible to share your DAE export from C4D?It would be really helpful for me (as the DAE model inside the original doesn't work)
Guidponzini. Do you have a working copy of C4D ??
If not then you'll just have to take our word for it that it works as expected.
Like I said before upload a patch with a model and a texture AND the Max patch your using to try and make it work.
It could just be that your making a simple error in your max patch.
@ANDRO ok, I will upload the patch asap...However it's quite straight...or Jit.gl.model help file or jit.model with read message and jit.world... Then optimize 0...And the model is the same that you can download from the link that I paste in my first message...So, as the model that MRMARTEN reconverted with C4D don't work neither as .obj or .dae (so he needed to reconvert it), I simply asked to see it...MRMARTEN can confirm that the original .dae in the folder don't work and the new one, exported from C4D file, works? Can you tell me the setting for the export? I will upload the patch asap, meanwhile
If your model is UV unwrapped (has to be for the texture to be correctly applied) and the texture is "baked" or painted by hand then it doesn't matter.
If in C4D the model looks correct then it'll be fine.
Upload a patch and also upload a screenshot of the C4D .dae export settings screen.
I'd rather not download models and have to set it all up, thats why I'm asking for a zip file with your progress.
Lets make it work.
Hi here is the model and textures. And the patch:
@MRMAARTEN... Perfect... I see the model textured!!! :) Can you tell me, if possible, the setting for exporting it from C4D?
OFF TOPIC: Any advice about making the 3D models smoother to see? As the border are always a little bit saw style (very little bit)...
Tried "anti-aliasing", "High res" from Jit.world and many other stuff, but no luck... Maybe some suggestion?
Hi guidoponzi.
I've suggested more than a few times that you post a patch. If you do that people can instantly help you with all your questions.
Heres a video i found. https://m.youtube.com/watch?v=K7deQU314LE
Explains everything in the 1st five minutes.
There are no export with texture options in c4d, it's automatic.. Simply pick export collada 1.4.
Done.
It's like ANDRO said: export from C4D as DAE 1.4 There are no settings, it's automatic.
The only setting I did on in jitter is the material.
In a live environment things look a bit 'harsher' to make rendering faster. But I think it looks pretty good with the window set to fsaa 1
You can add some post processing to your scene by capturing it to a texture. From Max 6 on this can be done with jit.gl.node.
The quick bloom I tried doesn't make it really better (the jaggedness is actually a bit increased):
In Max 7 it is easy to add a depth of field effect with the jit.gl.pass. Looks great, and the bloom is a bit better (or in combination with the DOF):
If you capture a texture at double the resolution of your final resolution then you achieve a sharper image.
Eg. Jit.window @size 1024 768
Jit.gl.node @dim 2048 1536
@andro, take a look at @fsaa for jit.gl.node (introduced in max 7). this is pretty much what it does.
Check ! Nice !
Dear All,
thank you so much as you resolved most of my issues. Also the fsaa function is amazing!
A last question: if I have a model and I use a rotatexyz function, the rotation is lock to the model orientation. There is a possibility to lock the function to the world orientation? I mean:
If I have the model in front and I rotate it left/right, If I do a complete rotation seeing the back and I do the same left/right the result is inverse.
It's possible to have a result based on the world coordinates and not on the model ones?
Hope it will be clear...
hi guidoponzini, take a look at jit.anim.node and the @animmode attribute. you can connect a jit.anim.node to a jit.gl.model, set @animmode (or @turnmode) to world, and animate using the "turn" message (or hook up an jit.anim.drive to handle the animations).
@ANDRO
JUL 21 2015 | 4:36 AM
Just make a simple model in blender with UV unwrapping using a texture. Save the textures. Then export the model with "include UV textures" checked. When the model is exported all necessary files will be exported along with the model into the folder. With me this works flawlessly. This should show you that dae import with textures works.
I know this is a very old topic, but I (and the model guy I'm working with) have a question: if the model is a large scene (trees, houses, plants etc.) which have a lot of textures to deal with, UV unwrapping will be a very complicated work. is there some other methods like a [jit.sth] to help jitter load 'wrapped textures' ?
thanks very much !