5 Replies Latest reply: Mar 28, 2012 2:55 AM by MBuehler-esristaff

    Materials On Assets

    fvbehr
      Hi,
      I am running into a problem with the material assignment on assets. When I export from Cityengine, the material on the assets get overwritten. The UVs from the assets export fine. I tried exporting FBX, OBJ and DEA. I also tried importing the assets as OBJ and DEA. Materials I assign within Cityengine work.

      This is the code I use to insert the assets:

      insert_window_tri -->
        s('1, '1, '1)
        i(asset_window_tri) 
        t(0,0,-scope.sz)


      I am using Cityengine Advanced 2010.3 64 Bit on Windows 7.
      All OBJ Assets have a matching .MTL file.

      It would be great if anyone had a tip on how to get this working.
        • Re: Materials On Assets
          MBuehler-esristaff
          hi !


          can you post a screenshot which shows the before/after states ?

          are you getting any errors in the export.log ?


          let me know ..
          • Re: Materials On Assets
            fvbehr
            Hi,
            hi !
            can you post a screenshot which shows the before/after states ?

            Do you mean a screenshot of the asset model before the export and after the export?
            Can I somehow check if Cityengine imports the materials of the assets correctly?

            are you getting any errors in the export.log ?


            No errors in the log.

            Cheers, Florian
            • Re: Materials On Assets
              MBuehler-esristaff
              hi !

              yes, you can check the asset in 2010.3 :


              if you select the asset in the Navigator (obj or dae), click on the little magnifying glass icon in the Navigator. this will open the file PREVIEW (you can tumble in this little preview.)

              mtl files are evaluated in there.


              does that work for you ?

              matt
              • Re: Materials On Assets
                fvbehr
                Hi Matthias,
                I got it working now. It seems that assigning a material to the building right after extruding the lot shape does overwrite the materials of the assets even if they get inserted later on.

                BTW: I am on Cityengine 2013.3 Build 0124. is this the latest 2010 Version?

                Thanks for the help.

                Cheers, Florian
                • Re: Materials On Assets
                  MBuehler-esristaff
                  hey !

                  it's generally the best to assign textures ONLY at the 'leaf-nodes'. it is correct that if you're inserting assets on shapes which already have a material, the asset's material will be overridden.

                  I am no more sure about the precise version, but we've included a way to solve exactly this, by using
                  set(material.colormap, "")
                  just before the insert. like this, your problem should work. but as I just mentioned, it can be that this was done for 2011.1 and will generate errors in 2010.3. [maybe check the CGA changelog at the very bottom of the CGA Help docs.]

                  * * *

                  yep, that's the latest one.

                  though I'd recommend to upgrade. I guess you're located in Germany, so ask Esri Deutschland and maybe you're 'getting lucky'. it's worth a shot .. :)

                  but certainly, try the TRIAL of 2011.2


                  cheers !

                  matt