Questions tagged [textures]
A bitmap (raster image) used in a texture mapping process.
1,531
questions
1
vote
1
answer
37
views
How to use Subviewports to render a texture for Sprite3D?
Godot 4.2
Background:
In my game prototype, I have a following player entity:
Paperdoll2D has a script that dynamically adds the weapon/armor/etc Sprite2D nodes to the main sprite to "dress-up&...
1
vote
1
answer
60
views
Godot 4.2.1: Calling get_data() on Image from NoiseTexture2D Returns Null
I am trying to retrieve image data from a NoiseTexture2D. I seem to be able to get an image resource, but as soon as I try to get the associated data via ...
0
votes
2
answers
4k
views
Limit Color Pallete Using Shader
Basically, what I want to do is take a primary input image texture (which is a render texture in-game) and a secondary pallete texture (contains X number of colors, and is X by 1 pixels in size). What ...
0
votes
0
answers
38
views
texture in perspective by vertices not interpolation
I am writing a software renderer with allegro5, but without using its own triangle drawing functions, I use the al_draw_prim function to draw the triangles but with all the z coordinates at zero, the ...
0
votes
1
answer
395
views
Draw a texture2D at specific coordinates on another Texture2D
I have a ShipTexture and a Sail Texture. I need to draw the sail texture at a specific location on the shipTexture (call it the sailMountPoint) regardless of the location vector associated with the ...
1
vote
1
answer
79
views
Does OpenGL have any automatic texture interpolation?
An image of a minecraft grass block in gimp:
Loading from a texture atlas in OpenGL, gives a much blurrier image:
I know that the actual image in my glfw window is larger than it is in gimp.
(...
0
votes
0
answers
28
views
Extract texture from glb file
How do you extract the texture from a glb file in Unity?
I'm not sure if it is from _MainTex or BaseColorTexUV?
2
votes
1
answer
3k
views
Unity procedural skybox shader texture stretching
I am using the procedural skybox shader that Unity provides, but have tweaked it so that I can have a cloud texture.
The problem I have, is that the texture is not tiling correctly, even though it is ...
2
votes
1
answer
75
views
Approach to rendering a planet texture
I'm making a space game using Godot 4, and I need to capture the "hugeness" of planets. I figured I'd use spheres with textures on them for planets. The textures have identifiable ...
0
votes
1
answer
368
views
Black texture when manually creating from image
I am trying to create a ID3D11Texture2D from a RgbaImage loaded from a .jpg. The below code produces no errors. However, the texture is black when it is actually ...
0
votes
1
answer
650
views
Using GetRawTextureData<Color32>() in Unity with non RGBA32 textures?
I am trying to manipulate a Texture2D using GetRawTextureData<Color32>() as this does not require extra memory to be allocated like ...
0
votes
2
answers
981
views
How can I have margins or padding around a texture in libgdx?
I am building a game using libgdx a 2048 like game and I draw the tiles of the board using textures (each texture represents a tile with the number 2 or 4 etc.)
I would like tohave a small space ...
3
votes
2
answers
1k
views
It's possible to use more than 4 channels of a texture in GLSL?
I have a Texture with 6 channels. Each channel store a mask that is used to change a color of a part of my player's sprite.
When the texture only had 3 channels it was easy to implement this color ...
3
votes
3
answers
3k
views
How do I convert a voxel model to a low-poly mesh with texture mapping that accurately mimics the coloured voxels?
I've created a model in MagicaVoxel (A) and I want to use it in Godot. I imported the model into Blender, but then realized that it's using a very high polygon count for such a simple model. I found ...
60
votes
9
answers
53k
views
Texture packing algorithm
What is a good texture packing algorithm? Technically, bin packing is NP-hard, so a heuristic is what I'm really after.
0
votes
1
answer
537
views
SDL_CreateTextureFromSurface not working
Code:
...
4
votes
3
answers
2k
views
Generate ETC2 compressed texture from Android Bitmap in OpenGL ES 2
My app currently uses a lot of textures most of which probably could be compressed quite a lot by using ETC2 (my app runs on 4.4 so i have a lot of devices supporting GLES30), i cannot use ETC1 since ...
2
votes
1
answer
86
views
I want to acheve this effect of trees changing texture based on distance to the player
The effect also applies to mountains and terrain, trees in the back look like shadows which with a dark sky look nice and in the day I can make them look like grey fog. I was thinking of simply adding ...
0
votes
0
answers
72
views
How do i make the terrain texture less repeating?
question in the title no more to add, don't say "but it depends on how you set up your project" cause i'll set up my project how i need to set it up to solve the problem.
0
votes
0
answers
19
views
Correct Orientation from Blender to Unreal Engine 5 in a spline
Let me preface this by saying I'm an absolute beginner and I have no idea what I'm doing.
Following lot's of different tutorials, I want to create a road spline in unreal engine. Therefor I created a ...
7
votes
3
answers
3k
views
Terrain & Multi-Texturing
I'm using OpenGL (Version 4.4) (and C++ if that matters).
I've created a terrain renderer, the terrain is stored as a 3D scalar field (isosurface/voxels). It uses a slightly modified version of ...
5
votes
3
answers
9k
views
Getting a pixel of Sprite at the cursor position in Unity
Summary: I've been trying to figure out a way to use simple box colliders as a nice and efficient "first pass" collider. For the "second pass", I want to check that the area clicked has an alpha value ...
0
votes
1
answer
64
views
How to render a portion of a texture (upscaled) without affecting the border with SDL2?
I noticed that render a portion of the texture, upscaling it, it affects is border values with the proximity of the outside remaining parts of the texture (when not using Neareast neighbour ...
0
votes
0
answers
133
views
How Virtual Textures work?
I'm trying to understand how Virtual Textures work. After coming across this post:
https://discourse.threejs.org/t/virtual-textures/53353
And more research here:
https://docs.unity3d.com/Manual/...
0
votes
0
answers
43
views
What causes certain spots to be blacked out on my texture?
So my model's hair (and other spots) are either blacked out or really dark, but only in spots.
(NOT THE WHOLE TEXTURE)
This is probably a stupid question with an easy answer, but it's bending my ...
0
votes
0
answers
68
views
How to import 3d texture in Unity?
How can I import a 3d texture the easisest way and visualize it somehow ( for example as a voxelized thing but other way can be also good)?
I tried to download a 3d texture form different sites like ...
2
votes
0
answers
122
views
How to paint terrain details (e.g. grass billboards) programmatically?
In Unity, is it possible to paint terrain details such as billboarded grass textures programmatically? (The kind that appear vertical and wave according to wind settings.)
What I know so far (or think ...
0
votes
0
answers
110
views
Do texture arrays bring performance gains
I have a terrain mesh in unity that uses a four-layer texture blend, at first I used a single texture (diffuse and normal), then I converted it to two texture arrays storing diffuse and normal ...
0
votes
1
answer
936
views
How to apply saturn's ring texture in Unreal Engine 4?
I'm working on a "solar system" model project. And while trying to apply saturn's ring texture which is this one :
it ended up looking like this:
I'm new to UE4 and this branch in general. So I ...
1
vote
1
answer
166
views
How can I dynamically change the skin and blush colours of an animated sprite's face in Unity?
I want to achieve this effect in unity when processing my sprites
before
After
I was thinking that I could use two color pickers to tell a shader only to create a gradient if two colors share a ...
1
vote
1
answer
326
views
Sprite framework binding multiple textures
In an attempt to batch render as many quads (sprites) as possible, I'm instance rendering a single unit-sized quad and passing in a buffer of per-instance data that includes width/height, texture ...
0
votes
1
answer
61
views
How do games package their textures in relation to image compression?
I know that you have to keep in mind what platform you're targeting, but it feels like you might have to have multiple sets of textures. Like let's say you're targeting desktop. How do I know what ...
-2
votes
1
answer
507
views
Creating a background image with Photoshop for Unity
I'm making a home screen for my game. I don't know how to transfer a 2d image from Photoshop into a game that's on Unity. How do I import the image and make it visible in game? It’s a 3D game. I don't ...
1
vote
0
answers
96
views
Sprite2D texture repeat switches from Mirror to Disabled when resizing window
In Godot 4, I set the texture repeat of a Sprite2D to 'Mirror',
When I run the game, it works fine except when I resize the window — then the texture repeat switches to 'disabled'.
Is there a ...
0
votes
0
answers
35
views
Different texture generation methods with opengl
I'm experimenting with texture generation so I can begin to implement height map generation/terrain generation. Right now I'm just experimenting with different generating functions. Right now I'm just ...
2
votes
1
answer
2k
views
Should non-power-of-two textures be resized to be a power of two?
I have a texture that is 1024x900. Should I resize it in Photoshop to be 1024x1024 or leave it as it is?
What about a texture sized 1000x900?
1
vote
1
answer
2k
views
Directx11 create Texture2D using subresourceData
I'm trying to create immutable texture in d3d11 so I want to use subresourceData, every tutorial on textures creates them with 2nd argument being null and after that updates subresource but I want to ...
0
votes
1
answer
57
views
why One big texture frames is consuming more RAM compared to be divided into single frame ones [closed]
I noticed that composing frames in a big texture will consume more RAM rather than having 1 frame per texture (or sprite if you would like).
The renderer is SDL2 backed by Direct3D.
Is there any ...
0
votes
1
answer
208
views
How to apply sampler2Darray textures to different locations of a single mesh?
In openGL, I have a 3D terrain composed of a grid of 255x255 vertices. The vertex of the lower left corner is at coordinates (-127;-127) and the one of the upper right corner is at coordinates (127;...
0
votes
1
answer
288
views
Make moon using cubemap in shadergraph
I'm trying to make moon with a cubemap texture in shadergraph.
I made it, but the texture is incorrect.
I'm using a cubemap from NASA as a texture and it works, but it's bigger than moon shape and ...
0
votes
0
answers
195
views
Ursina not applying shader and light to entity
I'm making a terrain-based game in Ursina. I finished making the terrain and the texture, and all of them run well, but Ursina is having problems with the lights and the shaders.
...
0
votes
0
answers
184
views
WHY doesn't Python's Ursina module load textures from .mtl file?
Why doesn't the Ursina module directly load all textures from an obj's mtl file?
Let's assume I have 4 files:
test.py:
...
0
votes
0
answers
57
views
In Unity, how do I get a specific texture in runtime from .psd file rather than its whole entire texture?
I'm trying to recreate the current texture on a SpriteRenderer's sprite in order to make it bigger so that I can add a white outline to it. This is all done on runtime.
If we look at the .psd file ...
0
votes
0
answers
193
views
How to avoid polygon fill in substance painter painting unselected polygons?
when using polygon fill in substance painter, it sometimes also paints different polygons that I havn't selected. (See image).
I am using the Polygon Fill on a black mask that is attached to a fill ...
0
votes
1
answer
2k
views
How to convert depth values into Unity's distance
I am new in Unity and now only studying for my work project. I need help with computing real distances from depth values. Can't figure it out.
My shader is:
...
0
votes
1
answer
172
views
How to use gather offsets
I have this situation where I have parts of the same scene in each 4 half squares of a rendertarget rendered with the same view projection matrices. In my deferred pipeline I would like to sample with ...
0
votes
0
answers
73
views
What are the pros and cons of having assets in one file versus multiple files?
Some games have all their assets in one .pak file or something. Or have all their textures in a single atlas. Others have their different assets in different files.
...
0
votes
1
answer
71
views
How do you handle edges on textures that join adjacent textures?
This question explains how to use borders to avoid texture bleeding. The following image is taken from the excellent answer to that question.
But the problem I don't understand is, imagine you have ...
0
votes
0
answers
175
views
How can I prevent height map artifacting when wrapping a texture around a sphere?
So, I have been on a bit of a journey wrapping a texture around a sphere. So, if you are reading this looking for spherical texture wrapping solutions, I would suggest checking out my last post as ...
3
votes
1
answer
1k
views
How can I map a texture around a sphere without a seam?
I am attempting to wrap a texture around a sphere without any warping using Unity's Shader Graph. I have been following this StackExchange answer, and have semi-successfully converted their shader ...