[FIX] Smoothing Mesh Bug Export from 501 Modo to Octane...

Forums: [FIX] Smoothing Mesh Bug Export from 501 Modo to Octane...
Foundry Modo (Developed by stenson, Integrated Plugin developed by Paul Kinnane)

Moderator: face_off

[FIX] Smoothing Mesh Bug Export from 501 Modo to Octane...

Postby madasebrof » Fri Apr 22, 2011 2:18 am

madasebrof Fri Apr 22, 2011 2:18 am
See below for the problem. The fix is to add the following code at line 127 in "fs_OctaneExporter.py"

lx.eval('poly.convert face subpatch true')

Just before this line:

lx.eval('!!scene.saveAs "%s" wf_OBJ true' %obj_export_path)

I think the transform scale is wonking the normals, and this wil re-smooth the normals so the mesh looks good in Octane. Note that you may get an "unexpected indent" msg--just make sure the indent is spaces not tabs when you add the code above. Also, now if you uncheck "smooth" in a material in Octane, you will see facetes, as you'd expect.

-------------------

So, I can't seem to get to the bottom of this, but there seems to be a smoothing bug when exporting a model form Modo to Octane...

If I export a model (e.g. a sphere or any mesh--I tried lots!) from modo as an .obj, then bring it in to Octane & set the smoothing bool to "true", all is good. But when I export the exact same model using the modo to octane script, the resulting model in Octane is faceted. Even if I try to, by hand, emulate the steps that the export script is doing, e.g. "poly.freeze false false 2 false true" to freeze the mesh, then export that as an OBJ, it comes in fine, with smoothing into Octane. But when I use the plugin, all meshes come in faceted.

Likewise, if instead of hitting the "render" button in the octane->modo script I hit the "export OBJ" as a test, then bring that OBJ into Octane, it's fine--it's not faceted. But if I hit the "render" button in the octane/modo script, the mesh comes in faceted. Weird.

The fix seems to be to re-import the meshes that were exported via the script BACK into modo, hit the "tab" key, export as an OBJ. This basically just smoothes the vetex normals in the OBJ file. Then the meshes look fine in Octane, e.g. smooth, not faceted! But that, of course, defeats the entire purpose of an automated export form modo to octane!

Likewise another fix is to edit the .ocs file and set 'useSuppliedVertexNormals' value to "false" instead of the default value of "true". Then the meshes come in smooth. But again, this defeats the purpose of a script...

(And just to be clear, I know all about subd's & the difference between modo's subd meshes vs. octane which uses only the actual polygons themselves.)

To summarize, in general, if you import an OBJ into octane & uncheck the "smooth" bool button in the material, you will get faceted faces. ALL models are coming in this way into Octane via the modo export script, and checking & unchecking the "smooth" button has no effect.

Am I missing a workflow thing???
win 7 home premium | gtx 580s | octane 2.46b cuda 3.0 + 3.2
madasebrof
Licensed Customer
Licensed Customer
 
Posts: 13
Joined: Fri Dec 17, 2010 6:16 pm

Re: [FIX] Smoothing Mesh Bug Export from 501 Modo to Octane...

Postby marchermitte » Tue Aug 30, 2011 1:11 pm

marchermitte Tue Aug 30, 2011 1:11 pm
Same here, I tried a workaround that consist in 1) hit render from Modo, then 2) close octane scene and 3) from Modo re-export mesh (obj) only to overwrite the one previously saved and 4) re-open the scene in OCtane. It doesn't always work, I have a big building mesh tha won't smooth whatever I do. This is the same problem with the Lightwave exporter and is a real issue.
Marc Hermitte
Intel I7 4.5 Ghz, 24 gig ram, 2x Nvidia GTX 480, win 764bits
marchermitte
Licensed Customer
Licensed Customer
 
Posts: 283
Joined: Sat May 29, 2010 9:25 pm
Location: Geneva

Re: [FIX] Smoothing Mesh Bug Export from 501 Modo to Octane...

