create tiling texture plane xna - xna

I want to create a plane using xna , similiar to the one in this link so i can add 3d objects above it
http://www.mathsisfun.com/geometry/plane.html
can anyone guide me or tell me how?

what you want to draw is a textured quad: http://msdn.microsoft.com/en-us/library/bb464051.aspx

Related

How to apply a 2D image to a 3D Model which I can then use with Google Sceneform and ARCore?

I'm looking for a guide on how to take a 2D image (Jpeg/PNG) and apply it to a 3D object template programmatically.
The specific use case I am trying to replicate is taking a picture and applying it to a 3D picture frame, similarly to how Cart Magician does (https://cartmagician.com/) where you can upload an image and then applies it to a picture frame object template that they provide which then renders the object with the image that can be viewed with Google AR.
Could anyone help or point me in the right direction?
Thanks in advance!
This is the AR frame with image, the image should be interchangeable.
You can create a ViewRenderable surrounded by the 3D model of a painting frame. The ViewRenderable will have the 2D image put on it.

Making 3D plane look 2D

I'm building a 3D app that uses SceneKit. My scene will have various 3D objects and a moveable perspective camera.
The user can load a 2D image into the scene, which I will display on a 3D plane using the image as the material.
What I need to be able to do is to initially show the image as if it were actually 2D, where the pixel width and height are the same as the image and it is not distorted by the camera perspective. So basically I need to know how to position that plane in relation to the camera to make it look 2D.
Thanks in advance for any tips :)
It's not clear where you are getting stuck.
If you're just looking for where to start, look at SCNPlane and SCNBillboardConstraint.
I do not know SceneKit, so what I suggest might not be doable in the specific program, but could you perhaps use an orthographic camera perspective? It removes a lot of the visual depth from a scene, combining that with some flat lighting might accomplish the look you are going for.

SceneKit: Transform texture to fill only part of a sphere

I'm developing an application that uses SceneKit API and I faced the problem that I basically cannot apply a texture to a sphere object and keep texture's pre-defined size. I'm able to either scale the texture up to the object's surface (default SceneKit's behavior) or repeat it. But what I want to achieve is similar to the billiard ball:
Let's say I have a a .png image of a white circle with the number "13" at the center of it. I want to put it like the one on the picture. Generally, I want it to be scaled up to a fixed size, not the whole surface.
I use material.diffuse.contents property of SCNGeometry to set the texture and I found contentsTransform property in the documentation which can probably help me sort it out but I didn't find an explanation how to use it with the sphere object.
Is it something that is possible with pure SceneKit? Any help would be very appreciated.
You need a preliminarily modelled geometry (polygonal sphere in your case) and its UV Mapped texture that's made in 3D modelling software (Autodesk Maya for instance).
Watch this short movie to find out how to get UV-mapped texture.

Render texture in 3d space with XNA

I have made an augmented reality app in XNA that displays a 3d model over an SLAR marker (Silverlight Augmented Reality-toolkit).
I would like to display an rectangle floating over the 3d model showing a texture, but I'm not sure what object to use.
Texture2D doesn't have any 3d space rendering capabilties I know of, is there anything else I can use?
The texture I would like to show is generated using the SetData method so it needs to be a Texture2D or an object with simular SetData method.
One solution is to render Textured Quad.
This basically means you're drawing a rectangle in 3d space, and texturing it with whatever texture you'd like.
The link i supplied covers the basics of doing this.
Notice that the link involved XNA 4.0 (not sure if there are any changes from previous releases), but the sample also exists for earlier versions of XNA.

Collision Detection - Goblin XNA

Im working on a Project based on Goblin XNA.You can get an idea on what I really want do by checking this image http://img97.imageshack.us/i/markerdetectioncopy.jpg/
I manage to retreive finger cordinates using open cv and pass it to XNA. What I want to do is to see if there is a collision between the finger cordinates and the object generated by Goblin.
I would really appriciate if anyone could give me some guidance on this issue.
Thanks
First you need the 2d coordinates from 3d object (using Viewport.Unproject function). Then you only have to do a simple circle collision between the two points.

Resources