3D Graphics For Dummies?

Hi Folks:

I’m a C++ programmer who’s totally new to computer graphics.

I want to put a rotating tennis court on an application’s splash screen, as a first step toward adding 3D graphics to my skill set.

I’ve been reading the manual and now have a plane object with the dimensions of a tennis court. I’ve applied lighting and a material to the object. The surface doesn’t look quite right yet, too shiny, but I think I have what I need to fine tune that.

Now I want to accurately draw the lines on the surface. I’ll save creating a net object for later.

I’d like the lines drawn on the court to be accurately placed.

I’m reading that Blender isn’t a CAD tool and that there are other applications better suited for the task of laying down lines of a particular width precisely on a surface.

I’ve learned how to put a JPG image over the surface of the court, so the concept of using some other tool to generate the surface color and lines is no problem.

I’ve looked into Gimp. I haven’t found how I can specify an accurate start and end point for a line of a specified width.

I’ve seen computer generated pictures of stadiums with courts, pitches and fields that have lines on the surface. What tools are used to place these lines?

What’s the appropriate tool for this task?

Bucks are tight, so free would be nice. Cheap is alright too.

  Thanks
  Larry

What do you class as accurate ? I don’t believe all tennis courts are exactly the same size to the nearest 1/10th millimetre. You do not need a CAD application for this accuracy and you can easily model objects to the nearest fraction of a millimetre in blender

One option (see attached) is to split a plane along the position of the lines. You can set units to imperial in the Scene settings. Enable edge length display in properties panel (N) under Display.

For the line width you could apply a bevel modifier to the edges that have a line. Add bevel weight of 1 to these lines (Ctrl+E / Edge Bevel Weight). The line width is set with the Width value in the bevel modifier.

You can add different materials (green / white) to selected faces after applying the bevel modifier or use the material setting in the modifier itself to assign the next material to the newly created faces


Attachments

court.blend (127 KB)

Sorry, accidental post.

I wish I could delete.

Thanks Richard:

This gives me something to focus on in the instructions.

Unfortunately, my client has given me an assignment that requires my attention right now.

It should be finished tomorrow.

I’ll pursue this after I’ve wrapped that up.

I appreciate your response.

Common mistake. When the purpose of the thing you’re making is visual, absolute precision has no value. That doesn’t mean being sloppy, still have to take relative precision into account. How precise model has to be is relative to: distance to the camera, scale relative to other objects, scale relative to features on the object, detail size and render resolution.

Blender is mainly a polygonal modeler. Polygonal modeling was originally created for visual purposes and is inherently inaccurate (approximation). That’s why it’s not a CAD application which use modeling paradigms created for technical purposes (solid modeling, nurbs). Quite many with CAD background have trouble with polygonal modeling because they are used to having precision as given and then try to make it “work” with polygonal modeling, instead of modeling effectively by doing a good approximation that fulfils the model structure requirements for the end purpose, other work stages, and take relative precision into account.

Ok, I’m back.

Thanks Richard and JA12 for the responses.

I’m an programmer. The client turned the 1 day project into a two week project.

To answer your question, “Precise” means the image needs to look like I’ve seen a tennis court before. This is a splash screen, the court is rotating. I guess I’d like 1/2 inch accuracy, or so.

I have two quick questions before I ask about splitting the plane.

I already display a crude image, using OpenGL. Can Blender generate textures my existing code can use?

And…

I want to define the dimensions for the court, 36’ x 78’.

So I create a plane, but the only place I see to set it’s dimensions is in the Viewport Properties region. It looks like it works.

Shouldn’t the Viewport Properties region be where you set properties for the 3D viewport?

To me this seems like an odd place to set dimensions for an object. Am I missing something?

Back to splitting a plane.

I’ve created a new plane, of the appropriate dimensions, and then saved it. Keeping it simple. I can try something, and return to this state when it blows up on me.

I’ve been looking around. This is what I’ve found. Please tell me where I’m going off track, because I’m sometimes creating odd 3D shapes when I just want to create a vertex.

I believe planes are split along edges.

So I try to define an edge by creating two vertices.

I believe this link:

https://www.blender.org/manual/modeling/meshes/mesh_structures.html

says I can create a vertex by hitting <CTL - LMB> in edit mode.

Clicking doesn’t seem to create anything. Nothing visual shows on the screen. Nothing new shows up in the outliner. Nothing shows up to allow me to position a new vertex in 3D space.

I was expecting to see something indicating a vertex had been created.

Sometimes creating one vertex like this causes the plane to turn into an odd 3 dimensional shape. I have no idea why tapping <CTL-LMB> has absolutely no visible effect one time, reloading the file and having these shapes pop up with <CTL_LMB> the next time. Blender is in Edit Mode, which is what that link says it should be in when creating a vertex.

Here is a picture of one of those 3D objects. Notice that the outliner shows only a plane object. Shouldn’t it show whatever this is too?


Here is the blend file of the simple plane:

court_02.blend (447 KB)

