PDA

View Full Version : double sided texturing


smrgol
07-11-2008, 05:14 PM
I'm having a spot of bother with double sided texturing. I've mapped the two textures/colours using the described method;
http://wiki.blender.org/index.php/Tutorials/Textures/Map_Input_Techniques

...and everything works splendidly, except at a few seemingly random frames where the backfacing texture breaks through. This is incredibly frustrating!
http://www.mwickham.co.uk/blender/correct.jpg
http://www.mwickham.co.uk/blender/wrong.jpg

http://www.mwickham.co.uk/blender/example.mov

I created a test .blend file for you guys to play with and get a feel for the problem;

http://www.mwickham.co.uk/blender/example.zip

Frame 62 is a dead giveaway of the issue. I was assuming that the negative-Z-normal mapping is calculated from the geometery, but if you move the camera it can sometimes fix the artifacts. Any ideas?

Thanks,

-M

fktt
07-11-2008, 07:50 PM
from what i understand this happens in 2.46 for you? asking because im about to report a bug, so an answer would be appreciated. :)

Mordachai
07-11-2008, 11:27 PM
It seems to be something with your texture mapping. You're using Normal (Nor) and the results will be a little unpredictable with all this movement of faces and motion from the object.

I add another side with fliped normals and a different material (you can use a UVmap too, if you like). Then turn on OSA (antialiasing) to get rid of the jagged edges/artifacts. It works fine:

http://i109.photobucket.com/albums/n42/mordachai_2006/flap.png

smrgol
07-12-2008, 10:54 AM
Thanks for the fast reply, guys. Most impressed.

fktt:

I am using 2.46, but have also tried other SVN's and previous releases. I think it is a bug of sorts, so if you could flag it up, that would be great.

It affects any mapping on the Z-Nor, which means backface culling (as in the link I posted) is still an issue for blender users who need it.

Mordachai:
When you say you added another side do you mean A) in edit mode duplicated the faces and flipped the normals. B) extuded the faces to create a low profile cube C) duplicated the whole object and moved to a new layer?

If A) the geometry clashes (two faces cannot exist in the same place. (so I dont think you did this ;) )

If B) this works to an extent - when animating the faces run the risk of passing through one another. Also, I'm using a alpha on the geometry to define the detail of the character which will then create a dual layered effect where the alpha edges don't meet.
(this is work for an (at the moment) hush-hush project, so im not allowed to post the original artwork, hence the mock up)

If C) how!?! I've been playing with this option and can't get a completely acceptable result.

Is there any chance you could post your .blend, or email it to me so I can have a look at your solution?

..and the artifact(s) I was talking about was the opposite face popping. OSA was turned off to bash out a quick render - sorry about the confusion.

-------------------

I assumed that the Normals are calculated (read) per face at render time, so that each normal stays at 90 deg to it's face. This appears not to be the case here, which is what's preventing the material from working correctly. I had a look at the size and offset in the map input window, which can adjust things, but will then put other frames out of sync. also considered the texture space, which made little to no difference.

Are there any Blender programmer-types out there with a reason/fix for the problem?

Still baffled

-M

smrgol
07-12-2008, 04:43 PM
Ok. Another quick update. http://www.mwickham.co.uk/blender/example_fix.zip
I've amended the test file to replicate closer the effect I require. I also discovered that if you render doublesided textures using the OpenGL preview renderer, things work just dandy (just no AA).

It just points to there being something wrong in passing the normals data to the renderer. Same with yafray. Can someone have a play and see if I'm mad, or have found an issue?

Cheers,
-M

P.s, the image used has nothing to do with the final work, just stuck it in to show the problem ;)

CGTalk Moderation
07-12-2008, 04:43 PM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.