---
title: "init(imageNamed:normalMapped:)"
framework: spritekit
role: symbol
role_heading: Initializer
path: "spritekit/skspritenode/init(imagenamed:normalmapped:)"
---

# init(imageNamed:normalMapped:)

Initializes a textured sprite using an image file, optionally adding a normal map to simulate 3D lighting.

## Declaration

```swift
convenience init(imageNamed name: String, normalMapped generateNormalMap: Bool)
```

## Parameters

- `name`: The name of an image file stored in the app bundle.
- `generateNormalMap`: If doc://com.apple.documentation/documentation/Swift/true, a normal map is generated from the image texture without applying any filter to it (SKTextureNormalMapFilteringTypeNone). If doc://com.apple.documentation/documentation/Swift/false, no normal map is generated (matching the behavior of the doc://com.apple.spritekit/documentation/SpriteKit/SKSpriteNode/spriteNodeWithImageNamed: class method).

## Return Value

Return Value A newly initialized sprite object.

## Discussion

Discussion The normal map is used only when lighting is enabled in the scene. For more information, see SKSpriteNode and SKLightNode.

## See Also

### Creating a Sprite from an Image Filename

- [Getting Started with Sprite Nodes](spritekit/getting-started-with-sprite-nodes.md)
- [init(imageNamed:)](spritekit/skspritenode/init(imagenamed:).md)
