text:
How to make dirty looking object?
I want to make an object look dusty and have some scruff on it (like the image directly below), but I am unsure of how to go about this.

Notice the dust and smudges on it, that's what I am trying to recreate.

I've modelled the object but would appreciate some advice or keywords to help do my own research, as you can see the render is a far cry from what I want to end up with. If you need any more information I can provide.

In order to see the blemishes you should be setting up your lighting in such a way as to give light a chance to bounce around the scene in the same way as the photo. The photo has much more environmental bounces. See this post by ben simmonds about lighting. Texturing and materials go hand in hand with lighting, they can't be divorced from each-other.

Not sure if you're still monitoring this, but i've put together a glass marble which looks similar to yours: http://www.pasteall.org/pic/89892 . It's quite render intensive, but i'll make a lil tutorial as the answer below if you're interested? :)

If you see an answer that solved your problem, please accept it. Thanks! :)

Decided I'll post a tutorial anyway in case anyone else is curious in the future, as the techniques used are extremely valuable to a variety of different scenes and renders! :)
This is along the lines of what we'll be creating, rendered at 150 samples:

1. To begin, I've used a relatively simple scene setup comprised of a UV Sphere, backdrop and 3 emission Mesh Lights.

2. Diving in head first, we'll jump straight on over into the node editor! The basic glass material will be comprised of 2 Shaders, a Glass BSDF mixed with a Glossy BSDF, with a Layer Weight node's Facing output plugged into the Fac input of the Mix Shader. Set the Blend of the Layer Weight node to 0.200. Change the Glass BSDF's light distribution type to GGX, and the IOR to a value of 1.800. Finally, add an RGB node and plug the Colour output of the RGB node to the Colour input of both the Glass BSDF and Glossy BSDF. Change the colour of the RGB node to the values shown in the following screenshot:

3. Now we've got the basic glass set up, let's add in some fingerprints! Glass is rarely ever 100% clean, and unless it's been recently polished or moved by machine it's going to have little bits of human grime on it in the form of fingerprints. We'll add this photorealistic detailing in through the use of a custom 'Finger Print Map', which I created using chain's brushes located here http://chain.deviantart.com/art/fingerprint-brushes-549217 . You can download my Seamless Texture from the imgur album link at the bottom of this post :)
Start by adding a Texture Coordinate, connected via the Object output to a Mapping node. Change the Mapping Node's XYZ Scale values to 0.500 and connect to an Image Texture Node. Open up the 'Fingerprint' texture into this node and set the projection type dropdown from Flat, to Box, with a Blend of 0.500. Finally add in a Mix RGB node and set the blend type to Add. Plug the Image Texture into the add and the Add into the Roughness Input of the Glossy BSDF shader as follows in the screenshot. Finally change the Colour 2 input of the Add node to a more greyish colour, i found changing the RGB values to 0.250 to work quite well. This just helps to mute the fingerprints slightly and make them appear more realistic.

4. Next comes the scratches! These tiny details will add both roughness and surface texture to the marble, all the while enhancing the realism! Again I created this Seamless Scratch Texture from, well scratch, using KeepWaiting's brush set located at http://keepwaiting.deviantart.com/art/11-Scratch-Brushes-for-PS7-177075258 , again you can download the Normal Map of the texture in the imgur link at the bottom!
Start by duplicating the Mapping and Image Texture Nodes and connecting them up to the Texture Coordinate Node as we did in the previous step. Change the scale of the Mapping Node's XYZ to 2.000 and open up the 'Scratch Normal Map' in the Image Texture node, changing the Colour Space from Colour to Non-Colour Data and the Blend to 0.000. Next, add in a Normal Map node and connect it to the Image Texture and Glass/Glossy nodes as shown in the screenshot. Finally, change the Strength value to 0.100. This will add subtlety to scratches that are really only visible around light sources reflected off the glass, but it'll help sell the weathered effect by a million percent! ;)

5. The final step! And arguably the most complex, so it'll be easier to explain it by showing, rather than explaining. Using the custom dirt map that I have edited from this original image: https://hmmatthews.files.wordpress.com/2012/07/table_colour.jpg , we will overlay it on top of the glass, adding an effect similar to that caused by limescale and grimey water and dust drying on a window surface... or a marble in this case! :P This image will also be available in the imgur link at the bottom.
Begin by repeating the process of adding in Mapping and Image Texture Nodes, change the XYZ Scale to 1.000, load up the 'Dirt Map' Texture and set the Blend to 1.000. Next add in a Diffuse BSDF (with a colour of that shown in the screenshot) with a Transparent BSDF, and mix them together. Plug the Dirt Map Texture into the Fac input of the Mix Shader. Add a second Mix Shader and insert it as the last node before the Material Output, blending together the rest of the nodes with the 'Dirt Map'. Again plug the 'Dirt Map's input into this second Mix Shader's Fac input, however this time add in a ColourRamp node onto the connecting node branch, and edit the stoppers as shown in the screenshot. This causes that subtle speckled effect that is definitely totally not noise...! (Don't worry it becomes more obvious with more samples!) ;)

6. (Optional Step:) Below are several setup screenshots of my render settings for the final image at the start of the tutorial, using my CPU.

And there you have it, the final result alongside a sweet node Setup! :P

And as I mentioned the techniques and textures can be used with a variety of different materials in a variety of different scenes!

Hope this helps! :D

Links:-
1) Imgur Link to Custom Maps: https://i.sstatic.net/q4XBp.jpg
2) KeepWaiting's Scratch Brushes: http://keepwaiting.deviantart.com/art/11-Scratch-Brushes-for-PS7-177075258
3) chain's Fingerprint Brushes: http://chain.deviantart.com/art/fingerprint-brushes-549217
4) Original Dirt Map Image: https://hmmatthews.files.wordpress.com/2012/07/table_colour.jpg


text:
How do I delete keyframes on a plane track?
I've got as plane track and I've keyframed the corners, however I want to delete some of the keyframes...they don't appear to be in in the dope sheet or graph editor. If I select the plane track and go to the frame (with the keyframe) and press the delete keyframe button (at the bottom of the UI) nothing happens.
Cheers
Jim

spacebar > delete keyframes or [alt + I]

HI, that seemed to delete all the keyframes....

I mean (Alt+ I) deletes all the keyframes, can I just delete a specific keyframe? Cheers

well if you go to the specific point in the timeline and delete them would that work?

That's what I tried, it deletes all the keyframes...

did you have the plane track selected?

What variable did you keyframe (location, rotations, scale or another slider)? :)

Move The Green Timeline Marker On The Frame You Want to Delete The Keyframe on and press alt+I this will delete all current keyframes on that frame.

Move the timeline marker to the key frame you want it to delete by change the number, then hold Alt and I together.

Blender will ask if you would like to delete the keyframe.
Hope that helps

source: Stack Exchange

license: Creative Commons - Attribution Share-Alike - https://creativecommons.org/licenses/by-sa/3.0/

sort: votes


text:
Rendering multiple scenes in parallel
I have 100s of scenes with simple primitive objects at random locations (not in a sequence) in each of these scenes. For example if I have 2 objects in a scene, the only thing that will vary across all 100s of scenes is the location, orientation of these 2 objects. I have file generated with all these locations and orientations to load into blender from. Currently in my project I am sequentially loading each location, orientation detail of a scene and rendering it one after the other.
Is there a way to generate these 100 scenes in parallel? I have been looking at GPU rendering/cluster based rendering but failed to find any concrete that I can use.
Any pointer will be appreciated. Thanks in advance!

I don't think rendering them in parallel would help you if you're just doing it on your one machine. I think a command line batch script would probably be better. Are all the scenes in one blend file, or do you have multiple blend files. If so, what naming convention are you using?

I am not using any blend file. I am setting things up using a python script, that sets the scene with camera, light and I am reading the file with the object poses into a list. Running the list in a loop, I am creating objects in the scene and rendering it. Clearing the objects again and creating them based on the next location and so on. Hope the process is clear now.

Hmmm, I think that will make it tough to split up or parallelize. If you could render each scene from the command line with a startup script and an input argument, you might have better luck at splitting it all up.

Also if you could arrange for each scene to be loaded for each frame *Scene 1 on Frame 1", it might make it easier to distribute the render job as well. That way if you trigger a render job to do Frames 1-5 it will render out Scenes 1-5.

Yes, I think the one scene per frame idea is good, because it keeps all the scene logic inside the blender file script, but allows the frame ranges of each distributed render job to be batched.

Your distributed render job would just need to be able to load the data file independently as you wouldn't be able to embed it into the blend file.

Ok, here's my first draft of an answer. I'll revise it as we talk this out more. If this seems to be going in the right direction, I can add further coding samples.
The key to being able to distribute your render jobs between many render nodes is being able to easily tell the render node what scenes to render.
Currently, from what you've described you would have to add some sort of input argument value to tell the script what scene to load and then render out one frame.
I think if you could modify your script to run on a per frame basis, then map the frame number to scene number, that would make it easier to distribute the job to many machines without having to worry about input values for the scene number.
So the file arrangement would be:

GenScene.blend file blank file ready for scene setup
Startup python script ("GenSceneFrame.py") would be run once for every frame of the animation. Let's assume we have 100 scene's to render, we'll set the animation range to 1-100
SceneData.csv file that contains object setup data for each scene

