Component Texture problem - What am I missing.
-
About 2 years ago I briefly used SU (V6) to create some components for a project I was working on.
Once the components were created I applied a texture to the component (which coloured sub-components a well) and used right click and 'save as' to save the components for future use.
When I needed them I used 'File/Import' to bring them in as components and all worked OK. The components imported with their textures.After a long period of illness I am now back to using SU (V7) for some other projects and am having a problem.
The old components still import OK (textures included).
However if I create a new component and apply a texture to it (same as before) then save the component as I did before, when I them import them into a new model they have no texture (no texture is added to the model).I am sure I am missing something simple here - but can't figure it out (maybe some brain cells died whilst I was ill). - or has something changed in SU7 that I am not aware of?
-
It sounds like maybe you have applied the material to the outside of the component. Then save the component. This will make it so that the component definition does not actually have a material assigned to its faces. So on export, I am guessing it will not export the materials.
Instead, double click on the component to edit it. THen apply the materials inside the component to all faces. Then save it out. By adding the material inside the component - while in component edit mode, you are adding the material to the component definition and it should therefore be exported.
I have not tested this to be honest, so maybe I'll go do that right now to see if it is accurate advice,
Chris
EDIT: Yup, after testing ir quickly, that appears to be what happens. So see if editing the component and then adding the material will fix your components.
-
Yes, indeed it works this way. Think of a component that is actually a full fledged skp model "embedded" into your ""master" model. Whatever you do to it "from outside" - i.e. not entering into its little world to affect it - it will only be part of the master model.
Anything that you can do with a component from outside without editing it
- scaling
- rotating
- moving
- painting
- naming (an instance in the Entity info)
will actually not belong to the component. It's like sitting in a car while it is raining outside.
-
Thanks Guys.
Ok now the correct colour is saved with the component
- BUT - it's a dynamic component and the 'Material' attribute is set to pick up the texture from a user input box (an attribute called 'colour' ) using 'MATERIAL = colour.
Now no matter what I enter in the 'colour' attribute, the component stays the same colour as was 'painted' on the component before it was saved - although the MATERIAL attribute changes according to input..
The older models change quite happily with the user input (as long as the colour entered is already in the model).
Here's an example Side Plinth.skp
-
Here is a sample of one of the original components which imports with the texture and also works by changing the colour in the component options dialog.
I don't understand why the two samples work differently.
As far as I remeber they are both created the same way.
-
What I learnt during those early trainings about dc's and their material attributes was (as far as I remember) that you should save them with every material applied on at least one, little, hidden face so that they will always be in there even if one purges the model.
Now as I quickly realised that dc's are not my world at all, I haven't really done anything like that for a year and a half almost so what I can now remember is not necessarily the truth.
-
I think that would be a good solution Gaieus. If the material is contained inside the DC, then it will always remain inside the model. Then in this case, don't apply the material to the entire model inside the component, but apply it to the outside. And then I think the DC color changing capability will work.
Chris
-
Thanks again Guys.
I applied a texture to the back of a face in the component where it is never seen, saved the component with the rest of the faces using the default material and now when I import it the material comes with it. If I now change the colour using Component options it works (although the hidden face always stays as the texture I applied directly to it).
However I am still confused, because when I import the component it comes in showing the default material until I drop it in the model when it changes to the texture specified in the component options.
With the original models I did (second sample above) they come in showing the texture specified correctly and they work perfectly when using the component options - AND - there are no hidden textures in them.
Also - with the original models, if I change the colour in component options then re-save the component, when I then import that into a new model it comes in the correct colour and brings that texture with it (the original texture is gone, as expected) - but I did not place any hidden textures in the component before saving it.
Very strange - but at least for the time being I have a solution (until I can work out what I may have done differently the in the original models).
Advertisement