Everything related to the integration for SketchUp.
#395797
Hi Jeremy, I'm hoping you have some tips on how to minimize this step every time I try to preview with Fire or exporting the scene. I do need to use pretty big textures and also place them on a few individual faces for accurate placement. From reading the manual, it seems Sketchup needs to then write one of these huge textures per edited face of my group/component?

I'm using standalone MXM files and my workflow is:

- I create a new SK material, then in the Scene Manager, I switch it to MXM mode and load my external MXM.
- I apply this material to a Group

- Now, if I don't click "Copy texture to Sketchup material", the export to Fire is fast.
- If I do click this button so I can see how the texture tiles on my object, it takes about 1 min for a 5000x5000 texture to load in SK. Not a big deal since it's a one time thing.

- Without changing anything to the texture position in SK, I just click Fire again and SK now shows the "Sketchup is writing textures to disk" message for about 45 secs before the scene is exported.

- I create two more grouped cubes and assign two more standalone MXM files with similarly sized textures, and use the copy textures to SK button. The "writing textures" pop up now shows for about 65 seconds, so it hasn't tripled the time at least, but makes me think there is a fixed, time wasting process that SK does which is not necessarily tied to nr or size of textures used in the materials?

- So now if I want to have control over the position of the texture over a face, I have two options:
- right click the face: make unique texture. I don't like to do this because then I have to choose a new texture size, I'm not sure how SK saves it etc.
- or select the face and apply the material per face.

This second option also doesn't create a duplicate extra material (like the "make unique texture" does) when the scene is exported which is a bonus. I also see this object is still only using one UV set, so obviously SK is doing some "UV reconstruction" to make that work, is that the phase that takes so long each time? Even for a simple cube?

It's just strange to me that SK still needs to write textures in this case (where is it writing them in the case of applying a material directly to a face?) when it's in fact still using the same material for that face too. It's not using an extra material, with a separately saved texture....

What would be great is if I haven't touched the positions of any textures between two exports, for SK to re-use the textures/UVs it has generated already.... :?:
#395798
My guess in this case is that the main problem is the use of 5000px textures; rather than use the "copy texture to SketchUp" function, I would recommend assigning a reduced-resolution version of the texture manually, via SketchUp's own material editor. Reason being, there are two (not mutually-exclusive) possible reasons for the "writing textures" phase to take a long time: a) there are many textures to write, and b) there are large textures to write.

Case (a) may generally be seen when, for example, you have downloaded some vegetation from the warehouse, and each leaf has its texture distorted; in this case, not only do we need to let SketchUp write a specific texture for each leaf, but we must of course also create an individual Maxwell material in the scene, for each texture. This type of slowdown can be mitigated using the plugin's UV Coordinates > Ignore Distortion option; the result will of course not be accurate, but in many cases the distortion is actually negligible, and you won't be able to notice the difference.

But, it sounds like that is not your situation, since you say you are testing with just a few cubes, so I suspect the (b) case, and that the only way of avoiding it will be to use a reduced-resolution texture in SketchUp. My assumption is that SketchUp was simply never designed to use such large textures.

Also, there is a third option regarding per-face assignment; you can group all faces but the one you want to customize (instead of just selecting and assigning to that face).

Regarding the last question/wish, basically none of this is about SketchUp using a different material per face, but rather that when you distort a face's texture, we have to write a Maxwell material specifically for that face, since the face will use a unique distorted texture. And I have no way of knowing, between two exports, whether the texture written by SketchUp will be different; therefore, it must always be written.
#395799
JDHill wrote:
Sat Oct 21, 2017 8:54 am
Regarding the last question/wish, basically none of this is about SketchUp using a different material per face, but rather that when you distort a face's texture, we have to write a Maxwell material specifically for that face, since the face will use a unique distorted texture. And I have no way of knowing, between two exports, whether the texture written by SketchUp will be different; therefore, it must always be written.
But in the case of assigning a whole material to a face (and not using the "make unique texture" thing in SK), when I open the scene in Studio I still only see the "main" material that's applied to different objects and/or faces? Where are those distorted extra textures and materials in this case?
#395800
I was speaking generally there -- not having seen your model, I can't say whether there are any (distorted textures and resulting duplicate Maxwell materials), or not. If, while positioning the texture in SketchUp, you avoid use the "distort" pin, then none should ever be written (and I recommend avoiding use of that).

When they are, they will be in one of three places: for FIRE, they'll be under <home>/Maxwell/SketchUp/temp, while for a document it depends whether it has been saved; if not, they will next to the default untitled.mxs under <home>/Maxwell/output/textures, and if so, in the textures dir next to the output mxs.

That said, I tried reproducing the situation you describe using a 5000px texture, and the slowdown appears to be purely related use of such a (comparatively, with respect to "normal" SketchUp usage) large texture. So as I began by saying, I would recommend using a reduced-resolution version of the texture for the viewport.
#395802
Ok thanks Jeremy, I will try to use lower rez textures for the viewport display, although it will get a bit time consuming to make duplicates of every texture I intend to use.

I'm not sure which is the "distort" pin when positioning a texture? I only used the position pin on a texture. The other pins are for scaling and rotating. I applied a material to a face, changed its position a bit using the position pin, and then exported. No extra materials where in the MXS file, and the texture on that face was positioned accurately, as it was shown in the SK viewport. So I'm still very confused as to what that "writing textures" dialog is doing in this particular case...it just seems to me it's writing something, but that's finally not going to be used in the scene? Would it make sense to add an option to the plugin, which when turned on assumes that I'm only using the position/rotate/scale pins and so this texture writing stage can be avoided?
#395804
There are (or should be) four "pins" shown when you are positioning a texture; if you hover over the yellow one, you should see that it is the "distort" one, and if you drag it, you'll see why (and why what it does can't be accomplished through UVs alone).

On the last question, frankly, I think I'd probably have to stare at the code for five hours before I could give a reliable answer to that. I can say that the purpose of the "Ignore Distortion" option is to address the first part; when enabled, the plugin won't request per-face textures be written, which represents the main problem case (but not your large-texture issue).
#395806
JDHill wrote:
Sat Oct 21, 2017 10:44 pm
I can say that the purpose of the "Ignore Distortion" option is to address the first part; when enabled, the plugin won't request per-face textures be written
Aha, so really what I was suggesting already exists in the plugin. So then what the crap is SK doing when this "writing texture" thing happens at every export? If I'm understanding correctly, whatever it's doing, is not necessary for Maxwell, or used in any way....(in the case of just changing the position of a texture).
Will there be a Maxwell Render 6 ?

Let's be realistic. What's left of NL is only milk[…]