+ Reply to Thread
Results 1 to 6 of 6

Thread: Materials On Assets

  1. #1
    Florian von Behr
    Join Date
    Feb 2012
    Posts
    5
    Points
    0
    Answers Provided
    0


    0

    Default Materials On Assets

    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:

    Code:
    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.

  2. #2
    Matthias Buehler

    Join Date
    Oct 2011
    Posts
    1,683
    Points
    441
    Answers Provided
    142


    0

    Default Re: Materials On Assets

    hi !


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

    are you getting any errors in the export.log ?


    let me know ..
    _________________

    CityEngine Machinist

    * YOUTUBE CHANNEL : www.youtube.com/channel/UCNS4TLgToEDQiH9pi06ofOA
    * tutorial videos : http://forums.arcgis.com/threads/648...URCES-FAQ-HELP
    * Please use the rating buttons on the right side !

  3. #3
    Florian von Behr
    Join Date
    Feb 2012
    Posts
    5
    Points
    0
    Answers Provided
    0


    0

    Default Re: Materials On Assets

    Hi,
    Quote Originally Posted by matthiasbuehler View Post
    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?
    Quote Originally Posted by matthiasbuehler View Post
    are you getting any errors in the export.log ?
    No errors in the log.

    Cheers, Florian

  4. #4
    Matthias Buehler

    Join Date
    Oct 2011
    Posts
    1,683
    Points
    441
    Answers Provided
    142


    0

    Default Re: Materials On Assets

    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
    _________________

    CityEngine Machinist

    * YOUTUBE CHANNEL : www.youtube.com/channel/UCNS4TLgToEDQiH9pi06ofOA
    * tutorial videos : http://forums.arcgis.com/threads/648...URCES-FAQ-HELP
    * Please use the rating buttons on the right side !

  5. #5
    Florian von Behr
    Join Date
    Feb 2012
    Posts
    5
    Points
    0
    Answers Provided
    0


    0

    Default Re: Materials On Assets

    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

  6. #6
    Matthias Buehler

    Join Date
    Oct 2011
    Posts
    1,683
    Points
    441
    Answers Provided
    142


    0

    Default Re: Materials On Assets

    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
    _________________

    CityEngine Machinist

    * YOUTUBE CHANNEL : www.youtube.com/channel/UCNS4TLgToEDQiH9pi06ofOA
    * tutorial videos : http://forums.arcgis.com/threads/648...URCES-FAQ-HELP
    * Please use the rating buttons on the right side !

+ Reply to Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts