textures

Material and Texture Change Python Script

心不动则不痛 提交于 2020-01-06 06:40:07
问题 I am trying to make a script centered around changing the material via a drop-down menu and the texture via a slider. I am having some difficulty applying to a model. How can I change my script to fit this requirement? import maya.cmds as mc if mc.window("ram", exists =True): mc.deleteUI(ram) ram = mc.window("Material and Texture",t = "Material and Texture v0.9", w=300, h=300) mc.columnLayout(adj = True) imagePath = mc.internalVar(upd = True)+"icons/scriptlogo.jpg" mc.image(w=300,h=200,image

Problem with opengles to show an image

浪尽此生 提交于 2020-01-06 05:47:25
问题 I use xcode Opengl App template to create a sample. I am new to opengles, and having to try re-write the 'render' method in ES1Renderer.m I try create a texture and show it on the screen, but nothing showed. Someone can help me ? I have no idea how to fix it: - (void)render { int imageW = 16; int imageH = 16; GLubyte *textureData = (GLubyte *) malloc(imageW * imageH << 2); for (int i = 0; i < imageW * imageH << 2; i++) { textureData[i]= 0xff & i; } GLuint textureId; glGenTextures(1,

Jogl, creating only red channel u16 but getting “Texture type and format combination is not valid”

ぐ巨炮叔叔 提交于 2020-01-06 04:54:17
问题 So, I am trying to implement the picking through id. This means with every drawArray a different unique id will be set as uniform and saved in the red component on a texture. 16 bits are more than enough (65k elements), so I choose to use shorts, I know that uniform variable can be only ui, but I decided to gave it a try anyway I also found another question, here, where the answer contains a small example with shorts However here my code to initialize the framebuffer and two textures, one for

libGDX Pixmap and Texture performance

人走茶凉 提交于 2020-01-06 03:26:30
问题 I have a huge amount of 2d images in my game, with multiple layers. I use spritebatch() and orthographicCamera() . I have some basic questions about performances : Does using Atlas is the faster way to load images ? What is faster to work with, Pixmap (and convert to texture before draw) or Textures? When i make a multiple layer image, should I use Texture.draw (or Pixmap.draw for Pixmap), make a final image and then render it ? Or should i render everything in the spritebatch.begin() and

How to Change CCTexture2D Color

核能气质少年 提交于 2020-01-06 02:22:41
问题 I have a polygon that I fill using a texture and glDrawArray (using the method described in this tutorial: http://www.raywenderlich.com/32954/how-to-create-a-game-like-tiny-wings-with-cocos2d-2-x-part-1). I want to be able to fill my polygon using a solid color, which is generated at random during gameplay. To do this using the technique from the tutorial, I need to dynamically create a texture that is just a solid color (for example, I might want to generate a 1x1 red square and use that to

GLSL Shader - Shadow between 2 textures on a plane

我是研究僧i 提交于 2020-01-05 10:36:17
问题 I'm writting a game with AGK (App Game Kit) and I wanted to make some shadows with shaders. (AGK only support GLSL 1.20 at the moment) On my game, I have a plane object, where I have 2 textures. The first texture is the background texture, and the second, is the foreground texture, with a transparent path where we see the background texture (they are like the walls) and I have a pointer light. Here is an example (left is what I have, right is what I want) : And here is the code : attribute

ThreeJS texture issue

孤人 提交于 2020-01-05 10:20:43
问题 I have a problem with my Three.js 3D application - at least according to some people I know. My application rests at [http://176.9.149.205/planungstool/] . Some people who supposedly have the most recent version of Chrome and Firefox, can not see the textured areas. For example, they do not see the roof or front of the 3D house. They do, however, see the non-textured stuff like the tree or the floor. What's weird is that I don't have that problem and most of the other people I asked do not

OpenGL ES 2.0 textures for retina display?

Deadly 提交于 2020-01-05 05:27:42
问题 I have got a GLKView, where I try to draw a couple of cubes and I create textures from a view and map them onto the cubes. However, when I start the app on a retina device, the textures are correctly sized but they look terrible. I have tried to set the contentScaleFactor of the GLKView to the scale of the main screen - to no avail. I have also tried to multiply the the buffers dimensions by the scale, which resulted in textures that looked crisp, but were only 1/4 of the original size...

webgl glsl emulate texture3d

▼魔方 西西 提交于 2020-01-05 02:33:09
问题 I'm porting a piece of opengl to webgl and i'm trying to emulate texture3d. Somehow something is going wrong. No interpolation is needed because it is only used for calculations. I'm not sure about the geometry part of the original code, the per layer properties are now fetched trough a texture. Update : Ok i rewrote the texture 3d functions, I still encounter some problems : const vec3 volumeTextureSize = vec3( 256.0, 128.0, 32.0 ); const vec2 imageSize = vec2( 1024.0, 1024.0 ); vec2

Problems with texture deformation in OpenGL ES 1.1 on quad made out of triangle strips

前提是你 提交于 2020-01-04 05:48:08
问题 I'm using triangle strips to create a quad. The problem is when I try to paint it using a rectangular texture that I want to have evenly interpolated over the shape. As long as the shape is a rectangle or an affine transform of a rectangle, I'll have two identical triangles that build the shape and everything goes well. But with arbitrary shapes, the triangles have different shapes and a distortion naturally occurs along the common edge of the triangles. _____ ______ _____ | | / / \ / |_____|