This is the blend file after I thought I as adding a single vertex:

court_02_after_vertex.blend (439 KB)

I’ve done that 6 part Blender Cookie starter tutorial. But clearly I have a long way to go before I can make even rudimentary use of this amazing piece of software.

My apologies. You folks have a clue, and have a right to expect anyone who posts here to have a clue too. I wish there was a forum for really, really stupid questions like these.

Thanks
Larry

There is a thing with object and object data (mesh in this case). Objects are manipulated in object mode and whatever they contain are manipulated in edit mode. Only one object can be edited at a time. An object is just a container as transforms are concerned and those are separate from object data, which means that when you manipulate an object, its content is unaffected. That’s bad when modeling because mesh tools and modifiers affect the mesh, and there is a difference in what you see in the viewport and what the tools see http://www.pasteall.org/pic/show.php?id=72366


You could add a plane primitive and enter its dimensions on the 3D view properties. Changing the dimensions will change the object scale, which means the object is scaled but the mesh (vertices, edges, faces) is still as it was a plane primitive (with the dimensions of 2’x2’). You would have to apply the object scale to get the object transforms transferred to the mesh and could do that with ctrl+A -> scale.

Applying the scale has no visual effect. If it does, something is wrong. Might get that when there are modifiers, which work on object data level, and the dimensions get changed. That would mean they were set up with wrong dimensions in the first place.

Or you could add a plane primitive, enter edit mode and edit the mesh



Could for example enable edge length display and move or scale the mesh to get the right dimensions.

ctrl+LMB click in edit mode extrudes whatever is selected, that’s why you get the weird shape. If nothing is selected, it adds a new vertex. Note that if you’re in edge or face selection mode, you won’t see the added vertex.

The separation between object and object data might be a bit hard to grasp but it’ll make sense after a while. These are better basics videos btw. https://www.youtube.com/playlist?list=PL0AfIdK08E7_PKsXOO_yuAql9b3hdcwPR

36’ x 78’. That would be 1 : 2.17. This is all what matters - proportions.
You need a final product consisting of images taken from some point using camera with certain optical parameters and there is no way for the viewer to tell if it is 36’ x 78’ or any other measurement units - one can only tell there is something wrong if the proportions are off. If that would be orthogonal top view you’d need to be precise enough to make opposite rectangle sides equal length; if this was perspective shot nobody would notice if you had quite a large difference.
JA12 already explained differences between Edit and Object modes and all what’s left is to decide on what to do about that tennis court…
First, it’s symmetrical - you could exploit that by modeling just 1/4 of the field. Next, it consists of rectangular elements: green, bigger ones and white, narrow in between. Object mode allows to drop in Plane primitive, 2x2 BU (1BU is considered 1m) and numbers can be edited - Radius (ehrm…plane?!), some other stuff on T-pane, Dimensions on N-pane.
You can find pretty detailed drawings on i-net and figure what numbers you’d need for the green rectangles you drop in to get 1/4 of the field. Leave empty space where white ones would go (5 cm line width, i read) and position greens.
Here i would need to explain all the details of moving and snapping objects in Object mode; here’s a page which explains this better than i would.
When green rectangles are positioned it’s about time to normalize scale for them - Shift select all planes and Ctrl- A -> Apply Scale.
While they are still selected - Ctrl-J join them. Assign new Material; depends on which renderer you choose but any simple green would do for now - stub.
Now the toughest part about connecting green rectangles - creating white stripes. I wont go into details but E to extrude vertex or edge, F to fill face between two edges or 4 vertices, Ctrl-R to insert edge loop or K - knife tool ( C for straight lines, see status line when using tool) is abut all what could be handy.
Provided that you modeled 1/4 and now need to use Mirror modifier on X and Y to get all court in one go you need to establish Origin point at the corner where middle of the field is. Select corresponding vertex and Shift-S, Cursor to Selected. Tab into Object mode and look on T-pane for Tools - Set Origin. Choose Origin to 3D Cursor.
Wrench icon - Add Modifier - Mirror, check X and Y, Merge, Clipping (just in case of what) checkboxes. That should be it. Create White material, assign to stripe faces.
Now, in Object mode, you can scale court as you see fit - proportions are there and units or numbers doesn’t really matter anymore. Pull your Camera out.

This was long and boring way, there is another one - fast. Use CAD and export svg (Inkscape, if CAD is not able to). Convert (or export selection from Inkscape) as a .png image. [Blender can import svg files directly. There usually are some misunderstandings about size of the imported curves and what to do about them, so bitmap import is easier]. Use Import Images as Planes addon in blender (find and check it in User Preferences) to import image as a plane. Scale up plane, done. Proportions came in as a correct image. Spectators should stay unaware of the real size of things.
Lights on, Camera… Ah, there was a net and poles somewhere…
Well, example. Feel free to dissect and reuse, hope materials are legal in this regard.
Mind you - there are disproportionate things in…

I want to thank everybody again.

