Problem with imported OBJ and AO (UberEnvironment2)

u2013_9cc188ec10u2013_9cc188ec10 Posts: 0
edited December 1969 in New Users

Hi all,

I'm currently stuck with a lighting / shading problem with imported props. The items look perfectly fine in active viewport when editing the scene and also look fine when rendering with normal lights (raytracing on or off).

Howwever, once I use UberEnvironment with Ambient Occlusion effect, the whole figure is blackened with only it's edges (wireframe) showing some light (see attached images).

The item is using the standard DAZ shader. I've tweaked every possible setting in the material, but it doesn't change anything.

Now my assumption is, that the AO shader does not know how to correctly shade my object. The question is, what editing steps are necessary to make the Mesh / Texture / Material work with AO? I hope someone can shed some light on this. (Pun intended ;)

Here are example images, with and without AO shader.

ted_AO.jpg
400 x 300 - 24K
ted_no_AO.jpg
400 x 300 - 32K

Comments

  • SzarkSzark Posts: 10,634
    edited December 1969

    This is a surfaces issue not UE2. Your top image is a viewport image and the second is a rendered version of the first one yes?

    Can you post a screeshot of the surfaces for the ted otherwise we will just be guessing. Also it looks like the ted is low poly and may need Subdividing so you could try using the Sub-D function which you will find under Edit > Geomtery : Convert to Sub-D (or something like that as I am rendering and cannot check)

    On the subject of UE2 take a look at this great thread by adam http://www.daz3d.com/forums/discussion/5320/

  • jestmartjestmart Posts: 4,449
    edited December 1969

    Another thing to consider with imported objects is are the normals pointing the right way. Since the polygons that make up the models have no thickness normals determine which 'side' is up or out. You would need to view the object in a modeler like Blender, Hexagon or Wings to see the normals.

  • SzarkSzark Posts: 10,634
    edited December 1969

    Nope Jestmart that won't be an issue in DS4.5.1.56 upward as the normals will always face the camera. This is why Negative scaling to reverse normals won't work anymore. :)

  • u2013_9cc188ec10u2013_9cc188ec10 Posts: 0
    edited December 1969

    Hi guys,

    thanks for taking the time to help out a noob. :)

    @Szark: Actually both images were renders. The first image is with a single distant light shining directly onto the ted. The second image is with only UE2 (at 100%) and with no additional lights.

    Thanks for the advice to convert the figure to Sub-D, that brought me one step closer. The figure is still too dark, but at least it appears more round now and doesn't expose any "wireframe lines" anymore.

    I have made screenshots of the ted's materials, though I'm not sure it's helpful. I pretty much left everything at it's default. I have also experimented with these settings for two full days now and it didn't fix anything. I also copied the mat from the sofa onto the ted and just set the texture back to that of the teddy, just to be sure. As you can see, the sofa is fine in UE2 render, the teddy is not. The only thing that will make the ted light up is ambient color and strength of course. But that isn't really a solution.

    I have also thought about what jestmart said about normals. Actually there was a normal map that came with the OBJ, but using it or not makes no difference, so I finally decided to not use it. However, I noticed something odd - which I show in my second attached imaged. It seems like the texture is mapped onto the mesh mirrored. I wrote some text onto the texture to demonstrate. According to what I know so far, writing onto textures (to make signs and such) should work - as in, you wouldn't be required to H-flip the text.

    Also, I set UE2 intensity + occlusion strength to 75% this time, so you can see the black text. Notice how the figure is not as black as in the old image. It seems as if it somehow drops shadow on itself.

    So all this brought me to thinking that maybe there actually is a problem with normals, making the texture pointing inside the figure and thus causing the figure to be entirely shadowed. Could that be it? If so, then how can i fix this?

    ted_03.jpg
    400 x 300 - 22K
    matt.jpg
    735 x 688 - 104K
  • SzarkSzark Posts: 10,634
    edited May 2013

    As I said earlier in response to jestmart DS4.5.1.56 will automatically reverse normals for you so they will be pointing outward toward the camera.

    What I would be checking is that the other surfaces in the scene don't have any coloured (anything barring black) ambient present in the surfaces which could give you the wrong impression.

    Oh and you fooled me with that first image as there are no shadows hence why I thought it was the viewport shoot. :)

    Post edited by Szark on
  • u2013_9cc188ec10u2013_9cc188ec10 Posts: 0
    edited December 1969

    Sorry for tricking you. The teddy would look the same with raytraced shadows on though (as in, not too dark).

    You mean the ted is actually lit correctly and everything else is brighter because it's using ambient color? That's a bit of a stretch... and it wouldn't explain why the teddy goes completely black when I set UE2 occlusion to 100%.

    No the scene is fine, it's Appartment 39 from DAZ and renders just fine with AO, as can be seen in the attached image. There are no ambient colors except for the TV picture texture, when used.

    What about the mirrored text on the teddy though - any thoughts on that?

    ted_04.jpg
    800 x 600 - 116K
  • SzarkSzark Posts: 10,634
    edited December 1969

    u2013 said:
    Sorry for tricking you. The teddy would look the same with raytraced shadows on though (as in, not too dark).

    You mean the ted is actually lit correctly and everything else is brighter because it's using ambient color? That's a bit of a stretch... and it wouldn't explain why the teddy goes completely black when I set UE2 occlusion to 100%.

    No the scene is fine, it's Appartment 39 from DAZ and renders just fine with AO, as can be seen in the attached image. There are no ambient colors except for the TV picture texture, when used.

    What about the mirrored text on the teddy though - any thoughts on that?

    no it wasn't a stretch but an educated guess as that is all I can do is guess. . The attached image doesn't show me that there is no ambient strength and colour, the only way to tell is looking at the surafces.

    Sorry I can't be more help hopefully others will have some ideas.

  • niccipbniccipb Posts: 483
    edited December 1969

    Hi...

    Szark said:
    As I said earlier in response to jestmart DS4.5.1.56 will automatically reverse normals for you so they will be pointing outward toward the camera.

    Sorry to have to correct you on this Szark, as I really respect your knowledge and abilities, but jetsmart is correct on the normals...

    With DS 4.5, what Studio does is to keep the normals oriented in the direction that they were originally pointed in relation to the camera... that's why negative scaling has no effect on flipping the normals...

    An imported object with normals pointed inward will render black on the outside when using UE2...

    The attached pic shows this... rendered using UE2 only... imported cube object with a texture map applied to a white diffuse channel

    One cube has the normals pointed out, one the normals pointed in and one has the normals pointed both ways in a checkered pattern to show the effect on a single object...

    As for the teddy bear... I think what may have happened is that the original object had the scale inverted before it was exported or during export... thus flipping the normals and reversing the UVs.... You can try importing it into a modeler and inverting the scale and then check the normals to see if they are then pointed out, then re-export the object... that should fix the reversed UVs also...

    nicci... :)

    UE2_normals_example.jpg
    1200 x 800 - 137K
  • SzarkSzark Posts: 10,634
    edited December 1969

    don't be sorry I love to be proved wrong..it is the only way to learn.

  • u2013_9cc188ec10u2013_9cc188ec10 Posts: 0
    edited December 1969

    Oh dear, unfortunately I haven't checked back here to see if there were any more replies.

    Anyway, thanks Nicci for your answer and your assessment was correct. As I found out in the meantime, the object just needed its normals inverted. I did this in an external modeling program and now the teddy is finally out of the shadows. :D

    Just in case anyone finds this who has the same problem: If the object gets completely saturated in shadow, its probably because the faces "point" inward into the figure due to a conversion bug.

    Just load the object in a modeling program and use "reverse normals" or a similarly named function ("Invert" in Wings3D).

    Cheers!
    :D

    ted_fixed.jpg
    400 x 300 - 24K
  • SzarkSzark Posts: 10,634
    edited December 1969

    Thanks for reporting back and I have saved this thread to help others if I come across this issue again. I am glad Nicci came in to enlighten me on my error as I wrongly assumed with the recent changes in how Daz Studio treats Normals effected all objects and as shown here this is not the case. I think this is true if the oblect is a Daz Primative but not an externally made mesh.

  • niccipbniccipb Posts: 483
    edited December 1969

    Hi...

    I am glad to see that you got things sorted out...

    Szark, the way Studio treats the normals is the same whether it is a Studio Primative or an imported object... but in 4.6 you can now change the direction that individual face normals point... no need to use a modeling program...

    In the Polygon Editor, you select the faces that you wish to reverse the normals on, then click the Options Menu, select Polygon Editing > Reverse Winding Order...

    That flips the normals for the selected faces...

    nicci... :)

  • SzarkSzark Posts: 10,634
    edited December 1969

    Right so why couldn't we use a sphere recently for a light dome using Area lighting becasue Negative scaling will now have the normal facing outward. It used to be that negative scaling would flip the normals so the light emitted inward in the direction of the normal..or is this something entirely unrelated, I am trying to learn from this. :)

  • Joe CotterJoe Cotter Posts: 3,259
    edited May 2013

    Well it sounds like you might be able to using reverse winding order on the sphere. I haven't tested it yet. Thank you niccipb (and everyone else here,) this information is very helpful :)

    Post edited by Joe Cotter on
  • niccipbniccipb Posts: 483
    edited May 2013

    Hi...

    Yes, I remember when this first popped up... I don't recall at the moment which release of 4.5 it occurred with, but the ability to use a primitive sphere at negative scaling with an area light shader was affected... since the normal would continue to face outwards... the work-around was to use a modeler or some other app to flip the normals and then re-import the object back into Studio...

    Below is an example pic using Studio's Reverse Winding Order on a Studio Cube Primitive created with subdivided faces... lighting is base UE2 only...

    nicci... :)

    Edit: Faces in black have had the Winding Order reversed...

    Winding_Order.jpg
    1500 x 750 - 57K
    Post edited by niccipb on
  • Joe CotterJoe Cotter Posts: 3,259
    edited December 1969

    Hmm, well that didn't work ;p

    Guess Blender it is ;)

  • niccipbniccipb Posts: 483
    edited December 1969

    Hi Gedd...

    What didn't work? How didn't it work?

    Below is an example of using the AreaLight Shader on a Studio Sphere... Left is default... Right is after reversing the windings...

    nicci... :)

    AreaLight.jpg
    1500 x 750 - 80K
  • Joe CotterJoe Cotter Posts: 3,259
    edited December 1969

    Oh ok.. it looked like the various squares white/black that it had a problem with a full mesh in sorting out what to reverse, as in it reversed in a somewhat random fashion. So my impression was that reverse winding order worked only with specific subsets of polys selected.. ie a very manual process for an object with many polys. That looks much more what I would expect :)

  • niccipbniccipb Posts: 483
    edited May 2013

    Hi...

    Oh... I guess I should have said that I just selected some of the faces on the cube and reversed the winding order... sorry for the confusion... :red:

    nicci... :)

    Edit: I have edited the other post... ;-)

    Post edited by niccipb on
  • Joe CotterJoe Cotter Posts: 3,259
    edited December 1969

    Thank you, these are great examples :)

Sign In or Register to comment.