|
DeleD Community Edition Forums
|
View previous topic :: View next topic |
Author |
Message |
Fallen Member
Joined: 24 Mar 2007 Posts: 40
|
Posted: Wed Jul 18, 2007 9:56 pm Post subject: flipping/reversing the texture the other way |
|
|
I want to flip my material, reverse it if you will, in photoshop this would be
edit transform, flip horizontal or vertical.
what its for is that I am making some skyboxes, I made a cube and reversed the normals, but its made the textures the wrong way round, I need to flip the textures, so say if one wall had a '3' on it the 3 letter would be facing the wrong way, I cannot see the tools in the textures to flip it the other way, what can I do? _________________ http://www.avantivita.com - Home of OOTB skyboxes |
|
Back to top |
|
|
Mr.Fletcher DeleD PRO user
Joined: 07 Aug 2004 Posts: 1772 Location: Germany
|
Posted: Wed Jul 18, 2007 10:19 pm Post subject: |
|
|
Hello Fallen,
this can be done by simply scaling the face with a negative value. If you want to flip the texture horizontally, you would enter -100 (%) for U. _________________ Behold! The DeleD Wiki! Please help us expanding it
DeleD on IRC |
|
Back to top |
|
|
Fallen Member
Joined: 24 Mar 2007 Posts: 40
|
Posted: Wed Jul 18, 2007 11:18 pm Post subject: |
|
|
That did it, thanks.
But I notice delgine does not put the texture to fill a face 100%, very odd indeed. Not very good for if you are making skyboxes.
heres what I did -
I did Face gen UV properties and checked fix texture size to face, this is so that my texture will cover each face 100%, the box is 1024 squared and the textures are 1024 squares, only trouble is that its not fitting 100%, I have a tiny seam in it, it doesn't fit the texture to fit the box 100%, there should not be any seams, what's happening, what can I do? _________________ http://www.avantivita.com - Home of OOTB skyboxes |
|
Back to top |
|
|
Paul-Jan Site Admin
Joined: 08 Aug 2004 Posts: 3066 Location: Lage Zwaluwe
|
Posted: Thu Jul 19, 2007 5:17 am Post subject: |
|
|
Can you post a screenshot?
Assuming your model is not rotated/skewed (in which case the fit-to-face option might not function properly), I assume that what you are seeing is the result of wrapping, not texture misalignment.
In other words, the textures are mapped perfectly, but the texture filtering wraps around to the other side of the texture. As the texture is non-continous over the edges, part of the other side 'bleeds' through, resulting in visible seams. The common solution is to change the texture-mode from 'wrap' to 'clamp' for non-continuous textures, like the build-in DeleD skybox does (did you try your texture with that?). Currently, the DeleD interface doesn't allow you to do this, but your final rendering engine (game engine) probably can (in OpenGL, it's GL_REPEAT v.s. GL_CLAMP_TO_EDGE).
Hope that helps! |
|
Back to top |
|
|
jwatte DeleD PRO user
Joined: 26 Apr 2006 Posts: 513
|
Posted: Thu Jul 19, 2007 8:40 am Post subject: |
|
|
Actually, CLAMP_TO_EDGE is not quite right for skyboxes. It's almost right, but shows small artifacts. The right thing to do is to use texture borders, where you fill in the expected border, and then do CLAMP_TO_BORDER (or simply CLAMP). If you don't have that, then you can render your skybox textures using slightly higher than 90 degree FOV, and inset the texture coordinates a small amount to compensate. |
|
Back to top |
|
|
Fallen Member
Joined: 24 Mar 2007 Posts: 40
|
Posted: Thu Jul 19, 2007 1:03 pm Post subject: |
|
|
CLAMP_TO_BORDER
can I do this in delgine _________________ http://www.avantivita.com - Home of OOTB skyboxes |
|
Back to top |
|
|
Paul-Jan Site Admin
Joined: 08 Aug 2004 Posts: 3066 Location: Lage Zwaluwe
|
Posted: Thu Jul 19, 2007 2:46 pm Post subject: |
|
|
You should probably listen to JWatte on the OpenGL technicalities... although I am pretty much convinced he got his facts reversed this time... (i.e. afaik CLAMP_TO_BORDER will filter the outer texture columns/rows with the default border color, which is black, resulting in visible darker seams).
Like I said, currently, the DeleD interface doesn't allow you to do this, but your final rendering engine (game engine) probably can. If not, try to rerender the skybox using a slightly offset FOV like JWatte suggests (although this is pretty tricky business). |
|
Back to top |
|
|
Fallen Member
Joined: 24 Mar 2007 Posts: 40
|
Posted: Thu Jul 19, 2007 4:24 pm Post subject: |
|
|
this is the image of the object made and textured in delgine.
cant find any clamping thing in delgine, are you talking about putting the thing in another program and doing something? seems odd if delgine cannot put textures on things correctly, I dont want seams on models, if delgine cannot texture right to the edges it makes it useless to apply textures to objects.
just tested this in deep exploration, yep dirty great seams on it, also its on its side, so delgine flips it as well. _________________ http://www.avantivita.com - Home of OOTB skyboxes |
|
Back to top |
|
|
Paul-Jan Site Admin
Joined: 08 Aug 2004 Posts: 3066 Location: Lage Zwaluwe
|
Posted: Thu Jul 19, 2007 5:36 pm Post subject: |
|
|
Thanks for the screenshot. Does look like wrapping indeed!
You have to realize DeleD does not 'put the seam there', the seam is not in the model (the texture coordinates are ok, the texture filter simply samples from the opposing side of the texture... which is all nice and dandy with wrapping textures, but skybox textures aren't), it's just the way the DeleD displays the textures. Sky Box rendering is not the same as rendering ordinary models in this aspect.
If you put the textures on the DeleD skybox (have you tried this yet?) the seams should disappear, as the skybox is rendered with clamped texturing. You'll find it under View->Options->Environment.
We'll add an option to choose the texture-repeat-mode (repeat, mirror or clamp) per layer at some point in the future, but that is not really important. What really matters is whether your final rendering solution (game engine, etc.) offers clamped rendering.
If it doesn't, we can set the rendering mode to whatever we want inside DeleD, but the seam will still show up in your game/application/etc. In that case, the only thing left is slightly scaling up the texture to try and hide the artifacts. |
|
Back to top |
|
|
Fallen Member
Joined: 24 Mar 2007 Posts: 40
|
Posted: Thu Jul 19, 2007 6:24 pm Post subject: |
|
|
No seams with the skybox in delgine, how big is the delgine skybox, can it be exported, I need my box 1024 squared, these also have to be perfect its for a skybox pack that will be sold and I dont want loads of angry customers if things are not perfect for their game.
I have seen another skybox that used 6 flat planes in a box, is this to counter the problem with clamping, would I be better doing that instead, should I just do some face mapping in another 3d program, would a tool like 3ds have no problems, but would the problem be their if a game engine or program not support these clamping textures whatever they are.
What should I do here. I have a 2 packs of skyboxes that will be sold across engines and aplications, whats the best thing to do?
I just tested on a machine that had 3ds on its HD, I made a box and tried some face mapping, same thing, I find that odd that this is in any program, why would one have seams, it doesnt matter if its a skybox, it could be anything, a crate with the same texture on every face and you will get seams, though in max it has all different types of mapping, I don't want to get into max, its too complex for what I want, delgine should do fine for game makers. But if you cannot make things without seams then you cannot put textures on objects so it makes it of no use, well not in texturing at all, If thats true that is a shame, I recommended delgine at a lot of games developer forums for new developers with a budget, I hope it can texture as otherwise my recommendations will be for vain.
I guess Im not getting the wrapping thing, I tried doing it by not having the texture fill the whole face, having delgine stick a texture in its recondition, I made a tex with a grid on it to see how it lays things out, it sticks the centre of the texture to the edges, rather than the centre of the tex to the centre, and the edges to the outside, make a tex with a black border and stick a number in the middle, then use delgine to auto put the tex on the object, the nuber is at the edges and the borders are in the centre, a bit inconvienant, you then have to move the texture to get the border or tex edges to the outside, its a bit clunky having the texture put on in that way, means you have to manulay move your texture, its OK for things like bricks etc, put for precice layouts very poor. _________________ http://www.avantivita.com - Home of OOTB skyboxes |
|
Back to top |
|
|
Paul-Jan Site Admin
Joined: 08 Aug 2004 Posts: 3066 Location: Lage Zwaluwe
|
Posted: Fri Jul 20, 2007 6:40 pm Post subject: |
|
|
Why don't you just sell your skybox as a set of 6 highdefinition textures? Anyone interested in buying such a pack will know how to use it in their game engine (i.e. they will either have an engine that handles skyboxes, or know how to use texture clamping if they programmed their own, it's common knowledge). As far as I know, this is how most skybox packs are normally sold, right?
About DeleD's texturing: by default it uses NAT (naturally aligned texturing), which means that where the texture ends up depends on where the object is placed. If you had moved your primitive a bit to the left or right, you would see the texture ends up in a different location by default (i.e. the number is not always on the edge, or always on the sides... it depends on where your primitive is in 3D space). The big advantage of NAT is that if you just put two primitives next to eachother the textures are continuous. It's the default in most world editors.
For detail texturing it is no good, but no automatic texture-layout is ever going to be good enough for detail texturing, as you'll want to manually re-align the texure in 99% of cases anyway. Hitting fit-to-face (ctrl-shift-f) is usually a good way to get started. Unfortunately, getting a nice UV map is a lot of hard manual work at the moment. In the future, we'll extend the UV editor with some nice wrapping algorithms, but we are very aware DeleD still could use a lot of work in that area. |
|
Back to top |
|
|
Fallen Member
Joined: 24 Mar 2007 Posts: 40
|
Posted: Sat Jul 21, 2007 4:29 pm Post subject: |
|
|
I have to have it on a box because one vendor wants it that way as its a game engine that people that dont know anything about game developing would use it, its a point and click type game creation tool. They even want an installer to place the skyboxes into the right directory in the game editor.
That makes great sense on placing the tex relative to its place in the map, that way it works for texturing levels. I placed my cube dead centre, ill try with its edge on the centre and see what happens with that.
just tried it, yep, placement affects how the texture is placed, when I put the same texture on all 4 sides it doesnt have any spaces on the edges, its only when one places different ones we get the spaces, it must be that texture blending thing someone mentioned
is it not possible to have different images for a skybox? what if I gave it all the same image so it was mapped OK, then I loaded it say in Deep explorere and changed some of the images, would it still not work I wonder? _________________ http://www.avantivita.com - Home of OOTB skyboxes |
|
Back to top |
|
|
trucker2000 DeleD PRO user
Joined: 11 May 2005 Posts: 1839 Location: Sacramento, California
|
Posted: Sat Jul 21, 2007 5:29 pm Post subject: |
|
|
I'm no expert, but have you tried applying a black (or whatever color you want) to the whole cube, then putting your sky texture on the face?
This way, you could swap out the textures with whatever texture you wanted in your game engine and it would all use the same UV mappings.
Edit to add: This works for the most part. My textures aren't in the right places, but here you can see very little of the seems.
This is a box subtracted from the inside of a box with 6 different sky textures (for another skybox) applied. _________________ Some day I will grow up and be a real modeler.
"Never give up! Never surrender!!"
Sys specs:
asus
8 gigs ram
Invidia gtx560 video card
Windows 8 (worst op sys Ever) |
|
Back to top |
|
|
Fallen Member
Joined: 24 Mar 2007 Posts: 40
|
Posted: Sat Jul 21, 2007 7:35 pm Post subject: |
|
|
I tried that, It didnt work, still seams.
I put the same tex on all sides, then put it in another program to change the sides to the skybox, and it shows seams.
How this works witb delgines texturing is very odd indeed, forms no use to do things to my eyes, whats wrong with just having a tex cover a suface, whats with seams and wrapping, just stick the tex on and thats it.
I found a box another modeller made so I am using that one in a model covertor program, would be nice if we could use delgine without the seam thing though. _________________ http://www.avantivita.com - Home of OOTB skyboxes |
|
Back to top |
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|