These 3 files would be packaged together in one folder (or with subfolders if you want but you'd have to be vigilant about paths).
You would have initate the render job from the command line so that you can get it run the python script on startup which is where the frame handler will be created.
It would look something like this:
blender -b GenScene.blend -s 1 -e 100 -a -P GenSceneFrame.py

Let's say for convenience sake that you're going to use a commercial render farm service. They would need to be able to launch your render job with the ability to pipe in the startup python script reference.
You would upload the folder as a Zip file, set the render job for frames 1-100. Then the animation job would be distributed between however many render nodes the service uses, or however many you opt to pay for.
Each frame render runs the internal script and sets up the scene for the current frame number and renders out one frame image. At the end of the job you should have 100 rendered images, one for each scene.

Thanks a lot for the detailed answer. So there is a slight bit of information I think is missing in my question. When I said rendering a scene, I care about a particular frame (say 500 after physics simulation), so current focus is on rendering a zbuffer of this particular frame. Hence I have 100 scenes and I have to render out 100 zbuffer images. However I might need the animation of the physics simulation as well, but thats not the current focus of my project.

Ok, well then you will definitely need to use the command line with Scene number solution in order to have multiple renders going on multiple render nodes. One command line call would set up on scene, bake x number of frames and then render out the desired frame image.

Adding to that, my project has lot of iterations and in each iteration my program calls blender to generate 100s of scenes according to specific object locations. So I am not sure if I can use the render farm. So i wanted to do it on a local machine to which i have access all the time.

If you are only using 1 machine, then I'm not sure trying to parallel the renders would be helpful. The physics sims generally use multicore processing, so doing it one by one would probably be the way to go. Do you not have this process already automated with scripts? I thought you did.

I think the only way to parallelize the process you already have would be to use multiple machines, either locally or remotely. Your launch app would have to be able to call blender headless commands for each machine. Then if they all rendered back to a shared drive, you'd get all the frames in one place.

Yes i have it running already. But as I told its very inefficient. Multiple instances of blender can be of use I believe. So a blend file can have all the scene i need (like light, camera, type of objects) and a scene script will have the pose of the objects. I should be having scene_script_id.py run the way you suggested with id varying from 1-100.

Let us continue this discussion in chat.

Is this for a commercial project? I could probably set this up using the Brenda project and render each scene with an AWS EC2 node (you can launch hundred's at once).

I am still prototyping and its a research project. So once I have it running fine on local machines, then EC2 would be the next step.

Ok, so based on my current understanding of your project, your launch app is triggering a CLI Blender command for each scene iteration, is that correct? So each scene is actually a separate blend file/instance and render job, correct? So the real issue is how to launch blender on multiple machines from your launch app, right? Out of curiosity, what is your launch app, another python script?

Yes Todd, my Matlab code is triggering blender at each iteration.

Now I have a blend file for the scene and I have a python script which when run with command line "blender scene.blend -P scene_id.py -- id" creates scene with id. Any ideas on instantiating this efficiently.

I am able to get the computation time down from 120sec to 12sec by multithreading the system calls on my matlab code side. Thanks Todd for the discussions.

I think the part of the process that launches each blender job needs to be pretty linear. The only way parallelize it is by launching multiple jobs to multiple machines

As you have a script creating all the scenes, I can think of three approaches, the render farm or way you distribute the render will influence which suits you.
One is to save a file after each scene is created. At the end of your scene creation loop, instead of rendering you save the scene out to it's own file - bpy.ops.wm.save_as_mainfile(filepath='scene'+str(index)). These individual files can be submitted as separate tasks to the render farm that you are using.
Another is to submit each render task after it is created. This will depend on the render farm you are using, if there is an addon that allows you to submit the task from blender then you can add that operator to your script, instead of bpy.ops.render.render()
The third approach would be to alter your script to only contain the tasks you have inside your loop. Use sys.argv to get a variable passed in when starting blender from the cli and use it as the index value instead of an index range as you loop through. Each machine that starts rendering will be given a different value or range of values to render.
blender -b --python myscript.py -- 5
myscript.py could contain -
import bpy
from sys import argv

SceneIdx = argv[argv.index('--') + 1]

mydata = ReadData('file.dat')
bpy.data.objects['Cube'].location = mydata[SceneIdx]
bpy.ops.render.render()

all_licenses: Creative Commons - Attribution Share-Alike - https://creativecommons.org/licenses/by-sa/3.0/


text:
Why can my NLA strip only be 10 000 frames long?
I have NLA strip with path animation, But it seems like I can only do animation for about 10 000 frames if I'm using NLA strips?
Really?
Am I doing something wrong?

So I clicked the button called "NOW" right beyond the red rectangle on the screen, and it helped so great. ;D
Working with Blender is so emotional <3


text:
How to set multiple camera views in one scene?
Is it possible to have several different views of one scene and set them as named "presets"?

Yes.
You can create new cameras with ShiftA> Camera, or you can just duplicate an existing camera with ShiftD.
To name them, enter a name in 3D view > Properties region > Item, and optionally enable  Name in Properties editor > Object > Display to display the name in the 3D view:

The active camera (the one used when you press Numpad 0 or render) is the one with the solid triangle.
To set a camera as active, select it and press CtrlNumpad 0, or select it in the scene panel with a search-able list drop down:

Another useful shortcut is CtrlAltNumpad 0, which snaps the active camera to the current view.
You can lock the transforms of the camera object to prevent moving them in the 3D view:

However you can still move them with the transform sliders in the interface.

Great. Thank you. I didn't mention it, but can one "lock" the cameras/aka "presets", so that they NEVER move? I know one can lock the view to camera, but that still allows scene changes.

@user961976 Something like this? (see my edit)

In addition to gandalf3's answer, you can also cycles though views using the timeline and markers. To do this, add a marker to your timeline by pressing M while hovering over the timeline. Next, select your first camera and marker, and hit CtrlB while hovering over the timeline. This will bind your camera to that marker. You can then repeat these steps for each camera in your scene.
If you place your markers on consecutive frames, you can uses the arrow keys to cycles between views.
Marker usage guide:
Move marker: G
Delete marker: X
Rename marker Ctrl-M
For more on markers see the wiki

Ingenious bypass to stubborn UI ;-)

all_licenses: Creative Commons - Attribution Share-Alike - https://creativecommons.org/licenses/by-sa/4.0/


text:
How to flood fill a color in texture paint?
In texture paint mode how do I fill a single colour (solid or transparent) on existing paints?
I currently paint with large brush filling complete area. Is there any faster method?

You can use the recently added Fill brush:

Thanks, Fill threshold should be 1 i believe to flood entire paint area. gandalf3 what is the use of threshold less than 1 ?

@ashwin To fill areas of similar color, e.g. http://www.pasteall.org/pic/87623

does this work even with texture flood fill ?

@ashwin If you want to fill the entire area, you may want to use a Threshold value larger than 1 (say, 2 for example. And, since 1 is the default limit, you have to manually type it in there)

Another way (if acceptable) is to use Anchored stroke method. Here is an example:

does this work even with texture flood fill ?

I think it can fill anything, yes?


text:
How to disable the "Save Over" popup
I'm accustomed to saving frequently using Ctrl+S in Blender. Each time I do this, Blender pops up the "Save Over?" button, which I have to click (or press Enter).
This gets in the flow of things. Is there a reasonably simple method to disable this behavior and just Save Over without prompting. (Reasonably simple meaning without modifying Blender's source code.)

One of the more alien design choices in Blender! I wish we could disable it as well.

To the best of my knowledge, this cannot be changed. Here are a few workarounds that might be helpful however.
Use a script
If you use the command bpy.ops.wm.save_mainfile() and register a shortcut, you would just need to do a normal save once (for Blender to get the path) and after that, use CtrlShift + Y as I have done in the script below to save without any popups. (You can also change this if you want, see the commented line).
import bpy

class SaveWithoutPrompt(bpy.types.Operator):
    bl_idname = "object.save_without_prompt"
    bl_label = "Save without prompt"

    def execute(self, context):
        bpy.ops.wm.save_mainfile()
        return {'FINISHED'}

def menu_func(self, context):
    self.layout.operator(SaveWithoutPrompt.bl_idname)

addon_kmaps = []

def register():
    bpy.utils.register_class(SaveWithoutPrompt)

    wm = bpy.context.window_manager
    km = wm.keyconfigs.addon.keymaps.new(name='Object Mode', space_type='EMPTY')
    # change the shortcut here..
    kmi = km.keymap_items.new(SaveWithoutPrompt.bl_idname, 'Y', 'PRESS', ctrl=True, shift=True)
    addon_kmaps.append(km)

def unregister():
    bpy.utils.unregister_class(SaveWithoutPrompt)
    bpy.types.VIEW3D_MT_object.remove(menu_func)

    wm = bpy.context.window_manager
    for km in addon_kmaps:
        wm.keyconfigs.addon.kmaps.remove(km)
    del addon_kmaps[:]

if __name__ == "__main__":
    register()

Set the autosave feature to save more often

You could have Blender save a copy of the file you are working on every minute. This runs in the background so no popups. You can find this feature under the File tab in your User Preferences.
Related, Blender saves a new file every time

Wouldn't it be possible to overwrite the Ctrl+S shortcut with the script? (so Ctrl+S executes the script instead of the popup) you could probably also make the script call the file browser if the file has not yet been saved.

@gandalf3 It is possible to overwrite Ctrl + S and yes, a first call to save could be done, I omitted that bit since I was in class at the time. Really trivial tho.

No,
The way the save operator (bpy.ops.wm.save_mainfile) works is when its activated with the filepath property set (as with File -> Save), it will execute immediately, but when its activated from a key-binding where the filepath is not set. it will activate a popup menu.
The only way around this is to create your own operator which calls bpy.ops.wm.save_mainfile with the filepath set. Then bind the key to this new operator.


text:
How to make a hoop simply...yes it seems an easy question but wait
Is there a way I can make a hoop, say, that has a major diameter of 40 mm and has a 2 mm diameter circular profile?
Bevel flattens the sides of the profile and changes the major diameter of the item that is bevelled.
I can’t seem to find a way to extrude along a path and get what I am after.
In addition, the bevel size doesn’t appear to have anything to do with the size of the profile. For example, if I want the hoop to have a 2 mm diameter boundary profile, the bez circle I need to create is 60, 70, 80 mm!
Even then it creates an ellipse and not a circle.
How can I fix this?

Hi :). Keep in mind that if you scale a bezier circle, the bevel size is affected: https://blender.stackexchange.com/q/250716/78972

I forgot to ask if you're looking for a solution with curves or meshes? My answer assumed meshes.

Looks like a duplicate of How to make Saturn ring bigger (or any torus) (which is a duplicate of How do I scale a Torus's minor radius?)

//EDIT: I made the assumption you wanted to create a mesh. If you want a curve solution, you'll find it at the end.
//2. EDIT: Sorry I'm an idiot I somehow thought you wrote circular profile with a diameter of 4 mm... I'll correct the values for the 2 mm version, but the images are still for a diameter of 4 mm.
Mesh version: A hoop with a circular profile? So you mean what is usually called a torus? What about just adding a torus with Shift+A > Mesh > Torus?
Then set Major Radius to 20 mm and Minor Radius to 1 mm in Dimension Mode > Major/Minor or maybe Exterior Radius to 20 mm and Interior Radius to 18 mm in Exterior/Interior mode?
Whereas the Major/Minor example I gave here actually creates an overall diameter of 42 mm instead of 40 mm, I don't know if you want 40 mm overall dimensions or 40 mm from one center of the circular profile to the opposite profile's center.
About the bevel dimensions: I guess you have scaled the object in Object Mode and didn't apply the scale: Ctrl+A > Apply > Scale.

Curve version: If you're instead going to do this with curves, add a curve circle with Shift+A > Curve > Circle. Set the Radius to 20 mm and under Object Data Properties > Geometry > Bevel set a Depth of 1 mm. This also results in an overall width of 42 mm because the radius goes from one profile center to the opposite. If you want an overall width of 40 mm, set the Radius to 19 mm.

Excursion: Comparing Dimensions Mode options of the Torus, Major/Minor and Exterior/Interior.
In both modes I created a torus object which is overall 10 m wide in diameter and has a circular ring profile with a diameter of 2 m.
Major/Minor mode:

Exterior/Interior mode:

torus was the best way to go i think, thankyou very much. i gave up on torus in the past because i could work out how to set major and minor diameters..

@TimN Did you get a better understanding of the Torus object now or should I add some schematics ?

And here's an answer regarding curves
Use Bevel > Depth to set a circular profile radius
Use Geometry > Offset to correct your circle size back to 40mm

Oh, of course, the Offset is a good idea. Better than mine with adjusting the radius beforehand. But you set the Bevel radius, not diameter.

Yo thanks :). I still find blender a bit confusing, not always clear what's radius and diameter

Most of the time it's radius... and except for the bevel depth it's mostly written down somewhere. Maybe it's easy or more natural to me because when I'm dealing with circular shapes outside of Blender I usually work with the radius, too.

license: Creative Commons - Attribution Share-Alike - https://creativecommons.org/licenses/by-sa/4.0/


text:
How can I paint objects altogether like this?
Consider:

How can I paint objects altogether like this?

Enter UV mode, and select "Project from View". Then add the texture image you want as usual.

Not a new answer, but I suggest mentioning that you JOIN all the copies of the object and then create a second UV map from the original so that you can use Project from View and then 'Paint' on all at once. Otherwise, each object needs to be selected for the paint to work and that will be painful.
Picture for illustration.

Great, I learn much from you.


text:
What is the different between a .msi and .zip Blender installer file?
Are there any feature differences between a .msi and .zip Blender installer file?

An .msi file is an installer. When you launch it, you start, by default, installing software. A .zip file is just an archive that doesn't have to contain a setup file as sometimes software can be used without installation (you doubleclick the .exe file). To work from zip file you first need to extract it. After that you can get the actual software.


text:
How can I choose randomly from five Mix RGB nodes?
I have five separate color ramps for leaf colors and I want
the leaves to choose their colors randomly.
My setup looks like this:

But this doesn’t work as I want:

I want it to looks like this:

But with my gradients.
I tried adding a round math node after the object info, but that didn't have any effect.

Thanks to Allen Simpson, it works!

Then it just looks like the last photo and I want that nice gradient to be on these leafes

ok my bad I misunderstood

Not an answer to the question, but in your case you could have just 1 color ramp in Black & White and just change the color with a mix RGB set to "Color" and use the factor the same way. My 2 cents

That's a pretty good idea, or just defining a hue range to go into HSV.

As mentioned, if you can combine your color choices into one ramp, you can plug the Random output directly into that.  To do this with this level of control, you need to do some math to convert the random output into a straight 0 or 1 over a given range.  I've done this with a compare node.

The bottom compare node is everything in the range of .8 to 1.0, which, at the end of this group, is the same as the top color input (that top input is the 'default' case, or in other words "everything that's not caught by these other compare nodes").  That's why it's not connected to anything.

Works just I wanted, thanks!


text:
How can I do a cartoon-like cannon firing animation?
I am working on the cannon below:

It is going to be used in a Christmas mobile game and is going to shoot presents. I want to make it have an animation where, when I shoot the present, it's a kind of cartoon-like animation where the present goes through it visibly. It's hard to explain, so I did a little visual explanation:

What is this kind of animation called, and what are the tools to do it?

The technique that's describe in this answer is called exaggeration. 12 Principles of Animation is probably the best beginner's overview of cartoon animation available, by the way.

You can use a Lattice modifier:
Create a lattice, scale it in Object mode, subdivide it a bit:

Give your cylinder a Lattice modifier with the lattice as Object, select the lattice, switch to Edit mode, edit the lattice so that it deforms the cylinder:

Animate the lattice obect:

Thank you so much!


text:
How to swap between several objects?
I have a complex question, so bear with me. I have 3 primaries, 3 secondaries, and 3 melees. I want a system where you can swap between primary, secondary, and melee when each of which can have a different weapon. I have a very simple .blend to get you started; all it is is basically a camera, and 3 types of primary, secondary, and melee; they all have animations and have different colors to help you. Here is a list of things I want with this system:

"Weapon Active" property; each weapon will have its own ("Smg1Active," "Smg2 Active," ...), and this will be used in such a way, for example, when a certain weapon is active, this property will be set to 1, and will allow me to make the character move faster and slower based on which item is active.
Live weapon swap: If you are selecting the primary, and suddenly the primary is smg2 instead of smg1, I want the start animation for smg2 to occur; smg2 to be active, and smg1 to be gone.
Invisibility: This is fairly simple, but when an item is not active I want it to be invisible, as I do not want other cameras to see guns floating.
Properties: I want the following properties: "Primary" (Set to 1 when primary is active); "Secondary" (Same but for secondary); "Melee" (Same but for melee); "PrimaryID" (Each weapon has its own id, as in smg1's id is 1, smg2's id is 2, and so forth); "SecondaryID" (Same but for secondary); "MeleeID" (Same but for melee).
Everything clean: Try to keep everything nice, and not scattered everywhere.

I know that is fairly hard, but I tried so many things but always failed. Try to explain your work very neatly. I want to always be able to go back, and edit it with ease. Thank you for your time!

Do you know code enough to successfuly do this? I am devoloping a fps game [In unity , not blender] , and the way i switch weapons is to disable every gun , Except the one you want active , And for each gun there is a class . When you switch to that gun , that guns class is active , and when that guns class is active and you press buttons then it will do the programmed commands for them. thats the logic of mine

Hm. I do it a similar way all in logic bricks though.

I wish i could help but i only know how to do this inside unity sorry.

@BlenderDev At some point you just need to learn python.

Well I don't know the best place to learn it. I am only 13, so it may be hard; although I have previously learned C#, Java, Lua, etc.

@BlenderDev I've you've done Lua, C# and Java properly, this level of python should be easy. you can learn the syntax from the documentation, Google searches, or free tutorials. You will also have to learn the blender game engine API, but there are a fair amount of resources on that as well.

@BlenderDev Python is a much simpler language than Lua or Java, I simply learned Python from reading the docs on python.org, the starting tutorial is actually quite good as docs go.

That's quite easy to do. You don't even need to use Python, you can do this with logic bricks, properties and messages.
I've got an example .blend here: http://www.pasteall.org/blend/33896
Press P to start.
Change weapons with 1, 2 or 3 keyboard keys. Notice how the wepon is lowered, then changes, and then plays a setup animation. Right now all the weapons play the same animation, but you could make several different ones if you like and link those up.
I've done in a slightly different way than you requested. Instead of adding/removing weapon objects, I've used Replace Mesh to change the weapon, and a active weapon int property. I've found this to work better, and you don't need to worry about having the new weapon follow the character around this way.
You can check for this int and change behaviours for the different weapons (to add different bullets or whatever).
I don't quite understand you requests about a 'Primary' property, but you can add that yourself, no problem.
For actual shooting, just add a Shoot action with some weapon movement and an empty in front of the weapon to emit bullets. These things can be set up to listen to the active weapon and change their behavior.
Hope this works out for you. These things are not really that hard once you get a hang of Properties and Messages. Cheers.

One issue. I have multiple weapons for primary, secondary, and melee. What if you swap to primary and there are multiple types? How do I achieve this?

@BlenderDev Switching between different types is easy... You just say I'm switching between 9 weapons... and build it that way.

I am not saying 9 weapon slots, im saying 3 weapons PER slot.


text:
How to change a primitive's properties after creating it?
I want to model a pistol like this for my FPS:

You can see how the cylinder for the front of the barrel is very low poly. How do I make a cylinder less low poly? Or even a sphere, anything?

What's the point of marking something as a duplicate if you don't link to the other item?

You can edit the polycount of cylinder by playing with the "Vertices"-setting in this interface:

Press T if you don't see this after Adding a new Cylinder.

As an aside, this only works immediately after adding a new cylinder. You can't use this to modify existing geometry.

Yes but in this case, where low poly is wanted it is much faster edding a new Cylinder than editing existing ones. Also the editing part has been answered countless times? I think so.

Agreed. I just thought it best to mention this for the OP in case they don't already know this. This way they won't have to search for why the redo menu is missing :)

