Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

DarkBASIC Professional Discussion / Texture No Wrapping

Author
Message
DigitalFury
15
Years of Service
User Offline
Joined: 30th Jul 2010
Location: United States
Posted: 15th Jul 2012 05:32
I have a really simple question. I couldn't find anything on the forums.

I have a texture I don't want to wrap on the other side of the plain. I want to be able to draw an image on both sides of the object without it repeating.

I think the command is Set Object Texture but I tried it and none of the setting changed anything.

Is there a command that can do this?

Edit: By the way this is for an example for another one of my plugins. It's a surprise .

Thanks,

DigitalFury

Pincho Paxton
23
Years of Service
User Offline
Joined: 8th Dec 2002
Location:
Posted: 15th Jul 2012 05:46 Edited at: 15th Jul 2012 05:48
You have to make flat cube. Or special plane with 2 sides.

DigitalFury
15
Years of Service
User Offline
Joined: 30th Jul 2010
Location: United States
Posted: 15th Jul 2012 05:59
@Pincho Paxton - Thanks. I thought a plain had two sides. I created a box but it still wraps/repeats.

DigitalFury

Mage
Valued Member
19
Years of Service
User Offline
Joined: 3rd Feb 2007
Location:
Posted: 15th Jul 2012 06:07
A box is bad since you will have 4 sides that are complete waste.

Best idea is to have 2 (one sided) planes, each separately textured. Then have them at the same XYZ and facing away from each other.

The plane can be rotated in literally any direction. So calculating the "opposite" angle, and having everything rotated correctly so the proper corners, sides, etc. always line up really sucks. Horrendous math problem. Skip this headache and glue one of the planes to the other one.

2 Planes, 2 Textures, One glued to the other. Rotated in opposite directions. Then moving and rotating the one will correctly position the other automatically.

DigitalFury
15
Years of Service
User Offline
Joined: 30th Jul 2010
Location: United States
Posted: 15th Jul 2012 06:12 Edited at: 17th Jul 2012 08:53
@Mage - Thanks but, that still doesn't solve my problem. I am going to use this for every type of object. I don't want the texture to wrap at all. I'm adding bullet holes and I don't want it to show up on the other side.

Is there anyway to do this for meshes?

DigitalFury

Pincho Paxton
23
Years of Service
User Offline
Joined: 8th Dec 2002
Location:
Posted: 15th Jul 2012 13:38 Edited at: 15th Jul 2012 13:46
Two plains. The bullet doesn't show up on the other side. Or maybe you do want it to show up on the other side. I think you actually mean culling. Turn the culling on if its bullet holes going through something.

mr Handy
18
Years of Service
User Offline
Joined: 7th Sep 2007
Location: out of TGC
Posted: 15th Jul 2012 16:14 Edited at: 15th Jul 2012 16:15
Quote: "I'm adding bullet holes and I don't want it to show up on the other side."

One-way hole? That's impossible. It's a HOLE.

«It's the Pony, pony me this, pony me that» — Bronies
«Socks are sexy. You should wear them!» — Bronies
«I sell apples and apple accessories» — Applejack
DigitalFury
15
Years of Service
User Offline
Joined: 30th Jul 2010
Location: United States
Posted: 15th Jul 2012 17:42
@mrHandy - Really? There is no way to turn repeat/wrapping off?

DigitalFury

Pincho Paxton
23
Years of Service
User Offline
Joined: 8th Dec 2002
Location:
Posted: 15th Jul 2012 18:18 Edited at: 15th Jul 2012 18:26
You say repeat wrapping, I don't know what that is in your case.

A plain has 1 texture side, and 1 blank side.

With culling it is like glass, the texture on both sides but showing the same thing.

2 plains, two textures, one on each side.

That covers everything. If you can't use one of those there is some problem with your code, or your models.

DigitalFury
15
Years of Service
User Offline
Joined: 30th Jul 2010
Location: United States
Posted: 15th Jul 2012 19:04
@Pincho Paxton - Ok, that covers plains. I guess i'll have to use two plains for my example.