While I’m eager to master this 3D graphics stuff and incorporate it into programs I write, a client has drawn my attention to another issue.

I appreciate the amount of effort you are taking to assist me.

I’m working through the third lesson in the GetBlended YouTube videos and I’m having trouble getting the rotation working.

At about the 7:26 mark the narrator selects the rotation manipulators and then effortlessly chooses one after the other to rotate the monkey’s head as he wishes.

When I attempt the same feat, usually the 3D cursor snaps to my cursor, and moving the mouse with the left button depressed translates, instead of rotates, the object.

Sometimes I do get rotation, but it’s not around the axis indicated by the color of the manipulator I’m trying to grab.

If I rotate the scene, and use the white circle that surrounds the rotation manipulators, I rotate around whichever axis I’m looking along.

What am I doing wrong?

Thanks

Could try switching to either of the selection method options in user preferences -> system: selection, instead of using automatic. People have had selection problems because their system tells Blender something is available, yet doesn’t work as well as it should.

Could also be that the manipulator hotspot is too small, that can be increased in user preferences -> interface: manipulator.

Assuming you didn’t mess with the default input preferences, manipulator handles are selected with left mouse. Right clicking and dragging anywhere in the 3D view grabs selected after moving the mouse for some distance. It’s called tweak, and tweak threshold (distance in pixels) can be adjusted in user preferences -> input. Handy when using twitchy input devices for selecting.

This is becoming more bizarre and less fun.

I was able to enter “RX45” and and the head rotates up as it does in the tutorial.

Now I enter the same text and the head tilts down 45 degrees.

“RX-45” rotates the head up.

I do “File - New - reload start up file”. Same thing.

I tried different user preferences, but never hit the save button. I didn’t see anything in the preferences that looks like I’m asking for this behavior.

Shouldn’t the reload start up file reload the user preferences too?

Suggestions please.

never mind

I believe I understand the concept of splitting the plane along edges representing the lines, and applying a white bevel of the desired width to connect the pieces.

I have my edges on the surface.

I would like the lines on the surface to be 2 inches wide, and lines around the court’s perimeter to be 3 inches wide.

Precision isn’t necessary, but I’m seeing what I can do.

Attempting to use the modifiers:

Select the edges that are interior to the court’s surface. Excluding the edges around the perimeter of the court.

Click on the wrench icon to bring up modifiers, add Edge Split. Set mean bevel weight to 1.0. I uncheck Edge Angle, sounds like something I don’t want.

Now I add the Bevel modifier, interior edges remain selected.

Set width to 2. Material is represented by a number, “-1”. Attempts to adjust the material, and color, for the bevel have been unsuccessful. I haven’t changed anything else.

Applying either of these inform me that modifiers can’t be applied in edit mode.

When I look at the court in 3D Full View things look promising. The lines inside the court seem to have width to them, but without material, they remain unpainted.

I continue to stumble along on a project you folks could scribble out over a coffee break.

Any advice is appreciated.

Never mind

The application is ready for release to beta testers and it’s time for me to get the splash screen looking nice.

I appreciate the help I’ve received and I’ve learned much. But my attempts to put lines on the court continue to be frustrating.

I’ve done a lot of reading and watched a lot of Youtube tutorials, but there’s something I’m missing.

I’ve followed tutorials where I’ve created three materials of different colors, selected an edge, created a bevel modifier for that edge and then picked the different materials. It worked like a charm. The bevel colors changed as expected.

It all seems so easy.

I’m trying to get the lines inside the court to draw. I’ll deal with the base lines and side lines after I’ve established this beachhead.

I’m using bevels, as suggested by Richard Marklew.

After creating the surface of the court with the appropriate dimensions and the Grass material, everything that follows has no visible effect when viewing the object in “3D View Full”:

Create the vertexes and extrude edges from them.

Create a second, white, material.

Select “Plane” in the Outliner window.

Set Edit Mode.

Select all of the interior edges.

EdgeSplit modifier with split angle of 0 and “Sharp Edges” unchecked.

Bevel modifier with width of 2", weight of 1 and material index of 1 for the second material. The second material is white for the line. I believe the material index is zero based.

When I look at the court in 3D View Full all I see is a green rectangle, no marks on it at all.

In the previous post I reported that the bevels were drawn with a width in edit mode, though I didn’t understand how a material was selected for a bevel at the time so no color was displayed.

I’m not sure what I was looking at, but now, while selecting a bevel weight of 1 draws wider and bolder lines, I see no evidence that there is width associated with the bevel.

I’ve tried the following modifiers together, setting both then returning to object mode and applying without success. Setting each modifier and applying them separately also yields nothing.

I’ve tried a lot of things out of desperation. I’ve saved the object with the materials and edges so I have something to return to as different efforts fail.

Lately, attempts to render the image display a grid, and nothing that looks like a green, tennis court shaped, rectangle.

Here is my latest blend file.

court_06_vertex_and_edges.blend (528 KB)

Thank you for the advice you have volunteered. I hope you will help me get over this bump.