While the general title suggests a duplicate question about editing "long-gone" mesh properties... If you want to smooth out a cylinder that already exists, you should use the "Subsurface" modifier and adjust the flat end "mean creases" to 1. You can then bump up the "level" of subsurfacing.


text:
Why are all the textures in my file pink?
I made a character, and its one of my first times texturing, and I saved my character into a new folder, and when I came back to the model ALL the textures were pink, I used to know what to do, but I stopped texturing, how do I bring my textures back?

Pink means that the texture files are missing.
If the texture files are still on your system, then it sounds like the textures are referenced relative to the blend file (the default behavior). This means that if you move the blend file and you don't move the textures, blender won't be able to find them.
There are several things you can do:

Use the Find Missing Files operator in Info > File > External Data to let blender try to find the files for you:

This will give you a file browser with which you can select a directory which you think contains some (or all) missing files. Blender will then recursively search through all files and subdirectories of the selected directory for files with the same names as the missing files.
Note that if the directory is big (contains lots of files and subdirectories), this might take a while. Blender will appear frozen while the operator runs, but don't panic.
With the blend file in the original location (so the textures are loaded correctly), press Make All Paths Absolute in Info > File > External Data,
then save the blendfile. Now blender can find the textures (provided they don't move) no matter where the file is on the system.
Pack the textures into the blendfile. Press Info > File > External Data > Pack into blendfile. This will embed the image data into the blendfile itself, so your file may become rather large. However, this means that blender will always be able to find the textures no matter what (even if the file is put on another computer).
Move the textures to be in the same position relative to the new blend as they were to the old blend. E.g., if the textures are in a directory that is in the same directory as the old .blend, move that directory into the directory containing the new .blend.

Note, in my case, "missing" simply meant that Blender didn't like the file name. MyTexture_1024.jpg did not work, but renaming it to MyTexture.jpg did work.

Pink display means missing texture image. Maybe you forgot to pack the image files or save them to external files, before saving the .blend file and closing Blender.
If that's the case, unfortunately you'll have to re-make the texture images..

Altought this is resolved already, here is a help:
When you open texture tab, find this:

Make sure to change pink color to black. Than it should be fixed, I think...

Welcome to the site :) This is useful information to have here, thanks for adding it. But note that this won't bring the textures back, it will just change the pinkness to blackness instead.

