I’m hoping someone has a suggestion to achieve the following task. It may seem complex to even explain. I am trying to capture a ray traced reflection in a mirror(chrome) surface. from that image that is being rendered as a reflection, freeze the view and capture it as a 2d image that could be unwrapped. So in theory being able to recreate the same shape and wrap it with an opaque 2d image map with the same image that the reflection was when the shape was mirrored. Any thoughts?
Hi Zack,
Renderman based renderengines are usually able to bake a 2d image into multiple passes individually. AIR by Sitexgraphixs for example allows to bake using a single reflection or refraction layer … and whatever you can imagine, eg. indirect lightning, occlusion etc. Of course channel outputs can be combined. For more info about this subject take a look into the AIR helpfile, look for “Multipass Rendering”. The required pass for your task would be
__reflect
I have to admit this engine is quite complex to learn, but after so many years of using it, it`s still fun.
c.
Hello Clement,
This is exactly what I was trying to describe. So “Baking” is the term. It looks like the Bake AIR is the ticket. I’m going to try to download the demo and stumble my way through. I may reach out again if I hit a road block. Thanks again for your advice!
Zack
Hi Clement,
I’m still wandering in the wilderness with this one. I have attached a file with an example of what I am trying to accomplish. You will see the patterned planer wrap of the background object and the sphere is Chrome. This is the sphere that can unwrap that you had created earlier. How difficult is the work flow to burn the reflection on the sphere into a 2d image that can be unwrapped? Can this be done? I understand if i am over reaching on your time, but you seemed to laser right in on this one.
Z
TEST WORK FLOW RayTrace Burn.3dm (1.1 MB)
Hi Zack, ok i´ll try to explain what i did, however it might sound confusing if you´re using AIR & BakeAir the first time
- Removed your mesh sphere, i´ve did it with a single sphere to make it easier to follow.
- If you have downloaded AIR and RhinoAir, you´ll need to set the scene up for shadowless rendering:
- Rhino Options / Air Main / Air GI set the GI mode to “Ambient” for constant lightning
- Rhino Options / Air Main / Environment set the Env to Color (white) for constant background
- To the nurbs sphere, i assigned a metal shader with zero diffuse and 100% reflection
- To your circular projector, i´ve assigned a constant material shader and your number_grid texture
- To bake the nurbs sphere, i´ve used my old BakeRender plugin with channel set to __reflect
- In the plugin dialog, i´ve defined a map name and resolution 2048x2048
- Then baked, the map is assigned automatically if that option was enabled
The result was the map attached below.
you will probably need to assign it to the nurbs sphere to see it: UnwrapReflectionTest.3dm (517.4 KB)
Once this is done, you can split the nurbs sphere in parts (eg. 12) using Split with Isocurve option, in V-Direction. Make shure that the Shrink option is set to No when you do this. I´ve marked the points to snap to on the sphere. Finally the splitted sphere segments can be meshed and unwrapped using _Squish as described here, to maintain the mapping…
is this what you`re trying to do ?
EDIT: you can as well do the whole process without splitting the nurbs sphere at the end, just use your 12 meshed sphere segments in step 1 instead of the nurbs sphere (with spherical mapping assigned) and bake 12 maps instead of a single one.
c.
Hi Zack,
There is no build in solution for this in Rhino , however I did try to hack something together:
I ran out of time now trying to get a good solution.
However what I could come up with my available time is a rewrite of an existing script to pull the texture coordinates from one mesh to other meshes:
MeshPullPerpendicularUVcoordinates.rvb (2.4 KB)
See the file for the result and explanation.
RhinoFile here
I wonder what you want to do with this. If you want to bake the reflection to make the inside sphere show an image when the disk is a mirror I believe there is more involved that what my script does.
Please answer with any questions I will try to respond later or next week.
HTH
_Willem
Hey Willem,
Thanks for your suggestion on this, I think it’s a little more complicated than my knowledge base is for now. I am going to try what Clement has posted, that seems to do the trick. Thank you for taking the time.
Best,
Zack
Hello Clement, Thank you again for tackling this. This seems to be exactly what I am looking for! I would love to set it up as a template so that I just swap out the “circular projector” image and the rest will follow. I am going to have to try to acclimate myself to the AIR products. Now that you did this once, is it a difficult task to repeat if I needed assistance with different images while I deal with my learning curve?
Thanks a million!!
Zack
@Zack, no problem. I guess it doesn`t make much sense to buy AIR just to bake a single image once. I have no idea how much resolution the demo allows, if you need a different image baked just send it via PM and i rebake it into the 12 mesh segments directly.
@Pascal, i guess i´ve found a small bug: To repeat it, please download the Rhino file above named “UnwrapReflectionTest.3dm” and reassign the BakeMap texture from the same post to the nurbs sphere. Please do the splitting as described below the texture file in my post. So far this works, but if you ExtractRenderMesh or use the Mesh command to create a mesh from the result, the mapping changes unexpected. For the moment i know how to prevent it, but it should not happen.
thanks,
c.
Hi Clement- thanks, I’ll take a look.
Yep. I see it.
-Pascal