Apply 2 different textures to two sides of the same face of an object in Autodesk Maya - maya

I've been trying to apply 2 separate textures to the inside and outside of a bowl shaped object in Maya. I don't want to extrude that particular face and put a different texture. That's easy though.
But since I'm working on a low-res model where I'm restricted to have a certain number of faces, so I need an alternative. Someone gave me an idea of using Maya Nodes. But, I couldn't come up with a solution.
How can I do this?

You can achieve that using samplerInfo node.
Just put a switch or colorBlend and use flippedNormal as a switcher between 2 textures/shaders/w/e is it.

Related

X3D, Shape Creation, Curve, Manipulation

I have created a box in X3D but i want to curve the top right and left corners of the box.
Any ideas on how? At the moment i have the code for the box only.
I cannot find much on the net about simple shape manipulation.
Thanks
You can't do it manually, directly in X3D.
You have to use a software like Blender or 3DS Max to create non-primitive shapes (more complex shapes than cubes, spheres, cylinders and so on.) There you have all kinds of functions that would change your object and then you can export it in several formats, including X3D.

Draw hole in solid shape using x3d/vrml

I'm new to x3d/vrml and I'm trying figure out how to punch a hole in a solid shape. For example, a 6x6x2 cube with a smaller 2x2x2 cube in the middle to create a hollow shape. I have tried extrusion and indexedFaceSet without success. I haven't found any tutorials that show me how to do this. Therefore, A working example would be useful to me as well as others .
Normally you don't create this kind of shapes manually. Of course it is possible to use the IndexedFaceSet node in order to achieve this but it's much better and easier to use a tool (e.g. 3D Studio Max) where you can create shapes using a graphical interface. Then you export the file to X3D or VRML or whatever and you'll see the IndexedFaceSet there and possibly the complexity of the node (I mean the node values which are nearly impossible to determine by yourself).
In your specific case you could use 4 cubes that are intersecting and leaving a hole in the middle...this would be just a tricky solution.

2D CAD application in WPF

I'm trying to write an CAD-like application in WPF(.NET 4.0) that needs to be able to display a lot of 2D points/lines. It will be used to display CAD-plans of entire cities with zoom, pan, rotate and point snapping on mouseover.
Right now I purely use WPF. I read the objects from the CAD file draw them into a StreamGeometry, use it as stroke of a new Path and add it to a Canvas, with several transforms.
My problem is that this solution doesn't scale well enough. It works fine with small CAD-files, but when I want to display like half a city(with houses and land boundaries) it is very very delayed.
I also tried to convert my CAD-file to an image, but
- a resolution a 32000x32000 is sometimes not enough
- when zooming out the lines are too thin.
In the end I need to be able to place this on a Canvas(2D/3D) as background.
What are my best options here?
Thanks,
Niklas
wpf is not good for a large 3d models. im afraid it is too slow. Your best bet is direct 3d or openGL
However, even with the speed of direct3d,openGL you will still need to work out how to cull as many polygons/vertices as possible before the rendering of the scene if you are trying to show an entire city.
there is a large amount of information on this (generally under game development)
there are a few techniques including frustrum culling, near and far plane culling.
also, since you probably have a static scene you may be able to use binary spacial partitioning.
As I understand the subject is 2D CAD system within WPF.
Great! I use it...
OpenGL and DirectX are in infinite loop OnDraw always. The CPU works all the time.
WPF/Silverlight 2D is smart model.
Yes, total amount of elements (for example, primitives inherited from Shape) must be not so much. But how many?
I tested own app (Silverlight). WPF will be a bit faster I hope...
Here my 2D CAD results. Performance is still great. Each beam consists of multiple primitives.
Use a VirtualCanvas like this one from Chris Lovett.

How to build the following visual

I am not a real designer and I would like to know if anyone have an idea how can I build the following visual :
The idea is to get 2 rings where inside I will draw secific number of pie represented as "Interactive shape or button". Base on the number of shape, they should cover the whole circle.
In addition to that, I need to be able to interact with each pie shape, and inside and oustide edge of those shape should be a perfect arc based on the circle diameter.
As I am not a perfect designer, how can I represent this visual ?
I was thinking of using a custom panel but then how to draw each panel shape in order that they gets perfect inside and ouside arc and offer interactivity with each of them ?
Thanks for your help
I would appreciate samples as well
Theres actually a Silverlight tutorial on making something exactly like this.
If you didnt want to use that, you could always do it in javascript. Here's an example using Rapheal js
I would recommend looking into WPF Geometry and how you can create custom controls (such as the Circular Gauge Custom Control over on CodeProject) using said Geometry.
I've never created a control quite like what your suggesting, but I would image you would define some form of area that can contain children and style it so that it forms the circular shape you want. Then, adding interactive regions should be as simple as adding controls to standard containers.
Here's a link to a "generic radial panel that can be used to host any items" which subclasses Panel.

Mixing layers in OpenCV

i need to make a program where i have to detect the edge of a subimage (like a face in a portrait) using canny detector. then i need to filter that portion out and paste it in another background. it is like mixing 2 layers. can anybody give me any algorithm for this? or any idea about the process?
You are probably aware that the task of selecting a subimage is most known Region of Interest (ROI).
Edge detection with canny shouldn't be a problem since OpenCV implements it as cvCanny().
For what I understand you want to overlap two images. I suppose you want to add one image on top of each other? Take a look at step 2 on the first link I suggest: Adding Two Images with Different Size
If you want to BLEND them, then check these instructions. I have used them before to draw over the webcam window.

Resources