Ohhh that's where the Pink of Doom™ comes from!

@gandalf3 By the way, there is no need to Pack into .blend file always you save game- it is annoying and hard to remember. You can check the box in File->External Data so it does it automaticly;)

@AdriansNetlis. Hi. Please can you tell me where I can find the texture tab? Because in Textures I have brush-texture and brush mask. I can't find the screen what you are talking about.

@Meri On the top you could look for 3 icons - Earth, cube and checkers. Click on cube.
P.S. This is old post, those days I had so low knowledge of Blender. It has grown a lot so this answer made by me seams to be foolish:D

@AdriansNetlis Thank you but I can' find those options. I am in the cube and I have opened every ticker. I'll do the model again. Thank you for answering.

I had a similar issue where the textures disappeared. You should make sure the textures are downloaded. If you save your files in iCloud I suggest you double check the folder with the model and texture.


text:
Object closely follows other object being moved
When I import object B in my scene, It appears at origin 0, near object A (which is keyframed). I cannot seem to move A away from B without B loosely following... What is the relationship at work here? How can I move object A without B being affected?

do you have proportional editing on ?

Yes I do. Please make it an answer so I can upvote it.

Moving, rotating or scaling  an object while the Proportional editing is on will propagate the effect to neighbors objects "or vertices in edit mode" .
you can toggle proportional editing ON and OFF in the 3D viewport from the icon or using the shortcut O


text:
How to import NGONS from Lightwave to Blender?
I don't want meshes to be triangulated. Is there a way to keep Ngons when importing objects from Lightwave into Blender

By default, the OBJ file exported from Lightwave supports N-gons.
When importing it into Blender, it will import Ngons by default. Make sure it is enabled in the Import Window:


text:
Operator arguments - Identification if object names are not unique?
A lot operators use StringPropertys to reference objects by name. This works well for ID datablocks - no duplicate names allowed (although there can be issues with linked datablocks).
But not all objects are of type ID datablock, and unique names may not be enforced. Related operators may take a string for indentification however. Thus you may not act upon the right object.
If names aren't unique, one could use an integer to reference by index. But I wonder if there are any operators, which actually take a pointer to the right object (in C)? Like:
ot->prop = RNA_def_pointer(...);

Is it even possible to use pointers as operator properties? It would mean that python couldn't make any use of it, if I'm not mistaken (or could one pass a python object, and have C code figure out the pointer?).

Operators should never have pointer properties and as far as I know there aren't any that do.
Such pointers would not be valid after deleting objects or after undo/redo steps, which would give problems in the operator history stack when repeating operators for example.
Operators that take datablock names should usually be avoided for python scripting. It's better to edit the data directly than going through operators when possible, there's probably only a handful of cases where you need to do this.

Thanks brecht, makes sense. I encountered transform orientations not needing a unique name, and currently delete based on index number in my mockup code. It is necessary to use an operator 'cause there is no RNA method to create/delete them. It doesn't even take a name for deletion, it is based on context instead. I wondered if there's a better way, at least in C.


text:
Could I straighten the fingers to shape the palm into a flat position using Blender's or any other's software?
I have a 3D scan of a human's left palm. However, the fingers are rolled in/not straightened. I need to 3D print an imprint of a human's palm, but it needs to be flat for it.

you can try to open the hand with the Pose brush in Sculpt mode, not sure the result will be ok, it depends on your mesh

You should post a few images of what you're working with and/or images of what you're aiming for, and if necessary share your blendfile to give us the most info to work with to help solve your question.

If the scan is of a closed hand you are not going to be able to repose it like that. There's presumably nothing inside the fingers. Fixing that would likely be more work than making a hand from scratch

Also 3d scans are notoriously hard to edit and reason with

Gentlemen, thank you very much!


text:
Make custom right click context button only appear in vertex select mode
I'm trying to create an addon that lets you merge at center all the vertices that are in proximity of your cursor (the tool will create a sort of circle selection that moves along your cursor, and all the vertices in the circle will be affected)
This is what I have so far
bl_info = {
    "name" : "Sew Vertices",
    "author" : "bad_lvck",
    "version" : (0, 0, 1),
    "blender" : (4, 10, 0),
    "category" : "Edit mode",
}

import bpy

class SewVerticesOperator(bpy.types.Operator):
    bl_idname = "mesh.sew_vertices"
    bl_label = "Sew Vertices"
    bl_description = "Merge at center all the vertices inside a circle selection"
    bl_options = {'REGISTER', 'UNDO'}

    def __init__(self):
        self.draw_radius = 1

    @classmethod
    def poll(cls, context):
        obj = context.object
        return (
            obj and obj.mode == 'EDIT' and
            obj.type == 'MESH' and
            context.tool_settings.mesh_select_mode[0]
        )

    def execute(self, context):
        #Placeholder

def draw_context_menu(self, context):
    layout = self.layout
    layout.operator(SewVerticesOperator.bl_idname)

def register():
    bpy.utils.register_class(SewVerticesOperator)
    for f in bpy.types.VIEW3D_MT_edit_mesh_context_menu._dyn_ui_initialize():
        if f.__name__ == draw_context_menu.__name__:
            bpy.types.VIEW3D_MT_edit_mesh_context_menu.remove(f)
    bpy.types.VIEW3D_MT_edit_mesh_context_menu.append(draw_context_menu)

def unregister():
    bpy.utils.unregister_class(SewVerticesOperator)
    for f in bpy.types.VIEW3D_MT_edit_mesh_context_menu._dyn_ui_initialize():
        if f.__name__ == draw_context_menu.__name__:
            bpy.types.VIEW3D_MT_edit_mesh_context_menu.remove(f)
            return

if __name__ == "__main__":
    register()

As you can see I'm checking that the mesh select mode type in the poll function of my operator class is vertex select, but having edge select or face select doesn't make the button disappear from the right click context menu, it simply makes it unclickable. I know it's possible to make it completely disappear because the right click context menu has different options based on which mesh select option you're using.
How can I fix this? Thanks in advance.


text:
Clone Trooper Face model
I've seen a lot of very accurate clone trooper face model photos online recently, like the one by High Ground Animations. Does anyone know where they got the model for the face, or did they sculpt it themselves?

The Blender StackExchange is for usage questions, so it's not the place to ask for help with finding third-party resources. Try the Blender group on X, the Blender Artists Forum, or a search engine.


text:
How to non-uniform scale this mesh?
I am trying to widen the flat face.

maybe try in Sculpt mode, mask the parts that you don't want to move? You can share your file here: https://blend-exchange.com/

In edit mode, press O to enter Proportional Edit mode, then use the mouse wheel while transforming to change the falloff. Docs

Or what nobody mentioned so far: to scale only on Y and Z axis in this case, press S to start scaling and then Shift+X to lock the X axis. Combine this with the Proportional Edit mode which @Jakemoyo mentioned to have a smoother transition between scaled and non-scaled parts. (If you wonder, the difference to Jakemoyo's approach is that in his example the object will also be scaled on X, what you maybe don't want).


text:
Final render different than preview, black artifacts appear
Update: Added edge split modifier, now it works. I don't understand any of this.
I'm going crazy over this. Tried rendering in 2.75 and 2.76b. Same result.
I have this piece of a sword that just looks completely different on the final render than on the preview. And all the "render" vs. "view" settings are completely identical. And there are no object that render but are hidden or vice-versa.
The material is a mix of anisotropic and glossy, in the top right you can see the rendered .png and at the bottom it's my 3D view in render view. Do you see the black artifacts? They just won't go. I tried messing around with the subsurf modifier or rotate the mesh, but some black crap always appears anyway.

Just have a look at this. How come is the final render so different from preview in this simple case below?! (just Fresnel->Emission)

I don't understand what's going on. I thought the final render ought to be the same as preview in general. Let me repeat: subsurf has 3 subdivisions for the "View" and also 3 for the "Render". That's not where the difference's coming from.
Please, help me!

Ok, but it tells me I have to wait 1 more day until I can accept my own answer. Guess that's because I don't have much reputation/karma here.

Thank you for the friendly tips. I would surely elaborate on the issue, if I could, but I already said everything I know. I don't understand this problem and why  the fix fixes it :/ Cheers!

Added Edge Split modifier, as suggested in a similar question -->here<--. Now it works.


text:
Weird bmesh performance when creating new vertices
I have 2 different meshes with roughtly the same amount of faces/verts. In the first case I only have 1 object in blend file, in second case around 80. This is the only difference I can think of, in both cases verts don't have any layers associated with them, and no other things I can think of.
I'm running a script on both, that add roughly the same amount of vertices. I was measuring only the calls to mesh.verts.new(), and the results were quite funny. In the first case creating roughly 200k verts took 3.5 seconds, in second case 45.5 seconds.
So the question is, what can cause such a huge difference in performance when doing something as basic as adding a vertex?

edit
The script is pretty straightforward, I'm grabbing a mesh by calling bmesh.from_edit_mesh(), then according to some logic (which is irrelevant, since I'm measuring only calls to mesh.verts.new) I call mesh.verts.new around 200k times, then I call bmesh.update_edit_mesh. So that's 1 update total. Basically it's a subdivide operator I wrote, because my mesh is a hexagonal grid and blender doesn't cope well with subdividing hexagons

Please show your script or some synopsis of how many times you are updating the screens in update() or by user operations.  There are discussions here at BSE about performance related to updating the screen minimally.  When performance is important and has degraded you may choose to switch you style of script to reduce updates to close to 1 update.  You may need to inspect your python/algorithm for performance which might come in flavors of time proportional to N, N * N, N *lg(N), or other, where N is the number of vertices.

The script is pretty straightforward, I'm grabbing a mesh by calling bmesh.from_edit_mesh(), then according to some logic (which is irrelevant, since I'm measuring only calls to mesh.verts.new) I call mesh.verts.new around 200k times, then I call bmesh.update_edit_mesh. So that's 1 update total. Basically it's a subdivide operator I wrote, because my mesh is a hexagonal grid and blender doesn't cope well with subdividing hexagons

