SceneKit PBR - multiply albedo - scenekit

I need to multiply a bitmap on top of an albedo/diffuse. I’m using PBR shading.
Ex: apply a tattoo (bitmap) on top a skin (albedo/diffuse), multiplying so you can see the tattoo overlaying the skin.
Question: this tattoo (bitmap) should be a second albedo/diffuse? Or set as another material? If yes, what kind of material?
Thanks!

Related

How to draw trendlines in lightweight-charts with left or right extension?

How to draw lines between any two highs or lows of the candlestick bars to make a slanted trend line that can extend to left or right or both directions?
Extending left or right by creating a custom series manually using y = mx + b formula seems plausible, but a direct straight-forward method would be more appropriate.
It's impossible right now. lightweight-charts doesn't support drawings at all (except workaround for drawing trend line with series with the only 2 points).
We aren't going to add drawing itself to the library, but we thought about extending the API to allow you draw on canvas directly. If you'd like to use drawings, I can suggest you take a look at charting_library.

Scenekit - add red tint to camera

Is it possible to add a red tint to a given camera in SceneKit? I would like to accomplish this without the (what I consider to be) hacky solution of just trying to shove a red object with < 1 opacity in front of the camera. That could be a solution but I haven't had great success in SceneKit showing an object right in front of the camera.
Also, ideally, I could fade the red tint in and out using SCNAction or some other way.
Finally, a perfect solution would work in ARKit, and give a red tint to the whole world around you. So it would have to be something more than a red scenekit light.
SCNCamera's colorGrading property can do that (that would be the most efficient option).
Using a SCNTechnique to apply a custom post process would work too but it requires an additional pass.
Both options would be faster than a blended node in front of the camera, or a red-ish spritekit overlay or a UIView on top of the SCNView.
Instead of adding a red-tinted SCNNode into the scene, you could just add a tinted UIView in front of the ARSCNView in the storyboard. With an outlet to that view fading it in and out would be easy.

How to implement halo effect with Wpf 3D?

I'm trying to build a 3D earth with Wpf Viewport3D. I have created the earth and it works pretty good. Then I want to add a halo effect around the earth like this attached image:
.
Some recommend to use diffuse material for the globe model. Then build a slight larger globe model with emissive material and little opacity. But the effect is not very good. It affects the color of diffusion material like this:
How can I implement the effect like the first screenshot?
I've done exactly this by creating a ring, inner radius the same radius as the planet and an outer radius to relect the atmospheric depth. Oriented to 'face me'. Using texture coordinates into a LinearGradientBrush to have the atmosphere fade from sky blue to transparent black.
Alternatively, there are some fairly good PNGs around of semi-transparent cloud layers you could use on the slightly larger sphere.

How to apply several side images to WPF 3D model?

I have already a 3D model for a planet and 4 pictures of front (0 degree), left (270), right (90) and back (180) side of the planet. Is there any known way to apply these 4 photos for texture of the 3D model?
I thought about combining these pictures into one like panoramic view and then apply it to the model. But that might be overkill. Maybe there is a way to apply 2D texture to the 2D view of 3D model like WYSWYG. Any hint would be appreciated.
Your best bet would be to combine the images into a single rectangular projection and then map that to the sphere using a spherical mapping.
Assuming your images are circular the first step is to create square images from those. A Mercator projection will probably work best.

Transformation to make a curve

Is there a way to create a matrix transform or any other transformation to bend a rectangular element on the screen? Say I have a long rectangle: width=50 and height = 500. And 2/3 of the way down I want it to turn 90 degrees.
Thank you!
I think what you're looking for are the various Geometry classes, especially PathGeometry.
These links are a good start:
http://msdn.microsoft.com/en-us/library/ms747393.aspx
http://msdn.microsoft.com/en-us/library/ms751808.aspx
You could use a pixel shader (effect in WPF), however this will render the hit test in that area useless.

Resources