• Hey Guest! Ever feel like entering a Game Jam, but the time limit is always too much pressure? We get it... You lead a hectic life and dedicating 3 whole days to make a game just doesn't work for you! So, why not enter the GMC SLOW JAM? Take your time! Kick back and make your game over 4 months! Interested? Then just click here!

3D [SOLVED] d3d_model_draw() & tex repeat

D

David11

Guest
Hi Members
I cant believe Im asking this really noob question, as I should run across this way sooner. I did a little search and keep comming up with the other answer. Or Im searching wrong.

Lets say, Im making a 3D model, using Anim8tor or Blender for example. For the argument, lets call this model, "1st floor", of a house. I make the walls to the entire first floor, including kitchen, living room, bathroom as so on. I then add UV the walls to the first floor. I import the 3D model into the game. But the textures are a little too stretched. Didnt really do a good job UV mapping the texture. With me so far?

When it comes to d3d_draw_block(x1, y1, z1, x2, y2, z2, tex, hrepeat, vrepeat) you can set the hrepeat, and vrepeat to lets say d3d_draw_block(x1, y1, z1, x2, y2, z2, tex, 4, 4) for an example. But with d3d_model_draw(ind, x, y, z, texid) there is NO hrepeat or vrepeat.

So is it possible to repeat a texture on a model youve created simmilar to "draw_block(" ? Or do I have to take the model back to a UVmapper and change the coordinates of the texture? If I can repeat a texture on model from code, what would the code look like? Never ran into the prob :D Thanks

Example code:
repeated texture with given number
Code:
d3d_draw_block(x-1,y-16,0,  x+1,y+16,71,tex1,4,9) // Wall section
my imported model with no option of repeat textures
Code:
d3d_model_draw(model,0,0,0, background_get_texture(tex_WallTexture));
 
Last edited by a moderator:
If it's a basic d3d_model_load() then that stuff has to be handled before you export. If you're importing raw data and then building primitives with it, those functions have arguments to handle the UV space.
 
D

David11

Guest
Thats what I thought. Oh well. Too bad I couldnt do what I was hoping :D
 
Top