Page 1 of 2

3.1.99.9 bugs and notes

Posted: Wed Sep 09, 2015 10:28 am
by carbon
Hello,
during updating my blender/maxwell addon i've found some things i'd like to report:

- running: CextensionManager.loadAllExtensions will output:
'Extension: /Applications/Maxwell 3/extensions/MaxwellCloner.osx.mxx incompatible
with current SDK version'


- i don't see any way to set output to PSD for channels in Studio, when written
with setPath, it is displayed as EXR with correct bit depth when opened in Studio

- there is nothing about camera lens extensions in docs, however i've managed to find it,
i set up cameras in studio, then get params getCameraLensExtensionParams and under
'EXTENSION_NAME' is 'Lat-Long Stereo' and 'Fish Stereo', now i can
CextensionManager.getExtension with extension name, and all is ok, but docs needs
to be updated.. just saying.. :)
EDIT: um, haven't much time when so didn't dig around it, i expected getExtension to behave
in a bit different way, seems like there is no way to create camera extension in current
pymaxwell, am i right?


- scatter: parameters "Initial Angle", "Initial Angle Variation", "Initial Angle Map"
are missing from Studio ui, but available in python

- backface materials are removed with eraseUnusedMaterials if not used somewhere
else as normal material. the same happens in Studio manually (right click... etc.)

- asset reference: rewriting asset reference file from other application while Studio is open
(just open, Fire is not running) will crash it, at least i encountered it with ply file,
haven't tried different file format

- asset reference: setting material with setMaterial, material is set in Studio,
but renders in Fire as default material (haven't tried in Maxwell), setting it manually works

that should be all for now. hope i am not setting false alarms..

thanks
jakub

Re: 3.1.99.9 bugs and notes

Posted: Wed Sep 09, 2015 4:54 pm
by JDHill
Regarding a couple of the items:
  • PSD: looks like a Studio issue; if you open the same file in maxwell.exe, you should find the channels are set to PSD as requested. Here is a repro that should show this:
    Code: Select all
    from pymaxwell import *
    import os
    import subprocess
    # output paths
    user = os.path.expanduser('~')
    desktop = os.path.join(user, 'Desktop')
    img = os.path.join(desktop, 'test.psd')
    mxs = os.path.join(desktop, 'test.mxs')
    # create scene
    scene = Cmaxwell(mwcallback)
    # need an active camera, or maxwell.exe will stop reading the mxs
    cam = scene.addCamera('camera',1,1,1,1,1,'circular',1,1,1,1,1,1)
    cam.setActive()
    # set/enable paths and write the mxs
    scene.setPath('RENDER', img, 16)
    scene.setPath('ALPHA', img, 16)
    scene.setRenderParameter('DO ALPHA CHANNEL', 1)
    mw.writeMXS(mxs)
    # executable paths
    mwroot = os.environ['MAXWELL3_ROOT']
    studio = os.path.join(mwroot, 'studio.exe')
    maxwell = os.path.join(mwroot, 'maxwell.exe')
    # open in maxwell, then studio
    subprocess.call('"%s" -mxs:"%s"' % (maxwell, mxs))
    subprocess.call('"%s" -mxs:"%s"' % (studio, mxs))
  • AssetReference: this extension is not intended to be implemented by plugins.

Re: 3.1.99.9 bugs and notes

Posted: Wed Sep 09, 2015 7:46 pm
by carbon
hi,
may i ask why it is not intended? seems like usable feature to me..
thanks

Re: 3.1.99.9 bugs and notes

Posted: Wed Sep 09, 2015 9:20 pm
by JDHill
Basically, because much of its functionality needs to be implemented inside Studio, where Qt is available for watching files and such, and because it relies on custom behavior & communication between it and Studio in order to allow it to manage its cached copies of referenced files (necessary for decent performance, but not possible using just the extensions API alone), and to deal with some specific quirks relating to adding materials to the current scene, and exposing them for editing, but avoiding having them overwritten later when the reference is updated. Things of this nature.

Re: 3.1.99.9 bugs and notes

Posted: Thu Sep 10, 2015 8:53 pm
by Polyxo
These are reasonable arguments. On the other hand I see the potential in asset references to serve as a universal
solution for all NL-supported CAD hosts to merge 3rd party created mesh content with Nurbs content in ways currently
not possible – neither using Maxwell nor any other render engine one can buy.
While some of the CAD hosts don't deal with meshes at all (e.g. Solidworks), all others struggle with common concepts
found in mesh modelling / digital sculpting and dedicated 3D painting packages: Several materials per item, several
UV-sets per mesh, UDIM, PTEX. With asset references in plugins one could model precise CAD part maybe in Solidworks,
detail and texture it in Zbrush and bring it back into the assembly for rendering.

Re: 3.1.99.9 bugs and notes

Posted: Fri Sep 11, 2015 1:54 am
by seghier
Polyxo ; you can create asset references in studio than load the mxs file as mxs reference in other applications
Image

Re: 3.1.99.9 bugs and notes

Posted: Tue Sep 15, 2015 11:15 am
by carbon
another problem, with Maxwell Cloner, and it is the same in 3.1 and 3.1.99.10
when some object with cloner is a child of another, one particle is misplaced. it happens with embedded locations and with external bin. when using external bin putting object to scene root will fix it, if using embedded it won't, see images and attached files. both objects have the same cloner settings

bad:
Image
Image

good:
Image
Image

files:
.mxs
.bin

Re: 3.1.99.9 bugs and notes

Posted: Tue Sep 15, 2015 6:38 pm
by carbon
also, Maxwell Particles, no matter what, when using embedded particles, always one is missing. using external bin is fine. putting it to scene root has no difference..

Re: 3.1.99.9 bugs and notes

Posted: Tue Sep 15, 2015 6:53 pm
by Polyxo
seghier wrote:Polyxo ; you can create asset references in studio than load the mxs file as mxs reference in other applications
Thank you Seghier,
that is an interesting workaround (and I might even make use of it). But it's of course a workaround – the whole listening for changes in
source file
makes limited sense if one uses Studio just as a converter and continues building the scene inside a supported host app.

Re: 3.1.99.9 bugs and notes

Posted: Tue Sep 15, 2015 11:57 pm
by Mihai
But how did you imagine this would work exactly? Who listens to what? Maxwell listens to changes you make to a Solidworks model for example, and automatically re-exports the MXS reference, or.....?

Re: 3.1.99.9 bugs and notes

Posted: Wed Sep 16, 2015 12:56 pm
by Polyxo
Mihai wrote:But how did you imagine this would work exactly? Who listens to what? Maxwell listens to changes you make to a Solidworks model for example, and automatically re-exports the MXS reference, or.....?
No, the other way around: The plugin (as Studio does) listens to changes made to possibly a Solidworks /Rhino... built part, which (exported as a mesh) is edited
outside the Nurbs app, say in Zbrush or the like. The plugin refreshes the mesh/pointcloud preview inside the Nurbs app and keeps track of texure data.

Re: 3.1.99.9 bugs and notes

Posted: Wed Sep 16, 2015 3:29 pm
by Mihai
So essentially the SW plugin would just re-export a mesh with every change you've made? But how is this mesh auto reloaded into say Zbrush where you've maybe already started sculpting it? And how is this mesh then taken into Maxwell?

It seems extremely messy, both from a developer and user point of view I think. 100s of little things that will go wrong at every step of this. Some automation is good but if you try to take it too far, you get to a point where it will just blow up in your face.

Re: 3.1.99.9 bugs and notes

Posted: Wed Sep 16, 2015 4:17 pm
by Polyxo
No Mihai, this is also not at all what I mean :0) The Nurbs part is static.