Straightforward is when it gets scary.

Can from_pydata be used for modifying an existing mesh, or only creating new one?

from_pydata expects an empty mesh.

Ok, thanks for suggestion. I'll try to do it in a way I first empty my mesh and then add all the new vertices in bulk

here's one silly way to do it :)  https://gist.github.com/zeffii/cad08a04c491bfcbbe1e


text:
When I Pose my Armature, the Mesh Attached "Fractures"
I add armatures,
Ctrl + P,
    -Armature Deform
       -With Automatic Weights
It's looking pretty good so far:

Then, I try to pose my newly rigged character mesh:

What happened here?
The render looks like this:

Naturally, in an animation this would look awful, so I'm trying to find out how to prevent this.
Maybe I'm rigging it incorrectly?
Maybe I need to add some sort of modifier?

It called a torn ACL. he needs reconstructive knee surgery. (why is this a blender question?) :D

Is it made of separate objects?

You should add some manual weighting:
Your procedure has created two new vertex groups: one named "bone", another named "bone.001".
Every vertex of your model will have a property called "weight" (range 0.0 - 1.0) for every vertex group associated to every bone of the rig.
If a vertex is weighted 1.0 to bone and 0.0 to bone.001, it moves along with the first bone and is not influenced by the movemets of bone.001.
If the two weights are both 0.5, the vertex will be moved by both bones, in a blended way.
There are many ways to assign the weight to a vertex, i.e.you can select a group of vertex in edit mode, then assign them to a vertex group specifiing the desired weight. Another popular but a little bit tricky method is to use weight paint mode.
Start your manual trimming of weights by assigning the vertex of that kind of "finger" coming out fron the knee, to both bones, not only one as it seems from the picture. Try to have all vertex with a total sum of 1.0 weight (1.0 - 0.0, 0.2-0.8, 0.5-0.5, etc .....)
Search for more info about "skinning".


text:
Batch exporting of multiple objects into separate STL files
I have as scene with 45 objects, I am trying to write a script that will export all of the objects into separate STL files. Any ideas?
Here is a broken script I have right now:
import bpy
import os

# get the current path and make a new folder for the exported meshes
path = bpy.path.abspath('//1')
os.makedirs(path)

for object in bpy.context.selected_objects:

    # deselect all meshes
    bpy.ops.object.select_all(action='DESELECT')

    # select the object
    object.select = True

    # export object with its name as file name
    bpy.ops.export_mesh.stl(filepath=str((path + object.name + '.stl')),   use_selection=True)

I am getting a "Python script fail, look in the console for now..." error.
PS. I'm using a mac.
Thank you for your help!!!

It is worth noting that a script is not required for batch exporting of STL files; the Export STL dialogue has a Batch Mode setting that can be set to Object in order to export each part as a single STL file.  To preserve part names, leave the File Name field empty when exporting this way.
Regardless, the question specifically addresses a Python script.

There is no need to loop through selected objects.  Additional, unnecessary use of bpy.ops should be avoided.
The following script will export all of the selected objects into a specified directory (relative or absolute path):
import bpy
import os

# Define Directory
dir = bpy.path.abspath('//subdirectory/')

# Create Directory (If Necessary)
if not os.path.exists(dir): os.makedirs(dir)

# Export STLs
bpy.ops.export_mesh.stl(filepath = dir, batch_mode = 'OBJECT')

while a single line of code will suffice if the directory is known to exist (absolute path):
import bpy

# Export STLs
bpy.ops.export_mesh.stl(filepath = 'C:/stls/', batch_mode = 'OBJECT')

Note that these scripts will use the exporter's default settings (which can be changed) unless you add arguments to the operator.

I actually found 3 issues with the original script:

Your path creation line did not check to see if the path already existed
Your stl export line used an incorrect parameter ("use_selection=true")
Your path variable did not include the ending backslash so it was concatenating the stl folder name and object name

Here's my version of the working script:
import bpy
import os

# get the current path and make a new folder for the exported meshes
path = bpy.path.abspath('//stlexport/')

if not os.path.exists(path):
    os.makedirs(path)

for object in bpy.context.selected_objects:

    # deselect all meshes
    bpy.ops.object.select_all(action='DESELECT')

    # select the object
    object.select = True

    # export object with its name as file name
    fPath = str((path + object.name + '.stl'))

    #bpy.context.active_object = object
    bpy.ops.export_mesh.stl(filepath=fPath)

Hi Todd! Thanks for helping me out, I copied the script from somewhere else and only changed the bpy.ops.export_mesh.stl part ^^

You should also note that I altered the path variable to test the script, so you may want to change that part.

I get AttributeError: 'Object' object has no attribute 'select' with this script from the line object.select = True when I try to run it with Blender 2.93.

use_selection=True , is not a keyword argument of export_mesh.stl
- stl()
bpy.ops.export_mesh.stl(
    filepath="",
    check_existing=True,
    axis_forward='Y',
    axis_up='Z',
    filter_glob="*.stl",
    global_scale=1,
    use_scene_unit=False,
    ascii=False,
    use_mesh_modifiers=True)

it appears to work on the Active object, so you might use something like this:
import bpy
import os

# get the current path and make a new folder for the exported meshes
destination_path = '/home/zeffii/Desktop/temp_stl/'

# if path doesn't exist, create, else skip that step
if not os.path.exists(destination_path):
    os.makedirs(destination_path)

# gather names
names = [o.name for o in bpy.context.selected_objects]

# deselect all
bpy.ops.object.select_all(action='DESELECT')

# iterate over named objects
for name in names:

    # select the object
    obj = bpy.data.objects[name]
    bpy.context.scene.objects.active = obj

    # export object with its name as file name
    stl_path = os.path.join(destination_path, name + '.stl')
    bpy.ops.export_mesh.stl(filepath=stl_path)


text:
Is it possible to apply a bezier curve along a mesh?
Is it possible to apply a bezier curve, along the surface of a mesh?

Could you give more details on how the curve would be applied? Would this add new geometry or deform existing?

Is it possible you intended this the other way around, while this is valid, it would make more sense the other way.

Hi, welcome to blender.SE. Your question isn't very helpful to those of us wanting to answer it. Please add details to the question rather than repeating the title over again.

We need more details!

No offense, but it seems pretty straight forward to me. No I don't mean the opposite, I want a curve on a mesh.

Yes, you can use the Shrinkwrap modifier. Select the curve and add the modifier to it, then as its target, select the mesh. It will snap the curve to the surface. The settings are pretty intuitive so to get a nice result you can just tweak the settings. Try changing the Mode to get a bit more control over how the curve is projected.


text:
Warp time with rigid body physics?
Is it possible to warp time (slow time down, speed time up) with rigid body physics?

Yes, this is possible.
3D view physics:
Animate the Speed value in Properties > Scene > Rigid body world:

You can add keyframes for this value by right clicking and selecting Insert Keyframe, or by pressing I while hovering over the field. See this question for more detail.
Game engine physics:
Change the FPS value in Properties > World > Physics:

Thanks, this seems to have worked. Never even thought about going there...

Note that you may encounter some issues while doing this, see here.


text:
How can I emulate old photo cracks and creases procedurally?
This is the reference photo I've been using, and after a few attempts at it myself I wasn't able to get anything I was happy with.

Essentially I want to be able to add an image into the Shader node network (or Compositor), change the seed, and have a result similar to the reference.
I'm sure there is an answered question or a tutorial for this kind of thing, but I've looked around quite a bit and couldn't find anything.

There is several types of cracks and scratches in your reference image ... some are easier to handle than others.
The simplest ones "empty maps" ... the key here is probably Musgrave texture node with low Dimension value ...

Secondly cracks that can be handled by Voronoi texture ... here it comes very sensitive in therm of value setup to get wanted result ... so something like this ...

Value node is used in "Seed" meaner.
Small painting cracks, seen at hairs (right bottom side), are the most difficult for me, but some similarity can be achieved by Voronoi > Minkowski ...

The trick to generate lines I could use Mapping node with some translation, but keep the nodetree light I used slightly different Randomness to let Compare node do its job.
Voronoi > Minkowski seems to be useful for other kind of damages - liquid or mold things (usually tinted to to brown paper) ...

With a small change of Scale value (here from 1 to 2) became like a paper damage, that can be used for Transparency and Normal factor ...

... final combination of those structures depends up to you :)
Before

After

To give final result a bit of thickness for cracks and creases you can combine all types to be reused into Height map

This is an exceedingly useful and comprehensive answer, thank you for sharing it with the community.

Really impressive :)) bookmarked

@JachymMichal ... also "really" value fragile :)


text:
How can I quickly create a low poly heap of rocks?
I want to create a heap of rocks that looks like this:

I can't come up with a technique how to do this. I tried to create a conus and randomize its verticies, but I got this:

I tried to subdivide the conus and use proportional editing to get rock shapes, but I got a strange looking result. The only way I see it is to create a few rocks and place them in a heap, but it's too long for me. I thought about physics simulation, but in that case I won't get the required shape, and I suppose it's overcomplicated. How can I do it?

Start with an Icosphere with one level of subdivisions. Maybe scale it down on one axis to make it more squat.

Add a displace modifier with an empty object as the coordinates and a cloud modifier as the texture. Default settings on the texture work fine. Play with the displace strength.

Then add a subsurf,

and a Decimate with the method set to Planar. Crank the degrees up pretty high (like 25 or so)

If you want to leave it here for a more cartoony look you can, or
You can Remesh it, Smooth it and then Displace again if you want to build on the level of detail. Repeat the process as many times as you want or your computer can handle.

Once you get something you like you can duplicate this object as many times as you want with free variation.

Put those into a collection labeled "rocks".
Add another Icosphere like before, delete the bottom half, scale the bottom edge loop out a bit and get it into an overall "Mound" shape.

If you want you can add a Displace modifier like before to give it some free random variation.
Then add a geometry nodes modifier to this mound object. And give it a setup like this.

Most of the values on each node, you just play with til it looks right.
I also duplicated the geo in edit mode and scaled it down to give it an "Interior" layer of rocks as well.

That gives you something that looks like this.

Whats cool again is that this is all procedural, so you can tweak it like crazy and get all kinds of variation.

Add some materials and you get something like this.

OMG, it's awesome! Thank you.

