Nik [ Friday, 09 September 2022, 05:57 PM ]
Post subject: I Want A Hole In My Mirror !!!
This quest began as something else, sorta morphed into how I could reliably apply both 'reflection' <b><i>and </i></b>'transparency' mapping to a surface.
<br />
<br />
I've seen it done, but the Poser guru on Rendo used such a zoo of nodes that I despaired of reverse-engineering it...
<br />
<br />
Turns out there's a fairly easy way. First, some back-ground...
<br />
<br />
<b>Transparency</b> 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.
<br />
<br />
In theory, Poser <b><i>should </i></b>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...
<br />
<br />
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...
<br />
<br />
A digression: Faced with a freebie I'd ported to OBJ+MTL, I was a <b><i>bit </i></b>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:
<br />
map_Kd 901_yanhuishiwu_004.jpg
<br />
...to...
<br />
map_Kd 901_yanhuishiwu_004.jpg
<br />
d 0 <<< Note essential space between d and 0 !!!
<br />
map_d 901_yanhuishiwu_004Alpha.jpg
<br />
<br />
<b><i>Reflection</i></b> 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...
<br />
<br />
Again, you need a B+W mask, where white reflects, black does not.
<br />
<br />
Tucked away down an options tree in 'Material Room', there's a 'Reflect' node to use this.
<br />
<br />
On 'Advanced' page, right-click into gray-diamond area. Follow menus through 'New Node', Ray Trace, Reflect.
<br />
<br />
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.
<br />
<br />
Now, what is masked white reflects when rendered...
<br />
I'm not sure what the Reflect factors do, but these renders used Quality = 0.2. YMMV...
<br />
<br />
<b>For that magic hole in mirror</b>, also drag connect 'Image Map' white spot directly to dark 'Transparency' spot, dial to taste. Black should go transparent in 'preview'...
<br />
<br />
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...
Nik [ Friday, 09 September 2022, 06:03 PM ]
Post subject: Re: I Want A Hole In My Mirror !!!
A thought: A sorta-starburst mask would suit a part-smashed mirror...
Nik [ Saturday, 10 September 2022, 05:02 PM ]
Post subject: MoRe: I Want A Hole In My Mirror !!!
I found a classic (2010) freebie 'oval mirror' on DA (free membership) by Kethaera
<br />
<br />
<a class="post-url" href="https://www.deviantart.com/kethaera/art/Oval-Mirror-Prop-174969873" target="_blank">https://www.deviantart.com/kethaera...-Prop-174969873</a>
<br />
<br />
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.
<br />
<br />
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.
<br />
<br />
Hard part was aligning mirror so it showed <b><i>anything </i></b>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 <b><i>twice </i></b>mirror's turn...
<br />
<br />
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...