OBJ sequence for animation with specular and bump maps

Started by Ben3D, January 17, 2015, 11:00:20 AM

Previous topic - Next topic

Ben3D

Hello,
I'm trying to make an animation with an OBJ object (sequence of objects for each frame for the object animation) but it seems that the OBJ reader only imports Diffuse maps. Has someone found a work around to make animations possible with an OBJ object sequence? As it is it's pretty useless for animating imported objects and I bought Terragen Pro+anim for animating.  :-\

j meyer

It's not the obj reader's fault.It's due to the program you export from which
parameters/settings are exported.Not every software exports/writes to obj
the same things,some do more than others.
You could try to run your obj files through poseray,but even then you may have
to set up some things manually in TG.

Ben3D

The exporter exports the bump along with the diffuse but only the diffuse is imported. According to the wiki the OBJ import reads the diffuse and specular values but only the diffuse textures, not the bump or specular textures:

http://planetside.co.uk/wiki/index.php?title=Wavefront_OBJ_Import
"TG reads diffuse and specular values from the MTL file. It can also load a diffuse texture file in any of the image formats TG supports."

If this is incorrect, could you point me to an OBJ file that would import correctly so that I can see what parameters are incorrect so I can modify them in the OBJ exporter that Blender uses.

Thanks.

j meyer

Unfortunately that (the bump map)is one of the things you indeed have to set up
manually.
The only work around I know of would be to make a tgc (clip file) for your obj.
And/or a tgo and work with that.
You could make one scene for the set up and load all iterations of your obj
into the obj node of that file and save from there.Lots of work,but still better
then doing it again and again for the whole sequence.
Sorry that I couldn't be of more help.

Hannes

Just import the OBJ sequence, and then adjust the material. It doesn't matter what's in the mtl file, because most of the time you need to rework the materials anyway, when you import objects.
Be sure to type in the correct line when you import the sequence. That means when your sequence goes from xxx.001.obj to xxx.200.obj you need to import it using this line: xxx.%03d.obj , because you have 3 digits (I hope this is the right expression). When your sequence goes from xxx.0001.obj to xxx.1000.obj (4 digits!) you need to change the 3 to 4, that means xxx.%04d.obj.
I hope what I wrote makes sense.

Ben3D

I've taken a deeper look at the problem and found what should be a workable solution:

I will export the obj object from Blender and put it's textures into a specific folder and use specific filenames for each object and vertex groups. I will import the object in Terragen then save the file. Being a programmer I will write a program that will take the tgd file and search for imported objects and then search for their textures (following the specific folders and filenames format). The program will then add the references to the texture files in the correct locations of the tgd file. I will then be able to reopen the tgd file and the textures should all be there ready for rendering.

The remaining test will be to verify if the .mtl file is loaded for each frame in the object sequence, erasing the previous modifications. I would think not but I will verify. If it does I will make another program to modify the tgd and then render a frame then modify it again and render the next frame until all the frames are rendered.

It will take a few days to get everything done and tested but it should work. I hope it does because one object I made has over 70 texture files (multiplied by the number of scenes if I have to use it in a few animations) and I have no intention of modifying the textures manually especially if this has to be done for each frame that I render in the animations and especially when I have more objects with more textures.

I've already tested the animation object sequence loading and it works well. Thanks for the help.

Hannes

Once you have adjusted the material once, everything will be OK for the whole sequence, unless the material is changing during the animation. Just apply a texture to your object as usual, as if it were an object for a still image.

Ben3D

You're right. I've made a test with my program modifying the Terragen tgd file to add the textures and the textures remain for the whole animation sequence in Terragen. That's a relief.

Thanks for all the help!

Hannes


Ben3D

Once I start animating something interesting I will post some of the animations in this forum. I hope to have some animations in march. But no promises  ;)

bobbystahr

Quote from: Ben3D on January 20, 2015, 08:48:46 PM
Once I start animating something interesting I will post some of the animations in this forum. I hope to have some animations in march. But no promises  ;)

Well I guess you missed March, heh heh heh...look forward to seeing your results....
something borrowed,
something Blue.
Ring out the Old.
Bring in the New
Bobby Stahr, Paracosmologist

Ben3D

Hahaha, yeah. But since I didn't specify Terragen so here's some animation test I did in Blender  ;D


Bear in mind that this was just a quick test so the movements are not ideal (ships & camera). The ice planet on the left will be where the main characters land (pale ship), the second planet is only 2D and was rendered in Terragen.

But seriously speaking, I'm currrently working on the two main characters and once this is done I will should working on the Terragen scene. But again no promises  ;D

Subscribe to my channel if you want to follow the general progress of the series.

bobbystahr

Not too shabby at all...really like blenders out; put I just couldn't handle the UI so it sits on the shelf next to Bryce . For all the same reasons.
something borrowed,
something Blue.
Ring out the Old.
Bring in the New
Bobby Stahr, Paracosmologist

TheBadger

Wow Ben! Did not expect this sorta thing from you. Did not think you were into 3D beyond the things you most often talk with us about. THis is really good too. Nice going, and thanks for the surprise!
It has been eaten.

Ben3D

Bobbystahr:

Yeah, I tried Blender a few years ago (version 2.5 I think) and the UI was a total mess. But the developers have improved it alot in the last few years and it's really great now. But you still have to get used to the different interface that is not the standard windows interface. But once used to it it's great. And you still have to view and read tutorials but I expect that this is the case with all 3D programs. (And in some cases there's a serious lack in the documentation department without naming names  ;) , but it's improving...)

The Badger:

Thanks! If I want to create a 3D animated series I have to do most of the work since I have a very small or micro budget. I hired concept artists and a writer (and eventually a musician) by contract because without them the result would basically suck  ;D