There's a rock generator addon built into Blender if you're using version 2.8 onwards. In Preferences > Addons, just search for 'Extra' and enable Add Mesh: Extra Objects. You'll then find the Rock Generator entry on the Add menu. There's a YT video on how to activate and use it here.

@Jakemoyo i noticed u used an icosphere. does it produce a better result than using a cube turned into quad sphere?

@HarryMcKenzie for some reason yes. I think it has to do with the way a Cloud Displace works on a plain icosphere, since each plane has to stay planar it lends itself toward more rock-like results.

You can see the difference here. It's definitely possible to get the same effect with either/or but I think an Icosphere get's you there with less hassle.


text:
Why does this mesh look different in object and edit modes?
I have a mesh without any modifiers and applied scale:

But when I'm trying to use edit mode, it looks different:

Where could the problem be?
Here's the blend file:

Hello, it looks like you have 2 meshes or objects overlapping, could you please share your file?

It seems that you have two objects very close to one another. The one with nails is very slightly "under" the one edited. Changing mode is recomputing the display. So perhaps, the numerical truncation is changing which mesh is rendered "above".

@moonboots yes, it is. I'm trying to create stockings, so I need to see all the meshes.

Couldyou please share your file?

@StefLAncien I've tried to hide mesh which is above, but main mesh still changing it's geometry.

"Main" mesh is foot or stocking ? It is very difficult to figure out what is happening "under the hood" because collection "Mercy" in collapsed. You could have there many things that could interfere...

@StefLAncien main mesh is stocking, and it is above foot.

Could you provide your Blender file using https://blend-exchange.com/ ? Please remove everything that is not visible in the provided views, still preserving the problem.

@StefLAncien yes, I've added it to question.

@moonboots I've finally added blend file to question. You can check it out if you want to.

Try and disable Shape Keys in the Object Data Properties ?

@StefLAncien yes, that's the right answer, thank you.

You have created 2 shapekeys, bring their values back to 0 and select the Basic shapekey if you want to edit the original mesh:


text:
Generate multiple renders of same scene, each at a different resolution?
I would like to generate several renders of a static scene, each render being a different size (eg 1024x1024, 512x512 etc). Other than the size, each render will be identical.
Is there a way of doing this using, say, the command line, or a script? I am currently doing this by manually changing the dimensions within the render panel every time, but I was wondering if there's a quicker way.
I am using Blender Internal in this specific instance.
Many thanks

Both great answers, many thanks user320 and tobkum.

You could also render the maximum size and then plug some Scale nodes into the compositor followed by File Output nodes. That way you only have to render once, and the smaller resolutions will be generated by the big one. (set the Scale node to Absolute and choose the size in the X and Y fields below)

@user320 True, I figured from the original question that this might work in that case, since he gave the examples 1024x1024, 512x512 etc.

@user320 You could also make sure you have a large enough render to encompass all the different sizes/aspect ratios, then crop/scale in the compositor

If all outputs are the same aspect ratio I would scale down to another file in the compositor. If I was after multiple aspect ratios I would combine this with @user320 answer of multiple scenes. Probably two scenes one for 4:3 and one for 16:9 with possible camera adjustments to ensure good framing.

I have used the following script from my toolbox to address a similar problem. I have adapted my script as per your question.
import bpy

# Original scene
source = bpy.context.scene

# Resolutions at which to render wedges
resolutions = [100, 50, 25]

# This list will contain the wedges to be created in next step
wedges = []

# Create the wedges
for i in range(0, 3):
     bpy.ops.scene.new(type='LINK_OBJECTS')
     scene = bpy.context.scene
     scene.name = '{0}.{1}'.format(source.name, i+1)
     scene.render.filepath = '//{0}.'.format(scene.name)
     scene.render.resolution_percentage = resolutions[i]
     wedges.append(scene)

# Set the screen to display the original scene
bpy.context.screen.scene = source

# Render the wedges
for scene in wedges:
    bpy.ops.render.render(write_still=True, scene=scene.name)
    bpy.data.scenes.remove(scene)

del wedges

You can copy/paste this into a text editor in a running session of blender, save the bland file with your scene setup, and then hit ALT+P in the text editor to run the script.

This script can also be used to render from the command line like so
blender -b filename.blend -P wedges.py

Satishgoda, I have only just seen this reply to my original question. I wanted to thank you very much, as well as the other contributors, for such helpful replies. Thank you - your script works beautifully!

I have updated the script for Blender 2.83
I change resolution_x,y rather than resolution_percentage since the percentage is locked to integers which caused problems when I rendered at 1/8th scale (12.5%)
Just press the Play button in the TextEditor to render.
import bpy

def MultiRender(outputDirectory, outputFileName, resolutionMax = 1 , resolutionMin = 6):
  #                0     1     2      3     4     5     6    7   8    9   10  11  12
  pixelCount = [4092 , 2048 , 1024 , 512 , 256 , 128 , 64 , 32 , 16 , 8 , 4 , 2 , 1]

  bpy.context.scene.render.resolution_percentage = 100

  for i in range(resolutionMax , resolutionMin + 1):
    bpy.context.scene.render.resolution_x = pixelCount[i]
    bpy.context.scene.render.resolution_y = pixelCount[i]
    bpy.context.scene.render.filepath = outputDirectory + (outputFileName % pixelCount[i])
    bpy.ops.render.render(write_still = True)

MultiRender('C:/Users/Name/Desktop/' , 'render%d.png')


text:
how do I create a sprite with hard (aliased) edges, but still be antialiased inside?
This question came up in the irc channel yesterday.  The fellow had a model he was turning into a sprite for a 2D game.  He wanted it to be aliased inside, but have a hard (aliased) edge.
Getting transparent images is easy.  Go to the Render Properties panel and set your Alpha to Transparent and make sure the file format is saving RGBA channels.

Getting a hard (aliased) edge is easy.  Turn off Anti-Aliasing in the Render Properties.  This gives your model hard edges, even in the internal pixels.

Now if turn on anti-aliasing you get soft edges, both inside, and outside.

How do you get hard edges on the outside, but soft edges inside?

Related: How to save an image without antialiasing in cycles?

