Page 1 of 1

.obj file internals

Posted: Wed Oct 03, 2012 3:34 pm
by MJB
I have been working on a Revit addin to write an obj file specifically for octane render.

I am writing the .obj file out in mm and setting the octane preferences accordingly on import.
I found that i had to scale the UV coordinates by .001 in order to get sensible texture scaling in octane.
I.e. the UV coordinates in the .obj file must be hard coded to meters, not millermeters.
Does this mean that your preferences setting that converts from mm to m is not actually applying the right multiplier to texture coordinates?
I have seen this behaviour in all versions of octane that i have tried, currently i am using 3.1 instancing preview beta.

I have also encountered an issue with scalling textures on curve (cylindrical) walls. All of the textures get horribly stretched in the x (horizontal direction),
but are fine vertically. I do not find anything unexpected when examining the uv coordinates of the verticex triangles in in the free MeshLab tool.
Do you think this could be a problem with octane, or is it that my triangulation of the cylinder in Revit is not fine enough.
I have not yet implemented vertex normals, do you think this would solve the problem?

Your thoughts would be welcome.

thx

mark

p.s your program is fantastic and will have a hugh impact on our business.

Re: .obj file internals

Posted: Wed Oct 03, 2012 5:11 pm
by matej
afaik, texture coordinates should not be in "meters" nor "mm", but normalized, ie. on an interval 0.0 - 1.0, that specifies percentage of image width / height.

Maybe it's your .obj exporter fault. Check export settings

Re: .obj file internals

Posted: Wed Oct 03, 2012 9:07 pm
by FooZe
Hi, You might want to quickly try 3.02a - there has been a fix for texture mapping.
Otherwise as matej says it's quite likely a problem with the exporter.

Cheers
Chris.

Re: .obj file internals

Posted: Fri Dec 28, 2012 8:33 am
by Seekerfinder
Mark,
Any update on this?
I have been fruitlessly lobbying for a Revit plugin for 2 years now. No one seems to be interested. If I had the required programming skills I would have tackled this!
Are you still developing the plugin?
Thanks,
Seeker

Re: .obj file internals

Posted: Mon Jan 14, 2013 2:15 pm
by Seekerfinder
Bump

Re: .obj file internals

Posted: Mon Jan 14, 2013 9:34 pm
by face_off
I am working on the ArchiCAD plugin, and found that architectural apps treat uv's somewhat differently to modelling apps - and I suspect that is where you are having issues. I haven't used Revit, but my guess is that it is dynamically allocating uv's based on the size of the geometry so that the tiled texture sizes stay the same. Therefore the uv's will be "world uv's" with a range outside the normal 0-1. Octane handles this situation very well - you can put the absolute uv's in the obj file.

Re: .obj file internals

Posted: Mon Jan 21, 2013 8:41 pm
by MJB
face_off

I have never worked with non architectual apps, to get uv to work in revit i can't use normalized numbers so i guess your right.
If you look at the octane_22_benchmark file, all these faces must be normalized, and this is not what you want in architecture.

I have it working fine now for common underlying shapes, but i unfortunately have to write a different algorithm to calculate them based on the underlying geometric shape from which the triangle was derived. My biggest issue is with topo surfaces which i don't have uv mapped yet.

I still have the scaling problem which was easy to correct, if it is an octane bug, when they fix it, my code will break. I have noticed on this forum users describing a very similar issue with the sketchup plugin to what i was seeing prior to putting in the fix.

best

mark

Re: .obj file internals

Posted: Mon Jan 21, 2013 9:06 pm
by MJB
Seekerfinder

This was an effort for a large architecture firm that has a couple of thousand seats of Revit. It ended up taking several hundred hours to implement (and its still got UV issues on certain complex shapes), profoundly different than some of the other exporters from what i can tell. Because of this I can't see it being given away for free. I will post again on this thread if anything changes.

best

mark