As for other objects I don't think textures repeat for anything other then boxes and cubes.

What do I do in those cases?

Thanks,

DigitalFury

Pincho Paxton
23
Years of Service
User Offline
Joined: 8th Dec 2002
Location:
Posted: 15th Jul 2012 19:15 Edited at: 15th Jul 2012 19:19
You can make a colour transparent like black for example, then you would have to put a cylinder inside the model as the 3d part of the hole. Although some people have managed to cut holes in 3D models.

DigitalFury
15
Years of Service
User Offline
Joined: 30th Jul 2010
Location: United States
Posted: 15th Jul 2012 20:31
@Pincho Paxton - I'm not cutting holes in the model? lol I'm just adding a bullet texture to the objects texture. lol

DigitalFury

basjak
16
Years of Service
User Offline
Joined: 16th Apr 2010
Location: feel like signing up for mars
Posted: 15th Jul 2012 20:54 Edited at: 15th Jul 2012 21:05
@digitalfury:

I tried this one for you and worked very well. i think this will solve the bullet texture to appear on one side.



DigitalFury
15
Years of Service
User Offline
Joined: 30th Jul 2010
Location: United States
Posted: 15th Jul 2012 21:01 Edited at: 15th Jul 2012 21:01
@basjak - Good idea. Now I know how to implement it for plains.

I believe boxes and cubes have a repeated texture. I don't know if there is any way around that?

Also, I believe meshes and spheres don't have repeated textures as I've tried a demo and I've been able to draw on any side.

Thanks,

DigitalFury

basjak
16
Years of Service
User Offline
Joined: 16th Apr 2010
Location: feel like signing up for mars
Posted: 15th Jul 2012 21:18 Edited at: 15th Jul 2012 21:20
Quote: "I believe boxes and cubes have a repeated texture. I don't know if there is any way around that?"


I made this one long time ago, lucky still in my computer:



Pincho Paxton
23
Years of Service
User Offline
Joined: 8th Dec 2002
Location:
Posted: 15th Jul 2012 21:33 Edited at: 15th Jul 2012 21:33
Quote: "I believe boxes and cubes have a repeated texture. I don't know if there is any way around that?"


Make your own, and load them. You can position the textures wherever you want with a UV mapper.

DigitalFury
15
Years of Service
User Offline
Joined: 30th Jul 2010
Location: United States
Posted: 15th Jul 2012 21:35 Edited at: 15th Jul 2012 21:41
@Pincho Paxton - Good idea. I'll have to just create one in a modeling program.

@basjak - Thanks for the code

Thanks,

DigitalFury

DigitalFury
15
Years of Service
User Offline
Joined: 30th Jul 2010
Location: United States
Posted: 16th Jul 2012 18:59
@Mod - serablue is spamming stuff about Microsoft office. It seems illegal anyways mind banning him or giving him a warning at least?

DigitalFury

basjak
16
Years of Service
User Offline
Joined: 16th Apr 2010
Location: feel like signing up for mars
Posted: 17th Jul 2012 01:36
This is very good thread but, Suddenly, a time waster interfere with his rubbish.

Please click out serablue from the forum.

Thraxas
Retired Moderator
20
Years of Service
User Offline
Joined: 8th Feb 2006
Location: The Avenging Axe, Turai
Posted: 17th Jul 2012 14:21
serablue banned and nuked.

http://thraxocorp.webs.com/ Visit my totally awesome website: Thraxocorp. It's my own company and I'm totes the CEO.
Mage
Valued Member
19
Years of Service
User Offline
Joined: 3rd Feb 2007
Location:
Posted: 19th Jul 2012 05:48
Quote: "serablue banned and nuked."

Thanks.

DigitalFury
15
Years of Service
User Offline
Joined: 30th Jul 2010
Location: United States
Posted: 19th Jul 2012 05:56
@Thraxas - Yeah, thanks.

I'll post back if I have issues with texture wrapping with my final plugin


DigitalFury

Login to post a reply

Server time is: 2026-07-08 04:22:18
Your offset time is: 2026-07-08 04:22:18