ted.mcclung Posted June 23, 2015 Share Posted June 23, 2015 I noticed a while ago that the billboard lighting changes more dramatically than it should when the camera rotates. Attached are some screenshots illustrating what I mean. The sun angle is almost straight overhead in these. The first screenshot is looking slightly down, and the billboards look ok. The second screenshot is looking straight out over the terrain and the billboards receive no lighting from the sun at all. The third screenshot is looking directly down at the ground, and the billboards receive full lighting. The difference between looking straight across the terrain versus looking down makes it very difficult to balance the ground cover to where it blends overall. I'm also not convinced that the lighting is coming from the correct angle. In the fourth screenshot I circled the sun in red, but the lighting is clearly coming from 90 degrees to the right, as indicated by the blue arrow. I've also attached the impostor's normal map used in the screenshots. vegetation_juniperoxy_large_impostor_n.rar Link to comment
demostenes Posted June 24, 2015 Share Posted June 24, 2015 There are two parametres in billboard material, back and side, which have influence on this. Link to comment
ted.mcclung Posted July 8, 2015 Author Share Posted July 8, 2015 So I figured out the bug with the lighting coming from the wrong direction. The grabber tool creates a normal map in the ATI2 format, aka 3Dc, which when loaded into Photoshop using nvidia's dds tools looks like this: when it's supposed to look like this: Notice the r and g channels are flipped, the red channel is inverted, and a blue channel is created. According to nvidia, there's a normal flag check in the code to determine if a 3Dc file is a normal map. My guess is that the flag is missing from the files grabber generates. From what I gather, it has to do with the order in which the image editor decompresses the different formats' R and G channels. So while trying to fix the problems in this thread: https://developer.unigine.com/forum/topic/3318-grabber-tool-taking-incorrect-images/?hl=grabber#entry17609I've been opening the normal map and diffuse in Photoshop and manually rearranging the order of the panels to get proper rotation, but because of inconsistencies in the 3Dc format save/load process, the normal that opens is completely wrong, resulting in really botched lighting when the atlas is saved out. I've also noticed a couple interesting new bugs. When grabber generates an atlas, it flips the image along it's x axis. In the attached screenshot, you can see the original model down at the bottom, with the correct arrow direction highlighted in blue, and the incorrect billboard's arrow direction, highlighted in red. Another bug in this screenshot is that some of the billboards correctly display the middle arrow with the torus pointing straight up, while others show it from a different angle on the vertical axis, despite the billboards being viewed from the same angle. I think this might be making some of our tree billboards appear shorter than they should be. Link to comment
ted.mcclung Posted July 8, 2015 Author Share Posted July 8, 2015 Oh, forgot to save out the blue/red arrows. Here's the edited screenshot image. Link to comment
sebastianbah Posted July 10, 2015 Share Posted July 10, 2015 As for impostor flip, check that Variation parameter for grass is disabled. http://developer.unigine.com/en/docs/objects/objects/grass/#variation As for the second problem, we've reproduced the issue and added it to our internal bug tracker. Thanks! Link to comment
ted.mcclung Posted July 13, 2015 Author Share Posted July 13, 2015 I've noticed before that variation flips billboards, so I had it disabled for this test. Link to comment
silent Posted July 14, 2015 Share Posted July 14, 2015 Hi Ted, We are currently in the middle of imposters tweaking. Maybe some of described problems are alredy fixed. If you can provide us your test scene with wrong rotation we can check it in our internal builds. Thank you! How to submit a good bug report --- FTP server for test scenes and user uploads: ftp://files.unigine.com user: upload password: 6xYkd6vLYWjpW6SN Link to comment
Recommended Posts