Jump to content


Photo

D3d strange effect


  • Please log in to reply
7 replies to this topic

#1 lollolc

lollolc

    GMC Member

  • GMC Member
  • 94 posts
  • Version:GM8

Posted 09 May 2012 - 06:44 PM

Hello guys.
D3d strange effect.
I used this:
d3d_model_vertex_normal_texture
I want to simulate radio controlled car game.
Camera:
d3d_set_projection(room_width/2,room_height/1,250,car.x,car.y,car.z,0,0,1)
Please note image: http://imageshack.us...mmagineugg.jpg/
If the vehicle acquires greater distance from the camera the strange effect grows.
Help?
  • 0

#2 icuurd12b42

icuurd12b42

    Self Formed Sentient

  • Global Moderators
  • 14395 posts
  • Version:GM:Studio

Posted 09 May 2012 - 07:28 PM

first off, you need to know if these facets are inverted. it happens quite often, they may face towards the inside of the model, sort of like if you would cut out a piece of your skin and flipped it and stitched it back inside out.

GMModelFix in my tools should allow you to examine the model closely. With culling ON these would disappear.

After eliminating any model issues, like inverted facets. generate proper lighting normals in the tool. use a smooth method to prevent drastic color changes.

Also your model should be large enough to limit z buffer confusion . Where (pixel of) elements are sorted and excluded during the draw process. if too small, the drawing may get into a state where it cannot determine what should be behind what. The effect is compounded if the color difference is drastic, like for inverted facets with lighting, the facet would be black (if culling is OFF the facet shows but the lighting is black 'cause the light is behind the facet) and so you see black and color fuzz at that spot.

The other part is the near far value of projection_ext can be tweaked to reduce the effect. and in GM8.1 there is an option to limit this as well but I forgot what it is.
  • 0

#3 lollolc

lollolc

    GMC Member

  • GMC Member
  • 94 posts
  • Version:GM8

Posted 10 May 2012 - 06:55 AM

first off, you need to know if these facets are inverted. it happens quite often, they may face towards the inside of the model, sort of like if you would cut out a piece of your skin and flipped it and stitched it back inside out.

GMModelFix in my tools should allow you to examine the model closely. With culling ON these would disappear.

After eliminating any model issues, like inverted facets. generate proper lighting normals in the tool. use a smooth method to prevent drastic color changes.

Also your model should be large enough to limit z buffer confusion . Where (pixel of) elements are sorted and excluded during the draw process. if too small, the drawing may get into a state where it cannot determine what should be behind what. The effect is compounded if the color difference is drastic, like for inverted facets with lighting, the facet would be black (if culling is OFF the facet shows but the lighting is black 'cause the light is behind the facet) and so you see black and color fuzz at that spot.

The other part is the near far value of projection_ext can be tweaked to reduce the effect. and in GM8.1 there is an option to limit this as well but I forgot what it is.


In fact I had to adjust the faces of the drawing so black.
The design is definitely small.
Are not yet practical 3d and d3d, so I drew little for fear of overloading Game Maker.
I still have to learn to get the textures in d3d, I tried but I can not get good result.
Learn how to draw 3d was easy, but hard to put texture.
I downloaded Gmmodelfix.
Thanks again for your attention.
I will not bother you, but if you want to teach you something about the texture and where to find them?
  • 0

#4 icuurd12b42

icuurd12b42

    Self Formed Sentient

  • Global Moderators
  • 14395 posts
  • Version:GM:Studio

Posted 10 May 2012 - 07:22 AM

The GMModelfix topic explains the basic for uv mapping using UV Mapper. There are staff picked tutorials on the subject in the tutorial sections

>>In fact I had to adjust the faces of the drawing so black.

so you fixed the model then. good.
  • 0

#5 lollolc

lollolc

    GMC Member

  • GMC Member
  • 94 posts
  • Version:GM8

Posted 10 May 2012 - 12:43 PM

The GMModelfix topic explains the basic for uv mapping using UV Mapper. There are staff picked tutorials on the subject in the tutorial sections

>>In fact I had to adjust the faces of the drawing so black.

so you fixed the model then. good.


GMModelFix save only in d3d.
When you save in obj export d3d anyway.
UVMapper lines only creates confusion.
Help please?
  • 0

#6 icuurd12b42

icuurd12b42

    Self Formed Sentient

  • Global Moderators
  • 14395 posts
  • Version:GM:Studio

Posted 10 May 2012 - 03:08 PM

GMModelFix save only in d3d.
When you save in obj export d3d anyway.
UVMapper lines only creates confusion.
Help please?



Use the little gift icon to make a gml scrip package if you really want code instead of d3d file.

Use UVMapper first on the obj file though. choose a method that is less confusing to you, there are many ways in UVmapper to map the texture.

Do you have an obj file? Where is your model from, I am assuming you have a obj file.
  • 0

#7 lollolc

lollolc

    GMC Member

  • GMC Member
  • 94 posts
  • Version:GM8

Posted 10 May 2012 - 03:54 PM



GMModelFix save only in d3d.
When you save in obj export d3d anyway.
UVMapper lines only creates confusion.
Help please?



Use the little gift icon to make a gml scrip package if you really want code instead of d3d file.

Use UVMapper first on the obj file though. choose a method that is less confusing to you, there are many ways in UVmapper to map the texture.

Do you have an obj file? Where is your model from, I am assuming you have a obj file.


I understand.
Thank you again.
Yes I own obj files.
I use UVMapper classic.
UVMapper classic creates accurate, but the faces have accumulated between them.
I manually adjust these faces, the texture will be fine anyway?
In this moment I lost my job and I have no money to buy UVMapper pro.
-------------------------------------------------------------------------------------------------------------------------------------------------
Now I have solved.
There is another problem.
If you load the texture, it is not homogeneous

Edited by lollolc, 10 May 2012 - 05:41 PM.

  • 0

#8 Sharp Pixel Games

Sharp Pixel Games

    GMC Member

  • New Member
  • 8 posts
  • Version:GM8

Posted 13 May 2012 - 10:10 AM

You say " I still have to learn to get the textures in d3d, I tried but I can not get good result "

I've got a BASIC code for .D3D textures.

d3d_model_draw(d3d_model_load(Models,"Tree1.d3d"),x,y,z,sprite_get_texture("txt_Tree_1",image_index))

Hopes it helps.

- Sam Kennedy
  • 0




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users