Postby scratch33 » Tue Sep 06, 2011 6:46 am

scratch33 Tue Sep 06, 2011 6:46 am
machermitte, here is a trick to bypass this problem with scenes without deformation. But, you must have all objects in one...

"The only way to do this is to export with the lightwave standart obj exporter from modeler, texture in octane, then place the obj in another folder.
Then I setup my anim in layout and I export to octane. When lightwave has finished to export and before octane load the geometry, I replace quickly the obj exported by the layout plugin with the obj exported with modeler standart exporter."

Works, but a real pain.

For the lightwave plugin, I have contacted radiance early july. He as contacted holocube for this. Holocube told him that he fix this soon.
But... 2 month later... nothing...
scratch33
Licensed Customer
Licensed Customer
 
Posts: 224
Joined: Sat May 29, 2010 7:45 am
Location: Bienne(Switzerland)

Re: [FIX] Smoothing Mesh Bug Export from 501 Modo to Octane...

Postby marchermitte » Fri Sep 09, 2011 10:33 am

marchermitte Fri Sep 09, 2011 10:33 am
Modo's and Lightwave users aren't getting much attention those days. Too bad for us!
Marc Hermitte
Intel I7 4.5 Ghz, 24 gig ram, 2x Nvidia GTX 480, win 764bits
marchermitte
Licensed Customer
Licensed Customer
 
Posts: 283
Joined: Sat May 29, 2010 9:25 pm
Location: Geneva

Re: [FIX] Smoothing Mesh Bug Export from 501 Modo to Octane...

Postby scratch33 » Fri Sep 09, 2011 2:14 pm

scratch33 Fri Sep 09, 2011 2:14 pm
marchermitte wrote:Modo's and Lightwave users aren't getting much attention those days. Too bad for us!


So true.

And so sad. :|
scratch33
Licensed Customer
Licensed Customer
 
Posts: 224
Joined: Sat May 29, 2010 7:45 am
Location: Bienne(Switzerland)

Re: [FIX] Smoothing Mesh Bug Export from 501 Modo to Octane...

Postby Joely-Bird » Tue Nov 15, 2011 9:26 am

Joely-Bird Tue Nov 15, 2011 9:26 am
There seems to be two parts to this, one is that when the Octane plugin exports a mesh, the surface smoothing is set to 0%. (this seems to have been fixed in the 1.05 plugin) the second is that when an OBJ is exported from modo, a surface normal map is created (found in the vertex map list under 'other maps') This will effectively 'fix' the surface normal in a set position so that smoothing cannot be changed.

If you open up the OBJ in modo, reapply smoothing to the materials (if necessary) then delete the surface normal map for all layers Then Save.

The problem will be fixed but I suspect if you try to uncheck smooth in Octane you will have the reverse problem. (I will test this later)

I hope this helps. It's a quick fix but it'd be good to get the plugin doing this for us :)
Attachments
Surface Normal.JPG
Surface Normal.JPG (16.43 KiB) Viewed 5323 times
i7 4820k 4.0Mhz | 32GB RAM | GTX 770
User avatar
Joely-Bird
Licensed Customer
Licensed Customer
 
Posts: 7
Joined: Wed Oct 12, 2011 7:59 am
Location: London

Re: [FIX] Smoothing Mesh Bug Export from 501 Modo to Octane...

Postby balt » Fri Mar 02, 2012 3:43 am

balt Fri Mar 02, 2012 3:43 am
Do any of you have this plugin working with Modo 5.01 SP6? I'm not even getting an Octane menu, even though I applied the menu patch.

Any help greatly appreciated!

Cheers

- Balt
balt
Licensed Customer
Licensed Customer
 
Posts: 71
Joined: Sun Feb 19, 2012 4:14 am

Return to Foundry Modo


Who is online

Users browsing this forum: No registered users and 6 guests

Fri Mar 29, 2024 5:46 am [ UTC ]