User creates a multi-part file in a plugin-supported CAD app, such as Rhino or SolidWorks. The long term goal may be manufacturing,
but one needs some visuals first. Some of the parts are very precise geometric shapes, which look good as is.
Others need intricate, natural looking surface detailing, some slight randomization, or hand-painted textures to look realistic.
This simply is nothing any CAD app is good at, but something one can do inside mesh applications. One would send the complex part
(as a mesh) to the mesh modeller of choice and would start editing. Likely one would remesh the part, one would refine the tesselation
,sculpt and do UV-Work. Maybe one would divide the UV-mesh logically to several UV sets or UDIM.

One then would save the geometry out in formats Maxwell can read as input for asset references, alongside with stacks of textures.
This geometry would get referenced inside the CAD application, while the original Nurbs part is hidden by User. As soon as the part
is updated inside the mesh application and gets re-exported (alongside with the texture files), the plugin would display the new version.
The result is a CAD file with a dynamically linked mesh entity, which can get rendered inside the CAD application, together with Nurbs parts.

This all describes a standard workflow of mine, except I'm working with re-imported meshes.
The current limitation is that even those CAD programs which can indeed read in meshes natively (Solidworks can't!) are very limited in doing so.
A technically perfect Zbrush or 3DCoat or Mari or Mudbox mesh with intricate UV information is inevivitably broken to several open meshes at import time,
with the known consequences for render output. Even a simple cube exported to Modo or Cinema4D, as a mesh where some polygons get a blue colour
assigned and some others a red colour does not re-import back as a closed, manifold mesh to the source CAD program.

In all of these cases asset references inside CAD plugins could serve as a robust solution. They would make loading meshes at all possible in
some cases, such as Solidworks. In others they would bring support for mesh texturing features which the CAD program fails reading and therefore
cripples render output.

Re: 3.1.99.9 bugs and notes

Posted: Wed Sep 16, 2015 6:09 pm
by carbon
ok guys, lets continue with my bugs and notes:
not related to beta: can you please make object names case sensitive? i run into problems having objects with names for example 'Plane' and 'plane', the second one added to scene is renamed plane1 and i can no longer access the object by name.. this is nothing super important, but would be nice.

Re: 3.1.99.9 bugs and notes

Posted: Wed Sep 23, 2015 6:22 am
by carbon
hello,
i've got another one if i create through python grass modifier and apply it to object which is not in scene root, but child of another transformed object, in Studio viewport the preview is drawn like the object has no parent and is not transformed by it. see screenshot, both object are in group which is transformed. no matter if i set parent-child relationship first and then apply modifier or vice versa.. the result is the same. is it bug or i am doing something wrong?
thanks

Image