I Want A Hole In My Mirror !!!


Page 1 of 1
 
 

Post I Want A Hole In My Mirror !!!

#1  Nik 09 Sep 2022 17:57

This quest began as something else, sorta morphed into how I could reliably apply both 'reflection' and 'transparency' mapping to a surface.

I've seen it done, but the Poser guru on Rendo used such a zoo of nodes that I despaired of reverse-engineering it...

Turns out there's a fairly easy way. First, some back-ground...

Transparency is 'mostly' easy. You get or craft a B+W mask for object, so black hides, white shows. Apply it to 'transparency' in material room. Dial amount from 0=solid through ~0.8=ghostie to 1=clear. Such mask often lurks in the Alpha channel of eg PNG textures.

In theory, Poser should be able to auto-extract and auto-apply a 'diffuse' mapped texture's alpha channel, especially for DDS format. Kindest way of describing result is 'perhaps'. YMMV. Let's just say Rendo are investigating why DDS may refuse to 'play nice'. Preliminary explanation is there are different flavours of DDS, like progressive / non-progressive for JPG...

Much safer to use eg free Irfan View to manually extract Alpha channel. Also, convenient to save this as JPG rather than DDS, PNG, TGA etc etc...

A digression: Faced with a freebie I'd ported to OBJ+MTL, I was a bit annoyed to find 18 of the 55 MTL materials called same texture, but did not invoke its Alpha channel. After some trial and error, I used 'Notepad' to hack the MTL. 'Search' to find my targets, copy/paste adding two lines to each such material:
map_Kd 901_yanhuishiwu_004.jpg
...to...
map_Kd 901_yanhuishiwu_004.jpg
d 0                                                     <<< Note essential space between d and 0 !!!
map_d 901_yanhuishiwu_004Alpha.jpg

Reflection can be easy or very, very hard depending on 'degree of rigour'. If you are layering effects, such as sub-surface arcana, you are in a higher league than my finger-painting...

Again, you need a B+W mask, where white reflects, black does not.

Tucked away down an options tree in 'Material Room', there's a 'Reflect' node to use this.

On 'Advanced' page, right-click into gray-diamond area. Follow menus through 'New Node', Ray Trace, Reflect.

Drag your mask into gray-diamond area. It should spawn a node for 'Image Map', naming your mask as source. Drag-Connect 'Image Map' white spot to dark 'background' spot of 'Reflect' node. Drag-Connect 'Reflect' white spot to dark 'Reflection colour' spot. Also drag-connect 'Image Map' white spot directly to dark 'Reflection value' spot.

Now, what is masked white reflects when rendered...
I'm not sure what the Reflect factors do, but these renders used Quality = 0.2. YMMV...

For that magic hole in mirror, also drag connect 'Image Map' white spot directly to dark 'Transparency' spot, dial to taste. Black should go transparent in 'preview'...

A gotcha: You seem to need a fairly high resolution mask to handle curved / diagonal holes. Note difference between 'similar' masks in 512x512 = jaggies vs 2048x2048 = smoooth. Being JPG, even a 2k B+W mask compresses to ~35 KB...
 



 
avatar
uk.png Nik Gender: Male
Power User
Power User
Life + 1
Life + 1
 
Warnings: 1 
Joined: December 2003
Posts: 728
Tomatoes 5780
Lemons 3486
hearts 97

  • Back to top Page bottom
 

Post Re: I Want A Hole In My Mirror !!!

#2  Nik 09 Sep 2022 18:03

A thought: A sorta-starburst mask would suit a part-smashed mirror...
 



 
avatar
uk.png Nik Gender: Male
Power User
Power User
Life + 1
Life + 1
 
Warnings: 1 
Joined: December 2003
Posts: 728
Tomatoes 5780
Lemons 3486
hearts 97

  • Back to top Page bottom
 

Post MoRe: I Want A Hole In My Mirror !!!

#3  Nik 10 Sep 2022 17:02

I found a classic (2010) freebie 'oval mirror' on DA (free membership) by Kethaera

https://www.deviantart.com/kethaera...-Prop-174969873

It has both Poser and DS PP2 / setup / materials, plus a stand-alone OBJ for DIY. No associated MTL, but only frame and glass materials to hand-set.

I imported the OBJ to Poser, at ~a third of figure height. Scaled it locally, perched it on a 'primitive' box as stand. Made a white 1024x1024 JPG in Irfan View, applied that per 'Reflect' above.

Hard part was aligning mirror so it showed anything but empty scene. After 'guesstimating' using 'Top Camera', I still had to adjust yRotate a degree at a time to nudge into view. Remember, reflection swings by twice mirror's turn...

Eventually my many small area renders coaxed scene to compliance. At that point, I switched render settings from my twin-GPU cards to CPU only, dialled pixel samples from 14 to 96, vols+buckets down from GPUs' preferred 1024 to CPU's 96, sent job to 'Box' where it ran in ~50 mins...
 



 
Last edited by Nik on 10 Sep 2022 17:02; edited 1 time in total 
avatar
uk.png Nik Gender: Male
Power User
Power User
Life + 1
Life + 1
 
Warnings: 1 
Joined: December 2003
Posts: 728
Tomatoes 5780
Lemons 3486
hearts 97

  • Back to top Page bottom
 


HideWas this topic useful?
Link this topic
URL
BBCode
HTML
HideSimilar Topics
Topic Author Forum Replies Last Post
No new posts A##Hole Submissions Inquire Here guiltypleasures Guiltypleasures' Clubhouse 42 18 Aug 2003 19:10 View latest post
Landman

Page 1 of 1
 



Users browsing this topic: 0 Registered, 0 Hidden and 0 Visitors
Registered Users: None