Jump to content
  • Advertisement
Sign in to follow this  
Happy SDE

Non-manual Texture positions addition.

This topic is 905 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

I have several hundred geometry objects with different shapes.

Each of the objects have per-vertex attributes: Position and Normal.

 

I would like to use several bump textures to add some scratches on each object.

But I don’t have an artist to perform that task. I am not an artist also =(

 

Scale of the objects is pretty the same: maximum length difference is about 20 times.

It seems for me it is a good idea somehow to add texture information for each vertex in automatic (programmatic) way.

So if I have a cube 1x1x1 cm, I would like to stretch 1x1 texture on each side.

For a sphere with radius 2, I would like to use the same texture with same proportion ratios: stretches of the material should be look in the same scale.

Overall vertices of all objects is about 1.000.000.

 

The question is:

How to automate this process: use some already built software/plugin for 3DS Max/write own code?

Is there an algorithm for this in a case if I should write my own code?

 

Thanks in advance.

Share this post


Link to post
Share on other sites
Advertisement

Writing an algorithm to automatically unwrap spheres or other types of geometry into a uv space is not going to be easy, especially if you don't understand the concepts. I highly suggest opening a modeling tool (Blender is free) and doing some quick unwrapping to see how people do it. For 100 simple objects, it shouldn't take long. A cube and a sphere can be done in about 10 seconds each if you know how to unwrap properly.

Share this post


Link to post
Share on other sites
dpadam450, on 31 Dec 2015 - 06:46 AM, said:

Writing an algorithm to automatically unwrap spheres or other types of geometry into a uv space is not going to be easy, especially if you don't understand the concepts. I highly suggest opening a modeling tool (Blender is free) and doing some quick unwrapping to see how people do it. For 100 simple objects, it shouldn't take long. A cube and a sphere can be done in about 10 seconds each if you know how to unwrap properly.

Unfortunately, it is not an option for me: all my meshes are automatically generated.

Next time when input parameters in my pipeline will change, I will need to redo all unwrapping again.

 

I would like to avoid each time unwrap geometries manually (even if I will diff via git changes in meshes to find out what meshes were changed).

 

Any other ideas? =)

Edited by Happy SDE

Share this post


Link to post
Share on other sites

"all my meshes are automatically generated."

 

In what sense? Surely they can't be purely random vertices to make some globs. Can you post an image of a bunch of these generated objects? You can always write an unwrapper that will unwrap 3D meshes. How good will it be depends on what your goal is. I don't know what it is called in other tools, but Blender uses one called Unwrap Smart Projections, which is probably the best method you could use given any 3D mesh. I don't know all the inner details of the algorithm, but I have an idea.

Edited by dpadam450

Share this post


Link to post
Share on other sites
dpadam450, on 02 Jan 2016 - 10:26 AM, said:

"all my meshes are automatically generated."

 

In what sense? Surely they can't be purely random vertices to make some globs. Can you post an image of a bunch of these generated objects? You can always write an unwrapper that will unwrap 3D meshes. How good will it be depends on what your goal is. I don't know what it is called in other tools, but Blender uses one called Unwrap Smart Projections, which is probably the best method you could use given any 3D mesh. I don't know all the inner details of the algorithm, but I have an idea.

Thank you, dpadam450!

 

It seems that algorithm is here:

http://wiki.blender.org/index.php/Extensions:2.4/Py/Scripts/UV/UV_Calculate/Unwrap_smart_projections

Will try to use it soon.

 

A sample of a mesh I use you can find here: http://www.gamedev.net/topic/674333-deferred-rendering-questions/

Edited by Happy SDE

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!