@gandalf3 Where is the anti-aliasing option in Blender 3? I am trying to render an emission object in front of a transparent background and I get black/grey pixels on the edge... :(

@MicroMachine This question about the old Blender Internal engine which is no longer in blender, for modern blender the closest setting is this: https://blender.stackexchange.com/a/3554/599 (though its not perfect). For getting aliasing on top of a transparent background, this composite node setup should be applicable: https://blender.stackexchange.com/a/3301/599

@gandalf3 I did this and I got this problem is still there

@MicroMachine Ah yeah, it isn't perfect and the higher the samples the more it gets smoothed. The scrambling distance multiplier can also help, though it is also not perfect and may introduce other unwanted effects. Instead you could perhaps try the node setup in the accepted answer?

This answer was composed based on help from several individuals in the #blender IRC channel (you know who you are).
The first step is to use blender's Compositor.  Start out by clicking the Use Nodes checkbox.  That should create the two-node pipeline that does nothing exciting.  Route the alpha channel through Math node (available through the Converter submenu of the shift-A menu) configured to do a Greater Than operation against 0.001.  This means that an alpha of 0 will remain zero, but an alpha of 0.001 or higher (and 0.001 < 1/255)  will be converted to 1.

The problem that remains is that the edges that otherwise would have been translucent are now kind of dark.  That's because the Image channel coming out of the Render Layers node is premultiplied.  To correct for this, add an Alpha Convert node (available under the Converter submenu) and route the image channel through that on its way to the Composite node.

Now your edges are hard and they match the thresholded alpha channel.


text:
Settings to fill an open container with objects
I am trying to create a natural arrangement of rubber thimbles in a jar.  What is the easiest method of doing this?
I've tried various settings with the jar being passive and using the various collision types like box, cylinder and mesh but none seem to work.
I tried dropping the thimbles into the jar but they either stop early and spill over or go through the jar! Is it better to use some sort of particle distribution? Thanks.

You can use rigid body physics to do this, make sure of the following:

All modifiers that you want to affect the simulation are applied

The jar has thickness

The jar is set to Mesh collision type to allow objects inside of it

You may also want to enable Split impulse in Scene > Rigid body world to prevent intersecting objects flying apart at high speed.

To arrange the thimble objects above the jar you could use the Randomize Transform tool (Space> Randomize Transform)
Once you have simulated the objects falling into the container and you want to remove the physics but keep the location/rotation for a specific frame, you can do this by:

Select the objects you want to bake into posistion

Press Bake to keyframes in 3D view > Tool shelf (N) > Rigid body tools and set the Start and End frames to the frame you want to keep:

Press OK. This will remove the rigid body physics settings from all selected objects, and add a single keyframe on the specified frame.

You can then remove this keyframe (AltI).

Result:

Could you expand this answer a little bit? I'm having trouble figuring out how to toss the animation of the physics simulation to keep just the static conclusion; I don't understand the last sentence of this.

@ajwood That page is talking about using BGE physics. See this post for getting rid of the physics settings


text:
C3D Importer does not work, Context is incorrect error
I'm trying to import a *.c3d motion capture file into Blender, but when I click the Import C3D button, I get the following error:

What is wrong?

Make sure you are in Object Mode before you import!
You could also add a mode switch command to the import script:
bpy.ops.object.mode_set(mode='OBJECT', toggle=False)

After months of blender, and years of CAD experience, I still find Blender's logic very strange. Thanks, I will try that and let you know :)


text:
Get smoke simulation to observe emitter's pose?
Right now I am making a model of a wind elemental in blender, and was trying to use the smoke simulation to make a small whirlwind that swirls around its main body.
However, the smoke simulation doesn't appear to observe the emitter mesh's current pose.  Rather than emitting from the model itself, it appears to emit from an invisible figure in a T-pose.
Is there a way to correct this problem, or is this something I should file a bug report on?
EDIT: I've rendered the first frame of the smoke simulation to show where it starts off from, in order to better demonstrate the issue:

It looks pretty low resolution. If you increase the resolution of the smoke sim, does that improve the result?

Yeah, already tried that, didn't work.

Also just now tried using key frames, to make it transition to the crouching position, but that didn't work either :-/

Is it possible you could upload your .blend? I just tried rigging a cube and using that in a smoke sim and it worked fine.

I had actually just uploaded a separate .blend file to blendswap, which also displayed the issue:  http://www.pasteall.org/blend/25773

As a note, this happens both with a manually-created smoke system, and by creating one automatically from Object->Quick Effects->Quick Smoke

What version of blender are you using?

I'm using version 2.69

I have looked at everything I could think of and I don't see any difference between the files. Here's the file I made which is working, does it work for you?

Yeah, I tried using your file and did work for me, but I am at a loss as to why.  What version are you using?

2.69.. This is really strange..

Okay, at this point, I'm assuming it's a bug and will post a report for it.

At this point, I've determined that the issue is a bug, possibly a platform-specific one, and will be reporting it on the mantis bug tracker.

One additional note: I had no trouble getting it working on Blender 2.66a, which I believe is nearly a year old.

I know the smoke sim has changed a lot recently, but it used to have a modifier on the modifier stack. It's possible that your smoke sim's modifier is above the armature modifier in the modifier stack, IWC the smoke sim is getting calculated, THEN the pose is getting calculated.
It also looks like the t-pose figure is a little bigger than the other. If that's the case, you should make sure your scale is applied on the model and the rig.
Hope that helps!

Yeah, I already have the smoke sim's position below the armature modifier in the stack, it had been added to the very bottom of the stock.  And the reason the t-pose figure appears bigger is because the model is posed in a semi-crouching position.  I did check and the bounding box for the smoke domain did not have its scale applied, though applying the scale did not change anything.

Hmmm, I can't think of anything else, except that it's just not supported...which I find difficult to believe. I hope you figure it out :-/

I see no problems emitting smoke from an animated mesh if the armature modifier is before the smoke. If the modifiers are moved after the smoke sim has been baked you will need to free the bake to see the changes.


text:
Cutting holes into a flat surface
So, I have this square, and I would like to add a lot of little holes to it.  Something like this:

Say, ports from a wire or something.  But, alas, when I try to move the port back into the square object:

The original face of the square remains stoically in place.  How to I put round holes in a flat face?
Thank you in advance.

There are several ways to go about this, most common and easiest is to use a boolean modifier. Select the plane and add a Boolean modifier to it, In hte Object field, select the object you want to stamp holes with (ie some cylinders joined together) and change the Operation to Difference. Next apply the modifer, delete or hide the cyclinders then Tab into Edit mode and box select the botton half of the mesh that protruded down and delete these.

If your mesh has thickness, you can just delete or hide the cylinders after applying the boolean modifier.

You can also further read up on some more techniques here http://www.blendernation.com/2013/07/14/8-methods-of-cutting-holes/.


text:
Subsurf adaptive on smoke?
I have a big smoke simulation that's all baked and has been rendering for awhile. I just saw Blender Guru's video about adaptive subserf and was curious to know if it's possible to apply this to physics. It would save me a tremendous amount of time If I could render on my GPU!

Adaptive Subsurf is meant to change density of a mesh (as regular Subsurf). You can't control smoke by this as smoke is a Volume simulation.

Shoot. Forgive me for sounding like an idiot!

If you ask me I think this was good way of thinking, something like adaptive smoke would be really great. But then I see that the whole sim should take a place and then some tesselation could be done. So this is pretty pointless.


text:
How can I make a pill shape? (capsule)
Is there any easy way to make a basic shape that looks something like this?

Yes, you can do it in a few steps:
(updated as per PG math's advice)

Add a sphere Shift-A>Mesh>Sphere
Enter edit mode Tab
Set the shading to smooth
Grab one end, including the middle loop (use Numpad 3 to go into side view and Z to be able to select vertices on the other side. Then hit B for box select to get everything except the middle loop.)
extrude it up using E.

Result:

Bonus:
How to add the ridge:

Use Alt-RMB to select the desired loop, you'll have to do this twice, once for each side.
Deselect the vertices at the ends of the pill
Use Ctrl-B to bevel the edges, make it a very very small bevel
in the F6 menu, set the number of cuts to 3.
Select the middle cut and scale it out a bit, use Alt-S
Add loop cuts to the edges loops around the edge to help keep the smooth shading correct.

For the first part you can simply select the top half of the sphere and hit [E].

@PGmath Good catch!

I always forget you can extrude whole portions like that too. :)

If you enable the Add Mesh: Extra Objects add-on

you'll be able to add a "Capsule" primitive.

Parameters such as resolution and dimensions can be tweaked in the operator panel at the bottom of the tooshelf.

@GiantCowFilms posted a great answer, and I would recommend reading that, if you haven't already.
It should be mentioned, though, that Blender has a built-in "capsule" metaball.
Simply press shift-A, hover over "Metaball", and you'll see the "capsule" shape there.

Note that this is a different kind of shape,
and should probably be converted to a mesh using Alt-C.

i dunno what the hotkey changed to in 2.81, it can be found in the spacebar menu under 'convert'


text:
Render grass blades defined by numpy array
I am new to Blender and I have a pretty basic question. I have a 3D numpy array of grass vertices that I would like to load and render in Blender. This is what I would normally do with numpy and matplotlib:
from mpl_toolkits.mplot3d import Axes3D
from mpl_toolkits.mplot3d.art3d import Poly3DCollection

data_folder = '../data/seville/'
world_name = 'world5000_gray.mat'

matlab_world  = sio.loadmat(data_folder + world_name)

X = matlab_world['X']
Y = matlab_world['Y']
Z = matlab_world['Z']

grass_verts = np.dstack((X, Y, Z))
p_grass = Poly3DCollection(grass_verts,
                           array=colours[:,0],
                           edgecolor='none',
                           cmap=grass_cmap)

…some code missing…
The question I have is, how do I do this from within the Blender scripting environment?

are those vertices something like a position of each leaf of grass?

related http://blender.stackexchange.com/questions/2407/how-to-create-a-mesh-programmatically-without-bmesh/2416#2416 possibly duplicate

If the linked Question above doesn't answer your problem please update your question with more information describing what you would like to be able to do.

@zeffii I appreciate your help and I think that the link you referred answers my question very well.  Thanks.


text:
How can I get all materials which are using an ambient occlusion node?
I'd like to get all materials using an ambient occlusion (AO) node and return their names in the console:
import bpy

mat = bpy.data.materials
for mat in mat:
    mat_name = (mat.name)
    ntree = mat.node_tree
    node = ntree.nodes.get("Ambient Occlusion", None)

    if node is not None:
        print("Material With Ambient Occlusion:", mat_name)

It works fine for the start up file, but when I run it in another scene I get this error:

AttributeError: 'NoneType' object has no attribute 'nodes'

What is wrong? And why does the code only work for the start up file?

Not all materials have an associated node_tree. This is only present where the 'use_nodes' checkbox has been used as this creates the node tree.
Your problem is that one or more material does not have a node_tree. The solution is to include a test before the ntree.nodes.get() to first check that there is actually an attribute 'nodes' - and to simply skip that material if none is found:
import bpy

# Run through all materials of the current blend file
for mat in bpy.data.materials:
    # If the material has a node tree
    if mat.node_tree:
        # Run through all nodes
        for node in mat.node_tree.nodes:
            # If the node type is Ambient Occlusion
            if node.type == 'AMBIENT_OCCLUSION':
                # Print the name of the material
                print("Ambient Occlusion Node found in:", mat.name)

Thanks to @brockmann for the great edit to improve clarity.

Thank you!it's fixed!


text:
How do I detect when an object is at a certain coordinate using Python?
In Python, I want to make it so the background changes when my object moves to a certain coordinate. The only idea I had was using an if statement like,
if (turtle.position() == (100, 100):

    wn.bgpic("test1.png")

But it doesn't work. How can I do it?

To the left of turtle you have an unnecessary unmatched bracket.

You can use a driver to control material node properties for your world material:

Rigt-click on the property you want to control an click Add Driver. It will give you a terribly inconvenient floating panel that disapears every time you move your mouse away:

You can work from there calling it back by right-clicking the driven property and choosing Edit Driver, or you ca open the Drivers panel:

You will need to disable that little mouse icon for Only Show Selected and find your value in the list, then add all transform channels as variables that you can then write your expression with. It can be a boolean expression in my case since I want the Mix factor to be only 0 or only 1 so I made it that when all(x,y and z) coordinates are negative, the expression would be True that is also 1 (x<0 and y<0 and z<0), but you could write more conditions to define any region in space.

I see two problems.

You are using only two coordinates, you might want to add a third one z to make it work, because your are in 3D.

Unless that you force it, the turtle is never going to be at exactly the point (100,100,0), it will be enough close. Here is a code to implement this idea (how close you want it is measured by eps).

Here is an example of hown you can make this work.
target=(100,100,0)
eps=0.1
if turtle.position[0]>=target[0]-eps  and turtle.position[0]<=target[0]+eps and turtle.position[1]>=target[1]-eps and turtle.position[1]<=target[1]+eps and turtle.position[2]>=target[2]-eps and turtle.position[2]<=target[2]+eps:
         print("Turtle is at target")
         bpy.ops.object.load_background_image(filepath="HERE YOU SHOULD WRITE THE FILE PATH OF YOUR IMAGE")

A variant of Martynas Žiemys' answer, perhaps easier for many:
Go to Shading tab, select the object of interest, Open Numbers panel, Switch the node editor to World mode:

Create a node setup like this, by dragging your $\color{green}{█}\color{#888}{0█}$ left mouse button from sockets and searching for Mix RGB node, Math: Less Than node, Vector Math: Distance node. Remember to set the colors in the Mix node:

Now use 3 drivers, to drive the first X, Y, Z fields of the Vector Math node, by the X, Y, Z fields of the object's location. You do that by $\color{#888}{█0}\color{green}{█}$ right-clicking a source field, choosing Copy as New Driver, then $\color{#888}{█0}\color{green}{█}$ right-clicking the destination field and choosing Paste Driver:

This already works, though you may want to adjust the second X, Y, Z fields or the Math: Less Than threshold.


text:
Simple Python script to be able to change the number of samples in a Blender startup script
I have tried writing a simple script to set up de-noising and a render sample of 100 on Blender 2.93 with a simple cube animation.
bpy.context.scene.cycles.samples = 100

The reason is that we want to be able to quickly override the preset samples in .blend files that are uploaded on our server without having to reupload each time.
I've tried many different variations of this start-up script from many different forums, but the samples always remain how they are set in the file (in this case two samples)
 .\blender -P 100_samples.py -b "cube_animation.blend" -o "\001\####" -a

I tried following the advice here How to change render samples using python, but it is too complex a solution for what we need, and I can't extract the line(s) that are necessary.

.\blender -P 100_samples.py cube_animation.blend first runs the script, then opens the .blend file.
.\blender cube_animation.blend -P 100_samples.py first opens the .blend file, then runs the script.


text:
How can I see where a mesh is open?
I have a mesh that is supposedly open, but I can't see any holes in it. Is there a way I could find where they are?

Under the menu Edit > Preferences > Addons tab, search the addon 3D Print Toolbox and enable it.
Back in the viewport, ↹ Tab into edit mode. In the Sidebar > 3DPrint tab, Analyze panel, hit the Solid button.
It should show you "non-manifold edges" in the "Results", you can click it to select the edges:

Alternatively, if you don't want to bother fixing holes manually, you have the "Make Manifold" button under the Clean-Up sub-panel:

If there's a hole in your mesh, that's someplace where the mesh is "non-manifold", and you can use a Select Non Manifold operation in Edit Mode via menu Select > Select All by Trait > Non Manifold, in either vertex or edge select mode, to quickly select all such boundaries:

You can see on the operator panel that I've disabled all but Boundaries, which gives me the borders between holes and mesh.  Other aspects of being non-manifold are just as important (more important, really) than boundaries, so odds are that if you need to fix boundaries, you need to fix everything else as well-- you might consider selecting all non-manifold, regardless of subtype.  (But "extend" isn't a subtype, it just means, add whatever gets selected to any existing selection.)
Once selected, you can quickly Zoom To with NumPad . (numpad period) the selected, and/or hide all but the selected (Shift+H).


text:
How do I recreate this holes pattern?
I been trying to recreate this pattern, but can not get my head around it. I recreated the upper pattern, but I couldn’t get it on the plane, and even if I did, I have no idea on how to add the other holes. Do I need more geometry?

it looks like the main pattern is something like that, so create a grid and select all these vertices:

Bevel with CtrlB and V:

Then subdivide and right click > LoopTools > Circle:

Delete the faces:

how about the small ones ? i want it to be as similar as possibile i dont want to just make holes ther, and with you method i would have to connect all the vertics right ?

You need to keep working on it afterwards


text:
How can I store multiple geometries created inside repeat zone as instances?
I'm working on a Blender-to-gcode project. I've created the randomized shape generator and now I'm trying to put it inside a repeat zone to quickly generate multiple shapes.
I want to store each iteration as an instance to control the way I distribute them on a grid, for example.
My problem is that each iteration is stacked on the previous one. How can I separate them?

All you have to do is convert the geometry created in the repeat zone into an instance and then add it to the existing geometry with Join Geometry.
Something like this:

Thank you so much, i tried doing that but i simply forgot to check "pick instance afterwards"... You're still a lifesaver i was running in circles XD


text:
spline editing or clever non spline editing?
I have always liked the example x.files that ship with the DirectX sdk and have wondered if the bigship1.x is a product of some type of spline editing as I have heard the term spline editing used in the context of editing mesh objects.
So, is the following mesh a product of spline editing or not and if so what type of spline editing would edit the curves (or is it just mesh smoothing?).
How would you create this model using Blender?

Welcome to the site, Jason. If you've not done so already, you might want to take the tour. You might also want to consider working through one (or both) of the online courses referenced on the resources page found under the "On Line Courses" entry under the "Learning" heading.

Your last question is more appropriate to this forum because its about Blender.       ......  The ship could have been done with a combination of spline editing and other techniques.  .... Everyone who uses Blender is clever. Very clever.

Spline Surfaces / Patches are used to define surfaces/objects using very few points. It's quite a convenient way to model with the right tools. It is quite possible that the bigship.x was modeled using a form of splines or NURBS, but it's hard to be certain even after seeing the mesh. Blender has (October 2015) a limited set of these tools, but they are there and can be found in The Add > Surface > NURBS Surface menu.

Not many Blender users use this feature, and that might explain why tutorials on the subject are rare. It doesn't fit within the format of this site to give a detailed explanation of how to model something using those tools.
In general modeling inside Blender is done using Polygon modeling techniques and Subdivision surfaces and creased Edges. I made a rudimentary model in about 3 minutes purely by extruding / insetting a Cube object and placing a Subdiv modifier on it. When the object is symmetric you don't even need to model both sides instead add a Mirror modifier.
Here model without mirror or subsurf, but with creases to indicate where the subsurf should become sharp.

Here with the mirror modifier:

Here the added subsurf modifier adds the interpolation and smoothing.

Here in object mode to show the result, also note i've set the mesh to Smooth Shading to get away from the tessellated look:

There are plenty of tutorials about how to do polygon modeling. See our resources page:
Here's what the low poly approach of the ship might look like to the left, and to the right again the model has subsurf and smooth shading and edge creases.

As I understand it, splines are a device in some game engines for modeling highly repetitive things, like walls, power lines, roads, forests, (among many other objects) in a way that calls for a minimum amount of geometry. Splines can be created in Blender just like any other Blender Mesh object (or set of objects).
The image in you questions appears to me like it could have been created with rather ordinary mesh modeling techniques.


text:
how to place circle in a far location from centre

A certain doubt always looms, when this circle is clicked ( by default ), it always remains near the screen. I mean with a click at most the cursor goes a bit away but not far from it. How does one get to place it lets say 20 measuring units ( inches or meters ) away.
Because it is in 3d space, this cursor should diminish in size as it goes far. That is my notion. could somebody clarify this.

Here you go: http://blender.stackexchange.com/questions/24787/uses-of-the-3d-cursor

You can type in the desired x.y.z components of the 3d cursor by using the 3D cursor panel in the N toolshelf in 3D View - This is by far the best way to control the 3D cursor with precision.

Precisely move the 3D cursor


text:
How to tell if an add on is present. Using Python
I want to add a button to a script that will detect if an add-on is present and then enable additional options if it is. I'm not sure how to go about locating this in python itself. But I think this would work better than having options that boot into an error if the add-on isn't present.
for example:
if addon_prefs.automirror:
Wouldn't I need to be more specific to query the add ons folder?

import addon_utils

addon_name = 'some_addon'

success = addon_utils.enable('some_addon')
if success:
    print("enabled", success.bl_info['name'])
else:
    print(addon_name, "is not found")

addon_utils.enable returns None if it failed to enable the addon, but returns a module reference (which evaluates to True) if it did manage to enable it.

The precise name of the addon is either:

the .py name if it's a single python file addon,
the directory name if it's directory based

Sometimes, especially prevalent with github .zips, the addon name is suffixed with -master. The addon name would then be 'some_addon-master'.

over the top, addon seeking
bpy.utils.script_paths() returns a list of directories where Blender looks for add-ons. With a bit of python-fu you can iterate through them and find any .py or sub-directories that contain part of an add-on name -- Then try to enable it :)

thats interesting. Im also curious in how one finds that particular information? How would I get the precise name of the add on Im looking for? The py? Or just the add on name?

What you are looking for is:
import addon_utils

addon_utils.check("addon_name.py")

this just checks the module state and does not enable it. Returns a tuple (loaded_default, loaded_state). If the addon is enabled and is not enabled by default it will result in (False, True).

so what about if the add on is in a folder and the name of the file shown in preferences is init.py wouldnt I have to change that then?

@masterxeon1001 yes you would have to change it and use the addon folder name instead.


text:
Creating a Grease Pencil Material in Blender 2.8
I would like to pre-define a material for a grease pencil in an addon.  However, when a new material is created from python, it is not a grease pencil material (mat.is_grease_pencil = False).  It is not possible to set the mat.grease_pencil.color of this material, because this part of the data structure does not exist, etc.
What is the python equivalent of clicking the "New (add a new material)" button when a grease pencil object is active?
# Create a grease pencil object
bpy.ops.object.gpencil_add(type='EMPTY')
bpy.ops.object.mode_set(mode='PAINT_GPENCIL')
gp_obj = bpy.data.objects['GPencil']
bpy.context.view_layer.objects.active = gp_obj

# Create a net material
gp_mat = bpy.data.materials.new("my_gp_material")  # This is not a grease pencil material
gp_mat.grease_pencil.color = [0,1,0,1]  # This is not possible, as mat.grease_pencil is None
gp_obj.data.materials.append(gp_mat)  # Trying to draw after this will crash Blender

Thanks for your help!

Use bpy.data.materials.create_gpencil_data(mat) to add grease pencil material settings
import bpy
context = bpy.context
space = context.space_data

# Create material for grease pencil
if "Bright Material" in bpy.data.materials.keys():
    gp_mat = bpy.data.materials["Bright Material"]
else:
    gp_mat = bpy.data.materials.new("Bright Material")

if not gp_mat.is_grease_pencil:
    bpy.data.materials.create_gpencil_data(gp_mat)
    gp_mat.grease_pencil.color = (1, 0, 0.818649, 1)

# Add grease pencil object
gp_data = bpy.data.grease_pencils.new("Bright Pencil")
gp_ob = bpy.data.objects.new("Bright Pencil", gp_data)
context.scene.collection.objects.link(gp_ob)
if space.local_view:
    gp_ob.local_view_set(space, True)

for ob in context.selected_objects:
    ob.select_set(False)
gp_ob.select_set(True)
context.view_layer.objects.active = gp_ob
bpy.ops.object.mode_set(mode='PAINT_GPENCIL')

# Assign the material to the grease pencil for drawing
gp_data.materials.append(gp_mat)

# Draw, using the material defined
bpy.ops.gpencil.draw(wait_for_input=False)

The best solution I have found so far is to create a new grease pencil stroke object, modify its material as desired, then delete the stroke object but keep the material, which can then be assigned to new grease pencil objects, as below.
If a more elegant solution exists, please share!
def get_gp_material():
    # Create a stroke object, modify its material, delete the stroke
    bpy.ops.object.gpencil_add(type='STROKE')
    gp_stroke_obj = bpy.context.object
    stroke_mat = gp_stroke_obj.material_slots[0].material
    stroke_mat.grease_pencil.color = [0,1,0,1]
    stroke_mat.name = "my_gp_material"
    bpy.ops.object.delete()
    del gp_stroke_obj
    return(stroke_mat)

# Get grease pencil material, must be done before creating blank GP object
gp_mat = get_gp_material()
# Add a new grease pencil blank
bpy.ops.object.gpencil_add(type='EMPTY')
# Go into draw mode
bpy.ops.object.mode_set(mode='PAINT_GPENCIL')
# Set the material
gp_obj = bpy.data.objects['GPencil']
gp_obj.data.materials.append(gp_mat)
gp_obj.active_material = gp_mat
# Now ready to draw