Jump to content
  • Advertisement
Sign in to follow this  
Bekos

Generating 3D textures of bone and flesh material.

This topic is 2709 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hello all! :)

I want somehow to generate some repeatable (in all three axes) 3D textures of: bone, flesh and teeth material. (although the bone is more important, I might not use 3D textures for flesh and teeth in the final application). The desired depth size of the 3D texture is nothing less than 32. The problem is that I have no idea how to do that! :)

What I want to do is to texture map a plane that moves(rotates and translates) inside a volume.

Generating a random 3D texture is easy by using some 3D perlin noise. But I can't think a way to generate a "bone-ish" or "flesh-ish" 3D texture.

One idea is following:
* Create a single bone material 2D texture.
* Generate a 3D perlin noise texture.
Inside the fragment shader:
* Sample the 3D texture and the some x,y,x values.
* Change the x and y sampling coordinates of the 2D texture based on the previously sampled values from the 3D texture.
* Map the 2D texture on the plane using the new changed sampling coordinates
* Now the 2D texture looks distorted and will look different every time I sample a different slice of the 3D perlin noise texture.

But I am not sure if this is going to work and look nice.

Do you have any other ideas/suggestions about how should I do this?

Thanks in advance.

Cheers

Share this post


Link to post
Share on other sites
Advertisement
On a large scale, flesh is nearly homogeneous other than the fatty layer under the skin. You don't even really need a 3D texture here in my opinion. As for bone, it is porous near the centre, so just insert randomized bubbles away from the walls of the bone.
For more complicated features, geometry-dependent texture generation that preserves some feature constraints is an active and complex research topic in the computer graphics community, so you'd need to refer to various SIGGRAPH papers etc. I'd go with the simple route as above, unless you need to allow closeups showing detail.



Hello all! :)

I want somehow to generate some repeatable (in all three axes) 3D textures of: bone, flesh and teeth material. (although the bone is more important, I might not use 3D textures for flesh and teeth in the final application). The desired depth size of the 3D texture is nothing less than 32. The problem is that I have no idea how to do that! :)

What I want to do is to texture map a plane that moves(rotates and translates) inside a volume.

Generating a random 3D texture is easy by using some 3D perlin noise. But I can't think a way to generate a "bone-ish" or "flesh-ish" 3D texture.

One idea is following:
* Create a single bone material 2D texture.
* Generate a 3D perlin noise texture.
Inside the fragment shader:
* Sample the 3D texture and the some x,y,x values.
* Change the x and y sampling coordinates of the 2D texture based on the previously sampled values from the 3D texture.
* Map the 2D texture on the plane using the new changed sampling coordinates
* Now the 2D texture looks distorted and will look different every time I sample a different slice of the 3D perlin noise texture.

But I am not sure if this is going to work and look nice.

Do you have any other ideas/suggestions about how should I do this?

Thanks in advance.

Cheers

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!