Saving new IBLs in Uberenvironment2

SertorialSertorial Posts: 962
edited December 1969 in New Users

I want to be able to create some new image maps in UE2. I have managed to find some nice HDRIs and converted them to TIFFs, but the only way I seem to be able to use them is by selecting the UE2 and then changing the diffuse texture channel. This means the little UE2 sphere is no longer showing the right JPG.

Is there some way I can create a new .dsa file (to set everything) and so it will just appear as a new icon in the content library?

I tried opening up a .dsa to see how editable it is, but I can't see where the .TIFF and .JPG get specified.

Can anyone help?

Comments

  • Herald of FireHerald of Fire Posts: 3,504
    edited December 1969

    Sounds like an awkward way to go about it. There are two main components to the UberEnvironment sphere. The first is the actual light. The second is parented to the light and is a sphere which is invisible to the render engine.

    The Environment sphere is superfluous for the most part. Its only purpose is to provide a visual reference to where the light will be coming from, so that you can rotate the light and get an idea of how things will look. You can happily delete it without affecting the actual lighting in the scene. If you want the sphere to match the light, simply apply the same 'light' texture to it in the diffuse channel. The light itself on the other hand has specific parameters for the lights, which obviously affects the IBL

    I have actually created several of my own presets which automatically set the lighting textures for both the light and the sphere.

  • SertorialSertorial Posts: 962
    edited June 2014

    Sounds like an awkward way to go about it. There are two main components to the UberEnvironment sphere. The first is the actual light. The second is parented to the light and is a sphere which is invisible to the render engine.

    The Environment sphere is superfluous for the most part. Its only purpose is to provide a visual reference to where the light will be coming from, so that you can rotate the light and get an idea of how things will look. You can happily delete it without affecting the actual lighting in the scene. If you want the sphere to match the light, simply apply the same 'light' texture to it in the diffuse channel. The light itself on the other hand has specific parameters for the lights, which obviously affects the IBL

    I have actually created several of my own presets which automatically set the lighting textures for both the light and the sphere.

    But how do I create the light part then? I though you just changed the TIFF file and it was the image that produced the light (hence the name IBL)?

    Maybe, i'm not being clear. I want to use my own image to create the IBL rather than using the images that come with UE2. How do I do that?

    Post edited by Sertorial on
  • Herald of FireHerald of Fire Posts: 3,504
    edited December 1969

    It's the 'color' section under 'Light'. The 'diffuse' setting is only visible on the Environment sphere which, as mentioned, is just there as a guide.

  • SertorialSertorial Posts: 962
    edited November 2015

     

    HeraldOfFire said:

    It's the 'color' section under 'Light'. The 'diffuse' setting is only visible on the Environment sphere which, as mentioned, is just there as a guide.

     

    Ok, so I insert the TIFF into the "colour" channel and the matching JPG into the "diffuse" channel of the sphere.

    But how do I create my own presets (ie DSA files) for this? When I open say the KHPark DSA file in notepad, I can't see where it refers to the TIFF file or the JPG file.

     

    // Change thisvar g_sMapName = "OmKHPark_EnvM";function getChildByName(oLight, sName) {    aChildren = oLight.getNodeChildren() for (var i=0; i< aChildren.length; i++) {  if (aChildren[ i ].name == sName) {   return aChildren[ i ];  } } return undefined;}function setChildTex(oLight, sTexPath) {    oGeo = getChildByName(oLight, "environmentSphere_1923");    if (oGeo) {        var oObject = oGeo.getObject();        var oShape = oObject.getShape(0);        var oMaterial = oShape.findMaterial("default");        var oProp = oMaterial.findPropertyByLabel("Diffuse Color");        oProp.setMap(sTexPath);        oProp = oMaterial.findPropertyByLabel("Ambient Color");        oProp.setMap(sTexPath);    }}function main() {    var sel = Scene.getSelectedLightList();    var oProp;    var oPHelper = new DzPresetHelper;        if( sel.length < 1 )    {        MessageBox.information( "You must select UberEnvironment Light(s) first.", "UberEnvironment", "&OK;" );    }    else    {        var sBasePath = "/Runtime/textures/omnifreaker/Environment";        var sMapTif = "%1/%2.tif".arg(sBasePath).arg(g_sMapName);        var sMapJpg = "%1/%2.jpg".arg(sBasePath).arg(g_sMapName);                for (var i = 0; i < sel.length; i++)        {            oLight = sel[ i ];            if (oLight.name.startsWith("UberEnvironment") || oLight.name.startsWith("omUberEnvironment")) {                       print('Changing HDR texture to "%1"'.arg(sMapTif));                oProp = oLight.findPropertyByLabel("Color")                oProp.setMap(sMapTif);                                setChildTex(oLight, sMapJpg);                           } else {               MessageBox.information( '"%1" is not an UberEnviroment Light; Skipping.'.arg(oLight.getLabel()), "UberEnviroment", "&OK;" );            }        }    }}    beginUndo();main();acceptUndo( "SetHDR" );

     


    EDIT - sorry, I see it there now at the top. Thanks

    Post edited by Richard Haseltine on
Sign In or Register to comment.